diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-08-24 17:51:01 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-08-24 17:51:01 +0100 |
commit | 934dddf3614eae2b4f305f42583b070bdbd5bc86 (patch) | |
tree | ac09e4f59c7492451d8082effc8d44b17103dc5c | |
parent | 88d2208221b5128c89d65a6539c2cbcbc1fdba6e (diff) | |
parent | d301872cbf032a56c946cb92fa11b511aff3f243 (diff) |
Merging Debian package tree.
-rw-r--r-- | bitlbee.conf | 2 | ||||
-rwxr-xr-x | debian/bitlbee.init | 16 | ||||
-rw-r--r-- | debian/changelog | 31 | ||||
-rwxr-xr-x | debian/postinst | 21 | ||||
-rwxr-xr-x | debian/prerm | 6 |
5 files changed, 64 insertions, 12 deletions
diff --git a/bitlbee.conf b/bitlbee.conf index 5fce2820..b87b4eaf 100644 --- a/bitlbee.conf +++ b/bitlbee.conf @@ -23,7 +23,7 @@ ## If BitlBee is started by root as a daemon, it can drop root privileges, ## and change to the specified user. ## -# User = bitlbee +User = bitlbee ## DaemonPort/DaemonInterface: ## diff --git a/debian/bitlbee.init b/debian/bitlbee.init index f8fac49c..1ab1bc43 100755 --- a/debian/bitlbee.init +++ b/debian/bitlbee.init @@ -31,8 +31,6 @@ if [ -r /etc/default/$NAME ]; then . /etc/default/$NAME fi -[ "$BITLBEE_DISABLED" = "1" ] && exit 0 - # # Function that starts the daemon/service. @@ -40,9 +38,17 @@ fi d_start() { # Make sure BitlBee can actually write its PID... touch /var/run/bitlbee.pid - chown bitlbee /var/run/bitlbee.pid + chown bitlbee: /var/run/bitlbee.pid - start-stop-daemon --start --quiet --pidfile $PIDFILE \ + # Clean up after the bug between 1.2-5 and 1.2.1-2 where BitlBee ran + # as root. (#494656 and #495877) Fixing this in the postinst script + # is not enough since the user will restart his BitlBee after up- + # grading the package, and the BitlBee running as root will then + # save its settings, re-setting ownership of the file to root. + # TODO: Remove this after a few revisions. + find /var/lib/bitlbee -uid 0 -name '*.xml' -exec chown bitlbee: {} \; + + start-stop-daemon --start --quiet \ --exec $DAEMON -- -p $BITLBEE_PORT -P $PIDFILE $BITLBEE_OPTS } @@ -57,6 +63,8 @@ d_stop() { case "$1" in start) + [ "$BITLBEE_DISABLED" = "1" ] && exit 0 + echo -n "Starting $DESC: $NAME" d_start echo "." diff --git a/debian/changelog b/debian/changelog index a569f4f8..1745e6c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,33 @@ -bitlbee (1.2-6) UNRELEASED; urgency=low +bitlbee (1.2.1-3) unstable; urgency=high - * Add Homepage and Vcs-Bzr fields. + * chown /var/lib/bitlbee/*.xml to bitlbee:bitlbee to clean up after + 1.2-5 and the bugfix in 1.2.1-2. (Closes: #495877) + * Moved BITLBEE_DISABLED check to only check when trying to *start* + the daemon. (Closes: #488611) - -- Jelmer Vernooij <jelmer@samba.org> Sun, 11 May 2008 14:18:16 +0200 + -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 23 Aug 2008 18:53:54 +0100 + +bitlbee (1.2.1-2) unstable; urgency=low + + * Properly set the User= line to something sensible so BitlBee won't + run as root anymore. 1.2-5 was a bad upload. :-( (Closes: #494656) + + -- Wilmer van der Gaast <wilmer@gaast.net> Tue, 12 Aug 2008 00:36:03 +0100 + +bitlbee (1.2.1-1.1) unstable; urgency=low + + * Non-Maintainer Upload + * Use invoke-rc.d as per policy. (Closes: #492637) [Thanks to Matt + Kraai] + + -- Don Armstrong <don@debian.org> Wed, 06 Aug 2008 06:57:18 -0700 + +bitlbee (1.2.1-1) unstable; urgency=low + + * New upstream release. + * Add Homepage and Vcs-Bzr fields. (From Jelmer.) + + -- Wilmer van der Gaast <wilmer@gaast.net> Thu, 26 Jun 2008 00:07:50 +0100 bitlbee (1.2-5) unstable; urgency=low diff --git a/debian/postinst b/debian/postinst index 80249bfe..db324b65 100755 --- a/debian/postinst +++ b/debian/postinst @@ -63,12 +63,23 @@ if [ -e /usr/share/bitlbee/help.upgrading ]; then fi fi +if ! grep -qi '^User *= *' /etc/bitlbee/bitlbee.conf; then + echo 'Updating configuration file, enabling User-setting...' + if ! sed -i -e 's/# *User *= *.*/User = bitlbee/i' /etc/bitlbee/bitlbee.conf; then + echo 'Failed! BitlBee may run as root now, please check your configs.' + fi +fi + if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then - /etc/init.d/bitlbee restart + if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d bitlbee restart + else + /etc/init.d/bitlbee restart + fi fi ## If we're upgrading, we'll probably skip this next part -if [ -d $CONFDIR ] && chown -R bitlbee $CONFDIR; then +if [ -d $CONFDIR ] && chown -R bitlbee: $CONFDIR; then echo 'BitlBee (probably) already installed, skipping user/configdir installation' exit 0 fi @@ -90,5 +101,9 @@ else fi if [ -z "$2" ]; then - /etc/init.d/bitlbee start + if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d bitlbee start + else + /etc/init.d/bitlbee start + fi fi diff --git a/debian/prerm b/debian/prerm index 5272e273..8426ab3a 100755 --- a/debian/prerm +++ b/debian/prerm @@ -9,5 +9,9 @@ if [ "$1" = "upgrade" ]; then mv /usr/share/bitlbee/help.txt /usr/share/bitlbee/help.upgrading fi else - /etc/init.d/bitlbee stop || exit 0 + if which invoke-rc.d >/dev/null 2>&1; then + invoke-rc.d bitblee stop || exit 0 + else + /etc/init.d/bitlbee stop || exit 0 + fi fi |