Hi, Quoting Johannes Schauer Marin Rodrigues (2022-04-13 12:10:16) > Quoting Johannes Schauer Marin Rodrigues (2022-01-22 09:25:43) > > the attached patch replaces add-shell/remove-shell with the declarative > > shells.d trigger from debianutils. > > > > For details about this new mechanism see https://bugs.debian.org/990440. > > > > This further reduces the number of maintainer scripts in the > > Essential:yes set and is the last missing piece for DPKG_ROOT support in > > bash. > > > > I also submitted the same improvement to dash: > > > > https://salsa.debian.org/debian/dash/-/merge_requests/8 > > the shells.d patch has been applied in dash in unstable for over a month now > and the dash maintainer states that there have been no problems since then. > > I'd thus like to send a friendly ping to this bug and ask about applying > shells.d support from debianutils to bash as well. > > If you have no objections, I can also prepare an NMU as I've done for #958083.
I've uploaded a NMU with attached debdiff to DELAYED/15. Thanks! cheers, josch
diff -Nru bash-5.1/debian/bash.postinst bash-5.1/debian/bash.postinst
--- bash-5.1/debian/bash.postinst 2013-10-23 14:41:22.000000000 +0200
+++ bash-5.1/debian/bash.postinst 2022-05-12 17:01:36.000000000 +0200
@@ -14,13 +14,6 @@
10 \
|| true
-if [ "$1" = configure ] && dpkg --compare-versions "$2" le 3.2-3 \
- && which add-shell >/dev/null
-then
- add-shell /bin/bash
- add-shell /bin/rbash
-fi
-
#DEBHELPER#
exit 0
diff -Nru bash-5.1/debian/bash.postrm bash-5.1/debian/bash.postrm
--- bash-5.1/debian/bash.postrm 2013-10-23 14:41:22.000000000 +0200
+++ bash-5.1/debian/bash.postrm 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-#! /bin/sh
-
-set -e
-
-case "$1" in
- upgrade|failed-upgrade|abort-install|abort-upgrade)
- ;;
- remove|purge|disappear)
- if which remove-shell >/dev/null && [ -f /etc/shells ]; then
- remove-shell /bin/bash
- remove-shell /bin/rbash
- fi
- ;;
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff -Nru bash-5.1/debian/bash-static.postinst bash-5.1/debian/bash-static.postinst
--- bash-5.1/debian/bash-static.postinst 2013-10-23 14:41:22.000000000 +0200
+++ bash-5.1/debian/bash-static.postinst 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if [ "$1" = configure ] && dpkg --compare-versions "$2" le 3.2-4 \
- && which add-shell >/dev/null
-then
- add-shell /bin/bash-static
-fi
-
-#DEBHELPER#
-
-exit 0
diff -Nru bash-5.1/debian/bash-static.postrm bash-5.1/debian/bash-static.postrm
--- bash-5.1/debian/bash-static.postrm 2013-10-23 14:41:22.000000000 +0200
+++ bash-5.1/debian/bash-static.postrm 1970-01-01 01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-#! /bin/sh
-
-set -e
-
-case "$1" in
- upgrade|failed-upgrade|abort-install|abort-upgrade)
- ;;
- remove|purge|disappear)
- if which remove-shell >/dev/null && [ -f /etc/shells ]; then
- remove-shell /bin/bash-static
- fi
- ;;
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
-exit 0
diff -Nru bash-5.1/debian/changelog bash-5.1/debian/changelog
--- bash-5.1/debian/changelog 2022-01-06 17:16:52.000000000 +0100
+++ bash-5.1/debian/changelog 2022-05-12 17:05:40.000000000 +0200
@@ -1,3 +1,12 @@
+bash (5.1-6.1) unstable; urgency=medium
+
+ [ Helmut Grohne ]
+ * Non-maintainer upload.
+ * Replace add-shell/remove-shell with declarative shells.d trigger.
+ Closes: #1004171
+
+ -- Johannes Schauer Marin Rodrigues <[email protected]> Thu, 12 May 2022 17:05:40 +0200
+
bash (5.1-6) unstable; urgency=medium
* Apply upstream patches 013 - 016.
diff -Nru bash-5.1/debian/control bash-5.1/debian/control
--- bash-5.1/debian/control 2021-11-27 09:37:56.000000000 +0100
+++ bash-5.1/debian/control 2022-05-12 17:01:36.000000000 +0200
@@ -17,7 +17,7 @@
Architecture: any
Multi-Arch: foreign
Pre-Depends: ${shlibs:Pre-Depends}, ${misc:Depends}
-Depends: base-files (>= 2.1.12), debianutils (>= 2.15)
+Depends: base-files (>= 2.1.12), debianutils (>= 5.6-0.1)
Recommends: bash-completion (>= 20060301-0)
Conflicts: bash-completion (<< 20060301-0)
Replaces: bash-doc (<= 2.05-1), bash-completion (<< 20060301-0)
@@ -39,7 +39,7 @@
Package: bash-static
Architecture: any
Multi-Arch: foreign
-Depends: passwd (>= 1:4.0.3-10), ${misc:Depends}
+Depends: passwd (>= 1:4.0.3-10), debianutils (>= 5.6-0.1), ${misc:Depends}
Suggests: bash-doc
Section: shells
Priority: optional
diff -Nru bash-5.1/debian/rules bash-5.1/debian/rules
--- bash-5.1/debian/rules 2021-11-27 09:50:18.000000000 +0100
+++ bash-5.1/debian/rules 2022-05-12 17:01:36.000000000 +0200
@@ -227,6 +227,9 @@
$(ID) debian/clear_console.1 $(d)/usr/share/man/man1/
endif
+ : # /etc/shells integration
+ $(ID) -D debian/shells.d/bash $(d)/usr/share/debianutils/shells.d/bash
+
: # files for the bash-doc package
dh_installexamples -p$(p_doc) examples/*
@@ -339,6 +342,7 @@
usr/share/man/man1
cp -p build-static/bash $(d_stat)/bin/bash-static
cp -p doc/bash.1 $(d_stat)/usr/share/man/man1/bash-static.1
+ $(ID) -D debian/shells.d/bash-static $(d_stat)/usr/share/debianutils/shells.d/bash-static
dh_installdocs -p$(p_stat)
dh_installchangelogs -p$(p_stat)
install -D -m 644 debian/bash-static.overrides \
diff -Nru bash-5.1/debian/shells.d/bash bash-5.1/debian/shells.d/bash
--- bash-5.1/debian/shells.d/bash 1970-01-01 01:00:00.000000000 +0100
+++ bash-5.1/debian/shells.d/bash 2022-05-12 17:01:36.000000000 +0200
@@ -0,0 +1,2 @@
+/bin/bash
+/bin/rbash
diff -Nru bash-5.1/debian/shells.d/bash-static bash-5.1/debian/shells.d/bash-static
--- bash-5.1/debian/shells.d/bash-static 1970-01-01 01:00:00.000000000 +0100
+++ bash-5.1/debian/shells.d/bash-static 2022-05-12 17:01:36.000000000 +0200
@@ -0,0 +1 @@
+/bin/bash-static
signature.asc
Description: signature

