Blob


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