From: Didier Raboud Date: Fri, 17 Feb 2012 08:56:34 +0000 (+0100) Subject: Reduce debian/rules using tiny dh7 style. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~191 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a0698b1be588a44c42115dc65fa385a7d12391e5;p=lsb.git Reduce debian/rules using tiny dh7 style. - Bump debhelper B-D to >= 7.0.50~ - Rename all implicit debian/* files to package-specific names. Signed-off-by: Didier Raboud --- diff --git a/debian/config b/debian/config deleted file mode 100755 index e927aac..0000000 --- a/debian/config +++ /dev/null @@ -1,8 +0,0 @@ -#!/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 index 07023b5..9e02184 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: misc Priority: extra Maintainer: Debian LSB Team Uploaders: Didier Raboud -Build-Depends: debhelper (>> 7), +Build-Depends: debhelper (>> 7.0.50~), po-debconf (>= 0.5.0), dpkg-dev (>= 1.10), python-support, python-all-dev diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index d3d8c10..0000000 --- a/debian/dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/lib/lsb -var/lib/lsb -etc/profile.d diff --git a/debian/lsb-base.install b/debian/lsb-base.install new file mode 100644 index 0000000..a9b214a --- /dev/null +++ b/debian/lsb-base.install @@ -0,0 +1 @@ +init-functions /lib/lsb diff --git a/debian/lsb-core.config b/debian/lsb-core.config new file mode 100755 index 0000000..e927aac --- /dev/null +++ b/debian/lsb-core.config @@ -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/lsb-core.dirs b/debian/lsb-core.dirs new file mode 100644 index 0000000..d3d8c10 --- /dev/null +++ b/debian/lsb-core.dirs @@ -0,0 +1,3 @@ +usr/lib/lsb +var/lib/lsb +etc/profile.d diff --git a/debian/lsb-core.examples b/debian/lsb-core.examples new file mode 100644 index 0000000..3ef7215 --- /dev/null +++ b/debian/lsb-core.examples @@ -0,0 +1 @@ +test/init-skeleton diff --git a/debian/lsb-core.install b/debian/lsb-core.install new file mode 100644 index 0000000..eaee1e9 --- /dev/null +++ b/debian/lsb-core.install @@ -0,0 +1,4 @@ +initdutils.py /usr/lib/lsb +install_initd /usr/lib/lsb +remove_initd /usr/lib/lsb +lsbinstall /usr/lib/lsb diff --git a/debian/lsb-core.postinst b/debian/lsb-core.postinst new file mode 100755 index 0000000..cb86233 --- /dev/null +++ b/debian/lsb-core.postinst @@ -0,0 +1,64 @@ +#!/bin/sh -e + +setup_ldso_symlink () { + ARCH=`dpkg --print-architecture` + case "$ARCH" in + 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 + ;; + powerpc) + ln -sf ld.so.1 /lib/ld-lsb-ppc32.so.1 + ln -sf ld.so.1 /lib/ld-lsb-ppc32.so.2 + ln -sf ld.so.1 /lib/ld-lsb-ppc32.so.3 + ;; + i386) + ln -sf ld-linux.so.2 /lib/ld-lsb.so.1 + ln -sf ld-linux.so.2 /lib/ld-lsb.so.2 + ln -sf ld-linux.so.2 /lib/ld-lsb.so.3 + ;; + amd64) + ln -sf ld-linux.so.2 /lib/ld-lsb.so.1 + ln -sf ld-linux.so.2 /lib/ld-lsb.so.2 + ln -sf ld-linux.so.2 /lib/ld-lsb.so.3 + ln -sf ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.2 + ln -sf ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3 + [ -L /lib/ld-lsb-x86-64.so.2 ] && rm /lib/ld-lsb-x86-64.so.2 || true + [ -L /lib/ld-lsb-x86-64.so.3 ] && rm /lib/ld-lsb-x86-64.so.3 || true + ;; + ia64) + ln -sf ld-linux-ia64.so.2 /lib/ld-lsb-ia64.so.1 + ln -sf ld-linux-ia64.so.2 /lib/ld-lsb-ia64.so.2 + ln -sf ld-linux-ia64.so.2 /lib/ld-lsb-ia64.so.3 + ;; + *) + echo "ld-lsb-*.so.1 symlink for $ARCH is unknown!" + ;; + esac +} + +PATH=/sbin:/usr/sbin:$PATH +export PATH + +. /usr/share/debconf/confmodule + +case "$1" in + configure) + if [ ! -e /etc/shadow ]; then + db_get lsb/shadowconfig + if [ "$RET" = "true" ]; then + shadowconfig on >&2 || true + fi + fi + setup_ldso_symlink + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# diff --git a/debian/lsb-core.prerm b/debian/lsb-core.prerm new file mode 100644 index 0000000..0740b5b --- /dev/null +++ b/debian/lsb-core.prerm @@ -0,0 +1,42 @@ +#!/bin/sh -e + +remove_ldso_symlink () { + ARCH=`dpkg --print-architecture` + case "$ARCH" in + s390|ia64|ppc64|sparc|sparc64|alpha|hppa|m68k|mipsel) + rm -f /lib/ld-lsb-$ARCH.so.[123] + ;; + powerpc) + rm -f /lib/ld-lsb-ppc32.so.[123] + ;; + i386) + rm -f /lib/ld-lsb.so.[123] + ;; + amd64) + rm -f /lib/ld-lsb.so.[123] /lib64/ld-lsb-x86-64.so.[23] /lib/ld-lsb-x86-64.so.[23] + ;; + *) + echo "ld-lsb-*.so.1 symlink for $ARCH is unknown; not removed." + ;; + esac +} + +PATH=/sbin:/usr/sbin:$PATH +export PATH + +case "$1" in + remove) + remove_ldso_symlink + rm -f /var/lib/lsb/facilities + rm -f /var/lib/lsb/depends + ;; + failed-upgrade|upgrade|deconfigure) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# diff --git a/debian/lsb-core.templates b/debian/lsb-core.templates new file mode 100644 index 0000000..47b8c0f --- /dev/null +++ b/debian/lsb-core.templates @@ -0,0 +1,25 @@ +# These templates have been reviewed by the debian-l10n-english +# team +# +# If modifications/additions/rewording are needed, please ask +# for an advice to debian-l10n-english@lists.debian.org +# +# Even minor modifications require translation updates and such +# changes should be coordinated with translators and reviewers. + +Template: lsb/shadowconfig +Type: boolean +Default: true +_Description: Enable shadow passwords? + The Linux Standard Base requires that certain features of adduser(8) + be available to conforming applications (such as password + aging). These features are only provided when shadow passwords are + enabled, while this system has them disabled. + . + Most LSB applications will work fine with either setting, but complete + conformance requires shadow passwords to be enabled. + . + 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 + check passwords against /etc/passwd). diff --git a/debian/lsb-release.bug-script b/debian/lsb-release.bug-script new file mode 100755 index 0000000..151361b --- /dev/null +++ b/debian/lsb-release.bug-script @@ -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 diff --git a/debian/lsb-release.bugscript b/debian/lsb-release.bugscript deleted file mode 100755 index 151361b..0000000 --- a/debian/lsb-release.bugscript +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 diff --git a/debian/lsb-release.install b/debian/lsb-release.install new file mode 100644 index 0000000..b28783d --- /dev/null +++ b/debian/lsb-release.install @@ -0,0 +1,2 @@ +lsb_release /usr/bin +lsb_release.py /usr/share/python-support/lsb-release diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in index cef83a3..6370349 100644 --- a/debian/po/POTFILES.in +++ b/debian/po/POTFILES.in @@ -1 +1 @@ -[type: gettext/rfc822deb] templates +[type: gettext/rfc822deb] lsb-core.templates diff --git a/debian/postinst b/debian/postinst deleted file mode 100755 index cb86233..0000000 --- a/debian/postinst +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -e - -setup_ldso_symlink () { - ARCH=`dpkg --print-architecture` - case "$ARCH" in - 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 - ;; - powerpc) - ln -sf ld.so.1 /lib/ld-lsb-ppc32.so.1 - ln -sf ld.so.1 /lib/ld-lsb-ppc32.so.2 - ln -sf ld.so.1 /lib/ld-lsb-ppc32.so.3 - ;; - i386) - ln -sf ld-linux.so.2 /lib/ld-lsb.so.1 - ln -sf ld-linux.so.2 /lib/ld-lsb.so.2 - ln -sf ld-linux.so.2 /lib/ld-lsb.so.3 - ;; - amd64) - ln -sf ld-linux.so.2 /lib/ld-lsb.so.1 - ln -sf ld-linux.so.2 /lib/ld-lsb.so.2 - ln -sf ld-linux.so.2 /lib/ld-lsb.so.3 - ln -sf ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.2 - ln -sf ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3 - [ -L /lib/ld-lsb-x86-64.so.2 ] && rm /lib/ld-lsb-x86-64.so.2 || true - [ -L /lib/ld-lsb-x86-64.so.3 ] && rm /lib/ld-lsb-x86-64.so.3 || true - ;; - ia64) - ln -sf ld-linux-ia64.so.2 /lib/ld-lsb-ia64.so.1 - ln -sf ld-linux-ia64.so.2 /lib/ld-lsb-ia64.so.2 - ln -sf ld-linux-ia64.so.2 /lib/ld-lsb-ia64.so.3 - ;; - *) - echo "ld-lsb-*.so.1 symlink for $ARCH is unknown!" - ;; - esac -} - -PATH=/sbin:/usr/sbin:$PATH -export PATH - -. /usr/share/debconf/confmodule - -case "$1" in - configure) - if [ ! -e /etc/shadow ]; then - db_get lsb/shadowconfig - if [ "$RET" = "true" ]; then - shadowconfig on >&2 || true - fi - fi - setup_ldso_symlink - ;; - abort-upgrade|abort-remove|abort-deconfigure) - ;; - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# diff --git a/debian/prerm b/debian/prerm deleted file mode 100644 index 0740b5b..0000000 --- a/debian/prerm +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -e - -remove_ldso_symlink () { - ARCH=`dpkg --print-architecture` - case "$ARCH" in - s390|ia64|ppc64|sparc|sparc64|alpha|hppa|m68k|mipsel) - rm -f /lib/ld-lsb-$ARCH.so.[123] - ;; - powerpc) - rm -f /lib/ld-lsb-ppc32.so.[123] - ;; - i386) - rm -f /lib/ld-lsb.so.[123] - ;; - amd64) - rm -f /lib/ld-lsb.so.[123] /lib64/ld-lsb-x86-64.so.[23] /lib/ld-lsb-x86-64.so.[23] - ;; - *) - echo "ld-lsb-*.so.1 symlink for $ARCH is unknown; not removed." - ;; - esac -} - -PATH=/sbin:/usr/sbin:$PATH -export PATH - -case "$1" in - remove) - remove_ldso_symlink - rm -f /var/lib/lsb/facilities - rm -f /var/lib/lsb/depends - ;; - failed-upgrade|upgrade|deconfigure) - ;; - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - - -#DEBHELPER# diff --git a/debian/rules b/debian/rules index 257144e..47ea9ec 100755 --- a/debian/rules +++ b/debian/rules @@ -1,9 +1,7 @@ #!/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 +%: + dh $@ # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) @@ -11,13 +9,6 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - # Map Debian architectures to LSB architectures lsbarch=${DEB_HOST_ARCH} ifeq (${lsbarch}, i386) @@ -47,95 +38,11 @@ ifeq (${lsbarch}, alpha) LIBC=libc6.1 (>> 2.3.5) 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] debian/lsb*substvars - - # Add here commands to clean up after the build process. - +override_dh_clean: dh_clean + rm -f *.py[co] -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - - # Add here commands to install the package into debian/lsb. - #$(MAKE) install DESTDIR=$(CURDIR)/debian/lsb - 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 lsb_release.py debian/lsb-release/usr/share/python-support/lsb-release - cp -p debian/lsb-release.bugscript debian/lsb-release/usr/share/bug/lsb-release - -# Build architecture-independent files here. -binary-indep: build install - 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_perl - dh_pysupport -i -# dh_python - dh_installdeb -i - 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 -a - dh_installdocs -a - dh_installexamples -a test/init-skeleton - dh_installmenu -a -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit - dh_installcron -a - dh_installman -a - dh_installinfo -a -# dh_undocumented - dh_installchangelogs -a +override_dh_gencontrol: @echo >> debian/lsb-core.substvars "glibc=${LIBC}" # @[ ${DEB_HOST_GNU_TYPE} != 'arm-linux-gnueabi' ] && echo >> debian/lsb-cxx.substvars "depends=libstdc++5" || true @echo >> debian/lsb-core.substvars "provides=lsb-core-${lsbarch}" @@ -148,18 +55,4 @@ binary-arch: build install @echo >> debian/lsb-printing.substvars "provides=lsb-printing-${lsbarch}" @[ ${DEB_HOST_ARCH} = 'amd64' ] && echo >> debian/lsb-core.substvars "depends=libc6-i386, lib32z1" || true @[ ${DEB_HOST_ARCH} = 'kfreebsd-amd64' ] && echo >> debian/lsb-core.substvars "depends=libc0.1-i386, lib32z1" || true - dh_link -a - dh_strip -a - dh_compress -a - dh_fixperms -a - dh_pysupport -a -# dh_makeshlibs - dh_installdeb -a -# dh_perl - dh_shlibdeps -a - dh_gencontrol -a - dh_md5sums -a - dh_builddeb -a - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure + dh_gencontrol diff --git a/debian/templates b/debian/templates deleted file mode 100644 index 47b8c0f..0000000 --- a/debian/templates +++ /dev/null @@ -1,25 +0,0 @@ -# These templates have been reviewed by the debian-l10n-english -# team -# -# If modifications/additions/rewording are needed, please ask -# for an advice to debian-l10n-english@lists.debian.org -# -# Even minor modifications require translation updates and such -# changes should be coordinated with translators and reviewers. - -Template: lsb/shadowconfig -Type: boolean -Default: true -_Description: Enable shadow passwords? - The Linux Standard Base requires that certain features of adduser(8) - be available to conforming applications (such as password - aging). These features are only provided when shadow passwords are - enabled, while this system has them disabled. - . - Most LSB applications will work fine with either setting, but complete - conformance requires shadow passwords to be enabled. - . - 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 - check passwords against /etc/passwd).