Blame


1 00ced238 2021-09-24 thomas README.portable
2 00ced238 2021-09-24 thomas ===============
3 00ced238 2021-09-24 thomas
4 00ced238 2021-09-24 thomas **NOTE: This repository is read-only and is used only to mirror the
5 00ced238 2021-09-24 thomas got-portable repository for CI purposes.**
6 00ced238 2021-09-24 thomas
7 00ced238 2021-09-24 thomas This is the portable version of got[1] (Game of Trees), using autotools to
8 e499844e 2022-03-03 thomas provide the library checks required for GoT's dependencies.
9 00ced238 2021-09-24 thomas
10 e499844e 2022-03-03 thomas The following operating systems are supported:
11 00ced238 2021-09-24 thomas
12 e499844e 2022-03-03 thomas * FreeBSD
13 e499844e 2022-03-03 thomas * NetBSD
14 b26177ad 2022-03-03 thomas * DragonFlyBSD
15 e499844e 2022-03-03 thomas * MacOS
16 e499844e 2022-03-03 thomas * Linux
17 e499844e 2022-03-03 thomas
18 00ced238 2021-09-24 thomas DEPENDENCIES
19 00ced238 2021-09-24 thomas ============
20 00ced238 2021-09-24 thomas
21 e499844e 2022-03-03 thomas Linux:
22 00ced238 2021-09-24 thomas
23 00ced238 2021-09-24 thomas * `libncurses` (for tog(1))
24 bd1cad3c 2022-04-30 thomas * `libbsd` (BSD's arc4random routines)
25 5007bd0d 2023-04-14 thomas * `libmd` (SHA256 routines)
26 00ced238 2021-09-24 thomas * `libuuid` (for UUID generation)
27 00ced238 2021-09-24 thomas * `libz` (for Z compression)
28 00ced238 2021-09-24 thomas * `pkg-config` (for searching libraries)
29 ebc794c1 2021-10-20 thomas * `bison` (for configuration file grammar)
30 00ced238 2021-09-24 thomas
31 e499844e 2022-03-03 thomas FreeBSD:
32 e499844e 2022-03-03 thomas
33 e499844e 2022-03-03 thomas * `automake`
34 e499844e 2022-03-03 thomas * `pkgconf`
35 20a7eac5 2023-03-03 thomas * `libevent` (for gotwebd)
36 e499844e 2022-03-03 thomas
37 e499844e 2022-03-03 thomas NetBSD:
38 e499844e 2022-03-03 thomas
39 e499844e 2022-03-03 thomas * `automake`
40 e499844e 2022-03-03 thomas * `libuuid`
41 e499844e 2022-03-03 thomas * `ncuresesw`
42 20a7eac5 2023-03-03 thomas * `libevent` (for gotwebd)
43 e499844e 2022-03-03 thomas
44 b26177ad 2022-03-03 thomas DragonFlyBSD:
45 b26177ad 2022-03-03 thomas
46 b26177ad 2022-03-03 thomas * `automake`
47 b26177ad 2022-03-03 thomas * `pkgconf`
48 b26177ad 2022-03-03 thomas * `openssl`
49 20a7eac5 2023-03-03 thomas * `libevent` (for gotwebd)
50 b26177ad 2022-03-03 thomas
51 e499844e 2022-03-03 thomas Darwin (MacOS):
52 e499844e 2022-03-03 thomas
53 e499844e 2022-03-03 thomas * `automake`
54 e499844e 2022-03-03 thomas * `bison`
55 e499844e 2022-03-03 thomas * `pkg-config`
56 e499844e 2022-03-03 thomas * `ncurses`
57 e499844e 2022-03-03 thomas * `openssl`
58 e499844e 2022-03-03 thomas * `ossp-uuid`
59 20a7eac5 2023-03-03 thomas * `libevent` (for gotwebd)
60 e499844e 2022-03-03 thomas
61 00ced238 2021-09-24 thomas TESTS (REGRESS)
62 00ced238 2021-09-24 thomas ===============
63 00ced238 2021-09-24 thomas
64 00ced238 2021-09-24 thomas To run the test suite:
65 00ced238 2021-09-24 thomas
66 00ced238 2021-09-24 thomas ```
67 00ced238 2021-09-24 thomas $ make tests
68 00ced238 2021-09-24 thomas ```
69 00ced238 2021-09-24 thomas
70 5713faaf 2023-03-09 thomas Dependencies
71 5713faaf 2023-03-09 thomas ============
72 5713faaf 2023-03-09 thomas
73 5713faaf 2023-03-09 thomas * jot
74 5713faaf 2023-03-09 thomas * ed
75 5713faaf 2023-03-09 thomas
76 1317cd3a 2022-03-08 thomas NOTE: For Linux, you must have the jot(1) command which is typically in the
77 5713faaf 2023-03-09 thomas `athena-jot` package, or similar.
78 1317cd3a 2022-03-08 thomas
79 00ced238 2021-09-24 thomas NOTE: THIS ONLY WORKS AFTER `make install` DUE TO HOW PATHS TO LIBEXEC
80 00ced238 2021-09-24 thomas HELPERS ARE HARD-CODED INTO THE BINARIES.
81 00ced238 2021-09-24 thomas
82 00ced238 2021-09-24 thomas INSTALLATION
83 00ced238 2021-09-24 thomas ============
84 00ced238 2021-09-24 thomas
85 00ced238 2021-09-24 thomas ```
86 00ced238 2021-09-24 thomas $ ./autogen.sh
87 00ced238 2021-09-24 thomas $ ./configure && make
88 00ced238 2021-09-24 thomas $ sudo make install
89 00ced238 2021-09-24 thomas ```
90 00ced238 2021-09-24 thomas
91 00ced238 2021-09-24 thomas BRANCHES + SUBMITTING PATCHES
92 00ced238 2021-09-24 thomas =============================
93 00ced238 2021-09-24 thomas
94 00ced238 2021-09-24 thomas `got-portable` has two key branches:
95 00ced238 2021-09-24 thomas
96 00ced238 2021-09-24 thomas * `main` which tracks got upstream untainted.
97 04dafe6d 2023-03-10 thomas * `portable` which provides the portable version of GoT based from code on `main`
98 00ced238 2021-09-24 thomas
99 04dafe6d 2023-03-10 thomas Patches for portable code fixes should be based from the `portable` branch and
100 00ced238 2021-09-24 thomas sent to the mailing list for review [2] or sent to me directly (see CONTACT).
101 00ced238 2021-09-24 thomas
102 61702ba6 2022-07-19 thomas Portable-specific patches should have a shortlog in the form of:
103 61702ba6 2022-07-19 thomas
104 61702ba6 2022-07-19 thomas ```
105 61702ba6 2022-07-19 thomas portable: AREA: description
106 61702ba6 2022-07-19 thomas ```
107 61702ba6 2022-07-19 thomas
108 61702ba6 2022-07-19 thomas Where `AREA` relates to the change in question (for example, `regress`,
109 61702ba6 2022-07-19 thomas `libexec`, etc). In some cases, this can be omitted if it's a generic change.
110 61702ba6 2022-07-19 thomas
111 61702ba6 2022-07-19 thomas This helps to delineate `-portable` changes from upstream `got`.
112 61702ba6 2022-07-19 thomas
113 00ced238 2021-09-24 thomas The read-only Github repository also runs CI checks using Cirrus-CI on Linux
114 00ced238 2021-09-24 thomas and FreeBSD.
115 00ced238 2021-09-24 thomas
116 585fb430 2022-07-21 thomas SYNCING UPSTREAM CHANGES WITH PORTABLE
117 585fb430 2022-07-21 thomas ======================================
118 585fb430 2022-07-21 thomas
119 585fb430 2022-07-21 thomas The `-portable` GoT repository uses the following workflow:
120 585fb430 2022-07-21 thomas
121 585fb430 2022-07-21 thomas ```
122 585fb430 2022-07-21 thomas Github (gh) GoT (upstream)
123 585fb430 2022-07-21 thomas ^ ^
124 585fb430 2022-07-21 thomas | |
125 585fb430 2022-07-21 thomas | |
126 585fb430 2022-07-21 thomas | |
127 585fb430 2022-07-21 thomas | |
128 585fb430 2022-07-21 thomas +--------> GoT-portable <------+
129 585fb430 2022-07-21 thomas
130 585fb430 2022-07-21 thomas ```
131 585fb430 2022-07-21 thomas
132 585fb430 2022-07-21 thomas Here, `got-portable` is a clone of the `-portable` repository, locally on
133 585fb430 2022-07-21 thomas disk. There are two remotes set up within that repository, via `git-remote`:
134 585fb430 2022-07-21 thomas
135 585fb430 2022-07-21 thomas * `upstream` -- which points to the official GoT repository;
136 585fb430 2022-07-21 thomas * `gh` -- which points to the mirrored `-portable` repository so that CI can
137 585fb430 2022-07-21 thomas be run for cross-platform/test purposes [3]
138 585fb430 2022-07-21 thomas * `origin` -- our cloned copy from `-portable`
139 585fb430 2022-07-21 thomas
140 585fb430 2022-07-21 thomas Within the `-portable` repository are two key branches (there may be other
141 585fb430 2022-07-21 thomas topic branches which represent on-going work):
142 585fb430 2022-07-21 thomas
143 585fb430 2022-07-21 thomas * `main` -- this is the branch that tracks (without modification) those
144 585fb430 2022-07-21 thomas changes from `upstream`. This branch is continually reset to
145 585fb430 2022-07-21 thomas `upstream/main` whenever changes occur.
146 585fb430 2022-07-21 thomas
147 04dafe6d 2023-03-10 thomas * `portable` -- this is the *default* branch of the `-portable` repository which
148 585fb430 2022-07-21 thomas contains portable-specific changes to make `GoT` compile across different
149 585fb430 2022-07-21 thomas OSes.
150 585fb430 2022-07-21 thomas
151 585fb430 2022-07-21 thomas When updating `-portable` from upstream changes, the following actions happen:
152 585fb430 2022-07-21 thomas
153 585fb430 2022-07-21 thomas 1. Changes from `upstream` are fetched. If there are no new changes, there's
154 585fb430 2022-07-21 thomas nothing else to do.
155 585fb430 2022-07-21 thomas 2. Changes from `gh` are fetch so that the result can be pushed out to `gh`.
156 585fb430 2022-07-21 thomas 3. The difference between the local copy of `main` and `origin/main` is used
157 585fb430 2022-07-21 thomas to represent the set of commits which have *NOT* yet been merged to
158 585fb430 2022-07-21 thomas `-portable`.
159 04dafe6d 2023-03-10 thomas 4. A topic-branch called `syncup` is created from the HEAD of the `portable`
160 585fb430 2022-07-21 thomas branch to hold the to-be-cherry-picked commits from step 3.
161 585fb430 2022-07-21 thomas 5. These commits are then cherry-picked to the `syncup` branch.
162 585fb430 2022-07-21 thomas 6. If there's any conflicts, they must be resolved.
163 585fb430 2022-07-21 thomas 7. Once done, a sanity build is done in-situ to check there's nothing amiss.
164 04dafe6d 2023-03-10 thomas 8. If that succeeds, the `syncup` branch is merged to `portable` and pushed to
165 585fb430 2022-07-21 thomas `gh` for verification against CI.
166 585fb430 2022-07-21 thomas 9. If that fails, fixes continue and pushed up to `gh` as required.
167 04dafe6d 2023-03-10 thomas 10. Once happy, both the `main` and `portable` branches can be merged to `origin`.
168 585fb430 2022-07-21 thomas
169 585fb430 2022-07-21 thomas These steps are encapsulated in a script within `-portable`. [Link](../maintscripts/sync-upstream.sh)
170 585fb430 2022-07-21 thomas
171 ce0dfd3b 2022-07-21 thomas RELEASING A NEW VERSION
172 ce0dfd3b 2022-07-21 thomas =======================
173 ce0dfd3b 2022-07-21 thomas
174 ce0dfd3b 2022-07-21 thomas Release for `-portable` try and align as close to upstream GoT as much as
175 ce0dfd3b 2022-07-21 thomas possible, even on the same day where that can happen. That being said,
176 ce0dfd3b 2022-07-21 thomas sometimes a release of `-portable` might happen outside of that cadence, where
177 ce0dfd3b 2022-07-21 thomas a `-portable`-specific issue needs addressing, for example.
178 ce0dfd3b 2022-07-21 thomas
179 ce0dfd3b 2022-07-21 thomas Before creating a new release, check the version of GoT as found in
180 598139dd 2022-07-22 thomas `util/got-portable-ver.sh` -- as `GOT_PORTABLE_VER`:
181 ce0dfd3b 2022-07-21 thomas
182 ce0dfd3b 2022-07-21 thomas ```
183 598139dd 2022-07-22 thomas GOT_PORTABLE_VER=0.75
184 ce0dfd3b 2022-07-21 thomas
185 ce0dfd3b 2022-07-21 thomas ```
186 ce0dfd3b 2022-07-21 thomas
187 ce0dfd3b 2022-07-21 thomas Here, the *to be released* version of `got-portable` will be `0.75`.
188 ce0dfd3b 2022-07-21 thomas Typically, this version is incremented directly after a release, such that
189 ce0dfd3b 2022-07-21 thomas there's no need to change this value. The only exception would be if there
190 ce0dfd3b 2022-07-21 thomas were an out-of-band release to `-portable`. In such cases, that would take
191 ce0dfd3b 2022-07-21 thomas the form:
192 ce0dfd3b 2022-07-21 thomas
193 ce0dfd3b 2022-07-21 thomas ```
194 529beb87 2022-09-23 thomas 0.75.1
195 ce0dfd3b 2022-07-21 thomas ```
196 ce0dfd3b 2022-07-21 thomas
197 529beb87 2022-09-23 thomas Where the suffix of `1`, `2`, etc., can be used to denote any sub-releases
198 ce0dfd3b 2022-07-21 thomas from the `0.75` version.
199 ce0dfd3b 2022-07-21 thomas
200 05345ace 2022-09-10 thomas The variable `GOT_RELEASE` needs be changed to `yes` so that the
201 05345ace 2022-09-10 thomas GOT_PORTABLE_VER is asserted correctly.
202 05345ace 2022-09-10 thomas
203 04dafe6d 2023-03-10 thomas Once the version is verified, the following should be run from the `portable`
204 ce0dfd3b 2022-07-21 thomas branch -- and the repository should not have any outstanding modifications to
205 ce0dfd3b 2022-07-21 thomas the source:
206 ce0dfd3b 2022-07-21 thomas
207 ce0dfd3b 2022-07-21 thomas ```
208 ce0dfd3b 2022-07-21 thomas make clean ; ./autogen && ./configure && make distcheck
209 ce0dfd3b 2022-07-21 thomas ```
210 ce0dfd3b 2022-07-21 thomas
211 ce0dfd3b 2022-07-21 thomas If this succeeds, the tarball is in the CWD, as: `got-portable-VERSION.tar.gz`
212 ce0dfd3b 2022-07-21 thomas
213 ce0dfd3b 2022-07-21 thomas This can then be copied to the `got-www` repository and uploaded, along with
214 ce0dfd3b 2022-07-21 thomas changing a couple of HTML pages therein to represent the new released version.
215 ce0dfd3b 2022-07-21 thomas Additionally, the CHANGELOG file can be copied to the `got-www` and committed.
216 ce0dfd3b 2022-07-21 thomas
217 529beb87 2022-09-23 thomas Once all of that has been done, the repository should be tagged to indicate
218 529beb87 2022-09-23 thomas the release, hence:
219 529beb87 2022-09-23 thomas
220 529beb87 2022-09-23 thomas ```
221 529beb87 2022-09-23 thomas git tag -a 0.75
222 529beb87 2022-09-23 thomas ```
223 529beb87 2022-09-23 thomas
224 529beb87 2022-09-23 thomas This can then be pushed out to `gh` and `origin`.
225 529beb87 2022-09-23 thomas
226 529beb87 2022-09-23 thomas After that point, the version of `GOT_PORTABLE_VER` in
227 529beb87 2022-09-23 thomas `util/got-portable-ver.sh` should be changed to the next version, and
228 529beb87 2022-09-23 thomas `GOT_RELEASE` should be setg back to `no`.
229 529beb87 2022-09-23 thomas
230 00ced238 2021-09-24 thomas TODO
231 00ced238 2021-09-24 thomas ====
232 00ced238 2021-09-24 thomas
233 00ced238 2021-09-24 thomas This port is incomplete in that only got(1) and tog(1) have been ported.
234 00ced238 2021-09-24 thomas gotweb has yet to be ported.
235 00ced238 2021-09-24 thomas
236 00ced238 2021-09-24 thomas configure.ac should start defining AC_ENABLE arguments to allow for
237 00ced238 2021-09-24 thomas finer-grained control of where to search for includes/libraries, etc.
238 00ced238 2021-09-24 thomas
239 00ced238 2021-09-24 thomas CONTACT
240 00ced238 2021-09-24 thomas =======
241 00ced238 2021-09-24 thomas
242 585fb430 2022-07-21 thomas Thomas Adam <thomas@xteddy.org><br />
243 00ced238 2021-09-24 thomas thomas_adam (#gameoftrees on irc.libera.chat)
244 00ced238 2021-09-24 thomas
245 585fb430 2022-07-21 thomas [1] https://gameoftrees.org<br />
246 585fb430 2022-07-21 thomas [2] https://lists.openbsd.org/cgi-bin/mj_wwwusr?user=&passw=&func=lists-long-full&extra=gameoftrees<br />
247 585fb430 2022-07-21 thomas [3] https://github.com/ThomasAdam/got-portable