Skip to contentSkip to conversation

meta-openembedded: net-snmp: systemd support

PATCH New Otavio Salvador 1 participant 1 message Apr 23, 2012 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 meta-openembedded: net-snmp: systemd support

In reply to a message not in the archive

From: Mario Domenech Goulart <[email protected]>

Backported systemd-related commits from net-snmp's master branch (full description in the systemd-support.patch file).

.service files slightly adapted from Fedora's.

---
 .../recipes-extended/net-snmp/files/snmpd.service  |   13 +
 .../net-snmp/files/snmptrapd.service               |   13 +
 .../net-snmp/files/systemd-support.patch           | 1616 ++++++++++++++++++++
 .../recipes-extended/net-snmp/net-snmp_5.7.1.bb    |   14 +-
 4 files changed, 1654 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-extended/net-snmp/files/snmpd.service
 create mode 100644 meta-oe/recipes-extended/net-snmp/files/snmptrapd.service
 create mode 100644 meta-oe/recipes-extended/net-snmp/files/systemd-support.patch
meta-oe/recipes-extended/net-snmp/files/snmpd.service new file +13 -0
new file mode 100644
index 0000000..10a1eb2
@@ -0,0 +1,13 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) Daemon.
+After=syslog.target network.target
+
+[Service]
+Type=notify
+Environment=OPTIONS="-LS0-6d"
+EnvironmentFile=-/etc/default/snmpd
+ExecStart=/usr/sbin/snmpd $OPTIONS -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
meta-oe/recipes-extended/net-snmp/files/snmptrapd.service new file +13 -0
new file mode 100644
index 0000000..951f9f2
@@ -0,0 +1,13 @@
+[Unit]
+Description=Simple Network Management Protocol (SNMP) Trap Daemon.
+After=syslog.target network.target
+
+[Service]
+Type=notify
+Environment=OPTIONS="-Lsd"
+EnvironmentFile=-/etc/default/snmptrapd
+ExecStart=/usr/sbin/snmptrapd $OPTIONS -f
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
meta-oe/recipes-extended/net-snmp/files/systemd-support.patch new file +1616 -0

1,616 lines not on this page · raw message

meta-oe/recipes-extended/net-snmp/net-snmp_5.7.1.bb +12 -2
index 9cbc5a8..b2a9786 100644
@@ -1,17 +1,25 @@
 require net-snmp.inc
-PR = "${INC_PR}.2"
+inherit systemd
+
+PR = "${INC_PR}.3"
 LIC_FILES_CHKSUM = "file://README;beginline=3;endline=8;md5=7f7f00ba639ac8e8deb5a622ea24634e"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
         file://sync-with-5.7-branch.patch \
         file://libnl-3-support.patch \
+        file://systemd-support.patch \
+        file://snmpd.service \
+        file://snmptrapd.service \
         file://init \
         file://snmpd.conf \
         file://snmptrapd.conf"
 
-EXTRA_OECONF += "--disable-embedded-perl --with-perl-modules=no"
+EXTRA_OECONF += "--disable-embedded-perl --with-perl-modules=no --with-systemd "
 EXTRA_OEMAKE = "INSTALL_PREFIX=${D}"
 
+SYSTEMD_PACKAGES = "${PN}-server-systemd"
+SYSTEMD_SERVICE_${PN}-server-systemd = "snmpd.service snmptrapd.service"
+
 do_configure_prepend() {
         gnu-configize -f
         # We better change sources and re-autoconf here, but
@@ -26,3 +34,5 @@ CCACHE = ""
 
 SRC_URI[md5sum] = "c95d08fd5d93df0c11a2e1bdf0e01e0b"
 SRC_URI[sha256sum] = "7c71c9650c65b715356547e20ca2dbe6313944278af8cc19c32a5337f46b181f"
+
+RDEPENDS_${PN}-server-systemd = "${PN}-server"
Signature · 1 line
1.7.2.5