lsb 3.2-16 Debian release.
authorChris Lawrence <lawrencc@debian.org>
Fri, 1 Aug 2008 21:39:43 +0000 (16:39 -0500)
committerDidier Raboud <odyx@debian.org>
Fri, 1 Aug 2008 21:39:43 +0000 (16:39 -0500)
debian/changelog
debian/control
debian/lsb-release.bugscript [new file with mode: 0755]
debian/lsb-release.dirs
debian/rules
init-functions
lsb_release
test [deleted file]
test/minid.initd [new file with mode: 0755]
test/minid.pl [new file with mode: 0755]

index d24d361cd2aa731797921bee463987fd47e76b35..c987317ff4f78e793a2f8f5045160829d19ef65f 100644 (file)
@@ -1,3 +1,17 @@
+lsb (3.2-16) unstable; urgency=low
+
+  * Add a bugscript to lsb-release to help figure out why people keep
+    getting very strange results.
+  * Lenny will be Debian 5.0, not Debian 4.1; fix accordingly.
+  * Improve output of lsb-specified logging functions; deal with
+    in-the-wild variations that omit messages.
+  * No longer use --retry in start-stop-daemon calls.  (Closes: #451529)
+  * Fix behavior of killproc and pidofproc when no pidfile is passed in.
+  * Call pidof with -x to include scripts that may be daemonized.
+  * Change dependencies *cupsys* -> *cups*.  (Closes: #490381)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Fri, 01 Aug 2008 16:39:43 -0500
+
 lsb (3.2-15) unstable; urgency=low
 
   * Add Basque [eu] translation.  (Closes: #491005)
index 805678604b03fb4695f422562bdefa7e8970ad94..68145265917214a376ca9903372498446459fb6d 100644 (file)
@@ -9,7 +9,7 @@ Homepage: http://www.linux-foundation.org/en/LSB
 
 Package: lsb-core
 Architecture: any
-Depends: lsb-release, ${glibc}, libz1, libncurses5, libpam0g, exim4 | mail-transport-agent, at, bc, binutils, bsdmainutils, bsdutils, cpio, cron, ed, file, libc6-dev | libc-dev, locales, lpr, lprng | cupsys-client, m4, mailx | mailutils, make, man-db, mawk | gawk, ncurses-term, passwd, patch, pax, procps, psmisc, rsync, alien (>= 8.36), ${python:Depends}, ${misc:Depends}, ${depends}, lsb-base
+Depends: lsb-release, ${glibc}, libz1, libncurses5, libpam0g, exim4 | mail-transport-agent, at, bc, binutils, bsdmainutils, bsdutils, cpio, cron, ed, file, libc6-dev | libc-dev, locales, lpr, lprng | cups-client, m4, mailx | mailutils, make, man-db, mawk | gawk, ncurses-term, passwd, patch, pax, procps, psmisc, rsync, alien (>= 8.36), ${python:Depends}, ${misc:Depends}, ${depends}, lsb-base
 Provides: lsb-core-noarch, ${provides}
 Conflicts: python (>= 2.6), lsb (<< 2.0-2)
 Replaces: lsb (<< 2.0-2)
@@ -164,7 +164,7 @@ Description: Linux Standard Base 3.2 Multimedia package
 
 Package: lsb-printing
 Architecture: any
-Depends: lsb-core (>= 3.2), libcupsys2, libcupsimage2, foomatic-filters, ghostscript | gs
+Depends: lsb-core (>= 3.2), libcups2, libcupsimage2, foomatic-filters, ghostscript | gs
 Provides: lsb-printing-noarch, ${provides}
 Description: Linux Standard Base 3.2 Printing package
  The Linux Standard Base (http://www.linuxbase.org/) is a standard
diff --git a/debian/lsb-release.bugscript b/debian/lsb-release.bugscript
new file mode 100755 (executable)
index 0000000..151361b
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+echo 'lsb_release output' >& 3
+echo '-*- -*- -*- -*- -*-'>&3
+lsb_release -a >& 3
+echo '-*- -*- -*- -*- -*-'>&3
+echo '    Apt policy' >&3
+echo '-*- -*- -*- -*- -*-'>&3
+apt-cache policy >&3
+echo '-*- -*- -*- -*- -*-'>&3
+echo '   sources.list' >&3
+echo '-*- -*- -*- -*- -*-'>&3
+if [ -f /etc/apt/sources.list ]; then
+    cat /etc/apt/sources.list | grep -v '^\s*#' | grep -v '^\s*$' >&3
+else
+    echo '- none' >&3
+fi
+echo '-*- -*- -*- -*- -*-'>&3
+echo ' /etc/lsb_release' >&3
+echo '-*- -*- -*- -*- -*-'>&3
+if [ -f /etc/lsb_release ]; then
+    cat /etc/lsb_release >&3
+else
+    echo '- none' >&3
+fi
index e77248175524d9f63749c2d6ca67159eeb4aa635..2e451f550f53eda742c8d973038682554a62d094 100644 (file)
@@ -1 +1,2 @@
 usr/bin
+usr/share/bug
index 0f4c3a55e0dddbc46e2efb460dd199c66a3c26a2..e21fb841702adde90482133e19e254deff49e902 100755 (executable)
@@ -84,6 +84,7 @@ install: build
        cp -p initdutils.py install_initd remove_initd lsbinstall debian/lsb-core/usr/lib/lsb
        cp -p init-functions debian/lsb-base/lib/lsb
        cp -p lsb_release debian/lsb-release/usr/bin
+       cp -p debian/lsb-release.bugscript debian/lsb-release/usr/share/bug/lsb-release
 
 # Build architecture-independent files here.
 binary-indep: build install
index 0d6cbb59c56f3f7d08b95b7a7330010cb3eee1cf..724a06f8931d593f09ff758b6e638fac82436e34 100644 (file)
@@ -71,11 +71,7 @@ pidofproc () {
     done
     shift $(($OPTIND - 1))
 
-    if [ -z "${pidfile:-}" ]; then
-        pidfile=/var/run/${1##*/}.pid
-    fi
-
-    if [ -f "$pidfile" ]; then
+    if [ -n "${pidfile:-}" -a -e "$pidfile" ]; then
         read pid < "$pidfile"
         if [ -n "${pid:-}" ]; then
             if $(kill -0 "${pid:-}" 2> /dev/null); then
@@ -91,7 +87,7 @@ pidofproc () {
     fi
     if [ -x /bin/pidof -a ! "$specified" ]; then
         status="0"
-        /bin/pidof -o %PPID $1 || status="$?"
+        /bin/pidof -o %PPID -x $1 || status="$?"
         if [ "$status" = 1 ]; then
             return 3 # program is not running
         fi
@@ -117,8 +113,9 @@ killproc () {
 
     base=${1##*/}
     if [ ! $pidfile ]; then
-        pidfile=/var/run/$base.pid
         name_param="--name $base"
+    else
+        name_param="--pidfile $pidfile"
     fi
 
     sig=$(echo ${2:-} | sed -e 's/^-\(.*\)/\1/')
@@ -129,12 +126,12 @@ killproc () {
     status=0
     if [ ! "$is_term_sig" = yes ]; then
         if [ -n "$sig" ]; then
-            /sbin/start-stop-daemon --stop --signal "$sig" --pidfile "$pidfile" --quiet $name_param || status="$?"
+            /sbin/start-stop-daemon --stop --signal "$sig" --quiet $name_param || status="$?"
         else
-            /sbin/start-stop-daemon --stop --pidfile "$pidfile" --quiet $name_param || status="$?"
+            /sbin/start-stop-daemon --stop --quiet $name_param || status="$?"
         fi
     else
-        /sbin/start-stop-daemon --stop --pidfile "$pidfile" --retry 5 --quiet --oknodo $name_param || status="$?"
+        /sbin/start-stop-daemon --stop --quiet --oknodo $name_param || status="$?"
     fi
     if [ "$status" = 1 ]; then
         if [ -n "$sig" ]; then
@@ -143,8 +140,8 @@ killproc () {
         return 3 # program is not running
     fi
 
-    if [ "$status" = 0 -a "$is_term_sig" = yes ]; then
-        pidofproc -p $pidfile "$1" >/dev/null || rm -f "$pidfile"
+    if [ "$status" = 0 -a "$is_term_sig" = yes -a "$pidfile" ]; then
+        pidofproc -p "$pidfile" "$1" >/dev/null || rm -f "$pidfile"
     fi
     return 0
 }
@@ -171,10 +168,10 @@ status_of_proc () {
     status="0"
     pidofproc $pidfile $daemon >/dev/null || status="$?"
     if [ "$status" = 0 ]; then
-        log_success_msg "$name is running."
+        log_success_msg "$name is running"
         return 0
     else
-        log_failure_msg "$name is not running."
+        log_failure_msg "$name is not running"
         return $status
     fi
 }
@@ -194,27 +191,24 @@ log_use_fancy_output () {
 }
 
 log_success_msg () {
-    echo "$@"
+    if [ -n "${1:-}" ]; then
+        log_begin_msg $@
+    fi
+    log_end_msg 0
 }
 
 log_failure_msg () {
-    if log_use_fancy_output; then
-        RED=`$TPUT setaf 1`
-        NORMAL=`$TPUT op`
-        /bin/echo -e "${RED}*${NORMAL} $@"
-    else
-        echo "$@"
+    if [ -n "${1:-}" ]; then
+        log_begin_msg $@
     fi
+    log_end_msg 1
 }
 
 log_warning_msg () {
-    if log_use_fancy_output; then
-        YELLOW=`$TPUT setaf 3`
-        NORMAL=`$TPUT op`
-        /bin/echo -e "${YELLOW}*${NORMAL} $@"
-    else
-        echo "$@"
+    if [ -n "${1:-}" ]; then
+        log_begin_msg $@
     fi
+    log_end_msg -1
 }
 
 #
@@ -302,15 +296,20 @@ log_end_msg () {
     # and if /usr is already mounted
     if log_use_fancy_output; then
         RED=`$TPUT setaf 1`
+        YELLOW=`$TPUT setaf 3`
         NORMAL=`$TPUT op`
         if [ $1 -eq 0 ]; then
             echo "."
+        elif [ $1 -eq -1 ]; then
+            /bin/echo -e " ${YELLOW}(warning).${NORMAL}"
         else
             /bin/echo -e " ${RED}failed!${NORMAL}"
         fi
     else
        if [ $1 -eq 0 ]; then
             echo "."
+        elif [ $1 -eq -1 ]; then
+            echo -e " (warning)."
         else
             echo " failed!"
         fi
index 69f72dbb19fd0c3fe95b540120735d71fa6731a6..3f6c7f869f4bf78a5802804312a64e520c0a682f 100755 (executable)
@@ -36,7 +36,7 @@ RELEASE_CODENAME_LOOKUP = {
     '3.0' : 'woody',
     '3.1' : 'sarge',
     '4.0' : 'etch',
-    '4.1' : 'lenny',
+    '5.0' : 'lenny',
     }
 
 TESTING_CODENAME = 'lenny'
diff --git a/test b/test
deleted file mode 100644 (file)
index 8255579..0000000
--- a/test
+++ /dev/null
@@ -1,2 +0,0 @@
-. init-functions
-start_daemon -p /var/run/dirmngr.pid /usr/bin/dirmngr --daemon --sh
diff --git a/test/minid.initd b/test/minid.initd
new file mode 100755 (executable)
index 0000000..2302015
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          svnd
+# Required-Start:    $syslog $remote_fs
+# Should-Start: $time ypbind sendmail
+# Required-Stop:     $syslog $remote_fs
+# Should-Stop: $time ypbind sendmail
+# Default-Start:     3 5
+# Default-Stop:      0 1 2 6
+# Short-Description: The daemon
+# Description:       a cool daemon
+### END INIT INFO
+# chkconfig: 345 99 00
+# description: a cool daemon
+
+
+DAEMON="/tmp/minid.pl"
+
+PARA=" "
+. /lib/lsb/init-functions
+
+case "$1" in
+   start)
+       echo -n "Starting $DAEMON "
+       start_daemon $DAEMON $PARA
+       RETVAL=$?
+       ;;
+   stop)
+       echo -n "Shutting down $DAEMON "
+       killproc $DAEMON -TERM
+       RETVAL=$?
+       ;;
+   restart)
+       $0 stop
+       $0 start
+       ;;
+   status)
+       echo -n "Checking for service $DAEMON "
+       pidofproc $DAEMON 2>&1 >/dev/null
+       RETVAL=$?
+       ;;
+   *)
+       echo "Usage: $0 {start|stop|restart|status}"
+       exit 1
+       ;;
+esac
+
+if [ "x$RETVAL" = "x0" ] ; then
+  log_success_msg
+ else
+  log_failure_msg
+fi
diff --git a/test/minid.pl b/test/minid.pl
new file mode 100755 (executable)
index 0000000..9bc81f2
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/perl -w
+# detach from tty
+main:
+$pid = fork;
+exit if $pid;
+die "fork: $!" unless defined $pid;
+print "continue in child";
+sleep(4000);