diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:37:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:37:48 +0000 |
commit | de85f20e859fad79dc95aaca554c4fa09e920374 (patch) | |
tree | d658ca6f0c6446d5bb248240d0fc1876d04d5f0b | |
parent | Merging upstream version 13.3. (diff) | |
download | base-files-debian.tar.xz base-files-debian.zip |
Adding debian version 13.3.debian/13.3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r-- | debian/base-files.dirs | 6 | ||||
-rw-r--r-- | debian/base-files.lintian-overrides | 13 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/clean | 1 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/postinst | 22 | ||||
-rw-r--r-- | debian/postrm | 11 | ||||
-rw-r--r-- | debian/preinst | 32 | ||||
-rwxr-xr-x | debian/rules | 28 |
9 files changed, 114 insertions, 8 deletions
diff --git a/debian/base-files.dirs b/debian/base-files.dirs index b646146..d0769e4 100644 --- a/debian/base-files.dirs +++ b/debian/base-files.dirs @@ -1,4 +1,3 @@ -bin boot dev etc @@ -8,19 +7,14 @@ etc/profile.d etc/skel etc/update-motd.d home -lib proc root run -sbin sys tmp usr -usr/bin usr/games usr/include -usr/lib -usr/sbin usr/share usr/share/base-files usr/share/common-licenses diff --git a/debian/base-files.lintian-overrides b/debian/base-files.lintian-overrides index 691e9e6..e65cf1d 100644 --- a/debian/base-files.lintian-overrides +++ b/debian/base-files.lintian-overrides @@ -20,3 +20,16 @@ base-files: extra-license-file [usr/share/common-licenses/GPL-3] base-files: extra-license-file [usr/share/common-licenses/LGPL-2] base-files: extra-license-file [usr/share/common-licenses/LGPL-2.1] base-files: extra-license-file [usr/share/common-licenses/LGPL-3] +# +# These links really should be relative. +# +base-files: relative-symlink usr/bin [bin] +base-files: relative-symlink usr/lib [lib] +base-files: relative-symlink usr/lib64 [lib64] +base-files: relative-symlink usr/libx32 [libx32] +base-files: relative-symlink usr/sbin [sbin] +# +# We need these for the relevant architectures. +# +base-files: non-multi-arch-lib-dir [usr/lib64/] +base-files: non-multi-arch-lib-dir [usr/libx32/] diff --git a/debian/changelog b/debian/changelog index cb72d36..43086e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +base-files (13.3) unstable; urgency=medium + + [ Helmut Grohne ] + * DEP17: Install /usr-merge aliasing symlinks. Closes: #1064459. + + -- Santiago Vila <sanvila@debian.org> Thu, 06 Jun 2024 00:35:00 +0200 + base-files (13.2) unstable; urgency=medium * Document that /etc/profile is not a conffile anymore. Closes: #868095. diff --git a/debian/clean b/debian/clean index e69de29..b4ac698 100644 --- a/debian/clean +++ b/debian/clean @@ -0,0 +1 @@ +debian/triggers diff --git a/debian/control b/debian/control index d4bad8a..942fed8 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: debhelper-compat (= 13), debhelper (>= 13.10~) Rules-Requires-Root: binary-targets Package: base-files -Provides: base +Provides: base, usr-is-merged Architecture: any Pre-Depends: awk Depends: ${misc:Depends} diff --git a/debian/postinst b/debian/postinst index 2708d17..e1ad3a4 100644 --- a/debian/postinst +++ b/debian/postinst @@ -108,4 +108,26 @@ if [ "$1" = "configure" ] && [ "$2" != "" ]; then fi fi +rtlddir="#USR_MERGE_RTLDLIB#" +if [ "$1" = "configure" ] && [ -n "$rtlddir" ]; then + # Remove temporary DEP17 M4 diversion added by glibc. + dpkg-divert --quiet --package base-files --remove --no-rename --divert "/.$rtlddir.usr-is-merged" "/$rtlddir" +fi + +if [ "$1" = "configure" ] || [ "$1" = "triggered" ]; then + for d in #USR_MERGE_MULTILIB#; do + if [ -d "$DPKG_ROOT/usr/$d" ]; then + if [ -L "$DPKG_ROOT/$d" ]; then + : + elif [ -d "$DPKG_ROOT/$d" ]; then + echo "Warning: /$d is not a symlink, but should be." 1>&2 + else + ln -s "usr/$d" "$DPKG_ROOT/$d" + fi + elif [ -L "$DPKG_ROOT/$d" ]; then + rm "$DPKG_ROOT/$d" + fi + done +fi + #DEBHELPER# diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..402c738 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +if [ "$1" = "remove" ]; then + for d in #USR_MERGE_MULTILIB#; do + # Remove DEP17 M4 protective diversions + dpkg-divert --quiet --package base-files --remove --no-rename --divert "/.$d.usr-is-merged" "/$d" + done +fi + +#DEBHELPER# diff --git a/debian/preinst b/debian/preinst new file mode 100644 index 0000000..b657de5 --- /dev/null +++ b/debian/preinst @@ -0,0 +1,32 @@ +#!/bin/sh +set -e + +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then + for d in bin lib lib32 lib64 libo32 lib64 sbin; do + if [ -d "$DPKG_ROOT/$d" ] && [ ! -L "$DPKG_ROOT/$d" ]; then + cat <<EOF + + +****************************************************************************** +* +* The base-files package cannot be installed because this system has a +* split /usr. +* +* Please install the usrmerge package to convert this system to merged-/usr. +* +* For more information please read https://wiki.debian.org/UsrMerge. +* +****************************************************************************** + + +EOF + exit 1 + fi + done + for d in #USR_MERGE_MULTILIB#; do + # Install DEP17 M4 protective diversions + dpkg-divert --quiet --package base-files --add --no-rename --divert "/.$d.usr-is-merged" "/$d" + done +fi + +#DEBHELPER# diff --git a/debian/rules b/debian/rules index 05dfb39..17ad36f 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,7 @@ #!/usr/bin/make -f +include /usr/share/dpkg/architecture.mk + OSNAME = "GNU/`uname | sed -e 's/GNU\///'`" ifeq ($(DEB_HOST_GNU_SYSTEM),linux) OSNAME=GNU/Linux @@ -11,6 +13,14 @@ endif VENDORFILE = debian DESTDIR = debian/base-files +ifneq (,$(filter $(DEB_HOST_ARCH),amd64 loong64 mips64el ppc64 ppc64el sparc64)) + USR_MERGE_RTLDLIB = lib64 +else ifneq (,$(filter $(DEB_HOST_ARCH),x32)) + USR_MERGE_RTLDLIB = libx32 +endif +USR_MERGE = bin lib sbin $(USR_MERGE_RTLDLIB) +USR_MERGE_MULTILIB = $(filter-out $(USR_MERGE),lib32 lib64 libo32 libx32) + %: dh $@ @@ -19,6 +29,15 @@ execute_after_dh_clean: override_dh_auto_build: sh debian/check-md5sum-etc profile + set -e; { \ + echo "# Triggers for creating multilib aliasing symlinks on demand"; \ + for d in $(USR_MERGE_MULTILIB); do \ + echo "interest-noawait /usr/$$d"; \ + done; \ + } > debian/triggers + +execute_after_dh_installdirs: + dh_installdirs $(foreach d,$(USR_MERGE),usr/$(d)) override_dh_auto_install: install -p -m 644 etc/* $(DESTDIR)/etc @@ -42,6 +61,10 @@ override_dh_installchangelogs: override_dh_link: dh_link -X os-release + # We want these links to be relative, so we cannot use dh_link. + set -e; for d in $(USR_MERGE); do \ + ln -s usr/$$d debian/base-files/$$d; \ + done override_dh_compress: dh_compress -X README @@ -55,4 +78,7 @@ override_dh_fixperms: cd debian/base-files && chmod 700 root override_dh_installdeb: - dh_installdeb -DVENDORFILE=$(VENDORFILE) + dh_installdeb \ + '-DVENDORFILE=$(VENDORFILE)' \ + '-DUSR_MERGE_MULTILIB=$(USR_MERGE_MULTILIB)' \ + '-DUSR_MERGE_RTLDLIB=$(USR_MERGE_RTLDLIB)' |