Skip to contentSkip to conversation

netsnmp: Make server and client installation optional

PATCH New Stefan Sørensen 2 participants 2 messages Feb 17, 2015 – Feb 19, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netsnmp: Make server and client installation optional

The netsnmp package consists of both a server and a number of client tools, this makes the installation of both parts optional.

---
 package/netsnmp/Config.in  | 12 ++++++++++++
 package/netsnmp/netsnmp.mk | 10 ++++++++++
 2 files changed, 22 insertions(+)
package/netsnmp/Config.in +12 -0
index 8edbd39..a93a7cc 100644
@@ -9,6 +9,18 @@ config BR2_PACKAGE_NETSNMP
 
 if BR2_PACKAGE_NETSNMP
 
+config BR2_PACKAGE_NETSNMP_SERVER
+	bool "net-snmp server"
+	default y
+	help
+	  The snmpd server
+
+config BR2_PACKAGE_NETSNMP_CLIENTS
+	bool "net-snmp clients"
+	default y
+	help
+	  The net-snmp clients (snmpget, snmpwalk, etc).
+
 config BR2_PACKAGE_NETSNMP_ENABLE_MIBS
 	bool "Install MIB files on target and enable MIB loading code"
 	default y
package/netsnmp/netsnmp.mk +10 -0
index f1b103e..b272da2 100644
@@ -67,6 +67,14 @@ ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING),y)
 	NETSNMP_CONF_OPTS += --disable-debugging
 endif
 
+ifneq ($(BR2_PACKAGE_NETSNMP_SERVER),y)
+NETSNMP_CONF_OPTS += --disable-agent
+endif
+
+ifneq ($(BR2_PACKAGE_NETSNMP_CLIENTS),y)
+NETSNMP_CONF_OPTS += --disable-applications
+endif
+
 # Remove IPv6 MIBs if there's no IPv6
 ifneq ($(BR2_INET_IPV6),y)
 define NETSNMP_REMOVE_MIBS_IPV6
@@ -84,10 +92,12 @@ endef
 
 NETSNMP_POST_INSTALL_TARGET_HOOKS += NETSNMP_REMOVE_BLOAT_MIBS
 
+ifeq ($(BR2_PACKAGE_NETSNMP_SERVER),y)
 define NETSNMP_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/netsnmp/S59snmpd \
 		$(TARGET_DIR)/etc/init.d/S59snmpd
 endef
+endif
 
 define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
 	$(SED) 	"s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
Signature · 1 line
1.9.3
#1 lore raw

PATCH 1/1 netsnmp: Make server and client installation optional

Dear Stefan S?rensen,

Quoted 8 lines · Stefan S?rensen

The netsnmp package consists of both a server and a number of client tools, this makes the installation of both parts optional.

---
 package/netsnmp/Config.in  | 12 ++++++++++++
 package/netsnmp/netsnmp.mk | 10 ++++++++++
 2 files changed, 22 insertions(+)

Applied to the next branch, after doing some minor changes:

[Thomas:
- Add explicit --enable-{agent,applications}, and use positive logic.
- Remove "net-snmp" from the new Config.in option prompts, since they are already visible under the netsnmp package option.]

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com