Commits
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
include sha2.h too where sha1.h is included
In preparation for wide sha256 support; stsp@ agrees. Change done
mechanically with
find . -iname \*.[cy] -exec sam {} +
X ,x/<sha1\.h>/i/\n#include <sha2.h>
- Commit:
f0f17247c9c6cf1f6f2adcf1f1e279b03403b6ea
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
reduce max amount of tags stored in object cache to avoid high memory usage
- Commit:
13b2bc374c1870ec27b2eeb40efe68fd465f64bb
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
introduce gotd(8), a Git repository server reachable via ssh(1)
This is an initial barebones implementation which provides the absolute
minimum of functionality required to serve got(1) and git(1) clients.
Basic fetch/send functionality has been tested and seems to work here,
but this server is not yet expected to be stable.
More testing is welcome. See the man pages for setup instructions.
The current design uses one reader and one writer process per repository,
which will have to be extended to N readers and N writers in the future.
At startup, each process will chroot(2) into its assigned repository.
This works because gotd(8) can only be started as root, and will then
fork+exec, chroot, and privdrop.
At present the parent process runs with the following pledge(2) promises:
"stdio rpath wpath cpath proc getpw sendfd recvfd fattr flock unix unveil"
The parent is the only process able to modify the repository in a way
that becomes visible to Git clients. The parent uses unveil(2) to
restrict its view of the filesystem to /tmp and the repositories
listed in the configuration file gotd.conf(5).
Per-repository chroot(2) processes use "stdio rpath sendfd recvfd".
The writer defers to the parent for modifying references in the
repository to point at newly uploaded commits. The reader is fine
without such help, because Git repositories can be read without
having to create any lock-files.
gotd(8) requires a dedicated user ID, which should own repositories
on the filesystem, and a separate secondary group, which should not
have filesystem-level repository access, and must be allowed access
to the gotd(8) socket.
To obtain Git repository access, users must be members of this
secondary group, and must have their login shell set to gotsh(1).
gotsh(1) connects to the gotd(8) socket and speaks Git-protocol
towards the client on the other end of the SSH connection.
gotsh(1) is not an interactive command shell.
At present, authenticated clients are granted read/write access to
all repositories and all references (except for the "refs/got/" and
the "refs/remotes/" namespaces, which are already being protected
from modification).
While complicated access control mechanism are not a design goal,
making it possible to safely offer anonymous Git repository access
over ssh(1) is on the road map.
- Commit:
54a0941e2bddd450b0797100b3218423b940f833
- From:
- Omar Polo <op@omarpolo.com>
- Date:
release the memory used by the object cache
Leak spotted by valgrind. ok stsp@
- Commit:
a97a5e436f0c35f5f40df274a89fd20be2d63801
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix NULL deref in the object cache debug code; ok stsp@
it's not in code compiled by default as it's under GOT_OBJ_CACHE_DEBUG.
- Commit:
977259281baa8a7a2776eefc691db02976cae993
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
keep track of the size of the largest object which entered an object cache
- Commit:
98275f2eefb932aee3f1824f53c268fd736f6c5f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
mark check_refcount as static
needed because of -Wmissig-prototypes; ok stsp@
- Commit:
977143974aa7ea0d5df19a556344adf0880276c1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
object cache: if kicking an object out to make space, reuse its mem allocation
- Commit:
336075a42a5ae0fa322db734c481d21998e82bb8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
build with -Wmissing-prototypes
ok stsp@
- Commit:
d7b5a0e827bb38e5c8502f0ba8d7838fedaba19b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
inline struct got_object_id in struct got_object_qid
Saves us from doing a malloc/free call for every item on the list.
ok op@
- Commit:
c0df59665de91324eeab1808c6c4e41343f21789
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
wrap overlong lines
- Commit:
d3c116bf7268bde4ceb3311eb4ed995fc4776487
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
cache raw objects in order to speed up gotadmin pack
- Commit:
dbdddfee1482b50ca8c4a0be06e4fec6a59fb9f4
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
switch from SIMPLEQ to equivalent STAILQ macros
The singly-linked tail queue macros were added to OpenBSD 6.9 and
are more widely available on other systems.
ok stsp
- Commit:
f73df793baa4ec89bcbfb0fddb9765c4187defc8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
increase tag cache size; makes tog more responsive when many tags exist
- Commit:
56e0773df7e12fc69c1f6f9d171c93fd78a13d0e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
convert tree entries from SIMPLEQ to an array
- Commit:
5f25cc858267bf6a334ed243cd4ceaa4bcb851d6
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove obj->path_packfile which is unused nowadays; saves a few free() calls
- Commit:
42c69117cce2e1658d5b5aabbc383ce7252cf167
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
stop storing decompressed delta data in struct got_delta; fetch it on demand
- Commit:
a0de39f3978b1d152679279d6e2f82d573e81209
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix build on OpenBSD/sparc64 (gcc)
- Commit:
79c99a64af2fcd11a3c60a54f989167ef4a72310
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
don't leak objects which can't be cached
- Commit:
01cd76145e99ea71ca66e60e659e21237b1240e6
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add cache debug output for too large elements
- Commit:
a60c9e772e2560a97c782a5dbe5269e6c5ad9d1f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
don't cache objects larger than 1MB
- Commit:
2ee32b237b2ca32a44543f7e32f3d1b2757115b8
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix build with -DGOT_OBJ_CACHE_DEBUG
- Commit:
638f9024045bbe2420143f8868dcc484c231c634
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rename got_error_prefix_errno() to got_error_from_errno()
- Commit:
230a42bdc60c6136d2a5ce65bf1a2f26d990c096
- From:
- joshua stein <jcs@jcs.org>
- Date:
got_error_from_errno -> got_error_prefix_errno
also add got_error_prefix_errno2 and got_error_prefix_errno3 which
should hopefully all be merged into a single function with variadic
args (but can't alloc mem)
- Commit:
f4a881ce8b200e5283247799c39abd2b578b8e75
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
more support for tag objects; new code is not yet reachable