lsb 2.0-6 Debian release.
authorChris Lawrence <lawrencc@debian.org>
Fri, 4 Mar 2005 23:42:11 +0000 (17:42 -0600)
committerDidier Raboud <odyx@debian.org>
Fri, 4 Mar 2005 23:42:11 +0000 (17:42 -0600)
debian/README.Debian
debian/changelog
debian/control
debian/dirs
debian/lsb-base.dirs [new file with mode: 0644]
debian/rules
init-functions

index f7b2ff7dc34e8a8e583bf2ebbe3bb36333af375d..64d3dea29a3d55aae53bc4535be279c14e825fb7 100644 (file)
@@ -19,7 +19,7 @@ contact the vendor of the lsb package to resolve the problem.
 
 PACKAGE LAYOUT
 
-The LSB implementation in Debian is currently divided into four
+The LSB implementation in Debian is currently divided into five
 packages:
 
 * The "lsb-core" package depends on the Debian packages that are
@@ -27,8 +27,7 @@ packages:
   roughly equivalent to the LSB 1.3 specification, except X11 libraries
   are not required.  It also includes some subroutines that are used
   by LSB-compliant applications when they are being installed or
-  removed, and a series of functions used by init.d scripts in some
-  LSB packages.
+  removed.
 
 * The "lsb-graphics" package depends on the X11 libraries required for
   the LSB-Graphics 2.0 specification.
@@ -39,6 +38,11 @@ packages:
 * The "lsb" package depends on the above three packages, and exists
   for backwards compatibility purposes with LSB 1.3.
 
+* The "lsb-base" package includes a number of functions used by init.d
+  scripts in some LSB packages; this package was separated in Debian's
+  lsb 2.0-6 package so other packages could make use of the init
+  functionality without requiring a full LSB installation.
+
 The first three packages are architecture-specific because of
 differences in the requirements of the LSB on various binary
 architectures.  In particular, each package provides
@@ -178,7 +182,7 @@ woody was Python 2.1.  To backport to woody:
 For proper LSB conformance in woody, you will also need to backport
 other Debian packages, including alien.
 
-The default version of Python in Debian 3.1 (sarge) is Python 2.3.4.
+The default version of Python in Debian 3.1 (sarge) is Python 2.3.5.
 
 COMPLIANCE TESTING
 
@@ -190,6 +194,6 @@ any reports of its success or failure.
 An example init script that tests some of these features is provided
 as /usr/share/doc/lsb/examples/init-skeleton.
 
- -- Chris Lawrence <lawrencc@debian.org>, Mon Sep 20 21:37:40 2004
+ -- Chris Lawrence <lawrencc@debian.org>, Fri Mar  4 17:41:50 2005
 
  LocalWords:  LSB
index 942c156583ef6a160b0edeb0ac3890385045f1e3..c55f4489bcffaa0a0299a88ed6278dcef0c5b4b0 100644 (file)
@@ -1,3 +1,13 @@
+lsb (2.0-6) unstable; urgency=low
+
+  * Create lsb package in binary-indep step.  (Closes: #297788)
+  * Merge /lib/lsb/init-functions from Ubuntu.
+  * Split /lib/lsb/init-functions into arch-all lsb-base package; this
+    functionality is thus available for use by other, non-LSB packages.
+  * Update README.Debian.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Fri,  4 Mar 2005 17:42:11 -0600
+
 lsb (2.0-5) unstable; urgency=low
 
   * Upload to unstable.  (Closes: #278093)
index bf6d513ed96a5a7b1b8bba073ac9af2c9e600285..63fd840350a6a2323cb1d9197d33686d499d3a4c 100644 (file)
@@ -7,7 +7,7 @@ Standards-Version: 3.6.1
 
 Package: lsb-core
 Architecture: any
-Depends: lsb-release, libz1, exim4 | mail-transport-agent, at, bc, binutils, bsdmainutils, cpio, cron, file, libc6-dev | libc-dev, locales, lpr, m4, make, man-db, mawk | gawk, ncurses-term, passwd, patch, pax, procps, psmisc, rsync, alien (>= 8.36), python (>> 2.2.2), ${misc:Depends}, ${depends}
+Depends: lsb-release, libz1, exim4 | mail-transport-agent, at, bc, binutils, bsdmainutils, cpio, cron, file, libc6-dev | libc-dev, locales, lpr, m4, make, man-db, mawk | gawk, ncurses-term, passwd, patch, pax, procps, psmisc, rsync, alien (>= 8.36), python (>> 2.2.2), ${misc:Depends}, ${depends}, lsb-base
 Provides: lsb-core-noarch, ${provides}
 Conflicts: python (>> 2.5), libutahglx1, lsb (<< 2.0-2)
 Replaces: lsb (<< 2.0-2)
@@ -89,3 +89,17 @@ Description: Linux Standard Base 2.0 support package
  presence does not imply that we believe that Debian fully complies
  with the Linux Standard Base, and should not be construed as a
  statement that Debian is LSB-compliant.
+
+Package: lsb-base
+Architecture: all
+Depends: sed, ncurses-bin
+Replaces: lsb (<< 2.0-5)
+Conflicts: lsb (<< 2.0-5)
+Description: Linux Standard Base 2.0 init script functionality
+ The Linux Standard Base (http://www.linuxbase.org/) is a standard
+ core system that third-party applications written for Linux can
+ depend upon.
+ .
+ This package only includes the init-functions shell library, which
+ may be used by other packages' initialization scripts for console
+ logging and other purposes.
index 7a537670800b56c87621cc2014880a951bd52f2d..6cf4eec4e7d8b6fa85b5dc5bc00c3b308d5db595 100644 (file)
@@ -1,4 +1,3 @@
-lib/lsb
 usr/lib/lsb
 var/lib/lsb
 usr/X11R6/bin
diff --git a/debian/lsb-base.dirs b/debian/lsb-base.dirs
new file mode 100644 (file)
index 0000000..4e00aa9
--- /dev/null
@@ -0,0 +1 @@
+lib/lsb
index 6a6d499e0e8fa1a64d6ec85e1e762b2f4d4df1e1..f833e9e2b72cc7b46e27369fd2329c52c2e8c22a 100755 (executable)
@@ -36,7 +36,7 @@ configure-stamp:
 
 build: build-stamp
 
-build-stamp: configure-stamp 
+build-stamp: configure-stamp
        dh_testdir
 
        # Add here commands to compile the package.
@@ -64,45 +64,69 @@ install: build
        # Add here commands to install the package into debian/lsb.
        #$(MAKE) install DESTDIR=$(CURDIR)/debian/lsb
        cp initdutils.py install_initd remove_initd debian/lsb-core/usr/lib/lsb
-       cp init-functions debian/lsb-core/lib/lsb
+       cp init-functions debian/lsb-base/lib/lsb
 
 # Build architecture-independent files here.
 binary-indep: build install
-# We have nothing to do by default.
+       dh_testdir
+       dh_testroot
+       dh_installdebconf -i
+       dh_installdocs -i
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_installinit
+       dh_installcron -i
+       dh_installman -i
+       dh_installinfo -i
+#      dh_undocumented
+       dh_installchangelogs -i
+       dh_link -i
+       dh_strip -i
+       dh_compress -i
+       dh_fixperms -i
+#      dh_makeshlibs
+       dh_installdeb -i
+#      dh_perl
+       dh_shlibdeps -i
+       dh_gencontrol -i
+       dh_md5sums -i
+       dh_builddeb -i
 
 # Build architecture-dependent files here.
 binary-arch: build install
        dh_testdir
        dh_testroot
-       dh_installdebconf       
-       dh_installdocs
-       dh_installexamples init-skeleton
-       dh_installmenu
+       dh_installdebconf -a
+       dh_installdocs -a
+       dh_installexamples -a init-skeleton
+       dh_installmenu -a
 #      dh_installlogrotate
 #      dh_installemacsen
 #      dh_installpam
 #      dh_installmime
 #      dh_installinit
-       dh_installcron
-       dh_installman lsb.8
-       dh_installinfo
+       dh_installcron -a
+       dh_installman -a lsb.8
+       dh_installinfo -a
 #      dh_undocumented
-       dh_installchangelogs 
+       dh_installchangelogs -a
        @[ ${DEB_BUILD_ARCH} = 'amd64' ] && mkdir -p debian/lsb-core/lib64 && echo >> debian/lsb-core.substvars "depends=ia32-libs" || true
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
+       dh_link -a
+       dh_strip -a
+       dh_compress -a
+       dh_fixperms -a
 #      dh_makeshlibs
-       dh_installdeb
+       dh_installdeb -a
 #      dh_perl
-       dh_shlibdeps
+       dh_shlibdeps -a
        @echo >> debian/lsb-core.substvars "provides=lsb-core-${lsbarch}"
        @echo >> debian/lsb-cxx.substvars "provides=lsb-cxx-${lsbarch}"
        @echo >> debian/lsb-graphics.substvars "provides=lsb-graphics-${lsbarch}"
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
+       dh_gencontrol -a
+       dh_md5sums -a
+       dh_builddeb -a
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
index 9e0fdece7a6810e190563eee2cff7c044fed6342..8e91ca0f0db1b19862de7b02bebc0315a1d946bf 100644 (file)
@@ -73,7 +73,9 @@ pidofproc () {
     if [ -f "$pidfile" ]; then
         read -d "" line < "$pidfile"
         for i in $line; do
-            [ -z "${p//[0-9]/}" -a -d "/proc/$i" ] && pids="$i $pids"
+            if [ -z "$(echo $p | sed 's/[0-9]//g')" -a -d "/proc/$i" ]; then 
+                pids="$i $pids"
+            fi
         done
         if [ -n "$pids" ]; then
             echo "$pids"
@@ -120,64 +122,87 @@ killproc () {
     fi
 }
 
-log_msg() {
-    local esc extd warn done norm stat
-    local rc_done rc_warning rc_failure
-    if test -z "$LINES" -o -z "$COLUMNS" ; then
-        eval `stty size 2>/dev/null | (read L C; \
-       echo LINES=${L:-24} COLUMNS=${C:-80})`
-    fi
+log_success_msg () {
+    echo " * $@"
+}
 
-    test $LINES   -eq 0 && LINES=24
-    test $COLUMNS -eq 0 && COLUMNS=80
-    export LINES COLUMNS
-
-    if test -t 1 -a "$TERM" != "raw" -a "$TERM" != "dumb" && stty size > /dev/null 2>&1 ; then
-        esc=`echo -en "\033"`
-        extd="${esc}[1m"
-        warn="${esc}[1;31m"
-        done="${esc}[1;32m"
-        attn="${esc}[1;33m"
-        norm=`echo -en "${esc}[m\017"`
-        done="${esc}[1;32m"
-        attn="${esc}[1;33m"
-        norm=`echo -en "${esc}[m\017"`
-        stat=`echo -en "\015${esc}[${COLUMNS}C${esc}[10D"`
-        
-        rc_done="${stat}${done}done${norm}"
-        rc_warning="${stat}${attn}warning${norm}"
-        rc_failure="${stat}${warn}failed${norm}"
+log_failure_msg () {
+    TPUT=/usr/bin/tput
+    if [ -x $TPUT ] && $TPUT hpa 60 >/dev/null 2>&1; then
+        RED=`$TPUT setaf 1`
+        NORMAL=`$TPUT op`
+        echo " $RED*$NORMAL $@"
     else
-        esc=".."
-        norm=
-        warn=
+        echo " * $@"
+    fi
+}
 
-        rc_done="..done"
-        rc_warning="..warning"
-        rc_failed="..failed"
+log_warning_msg () {
+    TPUT=/usr/bin/tput
+    if [ -x $TPUT ] && $TPUT hpa 60 >/dev/null 2>&1; then
+        YELLOW=`$TPUT setaf 3`
+        NORMAL=`$TPUT op`
+        echo " $YELLOW*$NORMAL $@"
+    else
+        echo " * $@"
     fi
-    case "$1" in
-        done)
-            echo "$2$rc_done"
-            ;;
-        warning)
-           echo "$2$rc_warning"
-        ;;
-        failure)
-           echo "$2$rc_failure"
-        ;;
-        *)
-           echo "$2${stat}${attn}$1${norm}"
-        ;;
-    esac
 }
 
-log_success_msg () {
-    log_msg "done" "$1"
+#
+# NON-LSB HELPER FUNCTIONS
+#
+# int get_lsb_header_val (char *scriptpathname, char *key)
+get_lsb_header_val () {
+        if [ ! -f "$1" ] || [ -z "$2" ]; then
+                return 1
+        fi
+        LSB_S="### BEGIN INIT INFO"
+        LSB_E="### END INIT INFO"
+        sed -n "/$LSB_S/,/$LSB_E/ s/# $2: \(.*\)/\1/p" $1
 }
-log_failure_msg () {
-    log_msg "failure" "$1"
+
+# int log_begin_message (char *message)
+log_begin_msg () {
+        if [ -z "$1" ]; then
+                return 1
+        fi
+        echo " * $@"
 }
-log_warning_msg () {
-    log_msg "warning" "$1"
+
+# int log_end_message (int exitstatus)
+log_end_msg () {
+
+    # If no arguments were passed, return
+    [ -z "$1" ] && return 1
+
+    # Only do the fancy stuff if we have an appropriate terminal
+    # and if /usr is already mounted
+    TPUT=/usr/bin/tput
+    EXPR=/usr/bin/expr
+    if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then
+        COLS=`$TPUT cols`
+        if [ -n "$COLS" ]; then
+            COL=`$EXPR $COLS - 7`
+        else
+            COL=73
+        fi
+        UP=`$TPUT cuu1`
+        END=`$TPUT hpa $COL`
+        START=`$TPUT hpa 0`
+        RED=`$TPUT setaf 1`
+        NORMAL=`$TPUT op`
+        if [ $1 -eq 0 ]; then
+            echo "$UP$END[ ok ]"
+        else
+            echo -e "$UP$START $RED*$NORMAL$END[${RED}fail${NORMAL}]"
+        fi
+    else
+       if [ $1 -eq 0 ]; then
+            echo "   ...done."
+        else
+            echo "   ...fail!"
+        fi
+    fi
+    return $1
 }
+