tag 637542 patch thanks patch attached.
-- Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern Email: [email protected] Internet: http://people.progress-technologies.net/~daniel.baumann/
>From 88a889b1756e3de03ee807fa7b44d3aaa5bc5f93 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). --- ...h-to-enable-search_recursively-by-default.patch | 42 ++++++++++++++++++++ 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 ++++++++++++- 7 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 0001-Adding-patch-to-enable-search_recursively-by-default.patch create mode 100644 debian/patches/whitelist.patch diff --git a/0001-Adding-patch-to-enable-search_recursively-by-default.patch b/0001-Adding-patch-to-enable-search_recursively-by-default.patch new file mode 100644 index 0000000..1d7aaa0 --- /dev/null +++ b/0001-Adding-patch-to-enable-search_recursively-by-default.patch @@ -0,0 +1,42 @@ +From 7d7badbc9fc3b3d0637654c51a006624b07531b2 Mon Sep 17 00:00:00 2001 +From: Daniel Baumann <[email protected]> +Date: Fri, 12 Aug 2011 14:46:47 +0200 +Subject: [PATCH] Adding patch to enable search_recursively by default + (Closes: #637536). + +--- + debian/patches/search_recursively.patch | 14 ++++++++++++++ + debian/patches/series | 1 + + 2 files changed, 15 insertions(+), 0 deletions(-) + create mode 100644 debian/patches/search_recursively.patch + +diff --git a/debian/patches/search_recursively.patch b/debian/patches/search_recursively.patch +new file mode 100644 +index 0000000..b4ba971 +--- /dev/null ++++ b/debian/patches/search_recursively.patch +@@ -0,0 +1,14 @@ ++Author: Daniel Baumann <[email protected]> ++Description: Enable search_recursively by default (Closes: #637536). ++ ++diff -Naurp gitalist.orig/gitalist.conf gitalist/gitalist.conf ++--- gitalist.orig/gitalist.conf 2011-08-12 14:44:15.528661680 +0200 +++++ gitalist/gitalist.conf 2011-08-12 14:43:55.608562898 +0200 ++@@ -4,6 +4,7 @@ name Gitalist ++ #git /path/to/git ++ # Configure this to where your repositories are. ++ # repo_dir __path_to(../)__ +++ search_recursively = 1 ++ </Model::CollectionOfRepos> ++ ++ sitename "A Gitalist" +diff --git a/debian/patches/series b/debian/patches/series +index 3cfb7ab..4ca135a 100644 +--- a/debian/patches/series ++++ b/debian/patches/series +@@ -1 +1,2 @@ + remove_findbin.patch ++search_recursively.patch +-- +1.7.6 + 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

