From 46c07db296c992ac65d73799f308b536674edc93 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Wed, 12 Sep 2012 15:40:13 +0100 Subject: Fixes from walkthrough --- Makefile | 8 ++++++++ gitano-admin/global-hooks/post-receive.lua | 2 +- gitano-admin/rules/createrepo.lace | 5 ++++- units/git-daemon.service | 6 ++++++ 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 Makefile create mode 100644 units/git-daemon.service diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0374936 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +install: + mkdir -p "${DESTDIR}/usr/share/gitano/skel" + cp -a gitano-admin "${DESTDIR}/usr/share/gitano/skel" + mkdir -p "${DESTDIR}/usr/lib/systemd/system/multiuser-target.wants" + cp units/* "${DESTDIR}/usr/lib/systemd/system" + for I in $$(cd units; ls); do \ + ln -sf ../$$I "${DESTDIR}/usr/lib/systemd/system/multiuser-target.wants/$I"; \ + done diff --git a/gitano-admin/global-hooks/post-receive.lua b/gitano-admin/global-hooks/post-receive.lua index 679cfa8..d1b3864 100644 --- a/gitano-admin/global-hooks/post-receive.lua +++ b/gitano-admin/global-hooks/post-receive.lua @@ -47,7 +47,7 @@ if notify_mason and repo.name ~= "gitano-admin" then for i = 1, #urlbases do local comma = (i==#urlbases) and "" or "," - _(("%q,"):format(urlbases[i] .. repo.name) + _(("%q,"):format(urlbases[i] .. repo.name)) _(("%q%s"):format(urlbases[i] .. repo.name .. ".git", comma)) end diff --git a/gitano-admin/rules/createrepo.lace b/gitano-admin/rules/createrepo.lace index 045d7e7..27583ae 100644 --- a/gitano-admin/rules/createrepo.lace +++ b/gitano-admin/rules/createrepo.lace @@ -14,7 +14,10 @@ ##PEOPLE_COMMENT##allow "Personal repo creation is okay" repo_is_personal # Allow people in *-admins to create repositories under -allow "Project admins may make project repositories" repo_has_project_code project_admin +allow "Project admins may make project repositories" repo_is_local_project project_admin + +# Allow lorry to create repositories anywhere but the local project root +allow "Lorry may create repositories anywhere but the local root" !repo_is_local_project is_lorry # Otherwise the default is that non-admins can't create repositories deny "Repository creation is not permitted." diff --git a/units/git-daemon.service b/units/git-daemon.service new file mode 100644 index 0000000..2a76f88 --- /dev/null +++ b/units/git-daemon.service @@ -0,0 +1,6 @@ +[Unit] +Description=Git Daemon for Trove +After=network.target + +[Service] +ExecStart=/usr/bin/git daemon --base-path=/home/git/repos --reuseaddr --user=git --group=git /home/git/repos -- cgit v1.2.1