gitreef

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit a7883ffaf102c7da56bf2da91af8ebaa127c555c
parent 2bea7e379a4c837a5d127d81bfe7f2ffe973f572
Author: Matthias Jaros <jaros@mailbox.org>
Date:   Mon, 27 Oct 2025 17:41:35 +0100

Updated VERSION handling and added LICENSE file to docker image

Diffstat:
MDockerfile | 11+++++++++++
Msrc/env | 1+
Msrc/init | 14++++++++++----
3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile @@ -20,3 +20,13 @@ RUN chmod 755 /usr/local/bin/git-run COPY src/version /usr/local/bin/ ENTRYPOINT ["/usr/local/bin/init"] + +# license information +LABEL org.opencontainers.image.licenses="GPL-3.0-or-later" +LABEL org.opencontainers.image.authors="Matthias Jaros" +LABEL org.opencontainers.image.source="https://github.com/youruser/yourrepo" +LABEL org.opencontainers.image.url="https://github.com/youruser/yourrepo" +LABEL org.opencontainers.image.title="git-server" +LABEL org.opencontainers.image.description="A minimal, secure Git server using SSH and Fish." +LABEL org.opencontainers.image.documentation="/usr/share/doc/git-server/LICENSE" +COPY LICENSE /usr/share/doc/git-server/LICENSE +\ No newline at end of file diff --git a/src/env b/src/env @@ -6,3 +6,4 @@ set _GIT_VALIDATION_REGEX "^(git-(?:upload-pack|receive-pack|upload-archive)) '$ set _GIT_SUDO_GROUP gitsudo set _LOG /var/log/git-run set _PERMISSIONS r w +set _VERSION (cat (dirname (status --current-filename))/version) diff --git a/src/init b/src/init @@ -2,7 +2,6 @@ # load environment source (dirname (status --current-filename))/env -set VERSION (cat (dirname (status --current-filename))/version) # # @@ -108,7 +107,7 @@ end # # -argparse 'g/git-uid=?' 'u/user=+' 'r/repo=+' 'h/help' -- $argv +argparse 'g/git-uid=?' 'u/user=+' 'r/repo=+' 'h/help' 'v/version' -- $argv or exit 1; if set -q _flag_h @@ -118,11 +117,17 @@ if set -q _flag_h echo -e "\t -h, --help \t\t Display this page" echo -e "\t -g, --git-uid \t\t UID of the git user that is used also as ownership for all repos" echo -e "\t -u, --user \t\t User setting in form of <user-name>:<public-key>" - echo -e "\t -r, --repo \t\t Repo setting in form of <repo-path>:<allowed-user1>. You can add as many users as you want. Currently if a user is allowed he has all permissions read/write" + echo -e "\t -r, --repo \t\t Repo setting in form of <repo-path>;<user>:<perm>[;<user2>:<perm>;...]. You can add as many users as you want. If you do not specify a user for a repo, that user does not have access to it. If you specify a user without permission, the default fallback is read only." + echo -e "\t -v, --version \t\t Version" echo -e "" return end +if set -q _flag_v + echo -e "$_VERSION" + return +end + function showBanner echo echo ' @@ -134,7 +139,8 @@ function showBanner |___/ ' echo - echo Version $VERSION Copyright Matthias Jaros 2025 + echo Copyright Matthias Jaros 2025 + echo This software is licensed under GPLv3. See /usr/share/doc/git-server/LICENSE echo end