[Pkg-net-snmp-commits] [pkg-net-snmp] 13/16: Import Debian patch 5.7.3+dfsg-1.4

Hideki Yamane henrich at moszumanska.debian.org
Sun Aug 28 02:19:45 UTC 2016


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch master
in repository pkg-net-snmp.

commit 740e4dbd701f8006026f2f3e1f13ea145392aebd
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Mon Jun 20 10:24:35 2016 +0200

    Import Debian patch 5.7.3+dfsg-1.4
---
 debian/changelog         | 12 ++++++++++++
 debian/control           |  3 ++-
 debian/rules             | 31 +++++++++++++++++++------------
 debian/snmpd.default     |  6 +++++-
 debian/snmpd.service     | 15 +++++++++++++++
 debian/snmptrapd.default |  6 +++++-
 debian/snmptrapd.service | 13 +++++++++++++
 7 files changed, 71 insertions(+), 15 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a0df929..5d9389c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+net-snmp (5.7.3+dfsg-1.4) unstable; urgency=medium
+
+  [ Sophie Brun ]
+  * Non-maintainer upload.
+  * Add a snmpd.service and a snmptrapd.service (Closes: #782243)
+
+  [ Raphaël Hertzog ]
+  * Fix the package so that it can build "Arch: all" without "Arch: any" (and
+    thus letting us make source only uploads).
+
+ -- Raphaël Hertzog <hertzog at debian.org>  Mon, 20 Jun 2016 10:24:35 +0200
+
 net-snmp (5.7.3+dfsg-1.3) unstable; urgency=medium
 
   * _Really_ add missing Build-Depends: pkg-config on kfreebsd
diff --git a/debian/control b/debian/control
index a78685b..d3af344 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,8 @@ Uploaders: Jochen Friedrich <jochen at scram.de>, Thomas Anders <tanders at users.sour
  Hideki Yamane <henrich at debian.org>
 Build-Depends: debhelper (>= 9), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), perl (>=5.8), libperl-dev,
  python-all (>= 2.6.6-3~), python-setuptools (>=0.6b3), python2.7-dev,
- autoconf, automake, autotools-dev, debianutils (>=1.13.1), dh-autoreconf,
+ autoconf, automake, autotools-dev, debianutils (>=1.13.1),
+ dh-autoreconf, dh-systemd,
  bash (>=2.05), findutils (>=4.1.20), procps, 
  pkg-config [kfreebsd-i386 kfreebsd-amd64], 
  libbsd-dev [kfreebsd-i386 kfreebsd-amd64], 
diff --git a/debian/rules b/debian/rules
index d2e7ece..9eb8d2d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -37,7 +37,7 @@ MIB_MODULES += host
 endif
 
 %:
-	dh $@ --with autotools-dev,autoreconf,python2
+	dh $@ --with autotools-dev,autoreconf,python2,systemd
 
 override_dh_auto_configure:
 	dh_auto_configure -- --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
@@ -60,6 +60,16 @@ override_dh_auto_configure:
 # --with-python-modules=""  # don't specify it, since dh_python2 cannot handle it.
 # --with-dnssec-local-validation  # not enabled since libval doesn't exist in Debian yet
 
+override_dh_auto_build:
+	dh_auto_build
+	cd python; python setup.py build --basedir=$(CURDIR)
+
+override_dh_auto_install:
+	dh_auto_install
+	cd python; python setup.py install --root=$(CURDIR)/debian/tmp \
+		--install-layout=deb --basedir=$(CURDIR) ; \
+		find $(CURDIR) -name *.pyc -delete
+
 override_dh_clean:
 	dh_clean
 	rm -rf `find . -name .libs` \
@@ -77,14 +87,12 @@ override_dh_strip:
 override_dh_makeshlibs:
 	dh_makeshlibs -plibsnmp$(LIB_VERSION) -V"libsnmp$(LIB_VERSION) (>= $(COMPAT_VERSION))"
 
-override_dh_install:
-	cd python; python setup.py build --basedir=$(CURDIR) ; \
-		   python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb --basedir=$(CURDIR) ; \
-		   find $(CURDIR) -name *.pyc -delete
-	install $(CURDIR)/EXAMPLE.conf $(CURDIR)/debian/snmpd/etc/snmp/snmpd.conf
+override_dh_install-arch:
 	dh_install
+	install $(CURDIR)/EXAMPLE.conf $(CURDIR)/debian/snmpd/etc/snmp/snmpd.conf
 
 override_dh_installdocs:
+	dh_installdocs -plibsnmp-perl -ptkmib -plibsnmp-base -plibsnmp$(LIB_VERSION)
 	dh_installdocs --link-doc=libsnmp$(LIB_VERSION) \
 		       -plibsnmp-dev \
 		       -plibsnmp$(LIB_VERSION)-dbg \
@@ -92,13 +100,8 @@ override_dh_installdocs:
 		       -psnmpd \
 		       -psnmptrapd \
 		       -psnmp
-	dh_installdocs  -plibsnmp-perl -ptkmib -plibsnmp-base
-	# dh_installdocs has a bug when --link-doc is called it don't install copyright file to referenced package
-	# so specify to copy it
-	install -d $(CURDIR)/debian/libsnmp$(LIB_VERSION)/usr/share/doc/libsnmp$(LIB_VERSION)/
-	install -m644 debian/copyright $(CURDIR)/debian/libsnmp$(LIB_VERSION)/usr/share/doc/libsnmp$(LIB_VERSION)/
 
-override_dh_fixperms:
+override_dh_fixperms-arch:
 	dh_fixperms
 	chmod -x debian/libsnmp-dev/etc/snmp/*.conf
 	chmod 600 debian/snmpd/etc/snmp/snmp*d.conf
@@ -107,6 +110,10 @@ override_dh_auto_test:
 	# prevent test since it fails with network configuration under pbuilder/etc.
 	true
 
+override_dh_systemd_enable:
+	dh_systemd_enable --package=snmptrapd --no-enable
+	dh_systemd_enable --remaining-packages
+
 get-orig-source:
 	@uscan --download-version $(UPSTREAM_VERSION) --destdir /tmp --force-download --no-symlink
 	@tar xf /tmp/net-snmp-$(UPSTREAM_VERSION).tar.gz -C /tmp
diff --git a/debian/snmpd.default b/debian/snmpd.default
index f4ee7a7..f779013 100644
--- a/debian/snmpd.default
+++ b/debian/snmpd.default
@@ -1,4 +1,8 @@
-# This file controls the activity of snmpd
+# This file controls the behaviour of /etc/init.d/snmpd
+# but not of the corresponding systemd service file.
+# If needed, create an override file in
+# /etc/systemd/system/snmpd.service.d/local.conf
+# see man 5 systemd.unit and man 5 systemd.service
 
 # Don't load any MIBs by default.
 # You might comment this lines once you have the MIBs downloaded.
diff --git a/debian/snmpd.service b/debian/snmpd.service
new file mode 100644
index 0000000..64ccb3a
--- /dev/null
+++ b/debian/snmpd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) Daemon.
+After=network.target
+ConditionPathExists=/etc/snmp/snmpd.conf
+
+[Service]
+Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp"
+Environment="MIBS="
+Type=simple
+ExecStartPre=/bin/mkdir -p /var/run/agentx
+ExecStart=/usr/sbin/snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/snmptrapd.default b/debian/snmptrapd.default
index 3649c48..0b8d9d1 100644
--- a/debian/snmptrapd.default
+++ b/debian/snmptrapd.default
@@ -1,4 +1,8 @@
-# This file controls the activity of snmptrapd
+# This file controls the behaviour of /etc/init.d/snmptrapd
+# but not of the corresponding systemd service file.
+# If needed, create an override file in
+# /etc/systemd/system/snmptrapd.service.d/local.conf
+# see man 5 systemd.unit and man 5 systemd.service
 
 # snmptrapd control (yes means start daemon).  As of net-snmp version
 # 5.0, master agentx support must be enabled in snmpd before snmptrapd
diff --git a/debian/snmptrapd.service b/debian/snmptrapd.service
new file mode 100644
index 0000000..052331b
--- /dev/null
+++ b/debian/snmptrapd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) Trap Daemon.
+After=network.target
+ConditionPathExists=/etc/snmp/snmptrapd.conf
+
+[Service]
+Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp"
+Type=simple
+ExecStart=/usr/sbin/snmptrapd -Lsd -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git



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