Package: gitalist-common
Version: 0.003005+dfsg-4
Severity: important
Tags: patch
The command
WHITELIST_LINE=$(grep "whitelist" /etc/gitalist.conf)
in gitalist's config script fails if /etc/gitalist.conf doesn't
mention "whitelist" at all, as can occur on systems that started out
with old versions of Gitalist due to its postinst script's practice of
not propagating updates to /usr/share/gitalist-common/gitalist.conf
(with which ucf could help). In addition, get_cfg_value is easy to
throw off. Could you please apply the following patch, which should
address both issues?
--- debian/gitalist-common.config~ 2011-10-08 08:55:41.000000000 -0400
+++ debian/gitalist-common.config 2011-10-19 11:20:20.000000000 -0400
@@ -2,8 +2,7 @@
GITALIST_CONF="/etc/gitalist.conf"
get_cfg_value() {
- PARAM=$1
- grep "${PARAM}" ${GITALIST_CONF} | sed -e "s@.*${PARAM}@@"
+ sed -nr "s/^[[:space:]]*$1[[:space:]]//p" $GITALIST_CONF
}
set -e
@@ -16,10 +15,7 @@
WHITELIST="none"
WHITELIST_CUSTOM=""
- WHITELIST_LINE=$(grep "whitelist" /etc/gitalist.conf)
- if [ $(echo ${WHITELIST_LINE} | grep -c "#.*whitelist") = 1 ]; then
- WHITELIST="none"
- else
+ if grep '^[[:space:]]*whitelist[[:space:]]' /etc/gitalist.conf; then
WHITELIST_LINE=$(get_cfg_value "whitelist")
if [ "$(echo ${WHITELIST_LINE} | sed 's@\s*@@g')" =
"/srv/git/projects.list" ]; then
WHITELIST="gitolite"
Thanks!
BTW, I find it highly ironic that your packaging has no obvious
public Git repository. ;-)
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable'), (300, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages gitalist-common depends on:
ii cdebconf [debconf-2.0] 0.157
ii debconf [debconf-2.0] 1.5.40
ii git 1:1.7.6.3-1
ii libaliased-perl 0.30-1
ii libcatalyst-action-rest-perl 0.91-1
ii libcatalyst-controller-actionrole-perl 0.15-1
ii libcatalyst-modules-perl 43
ii libcatalyst-perl 5.80033-1
ii libcatalyst-plugin-unicode-encoding-perl 1.2-1
ii libcatalyst-view-component-subinclude-perl 0.10-1
ii libcatalyst-view-tt-perl 0.37-1
ii libconfig-general-perl 2.50-1
ii libdatetime-perl 2:0.7000-1
ii libfile-copy-recursive-perl 0.38-1
ii libfile-type-perl 0.22-1.1
ii libfile-type-webimages-perl 1.01-1
ii libfile-which-perl 1.08-1
ii libgit-pure-perl 0.48-1
ii libhtml-parser-perl 3.68-1+b1
ii libipc-run-perl 0.90-1
ii libjs-jquery 1.6.4-1
ii libjson-perl 2.53-1
ii libjson-xs-perl 2.320-1
ii liblist-moreutils-perl 0.33-1
ii libmoose-autobox-perl 0.11-1
ii libmoose-perl 2.0205-1
ii libmoosex-declare-perl 0.35-1
ii libmoosex-storage-perl 0.30-1
ii libmoosex-types-common-perl 0.001003-1
ii libmoosex-types-iso8601-perl 0.07-1
ii libmoosex-types-path-class-perl 0.05-2
ii libmoosex-types-perl 0.30-1
ii libnamespace-autoclean-perl 0.13-1
ii libpath-class-perl 0.24-1
ii libsyntax-highlight-engine-kate-perl 0.05+dfsg-1
ii libtemplate-perl 2.22-0.1+b1
ii libtemplate-plugin-cycle-perl 1.06-1
ii libtemplate-plugin-utf8decode-perl 0.01-1
ii libtry-tiny-perl 0.11-1
ii perl 5.12.4-6
gitalist-common recommends no packages.
Versions of packages gitalist-common suggests:
pn starman <none>
-- debconf information:
gitalist/whitelist_custom:
* gitalist/directory: /srv/git
gitalist/whitelist: none
* gitalist/gravatar: true
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]