lsb 1.1.0-11 Debian release.
authorChris Lawrence <lawrencc@debian.org>
Mon, 15 Apr 2002 07:25:51 +0000 (02:25 -0500)
committerDidier Raboud <odyx@debian.org>
Mon, 15 Apr 2002 07:25:51 +0000 (02:25 -0500)
30 files changed:
debian/README.Debian [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/config [new file with mode: 0755]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/doc-base.lsb [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/lsb.docs [new file with mode: 0644]
debian/postinst [new file with mode: 0755]
debian/rules [new file with mode: 0755]
debian/templates [new file with mode: 0644]
html/DEBtoLSB [new file with mode: 0644]
html/LSBtoDEB [new file with mode: 0644]
html/deblist [new file with mode: 0644]
html/depends [new file with mode: 0644]
html/fresh.common [new file with mode: 0644]
html/fresh.extra [new file with mode: 0644]
html/fresh.new [new file with mode: 0644]
html/freshinstall [new file with mode: 0644]
html/index.html [new file with mode: 0644]
html/needed [new file with mode: 0644]
html/super.extra [new file with mode: 0644]
html/superset [new file with mode: 0644]
init-fragment [new file with mode: 0644]
init-functions [new file with mode: 0644]
initdutils.py [new file with mode: 0644]
install_initd [new file with mode: 0755]
lsb.8 [new file with mode: 0644]
remove_initd [new file with mode: 0755]

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644 (file)
index 0000000..6962cef
--- /dev/null
@@ -0,0 +1,163 @@
+lsb for Debian
+--------------
+
+This package provides the Linux Standard Base on Debian systems.  The
+LSB is a specification for allowing the same binary package to be used
+on multiple distributions.
+
+The "lsb" package depends on a number of other Debian packages that
+are required for full LSB compliance.  It also includes some
+subroutines that are used by some LSB-compliant applications when they
+are being installed or removed.
+
+INSTALLING LSB PACKAGES
+
+The "alien" package supports LSB packages on Debian.  For example, to
+install an LSB package "lsb-mozilla-1.2-1_i386.rpm", type (as root):
+
+alien -i lsb-mozilla-1.2-1_i386.rpm
+
+Ideally, the package should be converted to a Debian package and then
+installed by dpkg.  If this fails, there may be a problem with either
+the lsb package (most likely) or alien (less likely), and you should
+contact the vendor of the lsb package to resolve the problem.
+
+IMPLEMENTATION ISSUES
+
+This package attempts to implement the core LSB specification.  Much
+of the implementation is drawn on a talk by Wichert Akkerman
+(http://www.liacs.nl/~wichert/talks/LSBDistro/html/) and Matt
+Taggart's discussion of LSB 1.0 and Debian.  Matt's discussion is
+provided in the /usr/share/doc/lsb/html directory.
+
+It does so in a number of ways:
+
+- Depending upon packages that implement OS services required by the
+  LSB, including libraries and programs.
+
+- Including the ld-lsb.so.1 symlink to the dynamic linker.
+
+- Providing the LSB init script functionality.  Some of the LSB init
+  functionality cannot be implemented without cooperation from other
+  packages or changes in policy for woody+1; however, the remainder is
+  provided here.
+
+The intent of this package is to provide a best current practice way
+of installing LSB packages on Debian woody on the ia32 architecture.
+Its presence does not imply that I believe that Debian fully complies
+with the Linux Standard Base, and should not be construed as a
+statement that Debian is LSB-compliant.
+
+The specification is available at http://www.linuxbase.org/spec/
+
+DEVIATIONS FROM LSB 1.1
+
+The package and its dependencies implement all of LSB on Debian, with
+these exceptions:
+
+- LSB 1.1 assumes a 2.4 kernel.  Debian ships a 2.2 kernel by default
+  as of woody, although 2.4 is optional.  There is no way in the
+  Debian system to ensure a package is only installed on a specific
+  kernel release.  Running LSB applications on 2.2 kernels may result
+  in subtle bugs or failures, particularly if they depend on large
+  file support or new syscall interfaces introduced in Linux 2.3+.
+
+  (We do not consider this a bug in the package.)
+
+- LSB 1.1 specifies definitions for run levels 2-5 that correspond
+  with most Red Hat-like distributions.  Debian does not specify run
+  levels 3-5, and RL 2 can theoretically encompass any of LSB 2-5.
+
+  (LSB probably should implement init dependencies for facilities
+  expected in run levels, rather than using run levels directly.)
+
+  As LSB's "run levels" are virtual run levels that can be remapped by
+  distribuitions (per discussion on the LSB lists), we treat runlevels
+  as follows:
+
+  LSB <-> Debian
+   0        0
+   1        1
+   2        2,3,4,5
+   3        2,3,4,5
+   4        2,3,4,5
+   5        2,3,4,5
+   6        6
+
+- LSB 1.1 doesn't fully specify what the init_functions should do.  I
+  have chosen to implement them in a way that is consistent with
+  Debian current practice, using the start-stop-daemon utility and the
+  echo command.  For woody+1, I expect a nicer init logging facility
+  that could be used.
+
+- LSB specifies no way for a binary to request that a pid file be
+  created for it, and the spec is ambiguous about whether start_daemon
+  should create the pid file, therefore I assume the binary will
+  produce its own /var/run/basename.pid file.
+
+- LSB 1.1 specifies that the bin user and group should have uid 1 and
+  gid 1 respectively.  Debian uses uid 2, gid 2.  This could only
+  break applications that use numeric uid/gids, which is bad hoodoo
+  anyway, but it deviates from the spec.
+
+  We believe this requirement will be removed in a subsequent revision
+  of the LSB specification.
+
+- Debian only implements certain features of adduser if shadow
+  passwords are enabled.  The lsb package, as of 1.1.0-5, will prompt
+  the user to enable shadow passwords if they appear to be disabled;
+  however, it does not force this choice on the administrator.
+  Administrators who disable shadow passwords may find that some LSB
+  applications fail to operate correctly as a result.
+
+  (We do not consider this a bug in the package.)
+
+- The LSB specifies that several X libraries must be available on the
+  system, but does not specify the presence of either an X server or
+  any X clients.  However, many LSB packages may expect these things
+  to be present, despite their absence from the spec.
+
+  (This may be a deficiency in the spec.  However, we comply as-written.)
+
+- The LSB specifies that cron scripts can be placed in cron.daily and
+  other directories; however, Debian's run-parts appears to ignore
+  these scripts if they contain a dot in their names.  (See #118646)
+  Once this deficiency is fixed, a versioned dependency will be added
+  to this package.
+
+  (This appears to be a deficiency in debianutils.)
+
+There may be other deviations from the spec; they are bugs in this
+package and should be reported as such using Debian's bug tracking
+system: see reportbug(1) or your favorite bug reporting tool.  (The
+aforementioned deviations are generally bugs in the package that
+cannot be easily fixed, or are bugs in the specification itself that
+we hope to resolve in the near future.)
+
+For more discussion of these deviations, see:
+
+http://lists.debian.org/lsb-spec/2001/lsb-spec-200107/msg00002.html
+  (a discussion of deficiencies in LSB 1.0, most of which remain.)
+
+DESIGN DECISIONS
+
+- I implemented the LSB init dependencies based on Debian policy's
+  update-rc.d support.  A registry of package-provided facilities and
+  their start and stop priorities is retained in
+  /var/lib/lsb/facilities.  Priorities are assigned to the system
+  facilities as found on my unstable boxen as of today; perhaps system
+  facilities should be registered by the appropriate packages, and not
+  managed by the lsb package, but that is a woody+1 policy decision.
+
+- The facility handling scripts are written in Python.  I am not
+  particularly attached to them being written in Python, but at the
+  same time I do not forsee rewriting them in $language_of_choice.
+
+COMPLIANCE TESTING
+
+I have been unable to locate any LSB package that tests the init
+script functionality of the spec.  I am therefore unable to say
+whether this package actually works as advertised.  I would appreciate
+any reports of its success or failure.
+
+ -- Chris Lawrence <lawrencc@debian.org>, Sun, 17 Feb 2002 14:07:32 -0600
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..ed33790
--- /dev/null
@@ -0,0 +1,96 @@
+lsb (1.1.0-11) unstable; urgency=low
+
+  * Note that Debian's run-parts ignores certain lsb cron.* scripts, in
+    violation of the LSB specification.  See #118646.
+    (If necessary, run-parts may be diverted by this package to conform.)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Mon, 15 Apr 2002 02:25:51 -0500
+
+lsb (1.1.0-10) unstable; urgency=low
+
+  * Force removal of rc.d links in remove_initd.  (Closes: #139400)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Thu, 21 Mar 2002 22:43:01 -0600
+
+lsb (1.1.0-9) unstable; urgency=low
+
+  * Improve error handing in {install,remove}_initd when no argument is
+    specified.
+  * Fix minor syntax error in outputing the facilities file.
+  * Move facilities file handling into the initdutils module.
+  * Changed facilities file format to allow multiple init scripts to
+    provide the same facility w/o crashing.
+  * These changes should solve all the init script handing bugs; thanks to
+    Tobias Burnus <tburnus@physik.fu-berlin.de> for his testing.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Tue, 19 Mar 2002 20:40:50 -0600
+
+lsb (1.1.0-8) unstable; urgency=low
+
+  * Fix typo in debian/rules.  (Closes: #138945)
+  * Rewrite the init script handling to improve modularity.
+  * Fix typos in regexes in init script handling.  (Closes: #138946)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Tue, 19 Mar 2002 14:47:43 -0600
+
+lsb (1.1.0-7) unstable; urgency=low
+
+  * Fix remove_initd in line with the changes to install_initd.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Sun, 17 Mar 2002 19:46:21 -0600
+
+lsb (1.1.0-6) unstable; urgency=medium
+
+  * Fix typos in init functions.  (Closes: #138766)
+  * Move init-functions to /lib/lsb.  (Closes: #138762)
+  * Fix logic errors in start_daemon.  (Closes: #138771)
+  * Fix init script header processing to accomodate minor deviations from
+    the LSB spec.  (Closes: #138789)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Sun, 17 Mar 2002 18:27:42 -0600
+
+lsb (1.1.0-5) unstable; urgency=low
+
+  * Include /usr/X11R6/bin to make the LSB test suite happy.  Document
+    LSB's lack of specification of an X server or any clients as required
+    for compliance (hence making it odd that /usr/X11R6/bin would be
+    needed, as it could conceivably be empty).  (Closes: #136713)
+  * Prompt on installation if shadow passwords appear to be disabled, and
+    enable them if requested.  (Closes: #136806)
+  * Fix the spelling of Matt Taggart's name in README.Debian.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Fri,  8 Mar 2002 23:19:39 -0600
+
+lsb (1.1.0-4) unstable; urgency=low
+
+  * Clean up directories to omit those present in current base-files.
+  * Rearrange README.Debian to put installation discussion near the top.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Sun, 24 Feb 2002 23:51:05 -0600
+
+lsb (1.1.0-3) unstable; urgency=low
+
+  * Release candidate.
+  * Include HTML files from Matt Taggart <taggart@debian.org> comparing
+    the LSB spec to Debian.
+  * Clean up dependency list.
+  * Convert to arch-independent package.
+  * Add lsb(8) manpage.
+
+ -- Chris Lawrence <lawrencc@debian.org>  Sun, 24 Feb 2002 21:42:26 -0600
+
+lsb (1.1.0-2) unstable; urgency=low
+
+  * Update README.Debian and install_initd to implement a few changes:
+    - uid/gid for bin is documented.
+    - treat RL 2-5 as the same, because nothing else sensible seems
+      available.
+  
+ -- Chris Lawrence <lawrencc@debian.org>  Mon, 18 Feb 2002 20:08:23 -0600
+
+lsb (1.1.0-1) unstable; urgency=low
+
+  * Initial Release.  (Closes: #134658)
+
+ -- Chris Lawrence <lawrencc@debian.org>  Sun, 17 Feb 2002 14:07:32 -0600
+
diff --git a/debian/config b/debian/config
new file mode 100755 (executable)
index 0000000..e927aac
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+if [ ! -e /etc/shadow ]; then
+    db_input medium lsb/shadowconfig || true
+fi
+db_go
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..0ff824d
--- /dev/null
@@ -0,0 +1,25 @@
+Source: lsb
+Section: misc
+Priority: extra
+Maintainer: Chris Lawrence <lawrencc@debian.org>
+Build-Depends-Indep: debhelper (>> 3.0.0)
+Standards-Version: 3.5.2
+
+Package: lsb
+Architecture: all
+Depends: lsb-release, libgl1, xlibs, libz1, exim | mail-transport-agent, at, bc, binutils, bsdmainutils, cpio, cron, file, libc6-dev | libc-dev, locales, lpr, m4, make, man-db, mawk | awk, ncurses-term, passwd, patch, procps, psmisc, rsync, alien (>= 8.00), python (>> 2.1), ${misc:Depends}
+Conflicts: python (>> 2.3)
+Description: Linux Standard Base 1.1 core support package
+ The Linux Standard Base (http://www.linuxbase.org/) is a standard
+ core system that third-party applications can depend upon.
+ .
+ This package provides an implementation of version 1.1.0 of the Linux
+ Standard Base for Debian on the Intel x86 architecture with the Linux
+ kernel.  Future revisions may support the LSB on additional
+ architectures and kernels.
+ .
+ The intent of this package is to provide a best current practice way
+ of installing and running LSB packages on Debian GNU/Linux.  Its
+ 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.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..5843769
--- /dev/null
@@ -0,0 +1,23 @@
+This package was created by Chris Lawrence <lawrencc@debian.org> on
+Sun, 17 Feb 2002 14:07:32 -0600.
+
+The HTML files in html/ were written by Matt Taggart <taggart@debian.org>
+
+Copyright:
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 dated June, 1991.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this package; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+   02111-1307, USA.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in `/usr/share/common-licenses/GPL'.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..313fdfe
--- /dev/null
@@ -0,0 +1,4 @@
+lib/lsb
+usr/X11R6/bin
+usr/lib/lsb
+var/lib/lsb
diff --git a/debian/doc-base.lsb b/debian/doc-base.lsb
new file mode 100644 (file)
index 0000000..321bac5
--- /dev/null
@@ -0,0 +1,10 @@
+Document: lsb
+Title: LSB as it Relates to Debian 
+Author: Matt Taggart <taggart@debian.org>
+Abstract: This document compares the general Linux Standards Base written
+ specification to Debian.
+Section: misc
+
+Format: HTML
+Index: /usr/share/doc/lsb/html/index.html
+Files: /usr/share/doc/lsb/html/*
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/lsb.docs b/debian/lsb.docs
new file mode 100644 (file)
index 0000000..5ccff1a
--- /dev/null
@@ -0,0 +1 @@
+html/
diff --git a/debian/postinst b/debian/postinst
new file mode 100755 (executable)
index 0000000..86753a0
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+if [ ! -e /etc/shadow ]; then
+    db_get lsb/shadowconfig
+    if [ "$RET" = "true" ]; then
+        /usr/sbin/shadowconfig on >&2 || true
+    fi
+fi
+
+##DEBHELPER##
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..ff1c00e
--- /dev/null
@@ -0,0 +1,99 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=3
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+       INSTALL_PROGRAM += -s
+endif
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+
+       touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+       dh_testdir
+
+       # Add here commands to compile the package.
+       #$(MAKE)
+       #/usr/bin/docbook-to-man debian/lsb.sgml > lsb.1
+
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp *.py[co]
+
+       # Add here commands to clean up after the build process.
+       -$(MAKE) clean
+
+       dh_clean
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+
+       # Add here commands to install the package into debian/lsb.
+       #$(MAKE) install DESTDIR=$(CURDIR)/debian/lsb
+       # IA32 spec:
+       ln -s ld-linux.so.2 debian/lsb/lib/ld-lsb.so.1
+       cp initdutils.py install_initd remove_initd debian/lsb/usr/lib/lsb
+       cp init-functions debian/lsb/lib/lsb
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installdebconf       
+       dh_installdocs
+       dh_installexamples
+       dh_installmenu
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_installinit
+       dh_installcron
+       dh_installman lsb.8
+       dh_installinfo
+#      dh_undocumented
+       dh_installchangelogs 
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_makeshlibs
+       dh_installdeb
+#      dh_perl
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/debian/templates b/debian/templates
new file mode 100644 (file)
index 0000000..64ce2f4
--- /dev/null
@@ -0,0 +1,17 @@
+Template: lsb/shadowconfig
+Type: boolean
+Default: true
+Description: Should shadow passwords be enabled?
+ 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.
+ .
+ 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).
+ .
+ If you answer in the affirmative, the command 'shadowconfig on' will
+ be run to enable shadow passwords.
diff --git a/html/DEBtoLSB b/html/DEBtoLSB
new file mode 100644 (file)
index 0000000..3bdc326
--- /dev/null
@@ -0,0 +1,63 @@
+This file provides a mapping from Debian packages needed by the LSB 1.0 spec
+to the requirements of the spec that they fulfill. Section of the spec is
+"Chapter 14 - Commands" unless otherwise noted.
+
+Last Updated: August 2, 2001
+
+Debian Package  Parts of LSB 1.0
+--------------  ----------------
+lsb-release    lsb_release
+alien          lsb package format (Ch. 13)
+at             at,batch
+base-files     FHS (Ch. 17)
+base-passwd    defined users and groups (Ch. 16)
+bash           sh,time, a posix shell for /bin/sh (Ch. 15)
+bc             bc
+binutils       ar,strip
+bsdmainutils   col
+bsdutils       renice
+cpio           cpio
+cron           crontab,cron (Ch. 18)
+debianutils    mktemp
+diff           cmp,diff
+dpkg           md5sum
+exim           sendmail
+file           file
+fileutils      chgrp,chmod,chown,cp,dd,df,du,install,ln,ls,mkdir,mv,rm,
+               rmdir,sync,touch,find,xargs
+grep           egrep,fgrep,grep
+gzip           gunzip,gzip
+hostname       hostname
+libc6          libc,libm,libpthread,libdl,libcrypt,librt(Ch. 10)
+               libutil (Ch. 11)
+               iconv,locale,localedef
+libc6-dev      gencat,getconf
+libncurses5    libncurses (Ch. 11)
+locales                libc,locale,localedef
+login          newgrp,su
+lpr            lpr
+m4             m4
+make           make
+man-db         man
+mawk           awk
+mount          mount,umount
+ncurses-base   libncurses (Ch. 11)
+ncurses-bin    libncurses (Ch. 11)
+ncurses-term   libncurses (Ch. 11)
+passwd         chfn,chsh,groupadd,groupdel,groupmod,passwd,useradd,userdel,
+               usermod
+patch          patch
+procps         kill,ps
+psmisc         fuser,killall
+rsync          rsync
+sed            sed
+shellutils     basename,date,dirname,echo,env,expr,false,groups,id,logname,
+               nice,nohup,pathchk,printf,pwd,sleep,stty,tee,test,true,tty,uname
+sysvinit       init (Ch. 18), pidof
+tar            tar
+textutils      cat,cksum,comm,csplit,cut,expand,fold,head,join,nl,od,paste,pr,
+               sort,split,sum,tail,tr,tsort,unexpand,uniq,wc
+util-linux     ipcrm,ipcs,more
+xlibmesa3      libGL (Ch. 12)
+xlibs          libX11,libXext,libSM,libICE,libXt (Ch. 12)
+zlib1g         libz (Ch. 11)
diff --git a/html/LSBtoDEB b/html/LSBtoDEB
new file mode 100644 (file)
index 0000000..23ab10c
--- /dev/null
@@ -0,0 +1,193 @@
+This file provides a mapping from the LSB 1.0 spec to the corresponding packages
+in the Debian "unstable" release.
+
+Last Updated: July 16th, 2001
+
+Chapter 10
+----------
+Library                Package
+-------                -------
+libc           libc6,locales
+libm           libc6
+libpthread     libc6
+libdl          libc6
+libcrypt       libc6
+librt          libc6
+
+
+Chapter 11
+----------
+Library                Package
+-------                -------
+libz           zlib1g
+libncurses     libncurses5,ncurses-base,ncurses-bin,ncurses-term
+libutil                libc6
+
+
+Chapter 12
+----------
+Library                Package
+-------                -------
+libX11         xlibs
+libXext                xlibs
+libsm          xlibs
+libice         xlibs
+libXt          xlibs
+libGL          xlibmesa3
+
+
+Chapter 13
+----------
+Command                Package
+-------                -------
+rpm            alien
+
+
+Chapter 14
+----------
+Command                Package
+-------                -------
+ar             binutils
+at             at
+awk            mawk
+basename       shellutils
+batch          at
+bc             bc
+cat            textutils
+chfn           passwd
+chgrp          fileutils
+chmod          fileutils
+chown          fileutils
+chsh           passwd
+cksum          textutils
+cmp            diff
+col            bsdmainutils
+comm           textutils
+cp             fileutils
+cpio           cpio
+crontab                cron
+csplit         textutils
+cut            textutils
+date           shellutils
+dd             fileutils
+df             fileutils
+diff           diff
+dirname                shellutils
+du             fileutils
+echo           shellutils
+egrep          grep
+env            shellutils
+expand         textutils
+expr           shellutils
+false          shellutils
+fgrep          grep
+file           file
+find           findutils
+fold           textutils
+fuser          psmisc
+gencat         libc6-dev
+getconf                libc6-dev
+grep           grep
+groupadd       passwd
+groupdel       passwd
+groupmod       passwd
+groups         shellutils
+gunzip         gzip
+gzip           gzip
+head           textutils
+hostname       hostname
+iconv          libc6
+id             shellutils
+install                fileutils
+ipcrm          util-linux
+ipcs           util-linux
+join           textutils
+kill           procps
+killall                psmisc
+ln             fileutils
+locale         libc6,locales
+localedef      libc6,locales
+logname                shellutils
+lpr            lpr
+ls             fileutils
+lsb_release    lsb-release
+m4             m4
+make           make
+man            man-db
+md5sum         dpkg
+mkdir          fileutils
+mkfifo         fileutils
+mknod          fileutils
+mktemp         debianutils
+more           util-linux
+mount          mount
+mv             fileutils
+newgrp         login
+nice           shellutils
+nl             textutils
+nohup          shellutils
+od             textutils
+passwd         passwd
+paste          textutils
+patch          patch
+pathchk                shellutils
+pidof          sysvinit
+pr             textutils
+printf         shellutils
+ps             procps
+pwd            shellutils
+renice         bsdutils
+rm             fileutils
+rmdir          fileutils
+rsync          rsync
+sed            sed
+sendmail       exim
+sh             bash
+sleep          shellutils
+sort           textutils
+split          textutils
+strip          binutils
+stty           shellutils
+su             login
+sum            textutils
+sync           fileutils
+tail           textutils
+tar            tar
+tee            shellutils
+test           shellutils
+time           bash
+touch          fileutils
+tr             textutils
+true           shellutils
+tsort          textutils
+tty            shellutils
+umount         mount
+uname          shellutils
+unexpand       textutils
+uniq           textutils
+useradd                passwd
+userdel                passwd
+usermod                passwd
+wc             textutils
+xargs          findutils
+
+
+Chapter 15 - Shell
+------------------
+posix          bash
+
+
+Chapter 16 - users & groups
+---------------------------
+               base-passwd
+
+
+Chapter 17 - FHS               
+----------------
+               base-files
+
+
+Chapter 18
+----------
+cron           cron
+init           sysvinit
diff --git a/html/deblist b/html/deblist
new file mode 100644 (file)
index 0000000..e1a46c2
--- /dev/null
@@ -0,0 +1,49 @@
+alien
+at
+base-files
+base-passwd
+bash
+bc
+binutils
+bsdmainutils
+bsdutils
+cpio
+cron
+debianutils
+diff
+dpkg
+exim
+file
+fileutils
+grep
+gzip
+hostname
+libc6
+libc6-dev
+libncurses5
+locales
+login
+lpr
+lsb-release
+m4
+make
+man-db
+mawk
+mount
+ncurses-base
+ncurses-bin
+ncurses-term
+passwd
+patch
+procps
+psmisc
+rsync
+sed
+shellutils
+sysvinit
+tar
+textutils
+util-linux
+xlibmesa3
+xlibs
+zlib1g
diff --git a/html/depends b/html/depends
new file mode 100644 (file)
index 0000000..cac67c7
--- /dev/null
@@ -0,0 +1,9 @@
+bzip2
+debconf-utils
+debhelper
+html2text
+libbz2-1.0
+libfreetype6
+librpm0
+rpm
+xfree86-common
diff --git a/html/fresh.common b/html/fresh.common
new file mode 100644 (file)
index 0000000..dcafcbc
--- /dev/null
@@ -0,0 +1,44 @@
+at
+base-files
+base-passwd
+bash
+bc
+binutils
+bsdmainutils
+bsdutils
+cpio
+cron
+debianutils
+diff
+dpkg
+exim
+file
+fileutils
+grep
+gzip
+hostname
+libc6
+libc6-dev
+libncurses5
+locales
+login
+lpr
+m4
+make
+man-db
+mawk
+mount
+ncurses-base
+ncurses-bin
+ncurses-term
+passwd
+patch
+procps
+psmisc
+sed
+shellutils
+sysvinit
+tar
+textutils
+util-linux
+zlib1g
diff --git a/html/fresh.extra b/html/fresh.extra
new file mode 100644 (file)
index 0000000..3c8f9b6
--- /dev/null
@@ -0,0 +1,129 @@
+adduser
+apt
+apt-utils
+base-config
+biff
+bin86
+bison
+console-common
+console-data
+console-tools
+console-tools-libs
+cpp
+cpp-2.95
+cpp-3.0
+dc
+debconf
+dhcp-client
+doc-debian
+doc-linux-text
+dpkg-dev
+e2fsprogs
+ed
+fdflush
+fdutils
+findutils
+finger
+flex
+ftp
+g++
+g++-2.95
+gcc
+gcc-2.95
+gcc-3.0
+gcc-3.0-base
+gdb
+gettext-base
+gpm
+groff-base
+host
+iamerican
+ibritish
+ifupdown
+info
+ipchains
+ipmasqadm
+ispell
+klogd
+less
+libcap1
+libdb2
+libdb3
+libgcc1
+libgdbmg1
+libident
+libldap2
+liblockfile1
+libncurses4
+libnewt0
+libnss-db
+libpam-modules
+libpam-runtime
+libpam0g
+libpcre3
+libperl5.6
+libpng2
+libpopt0
+libreadline4
+libsasl-modules
+libsasl7
+libstdc++2.10-dev
+libstdc++2.10-glibc2.2
+libstdc++3
+libwrap0
+lilo
+logrotate
+lsof
+lynx
+mailx
+makedev
+manpages
+manpages-dev
+mbr
+mime-support
+modconf
+modutils
+mpack
+mtools
+mtr-tiny
+mutt
+nano
+net-tools
+netbase
+netkit-inetd
+netkit-ping
+nfs-common
+nfs-kernel-server
+nvi
+pciutils
+perl
+perl-base
+perl-modules
+pidentd
+portmap
+ppp
+pppoe
+procmail
+python-base
+python-newt
+rblcheck
+rcs
+reportbug
+setserial
+sharutils
+slang1
+strace
+sysklogd
+syslinux
+tasksel
+tcpd
+tcsh
+telnet
+texinfo
+time
+update
+util-linux-locales
+vacation
+wenglish
+whiptail
+whois
diff --git a/html/fresh.new b/html/fresh.new
new file mode 100644 (file)
index 0000000..f755ba8
--- /dev/null
@@ -0,0 +1,5 @@
+alien
+lsb-release
+rsync
+xlibmesa3
+xlibs
diff --git a/html/freshinstall b/html/freshinstall
new file mode 100644 (file)
index 0000000..379f576
--- /dev/null
@@ -0,0 +1,173 @@
+adduser
+apt
+apt-utils
+at
+base-config
+base-files
+base-passwd
+bash
+bc
+biff
+bin86
+binutils
+bison
+bsdmainutils
+bsdutils
+console-common
+console-data
+console-tools
+console-tools-libs
+cpio
+cpp
+cpp-2.95
+cpp-3.0
+cron
+dc
+debconf
+debianutils
+dhcp-client
+diff
+doc-debian
+doc-linux-text
+dpkg
+dpkg-dev
+e2fsprogs
+ed
+exim
+fdflush
+fdutils
+file
+fileutils
+findutils
+finger
+flex
+ftp
+g++
+g++-2.95
+gcc
+gcc-2.95
+gcc-3.0
+gcc-3.0-base
+gdb
+gettext-base
+gpm
+grep
+groff-base
+gzip
+host
+hostname
+iamerican
+ibritish
+ifupdown
+info
+ipchains
+ipmasqadm
+ispell
+klogd
+less
+libc6
+libc6-dev
+libcap1
+libdb2
+libdb3
+libgcc1
+libgdbmg1
+libident
+libldap2
+liblockfile1
+libncurses4
+libncurses5
+libnewt0
+libnss-db
+libpam-modules
+libpam-runtime
+libpam0g
+libpcre3
+libperl5.6
+libpng2
+libpopt0
+libreadline4
+libsasl-modules
+libsasl7
+libstdc++2.10-dev
+libstdc++2.10-glibc2.2
+libstdc++3
+libwrap0
+lilo
+locales
+login
+logrotate
+lpr
+lsof
+lynx
+m4
+mailx
+make
+makedev
+man-db
+manpages
+manpages-dev
+mawk
+mbr
+mime-support
+modconf
+modutils
+mount
+mpack
+mtools
+mtr-tiny
+mutt
+nano
+ncurses-base
+ncurses-bin
+ncurses-term
+net-tools
+netbase
+netkit-inetd
+netkit-ping
+nfs-common
+nfs-kernel-server
+nvi
+passwd
+patch
+pciutils
+perl
+perl-base
+perl-modules
+pidentd
+portmap
+ppp
+pppoe
+procmail
+procps
+psmisc
+python-base
+python-newt
+rblcheck
+rcs
+reportbug
+sed
+setserial
+sharutils
+shellutils
+slang1
+strace
+sysklogd
+syslinux
+sysvinit
+tar
+tasksel
+tcpd
+tcsh
+telnet
+texinfo
+textutils
+time
+update
+util-linux
+util-linux-locales
+vacation
+wenglish
+whiptail
+whois
+zlib1g
diff --git a/html/index.html b/html/index.html
new file mode 100644 (file)
index 0000000..0f8f54e
--- /dev/null
@@ -0,0 +1,48 @@
+<HTML>
+<HEAD>
+<TITLE>LSB as it relates to Debian</TITLE>
+</HEAD>
+<BODY>
+<H2>LSB as it relates to Debian</H2>
+This document compares the <A HREF="http://www.linuxbase.org/spec/">LSB written specification</A> to Debian. This changes on a continual basis so check the date at the bottom for when this comparison was last updated. This is a work in progress. Please point out any errors you may find.<BR>
+<BR>
+<I>Package lists last updated using woody on 2001-09-13</I><BR>
+<H3>Required by the Specification</H3>
+First we review the spec and see what that means in terms of Debian packages.
+<UL>
+<LI>Mapping of <A HREF="LSBtoDEB">LSB to Debian packages</A>[1]<BR>
+<LI>Mapping of those <A HREF="DEBtoLSB">Debian packages back to the LSB</A>[2]<BR>
+<LI><A HREF="deblist">List</A>[3] of Debian packages required by LSB<BR>
+</UL>
+<H3>Creating a Debian system plus LSB</H3>
+Now that we know what packages the spec requires we
+<OL>
+<LI>Install a "base" Debian system(including everything "required" by Debian).<BR>
+This results in,
+<UL>
+<LI>the <A HREF="freshinstall">following</A>[4] packages on the system
+<LI><A HREF="fresh.common">these</A>[5] are in common with [3].
+<LI><A HREF="fresh.new">these</A>[6] are in the LSB but not on the system
+<LI><A HREF="fresh.extra">these</A>[7] are on the system but not in LSB
+</UL>
+<LI>Now install the packages from [3] that aren't already installed(which were identified above as [6])
+<LI>Allow all dependencies of those packages to be fulfilled<BR>
+This results in,
+<UL>
+<LI>the <A HREF="superset">following</A>[8] packages on the system
+<LI>the entire list([3]) of Debian packages required by LSB have been installed
+<LI><A HREF="super.extra">this</A>[9] is the list of packages on the system but not in LSB
+</UL>
+</OL>
+<H3>Observations</H3>
+<UL>
+<LI>List [8] is <A HREF="superset">The Debian LSB Sample Implementation</A>
+<LI>[7] is <A HREF="fresh.extra">the list of packages that Debian considers "Required, Important, and Standard" which are not in the LSB</A>. Some of these may deserve consideration for a future version of the LSB.
+<LI>[8] minus [4] yields <A HREF="needed">the packages needed in the Debian base install to make it more LSB compliant</A>[10]
+<LI>[9] minus [7] yields <A HREF="depends">the packages pulled in as dependencies as a result of adding [6] to the system</A>[11]
+</UL>
+<HR>
+Matt Taggart <A HREF="mailto:taggart@debian.org">&lt;taggart@debian.org&gt;</A><BR>
+Last updated September 13, 2001</I>
+</BODY>
+</HTML>
diff --git a/html/needed b/html/needed
new file mode 100644 (file)
index 0000000..dd74928
--- /dev/null
@@ -0,0 +1,14 @@
+alien
+bzip2
+debconf-utils
+debhelper
+html2text
+libbz2-1.0
+libfreetype6
+librpm0
+lsb-release
+rpm
+rsync
+xfree86-common
+xlibmesa3
+xlibs
diff --git a/html/super.extra b/html/super.extra
new file mode 100644 (file)
index 0000000..294a146
--- /dev/null
@@ -0,0 +1,138 @@
+adduser
+apt
+apt-utils
+base-config
+biff
+bin86
+bison
+bzip2
+console-common
+console-data
+console-tools
+console-tools-libs
+cpp
+cpp-2.95
+cpp-3.0
+dc
+debconf
+debconf-utils
+debhelper
+dhcp-client
+doc-debian
+doc-linux-text
+dpkg-dev
+e2fsprogs
+ed
+fdflush
+fdutils
+findutils
+finger
+flex
+ftp
+g++
+g++-2.95
+gcc
+gcc-2.95
+gcc-3.0
+gcc-3.0-base
+gdb
+gettext-base
+gpm
+groff-base
+host
+html2text
+iamerican
+ibritish
+ifupdown
+info
+ipchains
+ipmasqadm
+ispell
+klogd
+less
+libbz2-1.0
+libcap1
+libdb2
+libdb3
+libfreetype6
+libgcc1
+libgdbmg1
+libident
+libldap2
+liblockfile1
+libncurses4
+libnewt0
+libnss-db
+libpam-modules
+libpam-runtime
+libpam0g
+libpcre3
+libperl5.6
+libpng2
+libpopt0
+libreadline4
+librpm0
+libsasl-modules
+libsasl7
+libstdc++2.10-dev
+libstdc++2.10-glibc2.2
+libstdc++3
+libwrap0
+lilo
+logrotate
+lsof
+lynx
+mailx
+makedev
+manpages
+manpages-dev
+mbr
+mime-support
+modconf
+modutils
+mpack
+mtools
+mtr-tiny
+mutt
+nano
+net-tools
+netbase
+netkit-inetd
+netkit-ping
+nfs-common
+nfs-kernel-server
+nvi
+pciutils
+perl
+perl-base
+perl-modules
+pidentd
+portmap
+ppp
+pppoe
+procmail
+python-base
+python-newt
+rblcheck
+rcs
+reportbug
+rpm
+setserial
+sharutils
+slang1
+strace
+sysklogd
+syslinux
+tasksel
+tcpd
+tcsh
+telnet
+texinfo
+time
+update
+util-linux-locales
+vacation
+wenglish
+whiptail
+whois
+xfree86-common
diff --git a/html/superset b/html/superset
new file mode 100644 (file)
index 0000000..63cde84
--- /dev/null
@@ -0,0 +1,187 @@
+adduser
+alien
+apt
+apt-utils
+at
+base-config
+base-files
+base-passwd
+bash
+bc
+biff
+bin86
+binutils
+bison
+bsdmainutils
+bsdutils
+bzip2
+console-common
+console-data
+console-tools
+console-tools-libs
+cpio
+cpp
+cpp-2.95
+cpp-3.0
+cron
+dc
+debconf
+debconf-utils
+debhelper
+debianutils
+dhcp-client
+diff
+doc-debian
+doc-linux-text
+dpkg
+dpkg-dev
+e2fsprogs
+ed
+exim
+fdflush
+fdutils
+file
+fileutils
+findutils
+finger
+flex
+ftp
+g++
+g++-2.95
+gcc
+gcc-2.95
+gcc-3.0
+gcc-3.0-base
+gdb
+gettext-base
+gpm
+grep
+groff-base
+gzip
+host
+hostname
+html2text
+iamerican
+ibritish
+ifupdown
+info
+ipchains
+ipmasqadm
+ispell
+klogd
+less
+libbz2-1.0
+libc6
+libc6-dev
+libcap1
+libdb2
+libdb3
+libfreetype6
+libgcc1
+libgdbmg1
+libident
+libldap2
+liblockfile1
+libncurses4
+libncurses5
+libnewt0
+libnss-db
+libpam-modules
+libpam-runtime
+libpam0g
+libpcre3
+libperl5.6
+libpng2
+libpopt0
+libreadline4
+librpm0
+libsasl-modules
+libsasl7
+libstdc++2.10-dev
+libstdc++2.10-glibc2.2
+libstdc++3
+libwrap0
+lilo
+locales
+login
+logrotate
+lpr
+lsb-release
+lsof
+lynx
+m4
+mailx
+make
+makedev
+man-db
+manpages
+manpages-dev
+mawk
+mbr
+mime-support
+modconf
+modutils
+mount
+mpack
+mtools
+mtr-tiny
+mutt
+nano
+ncurses-base
+ncurses-bin
+ncurses-term
+net-tools
+netbase
+netkit-inetd
+netkit-ping
+nfs-common
+nfs-kernel-server
+nvi
+passwd
+patch
+pciutils
+perl
+perl-base
+perl-modules
+pidentd
+portmap
+ppp
+pppoe
+procmail
+procps
+psmisc
+python-base
+python-newt
+rblcheck
+rcs
+reportbug
+rpm
+rsync
+sed
+setserial
+sharutils
+shellutils
+slang1
+strace
+sysklogd
+syslinux
+sysvinit
+tar
+tasksel
+tcpd
+tcsh
+telnet
+texinfo
+textutils
+time
+update
+util-linux
+util-linux-locales
+vacation
+wenglish
+whiptail
+whois
+xfree86-common
+xlibmesa3
+xlibs
+zlib1g
diff --git a/init-fragment b/init-fragment
new file mode 100644 (file)
index 0000000..65efa70
--- /dev/null
@@ -0,0 +1,12 @@
+### BEGIN INIT INFO
+# X-ZEDV-Note: This should be only installed on Systems in @amd
+# Provides: sshd2
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: Starts the secondary SSHD deamon used for rdist
+# Description: This script runs a second SSH daemon which listens on
+#      a different port (1000) and uses an extra config file.
+#      This is thought be used for system administration.
+### END INIT INFO
diff --git a/init-functions b/init-functions
new file mode 100644 (file)
index 0000000..758bdab
--- /dev/null
@@ -0,0 +1,81 @@
+# /lib/lsb/init-functions for Debian -*- shell-script -*-
+#
+#Copyright (c) 2002 Chris Lawrence
+#All rights reserved.
+#
+#Redistribution and use in source and binary forms, with or without
+#modification, are permitted provided that the following conditions
+#are met:
+#1. Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+#3. Neither the name of the author nor the names of other contributors
+#   may be used to endorse or promote products derived from this software
+#   without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+#ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+#ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+#FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+#DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+#OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+#HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+#LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+#OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+#SUCH DAMAGE.
+
+start_daemon () {
+    local force nice
+    set -- `POSIXLY_CORRECT=1 getopt "fn:" $*`
+    force=0
+    nice=0
+
+    for i in $*; do
+        case $i in
+            -f)  force=1; shift;;
+            -n)  nice=$2; shift 2;;
+            --)  shift; break;;
+        esac
+    done
+
+    exec=$1; shift
+
+    if [ $force = 1 ]; then
+        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --startas $exec --pidfile /dev/null --oknodo -- $*
+    else
+        /sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec --oknodo -- $*
+    fi
+}
+
+# The definition of "return" in the LSB documentation is ambiguous.
+pidofproc () {
+    if [ -e /var/run/$1.pid ]; then
+        cat /var/run/$1.pid
+    else
+        echo
+    fi
+    return 0
+}
+
+# start-stop-daemon uses the same algorithm as "pidofproc" above.
+killproc () {
+    if [ $2 ]; then
+        /sbin/start-stop-daemon --stop --pidfile /var/run/$1.pid --retry 5 --signal $2 --quiet --oknodo
+    else
+        /sbin/start-stop-daemon --stop --pidfile /var/run/$1.pid --retry 5 --retry 5 --quiet --oknodo
+    fi
+}
+
+# Something fancier might be nice.  But it meets the spec.
+log_success_msg () {
+    echo "Success: $1"
+}
+log_failure_msg () {
+    echo "Failure: $1"
+}
+log_warning_msg () {
+    echo "Warning: $1"
+}
diff --git a/initdutils.py b/initdutils.py
new file mode 100644 (file)
index 0000000..856e094
--- /dev/null
@@ -0,0 +1,78 @@
+# Support for scanning init scripts for LSB info
+
+import re, sys, os
+
+FACILITIES = '/var/lib/lsb/facilities'
+
+beginre = re.compile(re.escape('### BEGIN INIT INFO'))
+endre = re.compile(re.escape('### END INIT INFO'))
+linere = re.compile(r'\#\s+([^:]+):\s*(.*)')
+
+def scan_initfile(initfile):
+    headers = {'Description': []}
+    scanning = 0
+    
+    for line in open(initfile).xreadlines():
+        line = line.rstrip()
+        if beginre.match(line):
+            scanning = 1
+            continue
+        elif scanning and endre.match(line):
+            scanning = 0
+            continue
+        elif not scanning:
+            continue
+
+        if line[0] != '#':
+            continue
+
+        if line[1:3] == '  ' or line[1] == '\t':
+            headers['Description'].append(line[1:].strip())
+            continue
+
+        match = linere.match(line)
+        if not match:
+            print >> sys.stderr, "Warning: ignoring invalid init info line"
+            print >> sys.stderr, "-> %s" % line
+            continue
+
+        header, body = match.groups()
+        if header == "Description":
+            headers[header].append(body.strip())
+        elif header in ('Default-Start', 'Default-Stop'):
+            headers[header] = map(int, body.split())
+        elif header in ('Required-Start', 'Required-Stop', 'Provides'):
+            headers[header] = body.split()
+        else:
+            headers[header] = body
+
+    return headers
+
+def save_facilities(facilities):
+    if not facilities:
+        try:
+            os.unlink(FACILITIES)
+        except OSError:
+            pass
+        return
+    
+    items = facilities.items()
+    fh = open(FACILITIES, 'w')
+    for facility, entries in items:
+        if facility[0] == '$': continue
+        for scriptname, pri in entries.items():
+            start, stop = pri
+            print >> fh, "%(scriptname)s %(facility)s %(start)d %(stop)d" % locals()
+    fh.close()
+
+def load_facilities():
+    facilities = {}
+    if os.path.exists(FACILITIES):
+        for line in open(FACILITIES).xreadlines():
+            try:
+                scriptname, name, start, stop = line.strip().split()
+                facilities.get(name, {})[scriptname] = (int(start), int(stop))
+            except ValueError, x:
+                print >> sys.stderr, 'Invalid facility line', line
+
+    return facilities
diff --git a/install_initd b/install_initd
new file mode 100755 (executable)
index 0000000..cafa58e
--- /dev/null
@@ -0,0 +1,91 @@
+#!/usr/bin/python
+
+import sys, re, os, initdutils
+
+if len(sys.argv) > 1:
+    initfile = sys.argv[1]
+else:
+    print >> sys.stderr, 'Usage: %s /etc/init.d/<init-script>' % sys.argv[0]
+    sys.exit(1)
+
+# Default priorities
+startpri = stoppri = 20
+defstart = [2, 3, 4, 5]
+defstop = [0, 1, 6]
+
+# Priorities of these facilities in Debian
+os_facilities = {
+    "$local_fs" : {'lsb' : (0, 100)},
+    "$network" : {'lsb' : (10, 50)},
+    "$remote_fs" : {'lsb ': (19, 20)},
+    "$named" : {'lsb': (19, 19)},
+    "$syslog" : {'lsb' : (10, 89)},
+    "$netdaemons" : {'lsb': (80, 19)},
+    }
+
+facilities = initdutils.load_facilities()
+facilities.update(os_facilities)
+
+headers = initdutils.scan_initfile(initfile)
+
+reqstart = headers.get('Required-Start', [])
+if reqstart:
+    startpri = 5
+    for facility in reqstart:
+        if not facilities.has_key(facility):
+            print >> sys.stderr, 'Missing expected start facility', facility
+        else:
+            for script, pri in facilities[facility].items():
+                if script != initfile:
+                    start, stop = pri
+                    startpri = max(startpri, start+1)
+    startpri = min(max(startpri, 1), 99)
+
+reqstop = headers.get('Required-Stop', [])
+if reqstop:
+    stoppri = 95
+    for facility in reqstop:
+        if not facilities.has_key(facility):
+            print >> sys.stderr, 'Missing expected stop facility', facility
+        else:
+            for script, pri in facilities[facility].items():
+                if script != initfile:
+                    start, stop = pri
+                    stoppri = min(stoppri, stop-1)
+    stoppri = min(max(stoppri, 1), 99)
+
+provides = headers.get('Provides', [])
+if provides:
+    for facility in provides:
+        if facility[0] == '$':
+            print >> sys.stderr, 'Ignoring system-provided facility', facility
+            continue
+        if not facilities.has_key(facility):
+            facilities[facility] = {}
+
+        facilities[facility][initfile] = (startpri, stoppri)
+    initdutils.save_facilities(facilities)
+
+defstart = headers.get('Default-Start', defstart)
+defstop = headers.get('Default-Stop', defstop)
+
+# A set type would be nice... [range(2,6) = 2..5]
+for level in range(2,6):
+    if level in defstart:
+        for i in range(2,6):
+            if i not in defstart:
+                defstart.append(i)
+    if level in defstop:
+        for i in range(2,6):
+            if i not in defstop:
+                defstop.append(i)
+
+defstart.sort()
+defstop.sort()
+
+start_runlevels = " ".join(map(str, defstart))
+stop_runlevels = " ".join(map(str, defstop))
+
+initfile = initfile.replace('/etc/init.d/', '')
+
+os.system("/usr/sbin/update-rc.d %(initfile)s start %(startpri)d %(start_runlevels)s . stop %(stoppri)d %(stop_runlevels)s ." % locals())
diff --git a/lsb.8 b/lsb.8
new file mode 100644 (file)
index 0000000..89b5f9f
--- /dev/null
+++ b/lsb.8
@@ -0,0 +1,35 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH lsb 8 "2002-02-24"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+lsb \- Linux Standard Base support for Debian
+.SH DESCRIPTION
+The \fBlsb\fP package provides infrastructure for installing Linux
+Standard Base applications on Debian.  This manual page is designed to
+refer system adminstrators and others to the documentation available.
+.PP
+The Linux Standard Base is a common runtime environment for
+third-party packages.  The goal of the LSB is to make it easy to
+create binary packages that will run on any Linux distribution.  For
+more information on the standard, please see the LSB web site.
+.SH SEE ALSO
+.BR /usr/share/doc/lsb/README.Debian
+.BR /usr/share/doc/lsb/html/
+.BR http://www.linuxbase.org/
+.SH AUTHOR
+This manual page was written by Chris Lawrence <lawrencc@debian.org>
+for the Debian system (but may be used by others).
diff --git a/remove_initd b/remove_initd
new file mode 100755 (executable)
index 0000000..641e2cb
--- /dev/null
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+import sys, re, os, initdutils
+
+if len(sys.argv) > 1:
+    initfile = sys.argv[1]
+else:
+    print >> sys.stderr, 'Usage: %s /etc/init.d/<init-script>' % sys.argv[0]
+    sys.exit(1)
+
+headers = initdutils.scan_initfile(initfile)
+
+provides = headers.get('Provides')
+if provides:
+    facilities = initdutils.load_facilities()
+
+    for facility in provides:
+        if facilities.has_key(facility):
+            entries = []
+            for entry in facilities[facility]:
+                if entry[0] != initfile:
+                    entries.append(entry)
+            facilities[facility] = entries
+
+    initdutils.save_facilities(facilities)
+
+initfile = initfile.replace('/etc/init.d/', '')
+os.system('/usr/sbin/update-rc.d -f %s remove' % initfile)