Commits
- Commit:
ba97b2d7ec97e54a025a39e04c0fd59fdd54a57b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add initial support for commit notifications to gotd(8)
At present only email notifications are implemented.
Code for HTTP notifications is not yet finished, hence HTTP-related
documentation remains hidden for now.
This adds a new 'notify' process which has an "exec" pledge. It runs
helper programs which implement the notification transport layer,
such as got-notify-email which speaks SMTP. This design avoids having
to link all of gotd with network libraries and related crypto libraries.
Notification content is generated by the 'repo_write' process. Commit log
messages and diffstats are written to a file which the 'notify' process
will pass on to its helpers on stdin. The default output looks similar
to 'got log -d'. If too many new commits are present the output looks
similar to 'got log -s' instead. Tags always look like 'got tag -l'.
The session process coordinates generation of notifications. It maintains
a notification queue which holds one notification per updated reference,
and passes notification requests from this queue to the 'repo_write'
process for notification content creation and then to the 'notify'
process for notification delivery.
Only one notification can be in flight at a time to avoid file descriptor
starvation if many references get updated in a single client session.
ok op@
- Commit:
4b3827cd43394b89d2af822dcd1d9a9179c1ee10
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make gitwrapper ignore 'permission denied' for repository paths
We recommend that gotsh users should not have direct filesystem
access to repositories served by gotd. Which means admins will be
setting things up as follows if public read-access should be denied:
chown _gotd /git
chmod 700 /git
su -m _gotd -c 'gotadmin init /git/repo.git"
However, gitwrapper would error out when repositories listed in
gotd.conf were inaccessible to the user invoking gitwrapper:
git-upload-pack: /etc/gotd.conf:2: realpath /git/repo.git: Permission denied
Make gitwrapper ignore such errors as they are expected in this situation.
While here, add a PROC_GITWRAPPER process ID for use as a global variable
parse.y can check while special-casing any specific behaviour required by
gitwrapper. (The worse alternative would have been adding a new global
variable to parse.y just to control the behaviour on realpath errors.)
ok op@
- Commit:
5157cdbbd3ec97ecd5f28ea9a39522b07a10bc8e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make gitwrapper not fail if programs it wants to run do not exist on disk
- Commit:
1eb3899277955a87d80eef900b6ea458ff73bd6c
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
significantly reduce the amount of code linked into gitwrapper
By moving got_serve_parse_command() from lib/serve.c into lib/dial.c
as got_dial_parse_command(), we can significantly reduce the amount
of symbols gitwrapper depends on indirectly.
As a downside, gotsh now needs to link to dial.c. But it only uses the
same parsing routine, and any other routines in dial.c would likely
cause pledge violations in gotsh if used.
No functional change.
- Commit:
e9e0377f452e9d3f600011e0714cc6c779f10bab
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
avoid gitwrapper printing a warning when /etc/gotd.conf does not exist
gotd still requires the config file, of course, but gitwrapper must
treat is as optional and remain silent if the file cannot be found.
- Commit:
c5d17ec881b7f4c35f151faa9d30ac436d812dc3
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gitwrapper: execl() directly without fork()ing
Since we're going to unconditionally execute gotsh or git-*-pack, don't
bother fork()ing and having the main process to wait(2), just execle()!
ok stsp@
- Commit:
33121ca5fbb746824ea01ae2f92e0200ab14207b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fmt
- Commit:
6c5befc77a38fbe198b99fe0564052ffc0f246a6
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
require gotsh to exist if the repository is listed in gotd.conf
ok op@
- Commit:
b09c127974759a56a6b5273da53d215f8500f5a7
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add gitwrapper(1)
ok op@, tracey@ earlier version