From de85f20e859fad79dc95aaca554c4fa09e920374 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:37:48 +0200 Subject: Adding debian version 13.3. Signed-off-by: Daniel Baumann --- debian/base-files.dirs | 6 ------ debian/base-files.lintian-overrides | 13 +++++++++++++ debian/changelog | 7 +++++++ debian/clean | 1 + debian/control | 2 +- debian/postinst | 22 ++++++++++++++++++++++ debian/postrm | 11 +++++++++++ debian/preinst | 32 ++++++++++++++++++++++++++++++++ debian/rules | 28 +++++++++++++++++++++++++++- 9 files changed, 114 insertions(+), 8 deletions(-) create mode 100644 debian/postrm create mode 100644 debian/preinst 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 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 < 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)' -- cgit v1.2.3