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