block 1064459 by 1053111 1055959 1059533 1059919 1059981 1060000 1060089 1060139 1060160 1060270 1061274 user helm...@debian.org usertags 1064459 dep17m2 thanks
Hi Santiago, Thanks for the quick feedback. On Thu, Feb 22, 2024 at 03:27:20PM +0100, Santiago Vila wrote: > Hi> Please respect any already existing coding style that > you can notice in other parts of base-files. > > Some examples: > > Indent in shell script using 2 spaces. > Quotes around "triggered" and similar places. I'm sorry. I've attached an updated patch correcting this in all places. > (Also, I wonder if it would be possible to create debian/triggers > using some sort of dh-exec-like template instead of having > extra variables and a for loop in debian/rules). Difficult. The problem is that we need a looping construct here or duplicate the logic from debian/rules. I value don't-repeat-yourself higher than being able to use dh-exec and hence interpolated the triggers from debian/rules. I somewhat simplified the logic using make's filter-out now. Hope that makes things more clear. > While we are at it: Is there an estimated date when you will want > to upload this? We can only move forward once all of the bugs marked as blockers have been fixed (ideally in trixie). I'll have to look into NMUing them soon. If all goes well and time64 settles, I can do the synced NMU around the end of March. Does that work for you? An unsolved problem at this time is how to ensure that all of the relevant packages migrate to trixie at the same time. Possibly we'll have to add mutual versioned Breaks to the mix. Helmut
diff --minimal -Nru base-files-13/debian/base-files.dirs base-files-13+nmu1/debian/base-files.dirs --- base-files-13/debian/base-files.dirs 2023-03-02 14:00:00.000000000 +0100 +++ base-files-13+nmu1/debian/base-files.dirs 2024-01-24 08:10:53.000000000 +0100 @@ -1,4 +1,3 @@ -bin boot dev etc @@ -8,19 +7,14 @@ 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 --minimal -Nru base-files-13/debian/base-files.lintian-overrides base-files-13+nmu1/debian/base-files.lintian-overrides --- base-files-13/debian/base-files.lintian-overrides 2023-03-02 14:00:00.000000000 +0100 +++ base-files-13+nmu1/debian/base-files.lintian-overrides 2024-02-22 17:16:54.000000000 +0100 @@ -20,3 +20,14 @@ 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] + +# Yes, 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] + +# Yes, 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 --minimal -Nru base-files-13/debian/changelog base-files-13+nmu1/debian/changelog --- base-files-13/debian/changelog 2023-06-11 17:00:00.000000000 +0200 +++ base-files-13+nmu1/debian/changelog 2024-02-22 17:16:54.000000000 +0100 @@ -1,3 +1,10 @@ +base-files (13+nmu1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * DEP17: Install /usr-merge aliasing symlinks. Closes: #-1. + + -- Helmut Grohne <hel...@subdivi.de> Thu, 22 Feb 2024 17:16:54 +0100 + base-files (13) unstable; urgency=medium * Change issue, issue.net, debian_version and os-release diff --minimal -Nru base-files-13/debian/clean base-files-13+nmu1/debian/clean --- base-files-13/debian/clean 2023-03-02 14:00:00.000000000 +0100 +++ base-files-13+nmu1/debian/clean 2024-01-24 08:30:30.000000000 +0100 @@ -1 +1,2 @@ debian/postinst +debian/triggers diff --minimal -Nru base-files-13/debian/control base-files-13+nmu1/debian/control --- base-files-13/debian/control 2023-03-02 14:00:00.000000000 +0100 +++ base-files-13+nmu1/debian/control 2024-01-24 08:25:17.000000000 +0100 @@ -7,7 +7,7 @@ Rules-Requires-Root: binary-targets Package: base-files -Provides: base +Provides: base, usr-is-merged Architecture: any Pre-Depends: awk Depends: ${misc:Depends} diff --minimal -Nru base-files-13/debian/postinst.in base-files-13+nmu1/debian/postinst.in --- base-files-13/debian/postinst.in 2023-03-02 14:00:00.000000000 +0100 +++ base-files-13+nmu1/debian/postinst.in 2024-02-22 17:15:11.000000000 +0100 @@ -106,3 +106,15 @@ install_directory mnt 755 root fi fi + +if [ "$1" = "triggered" ]; then + for d in #USR_MERGE_MULTILIB#; do + if test -d "$DPKG_ROOT/usr/$d"; then + test -h "$DPKG_ROOT/$d" && continue + ln -s "usr/$d" "$DPKG_ROOT/$d" + else + test -h "$DPKG_ROOT/$d" || continue + rm "$DPKG_ROOT/$d" + fi + done +fi diff --minimal -Nru base-files-13/debian/postrm base-files-13+nmu1/debian/postrm --- base-files-13/debian/postrm 1970-01-01 01:00:00.000000000 +0100 +++ base-files-13+nmu1/debian/postrm 2024-01-24 08:29:50.000000000 +0100 @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +USR_MERGE="bin lib lib32 lib64 libo32 lib64 sbin" + +if [ "$1" = remove ]; then + for d in $USR_MERGE; 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 --minimal -Nru base-files-13/debian/preinst base-files-13+nmu1/debian/preinst --- base-files-13/debian/preinst 1970-01-01 01:00:00.000000000 +0100 +++ base-files-13+nmu1/debian/preinst 2024-02-22 17:16:23.000000000 +0100 @@ -0,0 +1,34 @@ +#!/bin/sh +set -e + +USR_MERGE="bin lib lib32 lib64 libo32 lib64 sbin" + +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then + for d in $USR_MERGE; do + if [ -d "$DPKG_ROOT/$d" ] && ! [ -h "$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; 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 --minimal -Nru base-files-13/debian/rules base-files-13+nmu1/debian/rules --- base-files-13/debian/rules 2023-03-02 14:00:00.000000000 +0100 +++ base-files-13+nmu1/debian/rules 2024-02-22 17:16:54.000000000 +0100 @@ -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,12 +13,32 @@ VENDORFILE = debian DESTDIR = debian/base-files +USR_MERGE = bin lib sbin +ifneq (,$(filter $(DEB_HOST_ARCH),amd64 loong64 mips64el ppc64 ppc64el sparc64)) +USR_MERGE += lib64 +else ifneq (,$(filter $(DEB_HOST_ARCH),x32)) +USR_MERGE += libx32 +endif +USR_MERGE_MULTILIB = $(filter-out $(USR_MERGE),lib32 lib64 libo32 libx32) + %: dh $@ override_dh_auto_build: sh debian/check-md5sum-etc profile - sed -e "s/#VENDORFILE#/$(VENDORFILE)/g" debian/postinst.in > debian/postinst + sed \ + -e "s/#VENDORFILE#/$(VENDORFILE)/g" \ + -e "s/#USR_MERGE_MULTILIB#/$(USR_MERGE_MULTILIB)/g" \ + debian/postinst.in > debian/postinst + set -e; { \ + echo "# Triggers for creating multilib aliasing symlinks on demand"; \ + for d in $(USR_MERGE_MULTILIB); do \ + echo "interest-noawait $$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 @@ -40,6 +62,8 @@ override_dh_link: dh_link -X os-release + # We want these links to be relative, so we cannot use dh_link. + $(foreach d,$(USR_MERGE),ln -s usr/$(d) debian/base-files/$(d) &&) : override_dh_compress: dh_compress -X README