Control: tags -1 + patch

On Wed, Jul 18, 2018 at 11:06:44PM +0200, Andreas Henriksson wrote:
> Source: netkit-telnet-ssl
[...]
> If time permits and I haven't heard anything back I'll consider fixing
> this via a NMU while at DebCamp/DebConf.

I'm attaching a patch implementing the suggested change. It's been
tested with piuparts. Please reply back if you'd like to incorporate it
or if you prefer I go ahead with NMU.

Please note that netkit-telnet-ssl maintainer-scripts likely violate
several cases of common convention and probably also policy by removing
user/groups, possibly even one created by another package. Would it be
possible netkit-telnet and netkit-telnet-ssl to use the same username?
That should simplify things alot. (See also #228692.)

Regards,
Andreas Henriksson
diff -Nru netkit-telnet-ssl-0.17.41+0.2/debian/changelog 
netkit-telnet-ssl-0.17.41+0.2/debian/changelog
--- netkit-telnet-ssl-0.17.41+0.2/debian/changelog      2017-01-22 
00:40:10.000000000 +0100
+++ netkit-telnet-ssl-0.17.41+0.2/debian/changelog      2018-07-28 
16:14:32.000000000 +0200
@@ -1,3 +1,15 @@
+netkit-telnet-ssl (0.17.41+0.2-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Replace sg usage with getent group in postinst (Closes: #904048)
+    - note that there's still much room for related improvements, like
+      not removing users and groups in postrm (see discussion linked
+      from #228692) and not removing group created by another package,
+      maybe even use the same group for both netkit-telnet* packages
+      to simplify maintscripts if possible.
+
+ -- Andreas Henriksson <andr...@fatal.se>  Sat, 28 Jul 2018 16:14:32 +0200
+
 netkit-telnet-ssl (0.17.41+0.2-3) unstable; urgency=low
 
   * Adapt to libssl of recent version.
diff -Nru netkit-telnet-ssl-0.17.41+0.2/debian/telnetd.postinst 
netkit-telnet-ssl-0.17.41+0.2/debian/telnetd.postinst
--- netkit-telnet-ssl-0.17.41+0.2/debian/telnetd.postinst       2017-01-10 
23:04:09.000000000 +0100
+++ netkit-telnet-ssl-0.17.41+0.2/debian/telnetd.postinst       2018-07-28 
16:08:27.000000000 +0200
@@ -38,10 +38,10 @@
                ;;
        esac
     fi
-    if sg telnetd -c true >/dev/null 2>&1; then
+    if getent group telnetd > /dev/null ; then
        groupdel telnetd 
     fi
-    if sg telnetd-ssl -c true >/dev/null 2>&1 ; then
+    if getent group telnetd-ssl > /dev/null ; then
        adduser --quiet --no-create-home --disabled-password --system --ingroup 
telnetd-ssl --home /nonexistent  telnetd-ssl
     else
        adduser --quiet --no-create-home --disabled-password --system --group 
--home /nonexistent telnetd-ssl

Reply via email to