Control: tags -1 + patch

On Wed, Jul 18, 2018 at 11:06:37PM +0200, Andreas Henriksson wrote:
> Source: eviacam
> Version: 2.1.3-4
[...]
> 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 the diff to fix this. It's been piuparts tested. Please
tell me if you'd like to incorporate it or if you want me to go ahead
with NMU.

Regards,
Andreas Henriksson
diff -Nru eviacam-2.1.3/debian/changelog eviacam-2.1.3/debian/changelog
--- eviacam-2.1.3/debian/changelog      2018-04-16 15:23:49.000000000 +0200
+++ eviacam-2.1.3/debian/changelog      2018-07-31 18:36:55.000000000 +0200
@@ -1,3 +1,13 @@
+eviacam (2.1.3-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Replace sg usage with getent group in maintainerscripts
+    - note for further improvement:
+      removing group on purge likely violates common consensus
+      (See mailinglist thread linked in #228692)
+
+ -- Andreas Henriksson <andr...@fatal.se>  Tue, 31 Jul 2018 18:36:55 +0200
+
 eviacam (2.1.3-4) unstable; urgency=medium
 
   * disable DH_VERBOSE = 1
diff -Nru eviacam-2.1.3/debian/postinst eviacam-2.1.3/debian/postinst
--- eviacam-2.1.3/debian/postinst       2018-02-28 16:20:44.000000000 +0100
+++ eviacam-2.1.3/debian/postinst       2018-07-31 18:36:31.000000000 +0200
@@ -14,7 +14,7 @@
                if [ "$RET" = true ]; then
                        
                        # Create group when necessary
-                       if ! sg "$GROUP" true 2>/dev/null; then
+                       if ! getent group "$GROUP" >/dev/null; then
                                addgroup --system "$GROUP"
                        fi
                        
diff -Nru eviacam-2.1.3/debian/postrm eviacam-2.1.3/debian/postrm
--- eviacam-2.1.3/debian/postrm 2018-02-28 16:20:44.000000000 +0100
+++ eviacam-2.1.3/debian/postrm 2018-07-31 18:36:53.000000000 +0200
@@ -10,7 +10,7 @@
 
 case "$1" in
        purge)
-               if sg "$GROUP" true 2>/dev/null; then
+               if getent group "$GROUP" >/dev/null; then
                        delgroup --quiet --only-if-empty "$GROUP" >/dev/null 
2>&1 || true
                fi
                ;;      

Reply via email to