Blame


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