[Pkg-net-snmp-commits] [SCM] Git repository for pkg-net-snmp branch, master, updated. debian/5.7.2_dfsg-7-3-g0b30a15

Hideki Yamane henrich at debian.org
Wed Jun 5 23:58:13 UTC 2013


The following commit has been merged in the master branch:
commit 2158c4a50785849dea40a8663147d867b1c1e383
Author: Hideki Yamane <henrich at debian.org>
Date:   Thu Jun 6 08:29:26 2013 +0900

    fix #709087

diff --git a/debian/changelog b/debian/changelog
index 70d2341..03330cc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ net-snmp (5.7.2~dfsg-8) UNRELEASED; urgency=low
 
   * add libsnmp-perl.preinst to deal with empty directory by libsnmp15
     package removal (Closes: #709761) 
+  * {snmp,snmpd}.postinst: deal with "copyright file missing after upgrade
+    (policy 12.5)" (Closes: #709087)
 
  -- Hideki Yamane <henrich at debian.org>  Thu, 06 Jun 2013 08:13:10 +0900
 
diff --git a/debian/snmp.postinst b/debian/snmp.postinst
new file mode 100644
index 0000000..da451d0
--- /dev/null
+++ b/debian/snmp.postinst
@@ -0,0 +1,34 @@
+#!/bin/sh
+# postinst script for snmp
+#
+# see: dh_installdeb(1)
+
+set -e
+
+case "$1" in
+    configure)
+
+        DOCDIR=/usr/share/doc/snmp
+        DOCLINK=libsnmp30
+
+        if [ -d $DOCDIR ] && [ ! -L $DOCDIR ]; then
+                rmdir $DOCDIR
+                ln -s $DOCLINK $DOCDIR
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/snmpd.postinst b/debian/snmpd.postinst
index c98fbeb..d8add08 100644
--- a/debian/snmpd.postinst
+++ b/debian/snmpd.postinst
@@ -2,16 +2,39 @@
 
 set -e
 
-. /usr/share/debconf/confmodule
-db_version 2.0
+case "$1" in
+    configure)
+
+	. /usr/share/debconf/confmodule
+	db_version 2.0
 
-if [ "x$1" = xconfigure ]; then
 	if ! getent group snmp >/dev/null ; then
-		 deluser --quiet --system snmp
+	    deluser --quiet --system snmp
 	fi
 	adduser --quiet --system --group --no-create-home --home /var/lib/snmp snmp
 	chown -R snmp:snmp /var/lib/snmp
-fi
+
+	# Bug#709087
+        DOCDIR=/usr/share/doc/snmpd
+        DOCLINK=libsnmp30
+
+        if [ -d $DOCDIR ] && [ ! -L $DOCDIR ]; then
+                rmdir $DOCDIR
+                ln -s $DOCLINK $DOCDIR
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
 
 #DEBHELPER#
 

-- 
Git repository for pkg-net-snmp



More information about the Pkg-net-snmp-commits mailing list