From 00030759b1c52f71136a201f16bda317246f57d7 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Sun, 16 Oct 2016 14:01:32 +0200 Subject: [PATCH] Cherry-pick the lsb-core package from 4.1+Debian14 --- debian/control | 58 +++++++++++++++++++++++++ debian/lsb-core.config | 12 ++++++ debian/lsb-core.dirs | 3 ++ debian/lsb-core.examples | 1 + debian/lsb-core.install | 4 ++ debian/lsb-core.lintian-overrides | 2 + debian/lsb-core.manpages | 1 + debian/lsb-core.postinst | 71 +++++++++++++++++++++++++++++++ debian/lsb-core.prerm | 47 ++++++++++++++++++++ debian/lsb-core.templates | 25 +++++++++++ 10 files changed, 224 insertions(+) create mode 100755 debian/lsb-core.config create mode 100644 debian/lsb-core.dirs create mode 100644 debian/lsb-core.examples create mode 100644 debian/lsb-core.install create mode 100644 debian/lsb-core.lintian-overrides create mode 100644 debian/lsb-core.manpages create mode 100755 debian/lsb-core.postinst create mode 100644 debian/lsb-core.prerm create mode 100644 debian/lsb-core.templates diff --git a/debian/control b/debian/control index 6e48f25..3554ee6 100644 --- a/debian/control +++ b/debian/control @@ -15,6 +15,64 @@ Homepage: http://www.linuxfoundation.org/collaborate/workgroups/lsb Vcs-Git: git://anonscm.debian.org/collab-maint/lsb.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/lsb.git +Package: lsb-core +Architecture: any +Depends: lsb-release (>= ${source:Version}), + ${glibc}, + libz1, + libncurses5, + libpam0g, + lsb-invalid-mta (>= ${source:Version}) | mail-transport-agent, + at, + bc, + binutils, + bsdmainutils, + bsdutils, + cpio, + cron | cron-daemon, + ed, + file, + libc6-dev | libc-dev, + locales, + cups-bsd | lpr, + lprng | cups-client, + m4, + mailutils | mailx, + make, + man-db, + mawk | gawk, + ncurses-term, + passwd, + patch, + pax, + procps, + psmisc, + rsync, + alien (>= 8.36), + ${python3:Depends}, + ${misc:Depends}, + ${depends}, + lsb-base (>= ${source:Version}), + lsb-security (>= ${source:Version}), + time +Provides: lsb-core-noarch, ${provides} +Description: Linux Standard Base 4.1 core support package + 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 provides an implementation of the core of version 4.1 of + the Linux Standard Base for Debian on the Intel x86, Intel ia64 + (Itanium), IBM S390, and PowerPC 32-bit architectures with the Linux + kernel. Future revisions of the specification and this package 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 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 Multi-Arch: foreign diff --git a/debian/lsb-core.config b/debian/lsb-core.config new file mode 100755 index 0000000..88952b5 --- /dev/null +++ b/debian/lsb-core.config @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +if [ ! -e /etc/shadow ]; then + db_input medium lsb/shadowconfig || true +fi +db_go + +#DEBHELPER# 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.lintian-overrides b/debian/lsb-core.lintian-overrides new file mode 100644 index 0000000..64b2b9f --- /dev/null +++ b/debian/lsb-core.lintian-overrides @@ -0,0 +1,2 @@ +# The purpose of LSB is to ensure that those packages are present. Being explicit cannot hurt. +depends-on-essential-package-without-using-version depends: bsdutils diff --git a/debian/lsb-core.manpages b/debian/lsb-core.manpages new file mode 100644 index 0000000..44c423d --- /dev/null +++ b/debian/lsb-core.manpages @@ -0,0 +1 @@ +lsb.8 diff --git a/debian/lsb-core.postinst b/debian/lsb-core.postinst new file mode 100755 index 0000000..435d1e0 --- /dev/null +++ b/debian/lsb-core.postinst @@ -0,0 +1,71 @@ +#!/bin/sh + +set -e + +setup_ldso_symlink () { + ARCH=$DPKG_MAINTSCRIPT_ARCH + if [ -z "$ARCH" ]; then + ARCH=$(dpkg --print-architecture) + fi + 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 + ;; + 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 + if dpkg --compare-versions "$2" lt "3.2+Debian30" ; then + [ -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 + 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..8b1f535 --- /dev/null +++ b/debian/lsb-core.prerm @@ -0,0 +1,47 @@ +#!/bin/sh + +set -e + +remove_ldso_symlink () { + ARCH=$DPKG_MAINTSCRIPT_ARCH + if [ -z "$ARCH" ]; then + ARCH=$(dpkg --print-architecture) + fi + 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] + ;; + *) + 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). -- 2.30.2