Source: screen
Version: 4.9.0-2
Tags: patch
Severity: serious
Justification: Debian policy 10.7.3

When upgrading or reinstalling screen, it adds /usr/bin/screen to
/etc/shells even if one locally removed it there. Such behaviour
violates Debian policy section 10.7.3. I propose managing the entry
declaratively using dpkg triggers and am attaching a patch for your
convenience.

Helmut
diff --minimal -Nru screen-4.9.0/debian/changelog screen-4.9.0/debian/changelog
--- screen-4.9.0/debian/changelog       2022-08-24 03:45:18.000000000 +0200
+++ screen-4.9.0/debian/changelog       2022-11-02 10:03:05.000000000 +0100
@@ -1,3 +1,10 @@
+screen (4.9.0-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Update /etc/shells using dpkg triggers. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 02 Nov 2022 10:03:05 +0100
+
 screen (4.9.0-2) unstable; urgency=medium
 
   * Add patch to fix bash example in man page. (LP: #1986839) Thanks to
diff --minimal -Nru screen-4.9.0/debian/control screen-4.9.0/debian/control
--- screen-4.9.0/debian/control 2022-08-23 19:15:25.000000000 +0200
+++ screen-4.9.0/debian/control 2022-11-02 10:03:05.000000000 +0100
@@ -18,7 +18,8 @@
 Package: screen
 Architecture: any
 Depends: ${misc:Depends},
-         ${shlibs:Depends}
+         ${shlibs:Depends},
+         debianutils (>= 5.3-1~)
 Suggests: byobu | screenie | iselect (>= 1.4.0-1),
           ncurses-term
 Description: terminal multiplexer with VT100/ANSI terminal emulation
diff --minimal -Nru screen-4.9.0/debian/rules screen-4.9.0/debian/rules
--- screen-4.9.0/debian/rules   2021-08-05 15:30:52.000000000 +0200
+++ screen-4.9.0/debian/rules   2022-11-02 10:03:02.000000000 +0100
@@ -63,6 +63,7 @@
        rm -f $(ROOT)/usr/share/info/dir*
        # Remove documentation from udeb
        rm -rf $(ROOT_UDEB)/usr/share/info $(ROOT_UDEB)/usr/share/man
+       install -D -m644 debian/shells 
$(ROOT)/usr/share/debianutils/shells.d/screen
 
 override_dh_installinit:
        dh_installinit --no-start --init-script=screen-cleanup
diff --minimal -Nru screen-4.9.0/debian/screen.postinst 
screen-4.9.0/debian/screen.postinst
--- screen-4.9.0/debian/screen.postinst 2021-02-23 11:18:41.000000000 +0100
+++ screen-4.9.0/debian/screen.postinst 2022-11-02 10:00:59.000000000 +0100
@@ -30,8 +30,6 @@
   if [ ! -e $servicefile ]; then
       ln -s /dev/null $servicefile
   fi
-
-  add-shell /usr/bin/screen || true
 fi
 
 #DEBHELPER#
diff --minimal -Nru screen-4.9.0/debian/screen.postrm 
screen-4.9.0/debian/screen.postrm
--- screen-4.9.0/debian/screen.postrm   2021-02-18 09:51:15.000000000 +0100
+++ screen-4.9.0/debian/screen.postrm   2022-11-02 10:01:12.000000000 +0100
@@ -13,8 +13,4 @@
   rmdir -p --ignore-fail-on-non-empty /lib/systemd/system
 fi
 
-if [ "$1" = disappear ]; then
-  remove-shell /usr/bin/screen || true
-fi
-
 #DEBHELPER#
diff --minimal -Nru screen-4.9.0/debian/screen.prerm 
screen-4.9.0/debian/screen.prerm
--- screen-4.9.0/debian/screen.prerm    2021-02-18 09:51:15.000000000 +0100
+++ screen-4.9.0/debian/screen.prerm    1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh
-set -e
-
-if [ "$1" = remove ] || [ "$1" = deconfigure ]; then
-  remove-shell /usr/bin/screen || true
-fi 
-
-#DEBHELPER#
diff --minimal -Nru screen-4.9.0/debian/shells screen-4.9.0/debian/shells
--- screen-4.9.0/debian/shells  1970-01-01 01:00:00.000000000 +0100
+++ screen-4.9.0/debian/shells  2022-11-02 10:02:02.000000000 +0100
@@ -0,0 +1 @@
+/usr/bin/screen

Reply via email to