Blob


1 Game of Trees (Got) is a version control system which prioritizes ease
2 of use and simplicity over flexibility (https://gameoftrees.org)
4 Got is still under development; it is being developed exclusively
5 on OpenBSD and its target audience are OpenBSD developers. Got is
6 ISC-licensed and was designed with pledge(2) and unveil(2) in mind.
8 Got uses Git repositories to store versioned data. At present, Got
9 supports local version control operations only. Git can be used
10 for any functionality which has not yet been implemented in Got.
11 It will always remain possible to work with both Got and Git on
12 the same repository.
14 To compile the Got tool suite on OpenBSD, run:
16 $ make obj
17 $ make
18 $ make install
20 This will install the following commands:
22 got, the command line interface
23 tog, an ncurses-based interactive Git repository browser
24 several helper programs from the libexec directory
25 man pages (only installed if building sources from a Got release tarball)
27 A Got release tarball will install files under /usr/local by default.
28 A build started in Got's Git repository will install files under ~/bin.
30 Tests will pass only after 'make install' because they rely on installed
31 binaries in $PATH. Tests in the cmdline directory currently depend on git(1).
32 Tests which use the got clone, fetch, and send commands will fail if
33 'ssh 127.0.0.1' does not succeed non-interactively.
35 $ doas pkg_add git
36 $ make regress
38 To test with packed repositories, run:
40 $ make regress GOT_TEST_PACK=1
42 Because got unveils the /tmp directory by default using the /tmp directory
43 for test data can hide bugs. However, /tmp remains the default because
44 there is no better alternative that works out of the box. In order to
45 store test data in a directory other than /tmp, such as ~/got-test, run:
47 $ mkdir ~/got-test
48 $ make regress GOT_TEST_ROOT=~/got-test
50 Man page files in the Got source tree can be viewed with 'man -l':
52 $ man -l got/got.1
53 $ man -l got/git-repository.5
54 $ man -l got/got-worktree.5
55 $ man -l tog/tog.1
57 EXAMPLES in got.1 contains a quick-start guide for OpenBSD developers.
60 Game of Trees Web (Gotweb) is a CGI program which displays repository data
61 and is designed to work with httpd(8) and slowcgi(8). It requires the Kristaps
62 Dzonsons kcgi library, version 0.12.0 or greater.
64 To compile gotweb on OpenBSD, run:
66 # pkg_add kcgi
67 $ make web
68 # make web-install
70 This will create the following files:
71 the CGI program /var/www/cgi-bin/gotweb/gotweb
72 helper programs from the libexec directory in /var/www/cgi-bin/gotweb/libexec
73 several template files in /var/www/cgi-bin/gw_tmpl/
74 html, css, and image files in /var/www/htdocs/gotweb/
75 the directory /var/www/got/tmp/
76 man pages (only installed if building sources from a Got release tarball)
78 Documentation is available in manual pages:
80 $ man -l gotweb/gotweb.8
81 $ man -l gotweb/gotweb.conf.5
84 Got can be built with profiling enabled to debug performance issues.
85 Note that profiled builds cannot make use of pledge(2).
86 Profiling should only be enabled for one program at a time. Otherwise,
87 multiple programs will attempt to write to the 'gmon.out' file in the
88 current working directory.
90 For example, to compile got-read-pack with profiling enabled:
92 $ cd libexec/got-read-pack
93 $ make clean
94 $ make PROFILE=1
95 $ make install
97 Running any Got command which ends up using got-read-pack should now
98 produce the file 'gmon.out' in the current working directory.
99 The gprof2dot program can be used to generate a profile graph:
101 $ doas pkg_add gprof2dot graphviz
102 $ gprof ~/bin/got-read-pack gmon.out | gprof2dot | dot -T png > profile.png
104 As another example, to compile gotweb with profiling enabled:
106 $ cd gotweb
107 $ make clean
108 $ make PROFILE=1 gotweb
109 $ make # compile remaining gotweb binaries as usual
110 $ doas make install
111 $ doas chown www /var/www/cgi-bin/gotweb/
113 After loading a gotweb page in the browser, there should now
114 be a gmon.out file next to the gotweb binary:
116 $ ls -l /var/www/cgi-bin/gotweb/
117 total 6088
118 -rw-r--r-- 1 www daemon 427642 Jun 17 22:04 gmon.out
119 -rwxr-xr-x 1 www www 2630488 Jun 17 22:03 gotweb
120 drwxr-xr-x 2 root daemon 512 Jun 17 22:03 gw_tmpl
121 drwxr-xr-x 2 root daemon 512 Jun 17 22:03 libexec
124 Guidelines for reporting problems:
126 All problem/bug reports should include a reproduction recipe in form of a
127 shell script which starts out with an empty repository and runs a series of
128 Got and/or Git commands to trigger the problem, be it a crash or some other
129 undesirable behaviour.
131 The regress/cmdline directory contains plenty of example scripts.
132 An ideal reproduction recipe is written as an xfail ("expected failure")
133 regression test. For a real-world example of an xfail test, see commits
134 4866d0842a2b34812818685aaa31d3e0a966412d and
135 2b496619daecc1f25b1bc0c53e01685030dc2c74 in Got's history.
137 Please take this request very seriously; Ask for help with writing your
138 regression test before asking for your problem to be fixed. Time invested
139 in writing a regression test saves time wasted on back-and-forth discussion
140 about how the problem can be reproduced. A regression test will need to be
141 written in any case to verify a fix and prevent the problem from resurfacing.
143 It is also possible to write test cases in C. Various examples of this
144 exist in the regress/ directory. Most such tests are unit tests; it is
145 unlikely that a problem found during regular usage will require a test
146 to be written in C.
148 Some areas of code, such as the tog UI, are not covered by automated tests.
149 Please always try to find a way to trigger your problem via the command line
150 interface before reporting a problem without a written test case included.
151 If writing an automated test really turns out to be impossible, please
152 explain in very clear terms how the problem can be reproduced.
154 Mail problem reports to: gameoftrees@openbsd.org
157 Guidelines for submitting patches:
159 Mail patches to: gameoftrees@openbsd.org
160 Pull requests via any Git hosting sites will likely be overlooked.
161 Please keep the intended target audience in mind when contributing to Got.
164 Subscribing to the gameoftrees@openbsd.org mailing list:
166 The mailing list is used for patch reviews, bug reports, and user questions.
167 To subscribe, send mail to majordomo@openbsd.org with a message body of:
168 subscribe gameoftrees
170 See https://www.openbsd.org/mail.html for more information.