Blame


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