oops, patch contained cruft (the other patch from before), this one is clean.
sorry for the noise. -- Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern Email: [email protected] Internet: http://people.progress-technologies.net/~daniel.baumann/
>From 67e9cb6da504098e6b08820ceaa778be63ac0e80 Mon Sep 17 00:00:00 2001 From: Daniel Baumann <[email protected]> Date: Fri, 12 Aug 2011 15:38:24 +0200 Subject: [PATCH] Adding whitelist in default configuration (Closes: #637542). --- debian/gitalist-common.config | 3 +++ debian/gitalist-common.postinst | 4 ++++ debian/gitalist-common.templates | 12 ++++++++++++ debian/patches/series | 1 + debian/patches/whitelist.patch | 14 ++++++++++++++ debian/po/templates.pot | 29 ++++++++++++++++++++++++++--- 6 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 debian/patches/whitelist.patch diff --git a/debian/gitalist-common.config b/debian/gitalist-common.config index d7c2053..bf5c954 100644 --- a/debian/gitalist-common.config +++ b/debian/gitalist-common.config @@ -7,6 +7,9 @@ set -e db_input low gitalist/directory || true db_go +db_input low gitalist/whitelist || true +db_go + db_input low gitalist/gravatar || true db_go diff --git a/debian/gitalist-common.postinst b/debian/gitalist-common.postinst index 54fed1c..d5d8c8b 100644 --- a/debian/gitalist-common.postinst +++ b/debian/gitalist-common.postinst @@ -14,6 +14,9 @@ case "${1}" in db_get gitalist/directory DIRECTORY="${RET:-/srv/git}" + db_get gitalist/whitelist + WHITELIST="${RET:-/srv/git/projects.list}" + db_get gitalist/gravatar GRAVATAR="${RET:-false}" db_stop @@ -30,6 +33,7 @@ case "${1}" in cp /usr/share/doc/gitalist-common/examples/gitalist.conf ${GITALIST_CONF} fi sed -i "s@.*repo_dir.*@ repo_dir ${DIRECTORY}@" ${GITALIST_CONF} + sed -i "s@.*whitelist.*@ whitelist ${WHITELIST}@" ${GITALIST_CONF} sed -i "s@no_gravatars.*@no_gravatars = ${GRAVATAR}@" ${GITALIST_CONF} ;; diff --git a/debian/gitalist-common.templates b/debian/gitalist-common.templates index 0ea8a10..a3c923f 100644 --- a/debian/gitalist-common.templates +++ b/debian/gitalist-common.templates @@ -7,6 +7,18 @@ _Description: Directory where git repositories are stored: . These git repositories have to be bare repositories. +Template: gitalist/whitelist +Type: string +Default: /srv/git/projects.list +_Description: File that contains a whitelist of repositories to be displayed: + If you use an SSH gatekeeper to maintain your git repositories on the + server, such as Gitosis or Gitolite, you can specify the whitelist file + that defines what repositories get presented in the webfrontend. + . + The default whitelist for Gitosis and Gitolite is the projects.list file + in the parent directory of the directory where the git repositories are + stored. + Template: gitalist/gravatar Type: boolean Default: false diff --git a/debian/patches/series b/debian/patches/series index 4ca135a..41bc85c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ remove_findbin.patch search_recursively.patch +whitelist.patch diff --git a/debian/patches/whitelist.patch b/debian/patches/whitelist.patch new file mode 100644 index 0000000..c0a4ad9 --- /dev/null +++ b/debian/patches/whitelist.patch @@ -0,0 +1,14 @@ +Author: Daniel Baumann <[email protected]> +Description: Adding whitelist in default configuration (Closes: #637542). + +diff -Naurp gitalist.orig//gitalist.conf gitalist/gitalist.conf +--- gitalist.orig//gitalist.conf 2011-08-12 15:16:23.746223199 +0200 ++++ gitalist/gitalist.conf 2011-08-12 15:24:06.384517284 +0200 +@@ -5,6 +5,7 @@ name Gitalist + # Configure this to where your repositories are. + # repo_dir __path_to(../)__ + search_recursively = 1 ++ # whitelist __path_to_file__ + </Model::CollectionOfRepos> + + sitename "A Gitalist" diff --git a/debian/po/templates.pot b/debian/po/templates.pot index 77ec94d..7fe8597 100644 --- a/debian/po/templates.pot +++ b/debian/po/templates.pot @@ -36,21 +36,44 @@ msgstr "" msgid "These git repositories have to be bare repositories." msgstr "" -#. Type: boolean +#. Type: string +#. Description +#: ../gitalist-common.templates:2001 +msgid "File that contains a whitelist of repositories to be displayed:" +msgstr "" + +#. Type: string +#. Description +#: ../gitalist-common.templates:2001 +msgid "" +"If you use an SSH gatekeeper to maintain your git repositories on the " +"server, such as Gitosis or Gitolite, you can specify the whitelist file that " +"defines what repositories get presented in the webfrontend." +msgstr "" + +#. Type: string #. Description #: ../gitalist-common.templates:2001 +msgid "" +"The default whitelist for Gitosis and Gitolite is the projects.list file in " +"the parent directory of the directory where the git repositories are stored." +msgstr "" + +#. Type: boolean +#. Description +#: ../gitalist-common.templates:3001 msgid "Should gravatar support in gitalist enabled?" msgstr "" #. Type: boolean #. Description -#: ../gitalist-common.templates:2001 +#: ../gitalist-common.templates:3001 msgid "Gravatar support in gitalist is disabled by default." msgstr "" #. Type: boolean #. Description -#: ../gitalist-common.templates:2001 +#: ../gitalist-common.templates:3001 msgid "" "Warning: enabled gravatar support will leak your git repositories, " "directries and filenames in your git repro via browser referrer to gravatar." -- 1.7.6

