On 2010-08-17 14:04, Raphael Bossek wrote:
could you please attach your terminal output where the problem occured for further investigation?

I'm very sorry but I had to reboot the machine and I no longer have the entire output. I already pasted the result of running /etc/cron.daily/bugzilla3, but not of running /usr/share/bugzilla3/lib/checksetup.pl.

Here are the relevant commands I ran, taken from my .bash_history, with comments added:

wget 
http://mirrors.kernel.org/debian/pool/main/b/bugzilla/bugzilla3_3.6.2.0-1_all.deb
sudo dpkg -i bugzilla3_3.6.2.0-1_all.deb
# Complained about missing /var/lib/bugzilla3/data/shutdownhtml
# I think this came from dpkg-statoverride
ls -l /var/lib/bugzilla3/data/shutdownhtml
# Now exists
sudo /etc/cron.daily/bugzilla3
# Says:
#Use of uninitialized value in split at /usr/share/perl5/Bugzilla/Util.pm line 
295.
#Bugzilla is down for maintenance purposes. Please try again later.
reportbug bugzilla3

# Later:
sudo /etc/cron.daily/bugzilla3
# Same error
sudo dpkg-reconfigure bugzilla3
# No complaints
cd /etc
sudo etckeeper commit "Install bugzilla3 3.6.2.0-1 from unstable using dpkg -i"
sudo /etc/cron.daily/bugzilla3
# Same error
sudo /usr/share/bugzilla3/lib/checksetup.pl
sudo /etc/cron.daily/bugzilla3
# No error
cd /etc
sudo etckeeper commit "After running /usr/share/bugzilla3/lib/checksetup.pl"


I'm attaching git patches from etckeeper so you can see what changed.

--Neil
>From acd5d0d30e17f584bfbd60456061f38f2d7de0e7 Mon Sep 17 00:00:00 2001
From: mayhewn <mayh...@bach>
Date: Tue, 17 Aug 2010 12:56:24 -0600
Subject: [PATCH 1/2] Install bugzilla3 3.6.2.0-1 from unstable using dpkg -i

---
 .etckeeper                                         |    9 ++++--
 bugzilla3/dbconfig-params                          |   18 ------------
 bugzilla3/localconfig                              |    6 ++--
 bugzilla3/params                                   |    2 +-
 .../post-checksetup.d/10setdefaultdpkgstatoverride |   28 ++++++++++---------
 .../post-checksetup.d/15restoredpkgstatoverride    |    8 +----
 bugzilla3/post-checksetup.d/97shutdownhtmlunset    |   14 ++++++++++
 bugzilla3/pre-checksetup.d/03shutdownhtmlset       |   11 ++++++++
 bugzilla3/pre-checksetup.d/90rmobsolatefiles       |    6 ++++
 cron.daily/bugzilla3                               |    7 +++--
 10 files changed, 62 insertions(+), 47 deletions(-)
 delete mode 100644 bugzilla3/dbconfig-params
 create mode 100755 bugzilla3/post-checksetup.d/97shutdownhtmlunset
 create mode 100755 bugzilla3/pre-checksetup.d/03shutdownhtmlset
 create mode 100755 bugzilla3/pre-checksetup.d/90rmobsolatefiles

diff --git a/.etckeeper b/.etckeeper
index 3126b75..a5ad741 100755
--- a/.etckeeper
+++ b/.etckeeper
@@ -94,6 +94,8 @@ maybe chown postgres './postgresql/8.4/main/pg_ident.conf'
 maybe chown postgres './postgresql/8.4/main/postgresql.conf'
 maybe chown postgres './postgresql/8.4/main/start.conf'
 maybe chown tomcat6 './authbind/byuid/134'
+maybe chown www-data './bugzilla3/localconfig'
+maybe chown www-data './bugzilla3/params'
 maybe chgrp Debian-exim './exim4/passwd.client'
 maybe chgrp adm './clamav/freshclam.conf'
 maybe chgrp adm './clamav/freshclam.conf.ucf-old'
@@ -152,8 +154,9 @@ maybe chgrp tomcat6 './tomcat6/server.xml'
 maybe chgrp tomcat6 './tomcat6/tomcat-users.xml'
 maybe chgrp tomcat6 './tomcat6/web.xml'
 maybe chgrp www-data './bugzilla3'
-maybe chgrp www-data './bugzilla3/dbconfig-params'
 maybe chgrp www-data './bugzilla3/index.html'
+maybe chgrp www-data './bugzilla3/localconfig'
+maybe chgrp www-data './bugzilla3/params'
 maybe chgrp www-data './bugzilla3/sites'
 maybe chmod 700 './cups/ssl'
 maybe chmod 700 './lvm/cache'
@@ -179,7 +182,6 @@ maybe chmod 600 './.pwd.lock'
 maybe chmod 600 './X11/Xwrapper.config'
 maybe chmod 600 './anthy/dict.args'
 maybe chmod 600 './apt/secring.gpg'
-maybe chmod 600 './bugzilla3/localconfig'
 maybe chmod 600 './cups/classes.conf'
 maybe chmod 600 './cups/classes.conf.O'
 maybe chmod 600 './cups/printers.conf'
@@ -201,7 +203,6 @@ maybe chmod 600 './security/opasswd'
 maybe chmod 600 './ssh/ssh_host_dsa_key'
 maybe chmod 600 './ssh/ssh_host_rsa_key'
 maybe chmod 640 './at.deny'
-maybe chmod 640 './bugzilla3/dbconfig-params'
 maybe chmod 640 './cups/subscriptions.conf'
 maybe chmod 640 './cups/subscriptions.conf.O'
 maybe chmod 640 './exim4/passwd.client'
@@ -211,6 +212,8 @@ maybe chmod 640 './postgresql/8.4/main/pg_hba.conf'
 maybe chmod 640 './postgresql/8.4/main/pg_ident.conf'
 maybe chmod 640 './ssl/private/ssl-cert-snakeoil.key'
 maybe chmod 640 './tomcat6/tomcat-users.xml'
+maybe chmod 660 './bugzilla3/localconfig'
+maybe chmod 660 './bugzilla3/params'
 maybe chmod 660 './pootle/pootle.prefs'
 maybe chmod 660 './pootle/users.prefs'
 maybe chmod 700 './.etckeeper'
diff --git a/bugzilla3/dbconfig-params b/bugzilla3/dbconfig-params
deleted file mode 100644
index 6576fbb..0000000
--- a/bugzilla3/dbconfig-params
+++ /dev/null
@@ -1,18 +0,0 @@
-##
-## database access settings in /bin/sh format
-## automatically generated from /etc/dbconfig-common/bugzilla3.conf
-## by /usr/sbin/dbconfig-generate-include
-##
-## by default this file is managed via ucf, so you shouldn't have to
-## worry about manual changes being silently discarded.  *however*,
-## you'll probably also want to edit the configuration file mentioned
-## above too.
-##
-
-dbuser='bugzilla3'
-dbpass='XXXXXXXXXXXX'
-basepath=''
-dbname='bugzilla3'
-dbserver=''
-dbport=''
-dbtype='mysql'
diff --git a/bugzilla3/localconfig b/bugzilla3/localconfig
index 7b2e94f..69835c5 100644
--- a/bugzilla3/localconfig
+++ b/bugzilla3/localconfig
@@ -30,7 +30,7 @@ $webservergroup = 'www-data';
 $db_driver = 'mysql';
 
 # The DNS name of the host that the database server runs on.
-$db_host = 'localhost';
+$db_host = '';
 
 # The name of the database
 $db_name = 'bugzilla3';
@@ -49,7 +49,7 @@ $db_pass = 'XXXXXXXXXXXX';
 # the case for your database server, set this to the port number that your
 # database server is running on. Setting this to 0 means "use the default
 # port for my database server."
-$db_port = 3306;
+$db_port = 0;
 
 # MySQL Only: Enter a path to the unix socket for MySQL. If this is
 # blank, then MySQL's compiled-in default will be used. You probably
@@ -59,7 +59,7 @@ $db_sock = '';
 # Should checksetup.pl try to verify that your database setup is correct?
 # (with some combinations of database servers/Perl modules/moonphase this
 # doesn't work)
-$db_check = 1;
+$db_check = 0;
 
 # With the introduction of a configurable index page using the
 # template toolkit, Bugzilla's main index page is now index.cgi.
diff --git a/bugzilla3/params b/bugzilla3/params
index 10a1545..5c76fc1 100644
--- a/bugzilla3/params
+++ b/bugzilla3/params
@@ -83,7 +83,7 @@
            'shadowdbport' => '3306',
            'shadowdbsock' => '',
            'showallproducts' => 0,
-           'shutdownhtml' => '',
+           'shutdownhtml' => '<h1>Bugzilla is down for maintenance purposes. Please try again later.</h1>',
            'smtp_debug' => 0,
            'smtp_password' => '',
            'smtp_username' => '',
diff --git a/bugzilla3/post-checksetup.d/10setdefaultdpkgstatoverride b/bugzilla3/post-checksetup.d/10setdefaultdpkgstatoverride
index 57c3a56..7294686 100755
--- a/bugzilla3/post-checksetup.d/10setdefaultdpkgstatoverride
+++ b/bugzilla3/post-checksetup.d/10setdefaultdpkgstatoverride
@@ -1,8 +1,6 @@
 #!/bin/sh
 # Copyright (C) 2009  Raphael Bossek <boss...@debian.org>
 
-set -e
-
 setacl()
 {
     u="$1"
@@ -38,30 +36,34 @@ setaclf()
     for d in $*; do
         for p in `find "$d" -type f`; do
             setacl "$u" "$g" "$m" "$p"
-	    done
+        done
     done
 }
 
 setacl "root" "www-data" 0775 "$BUGZILLA_ETCDIR" "$BUGZILLA_ETCDIR/sites"
-setacl "root" "www-data" 0660 "$BUGZILLA_ETCDIR"/params
-setacl "root" "www-data" 0664 "$BUGZILLA_ETCDIR"/localconfig
-setacl "root" "www-data" 0640 "$BUGZILLA_ETCDIR"/dbconfig-params
+setacl "www-data" "www-data" 0660 "$BUGZILLA_ETCDIR"/params
+setacl "www-data" "www-data" 0660 "$BUGZILLA_ETCDIR"/localconfig
+setacl "www-data" "www-data" 0660 "$BUGZILLA_DATADIR"/shutdownhtml
 setacl "root" "www-data" 0644 "$BUGZILLA_ETCDIR"/index.html
 
 setacl "root" "www-data" 0775 "$BUGZILLA_DATADIR" "$BUGZILLA_DATADIR"/attachments "$BUGZILLA_DATADIR"/duplicates "$BUGZILLA_DATADIR"/mining "$BUGZILLA_DATADIR"/template "$BUGZILLA_DATADIR"/webdot
 
 # It's a really time consuming action to manage access rights for all files
 # and directories with dpkg-statoverride e.g. for the $BUGZILLA_VARDIR/template.
-#setacld "root" "www-data" 0755 "$BUGZILLA_VARDIR"/template
-#setaclf "root" "www-data" 0644 "$BUGZILLA_VARDIR"/template
+#setacld "www-data" "www-data" 0755 "$BUGZILLA_VARDIR"/template
+#setaclf "www-data" "www-data" 0644 "$BUGZILLA_VARDIR"/template
 #
 # As workarround we make some assumtions:
 # 1) All directories get the same user/group and mode as "$BUGZILLA_VARDIR"/tempalte
 # 2) All files gets the same same user/group and mode as "$BUGZILLA_VARDIR"/template/en/default/index.html.tmpl
 #
 # Check post-checksetup.p/15restoredpkgstatoverride how this will be achived.
-setacl "root" "www-data" 0755 "$BUGZILLA_VARDIR"/template
-setacl "root" "www-data" 0644 "$BUGZILLA_VARDIR"/template/en/default/index.html.tmpl
- 
-setacld "root" "www-data" 0755 "$BUGZILLA_WEBDIR"/skins
-setaclf "root" "www-data" 0644 "$BUGZILLA_WEBDIR"/skins
+setacl "www-data" "www-data" 0755 "$BUGZILLA_VARDIR"/template
+setacl "www-data" "www-data" 0644 "$BUGZILLA_VARDIR"/template/en/default/index.html.tmpl
+
+setacld "root" "www-data" 0775 "$BUGZILLA_WEBDIR"/skins
+setaclf "root" "www-data" 0664 "$BUGZILLA_WEBDIR"/skins
+
+setacl "root" "www-data" 0755 "$BUGZILLA_EXTENSIONSDIR"
+
+# vim:ts=4:et
diff --git a/bugzilla3/post-checksetup.d/15restoredpkgstatoverride b/bugzilla3/post-checksetup.d/15restoredpkgstatoverride
index 0be2d26..8aa1ef5 100755
--- a/bugzilla3/post-checksetup.d/15restoredpkgstatoverride
+++ b/bugzilla3/post-checksetup.d/15restoredpkgstatoverride
@@ -1,14 +1,10 @@
 #!/bin/sh
 # Copyright (C) 2009  Raphael Bossek <boss...@debian.org>
 
-set -e
-
-tmpf=`tempfile`
+tmpf=`mktemp`
 trap "rm $tmpf" EXIT QUIT
-dpkg-statoverride --list "*/bugzilla3*"| sed -e 's,^\([^[:space:]]\+\)[[:space:]]\([^[:space:]]\+\)[[:space:]]\([^[:space:]]\+\)[[:space:]]\(.*\),chown \1:\2 "\4"\nchmod \3 "\4",g' >"$tmpf"
-set +e
+dpkg-statoverride --list '*/bugzilla3*'| sed -e 's,^\([^[:space:]]\+\)[[:space:]]\([^[:space:]]\+\)[[:space:]]\([^[:space:]]\+\)[[:space:]]\(.*\),test -e "\4" \&\& chown \1:\2 "\4" \&\& chmod \3 "\4",g' >"$tmpf"
 . "$tmpf"
-set -e
 
 # Please read the post-checksetup.d/10setdefaultdpkgstatoverride about how
 # to speed up the processing of "$BUGZILLA_VARDIR"/templates
diff --git a/bugzilla3/post-checksetup.d/97shutdownhtmlunset b/bugzilla3/post-checksetup.d/97shutdownhtmlunset
new file mode 100755
index 0000000..ec4d7da
--- /dev/null
+++ b/bugzilla3/post-checksetup.d/97shutdownhtmlunset
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Set the shutdownhtml message.
+set -e
+umask 0027
+
+paramsf="$BUGZILLA_ETCDIR/params"
+shutdownhtml_set=`su www-data -c "$BUGZILLA_CONTRIBDIR/bugzparam shutdownhtml"`
+if [ -z "$BUGZILLA_CHECKSETUP_FAILED" -a -n "$shutdownhtml_set" -a -s "$BUGZILLA_DATADIR/shutdownhtml" ]; then
+	shutdownhtml=`head -n 1 "$BUGZILLA_DATADIR/shutdownhtml"`
+	# Unset shutdownhtml message only if set by us.
+	if [ "$shutdownhtml_set" = "$shutdownhtml" ]; then
+		su www-data -c "$BUGZILLA_CONTRIBDIR/bugzparam shutdownhtml ''"
+	fi
+fi
diff --git a/bugzilla3/pre-checksetup.d/03shutdownhtmlset b/bugzilla3/pre-checksetup.d/03shutdownhtmlset
new file mode 100755
index 0000000..cc36478
--- /dev/null
+++ b/bugzilla3/pre-checksetup.d/03shutdownhtmlset
@@ -0,0 +1,11 @@
+#!/bin/sh
+# Set the shutdownhtml message.
+set -e
+umask 0027
+
+paramsf="$BUGZILLA_ETCDIR/params"
+shutdownhtml_set=`$BUGZILLA_CONTRIBDIR/bugzparam shutdownhtml`
+if [ -z "$shutdownhtml_set" -a -s "$BUGZILLA_DATADIR/shutdownhtml" ]; then
+	# Change value of shutdownhtml parameter.
+	su www-data -c "$BUGZILLA_CONTRIBDIR/bugzparam --infile shutdownhtml $BUGZILLA_DATADIR/shutdownhtml"
+fi
diff --git a/bugzilla3/pre-checksetup.d/90rmobsolatefiles b/bugzilla3/pre-checksetup.d/90rmobsolatefiles
new file mode 100755
index 0000000..b97b26d
--- /dev/null
+++ b/bugzilla3/pre-checksetup.d/90rmobsolatefiles
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+set -e
+
+rm -f "$BUGZILLA_DATADIR/old-params.txt"
+
diff --git a/cron.daily/bugzilla3 b/cron.daily/bugzilla3
index 0761a54..2b588e8 100755
--- a/cron.daily/bugzilla3
+++ b/cron.daily/bugzilla3
@@ -13,15 +13,16 @@ doit()
     test -x /usr/share/bugzilla3/lib/whine.pl && \
     su www-data -c /usr/share/bugzilla3/lib/whine.pl >/dev/null
 
-    if [ -x /usr/share/bugzilla3/lib/sanitycheck.pl ]; then
+    answerfile="/var/lib/bugzilla3/data/answerfile"
+    if [ -x /usr/share/bugzilla3/lib/sanitycheck.pl -a -s "$answerfile" ]; then
         if [ "$X_BUGZILLA_SITE" ]; then
             paramsf="/etc/bugzilla3/site/$X_BUGZILLA_SITE"
         else
             paramsf="/etc/bugzilla3/params"
         fi
         # Extract the email address for sanitycheck.pl
-        maintainer=`perl -e "require \"$paramsf\"; print \\\$param{\"maintainer\"}. \"\\n\"";`
-        su www-data -c "/usr/share/bugzilla3/lib/sanitycheck.pl --login \"$maintainer\""
+        admin=`perl -e "require \"$answerfile\"; print \\\$answer{'ADMIN_EMAIL'}. \"\\n\"";`
+        su www-data -c "/usr/share/bugzilla3/lib/sanitycheck.pl --login \"$admin\""
     fi
 }
 
-- 
1.7.1


>From 1a7f8a2516d25ad60fd1fe1384877fc0c3c1ba5a Mon Sep 17 00:00:00 2001
From: mayhewn <mayh...@bach>
Date: Tue, 17 Aug 2010 15:23:11 -0600
Subject: [PATCH 2/2] After running /usr/share/bugzilla3/lib/checksetup.pl

---
 bugzilla3/localconfig |   19 ++++++++++++++++---
 bugzilla3/params      |   18 +++++-------------
 2 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/bugzilla3/localconfig b/bugzilla3/localconfig
index 69835c5..f025b49 100644
--- a/bugzilla3/localconfig
+++ b/bugzilla3/localconfig
@@ -1,7 +1,7 @@
 
 # If you are using Apache as your web server, Bugzilla can create .htaccess
 # files for you that will instruct Apache not to serve files that shouldn't
-# be accessed from the web (like your local configuration data and non-cgi
+# be accessed from the web browser (like your local configuration data and non-cgi
 # executable files).  For this to work, the directory your Bugzilla
 # installation is in must be within the jurisdiction of a <Directory> block
 # in the httpd.conf file that has 'AllowOverride Limit' in it.  If it has
@@ -12,9 +12,11 @@
 # If this is set to 0, Bugzilla will not create these files.
 $create_htaccess = 0;
 
-# This is the group your web server runs as.
+# Usually, this is the group your web server runs as.
 # If you have a Windows box, ignore this setting.
-# If you do not have access to the group your web server runs under,
+# If you have use_suexec switched on below, this is the group Apache switches
+# to in order to run Bugzilla scripts.
+# If you do not have access to the group your scripts will run under,
 # set this to "". If you do set this to "", then your Bugzilla installation
 # will be _VERY_ insecure, because some files will be world readable/writable,
 # and so anyone who can get local access to your machine can do whatever they
@@ -24,6 +26,17 @@ $create_htaccess = 0;
 # asroot, or as a user who is a member of the specified group.
 $webservergroup = 'www-data';
 
+# Set this if Bugzilla runs in an Apache SuexecUserGroup environment.
+# (If your web server runs control panel software (cPanel, Plesk or similar),
+# or if your Bugzilla is to run in a shared hosting environment, then you are
+# almost certainly in an Apache SuexecUserGroup environment.)
+# If you have a Windows box, ignore this setting.
+# If set to 0, Bugzilla will set file permissions as tightly as possible.
+# If set to 1, Bugzilla will set file permissions so that it may work in an
+# SuexecUserGroup environment. The difference is that static files (CSS,
+# JavaScript and so on) will receive world read permissions.
+$use_suexec = 0;
+
 # What SQL database to use. Default is mysql. List of supported databases
 # can be obtained by listing Bugzilla/DB directory - every module corresponds
 # to one supported database and the name corresponds to a driver name.
diff --git a/bugzilla3/params b/bugzilla3/params
index 5c76fc1..1d5e39e 100644
--- a/bugzilla3/params
+++ b/bugzilla3/params
@@ -24,11 +24,8 @@
            'bonsai_url' => '',
            'chartgroup' => 'editbugs',
            'commentonchange_resolution' => '1',
-           'commentonclearresolution' => '1',
            'commentonduplicate' => 0,
-           'commentonreassignbycomponent' => 0,
            'confirmuniqueusermatch' => 1,
-           'convert_uncompressed_images' => '1',
            'cookiedomain' => '',
            'cookiepath' => '/',
            'createemailregexp' => '.*',
@@ -45,10 +42,10 @@
            'emailregexpdesc' => 'A legal address must contain exactly one \'@\', and at least one \'.\' after the @.',
            'emailsuffix' => '',
            'globalwatchers' => '',
+           'inbound_proxies' => '',
            'insidergroup' => '',
            'letsubmitterchoosemilestone' => 1,
            'letsubmitterchoosepriority' => 1,
-           'loginnetmask' => '0',
            'lxr_root' => '',
            'lxr_url' => '',
            'mail_delivery_method' => 'Sendmail',
@@ -57,7 +54,6 @@
            'makeproductgroups' => 0,
            'maxattachmentsize' => '1000',
            'maxlocalattachment' => '0',
-           'maxpatchsize' => '1000',
            'maxusermatches' => '1000',
            'mostfreqthreshold' => '2',
            'move-button-text' => 'Move To Bugscape',
@@ -73,7 +69,6 @@
            'noresolveonopenblockers' => 0,
            'proxy_url' => '',
            'querysharegroup' => 'editbugs',
-           'quicksearch_comment_cutoff' => '4',
            'quip_list_entry_control' => 'open',
            'rememberlogin' => 'on',
            'requirelogin' => '0',
@@ -82,29 +77,26 @@
            'shadowdbhost' => '',
            'shadowdbport' => '3306',
            'shadowdbsock' => '',
-           'showallproducts' => 0,
-           'shutdownhtml' => '<h1>Bugzilla is down for maintenance purposes. Please try again later.</h1>',
+           'shutdownhtml' => '',
            'smtp_debug' => 0,
            'smtp_password' => '',
            'smtp_username' => '',
            'smtpserver' => 'localhost',
            'specific_search_allow_empty_words' => 0,
-           'ssl' => 'never',
+           'ssl_redirect' => 0,
            'sslbase' => '',
            'strict_isolation' => 0,
-           'supportwatchers' => '1',
            'timetrackinggroup' => 'editbugs',
-           'timezone' => '',
            'upgrade_notification' => 'disabled',
            'urlbase' => '/bugzilla3/',
+           'use_mailer_queue' => 0,
+           'use_see_also' => 1,
            'usebugaliases' => 0,
            'useclassification' => 0,
-           'useentrygroupdefault' => 0,
            'usemenuforusers' => '1',
            'useqacontact' => 0,
            'user_info_class' => 'CGI',
            'user_verify_class' => 'DB',
-           'usermatchmode' => 'off',
            'usestatuswhiteboard' => 0,
            'usetargetmilestone' => 0,
            'usevisibilitygroups' => 0,
-- 
1.7.1

Reply via email to