Hello all,

While I am reluctant to NMU a core package without RC bugs, it seems
a shame to release etch with an lsb package with so many trivially
fixable bugs.  I have prepared the attached patch which fixes all but
4 of the outstanding bugs against lsb.  Of the remaining ones, 2 seem
like not really bugs, and the others I don't immediately see a fix for.

If someone on the lsb list could take a look at the patch and make sure
I am not breaking an LSB specification, that would be great.  If someone
who knows LSB better than I do wants to upload, that would be even
better.  If the maintainer wants to take the patch and make it his own,
that of course, would be the best.

For those reading this via -lsb, please cc me on replies, as I am not
subscribed.  Several headers set to make this easier.

If I hear no major complaints in a week or so, I will upload to a 7 day
delayed queue.

Thanks all,
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        [EMAIL PROTECTED] |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------
diff -Nru /tmp/rRcmx5YDgj/lsb-3.1/debian/changelog 
/tmp/ueXhB624Dc/lsb-3.1/debian/changelog
--- /tmp/rRcmx5YDgj/lsb-3.1/debian/changelog    2006-06-05 21:00:18.000000000 
+0100
+++ /tmp/ueXhB624Dc/lsb-3.1/debian/changelog    2006-08-06 18:35:25.000000000 
+0100
@@ -1,3 +1,25 @@
+lsb (3.1-10.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Patch for other architectures from Martin Habets
+    <[EMAIL PROTECTED]> (closes: #375457)
+  * Stop using basename: patch from Tore Anderson <[EMAIL PROTECTED]>
+    (closes: #354028)
+  * Move return code evaluation out of if $specified block in killproc, so
+    that evaluation is dependant on whether or not process is running, not on
+    whether a pidfile was specified (closes: #379387)
+  * log_end_msg no longer returns non-zero.  It's a log function, after all
+    (closes: #381687)
+  * log_use_fancy_output is now overridable by admin (closes: #374780)
+  * pidofproc actually checks if process is running (closes: #381684)
+    (probably closes: #167757)
+  * Use shell built-in getopts instead of /usr/bin/getopt (closes: #335216)
+  * Remove reference to /usr/share/doc/lsb-core/html/ (closes: #380045)
+  * Ru translation (thanks: Yuri Kozlov <[EMAIL PROTECTED]>) 
+    (closes: #380430)
+
+ -- Stephen Gran <[EMAIL PROTECTED]>  Sun,  6 Aug 2006 18:34:35 +0100
+
 lsb (3.1-10) unstable; urgency=low
 
   * Quote tests of $specified.  (Closes: #370256)
diff -Nru /tmp/rRcmx5YDgj/lsb-3.1/debian/lsb-base.README.Debian 
/tmp/ueXhB624Dc/lsb-3.1/debian/lsb-base.README.Debian
--- /tmp/rRcmx5YDgj/lsb-3.1/debian/lsb-base.README.Debian       2005-09-25 
00:15:02.000000000 +0100
+++ /tmp/ueXhB624Dc/lsb-3.1/debian/lsb-base.README.Debian       2006-08-06 
18:57:34.000000000 +0100
@@ -90,4 +90,6 @@
 /bin/sh, as init scripts sourcing this file may be running under any
 Bourne-style shell permitted by Debian policy (i.e. not just bash).
 
+"Fancy output" can be overriden by setting FANCYTTY=0 in this file.
+
  -- Chris Lawrence <[EMAIL PROTECTED]>, Sat Sep 24 19:15:02 2005
diff -Nru /tmp/rRcmx5YDgj/lsb-3.1/debian/po/ru.po 
/tmp/ueXhB624Dc/lsb-3.1/debian/po/ru.po
--- /tmp/rRcmx5YDgj/lsb-3.1/debian/po/ru.po     1970-01-01 01:00:00.000000000 
+0100
+++ /tmp/ueXhB624Dc/lsb-3.1/debian/po/ru.po     2006-08-06 18:33:38.000000000 
+0100
@@ -0,0 +1,74 @@
+# translation of lsb_3.1-10_debconf_ru.po to Russian
+# This file is distributed under the same license as the PACKAGE package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+# Yuri Kozlov <[EMAIL PROTECTED]>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: lsb_3.1-10\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-06-28 08:12-0600\n"
+"PO-Revision-Date: 2006-07-30 10:49+0300\n"
+"Last-Translator: Yuri Kozlov <[EMAIL PROTECTED]>\n"
+"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.9.1\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Should shadow passwords be enabled?"
+msgstr "Включить поддержку теневых паролей?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The Linux Standard Base requires that certain features of adduser(8) be "
+"available to conforming applications (such as password aging). Debian only "
+"provides these features when shadow passwords are enabled; however, your "
+"system currently has shadow passwords disabled."
+msgstr ""
+"По стандарту Linux Standard Base требуется, чтобы определённые возможности "
+"adduser(8) были доступны для соответствующих стандарту приложений (например, "
+"устаревание паролей). Debian предоставляет эти возможности только, если 
включён "
+"механизм теневых паролей; однако на данный момент в вашей системе теневые "
+"пароли выключены."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+#, no-c-format
+msgid ""
+"Most LSB applications will work fine with either setting, but 100% "
+"conformance requires shadow passwords to be enabled."
+msgstr ""
+"Большинство LSB приложений будут правильно работать при любой настройке, но "
+"для 100% соответствия требуется включить теневые пароли."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"Generally speaking, it is considered good practice to enable shadow "
+"passwords.  However, there are some situations in which shadow passwords may "
+"not work properly (most notably, if non-root users need to authenticate "
+"passwords against /etc/passwd)."
+msgstr ""
+"Вообще, считается хорошей практикой использовать механизм теневых паролей. "
+"Однако, возможны ситуации, при которых теневые пароли могут работать 
неправильно "
+"(самая заметная, когда обычным пользователям требуется аутентификация паролей 
через "
+"/etc/passwd)."
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"If you answer in the affirmative, the command 'shadowconfig on' will be run "
+"to enable shadow passwords."
+msgstr ""
+"Если вы ответите утвердительно, будет запущена команда 'shadowconfig on' "
+"для включения теневых паролей."
+
diff -Nru /tmp/rRcmx5YDgj/lsb-3.1/debian/postinst 
/tmp/ueXhB624Dc/lsb-3.1/debian/postinst
--- /tmp/rRcmx5YDgj/lsb-3.1/debian/postinst     2006-04-10 19:21:26.000000000 
+0100
+++ /tmp/ueXhB624Dc/lsb-3.1/debian/postinst     2006-08-06 15:20:25.000000000 
+0100
@@ -3,7 +3,7 @@
 setup_ldso_symlink () {
     ARCH=`dpkg --print-installation-architecture`
     case "$ARCH" in
-        s390|ppc64)
+        s390|ppc64|sparc|sparc64|alpha|hppa|m68k|mipsel)
             ln -sf ld.so.1 /lib/ld-lsb-$ARCH.so.1
             ln -sf ld.so.1 /lib/ld-lsb-$ARCH.so.2
             ln -sf ld.so.1 /lib/ld-lsb-$ARCH.so.3
diff -Nru /tmp/rRcmx5YDgj/lsb-3.1/debian/prerm 
/tmp/ueXhB624Dc/lsb-3.1/debian/prerm
--- /tmp/rRcmx5YDgj/lsb-3.1/debian/prerm        2005-09-16 23:45:20.000000000 
+0100
+++ /tmp/ueXhB624Dc/lsb-3.1/debian/prerm        2006-08-06 15:20:41.000000000 
+0100
@@ -3,7 +3,7 @@
 remove_ldso_symlink () {
     ARCH=`dpkg --print-installation-architecture`
     case "$ARCH" in
-        s390|ia64|ppc64)
+        s390|ia64|ppc64|sparc|sparc64|alpha|hppa|m68k|mipsel)
             rm -f /lib/ld-lsb-$ARCH.so.[123]
             ;;
         powerpc)
diff -Nru /tmp/rRcmx5YDgj/lsb-3.1/init-functions 
/tmp/ueXhB624Dc/lsb-3.1/init-functions
--- /tmp/rRcmx5YDgj/lsb-3.1/init-functions      2006-06-05 20:57:40.000000000 
+0100
+++ /tmp/ueXhB624Dc/lsb-3.1/init-functions      2006-08-06 18:22:46.000000000 
+0100
@@ -29,81 +29,78 @@
 
 start_daemon () {
     local force nice pidfile exec i
-    set -- `POSIXLY_CORRECT=1 getopt "fn:p:" $*`
     force=0
     nice=0
     pidfile=/dev/null
 
-    for i in $*; do
-        case $i in
-            -f)  force=1; shift;;
-            -n)  nice=$2; shift 2;;
-            -p)  pidfile=$2; shift 2;;
-            --)  shift; break;;
+    while getopts fn:p: opt ; do
+        case "$opt" in
+            f)  force=1; shift 1;;
+            n)  nice="$OPTARG"; shift 2;;
+            p)  pidfile="$OPTARG"; shift 2;;
         esac
     done
 
-    exec=$1; shift
+    exec=$1; shift 1
+    if [ "$1" = '--' ] ; then shift 1; fi
 
     if [ $force = 1 ]; then
-        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --startas 
$exec --pidfile /dev/null --oknodo -- $*
+        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --startas 
$exec --pidfile /dev/null --oknodo -- "$@"
     elif [ $pidfile ]; then
-        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec 
--oknodo --pidfile "$pidfile" -- $*
+        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec 
--oknodo --pidfile "$pidfile" -- "$@"
     else
-        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec 
--oknodo -- $*
+        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec 
--oknodo -- "$@"
     fi
 }
 
 pidofproc () {
     local pidfile line i pids= status specified pid
-    set -- `POSIXLY_CORRECT=1 getopt "p:" $*`
     pidfile=
     specified=
 
-    for i in $*; do
-        case $i in
-            -p)  pidfile=$2; specified=1; shift 2;;
-            --)  shift; break;;
+    while getopts p:- opt ; do
+        case $opt in
+            p)  pidfile="$OPTARG"; specified=1; shift 2;;
         esac
     done
 
     if [ -z "${pidfile:-}" ]; then
-        pidfile=/var/run/$(basename "$1").pid
+        pidfile=/var/run/${1##*/}.pid
     fi
 
     if [ -f "$pidfile" ]; then
         read pid < "$pidfile"
         if [ -n "${pid:-}" ]; then
-            echo "$pid"
-            return 0
-        else
-            return 2 # program is dead and /var/run pid file exists
+            if $(kill -0 "${pid:-}"); then
+                echo "$pid"
+                return 0
+            else
+                return 1 # program is dead and /var/run pid file exists
+            fi
         fi
-    elif [ -x /bin/pidof -a ! "$specified" ]; then
+    fi
+    if [ -x /bin/pidof -a ! "$specified" ]; then
         /bin/pidof -o %PPID $1
         status="$?"
         [ "$status" = 1 ] && return 3 # program is not running
         return 0
-    else
-        return 4 # program or service is unknown
     fi
+    return 4 # program or service is unknown
 }
 
 # start-stop-daemon uses the same algorithm as "pidofproc" above.
 killproc () {
     local pidfile sig status base i specified
-    set -- `POSIXLY_CORRECT=1 getopt "p:" $*`
     pidfile=
     specified=
 
-    for i in $*; do
+    while getopts p:- opt ; do
         case $i in
-            -p)  pidfile=$2; specified=1; shift 2;;
-            --)  shift; break;;
+            p)  pidfile="$OPTARG"; specified=1; shift 2;;
         esac
     done
 
-    base=$(basename "$1")
+    base=${1##*/}
     if [ ! $pidfile ]; then
         pidfile=/var/run/$base.pid
     fi
@@ -113,12 +110,12 @@
         sig=$(echo $sig | sed -e 's/^SIG\(.*\)/\1/')
         sig=${sig:-TERM}
         /sbin/start-stop-daemon --stop --pidfile "$pidfile" --signal $sig 
--quiet --name "$base"
-        status="$?"
-        [ "$status" = 1 ] && return 3 # program is not running
-        return 0
     else
         /sbin/start-stop-daemon --stop --pidfile "$pidfile" --retry 5 --quiet 
--oknodo --name "$base"
     fi
+    status="$?"
+    [ "$status" = 1 ] && return 3 # program is not running
+    return 0
 
     rm -f "$pidfile"
 }
@@ -126,6 +123,9 @@
 log_use_fancy_output () {
     TPUT=/usr/bin/tput
     EXPR=/usr/bin/expr
+    if FANCYTTY=0; then
+        false
+    fi
     if [ "x$TERM" != "xdumb" ] && [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 
>/dev/null 2>&1; then
         FANCYTTY=1
         true
@@ -252,7 +252,7 @@
             echo " failed!"
         fi
     fi
-    return $1
+    return 0
 }
 
 log_action_msg () {
diff -Nru /tmp/rRcmx5YDgj/lsb-3.1/lsb.8 /tmp/ueXhB624Dc/lsb-3.1/lsb.8
--- /tmp/rRcmx5YDgj/lsb-3.1/lsb.8       2004-09-21 03:06:19.000000000 +0100
+++ /tmp/ueXhB624Dc/lsb-3.1/lsb.8       2006-08-06 18:31:51.000000000 +0100
@@ -28,7 +28,6 @@
 more information on the standard, please see the LSB web site.
 .SH SEE ALSO
 .BR /usr/share/doc/lsb-core/README.Debian
-.BR /usr/share/doc/lsb-core/html/
 .BR http://www.linuxbase.org/
 .SH AUTHOR
 This manual page was written by Chris Lawrence <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

Reply via email to