mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] net-snmp: patch series again
@ 2013-09-20 13:59 Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 1/8] net-snmp: improve menu help texts Alexander Dahl
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Alexander Dahl @ 2013-09-20 13:59 UTC (permalink / raw)
  To: ptxdist

Hei hei, 

I reworked my net-snmp patches and repost the whole series, because
the discussions were spread over several threads lately. I tried to
incorporate all suggested changes.

Greets
Alex


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ptxdist] [PATCH 1/8] net-snmp: improve menu help texts
  2013-09-20 13:59 [ptxdist] net-snmp: patch series again Alexander Dahl
@ 2013-09-20 13:59 ` Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 2/8] net-snmp: check mib config by default Alexander Dahl
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alexander Dahl @ 2013-09-20 13:59 UTC (permalink / raw)
  To: ptxdist


Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/net-snmp.in |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/rules/net-snmp.in b/rules/net-snmp.in
index aed84a8..95b7d43 100644
--- a/rules/net-snmp.in
+++ b/rules/net-snmp.in
@@ -109,7 +109,11 @@ config NET_SNMP_MIB_MODULES
 config NET_SNMP_DEFAULT_MIBS
 	prompt "default mib id's to read"
 	string
-	default	""
+	default	"SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB"
+	help
+	  Colon separated list of default mib IDs to read. (The default list
+	  is "SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB" with the addition of
+	  any mibs used by the mib modules the agent is configured with)
 
 config NET_SNMP_MIB_INSTALL_DIR
 	prompt "directory to install mib files"
@@ -117,8 +121,10 @@ config NET_SNMP_MIB_INSTALL_DIR
 	default	"/usr/share/snmp/mibs"
 
 config NET_SNMP_DOM_SOCK_ONLY
-	bool "Only allow domain socket connections to the agent" if NET_SNMP_AGENT
+	bool "Disable UDP/TCP transports for agentx" if NET_SNMP_AGENT
 	default y
 	help
-	  Enable this to disable TCP and UDP connections to the agent.
+	  Enable this to disable TCP and UDP connections for subagent
+	  connections with AgentX protocol. Only unix socket connections are
+	  allowed then.
 endif
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ptxdist] [PATCH 2/8] net-snmp: check mib config by default
  2013-09-20 13:59 [ptxdist] net-snmp: patch series again Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 1/8] net-snmp: improve menu help texts Alexander Dahl
@ 2013-09-20 13:59 ` Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 3/8] net-snmp: enable rewritten mib modules " Alexander Dahl
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alexander Dahl @ 2013-09-20 13:59 UTC (permalink / raw)
  To: ptxdist

If you compile additional MIB modules --enable-mib-config-checking
checks for conlicts in the options you provided. Without setting this, a
warning would be given, but the build would proceed with deactivated
options and silently not building a desired module would be the result.
Setting this the build fails and the user can correct the chosen MIB
modules.

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/net-snmp.make |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/net-snmp.make b/rules/net-snmp.make
index 7a25043..658273c 100644
--- a/rules/net-snmp.make
+++ b/rules/net-snmp.make
@@ -54,7 +54,7 @@ NET_SNMP_AUTOCONF := \
 	--disable-privacy \
 	--disable-internal-md5 \
 	--$(call ptx/endis, PTXCONF_NET_SNMP_DOM_SOCK_ONLY)-agentx-dom-sock-only \
-	--disable-mib-config-checking \
+	--enable-mib-config-checking \
 	--disable-mfd-rewrites \
 	--disable-testing-code \
 	--disable-reentrant \
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ptxdist] [PATCH 3/8] net-snmp: enable rewritten mib modules by default
  2013-09-20 13:59 [ptxdist] net-snmp: patch series again Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 1/8] net-snmp: improve menu help texts Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 2/8] net-snmp: check mib config by default Alexander Dahl
@ 2013-09-20 13:59 ` Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 4/8] net-snmp: added extra menu entries for mib modules Alexander Dahl
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alexander Dahl @ 2013-09-20 13:59 UTC (permalink / raw)
  To: ptxdist

Upstream started rewriting some old/ancient MIB modules. Using
--disable-mfd-rewrites like before would compile those not rewritten
options. This also affects basic MIBs like the IF-MIB. Because this is
the LTS branch of net-snmp and Debian enables this too, I consider it
safe.

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/net-snmp.make |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/net-snmp.make b/rules/net-snmp.make
index 658273c..894946b 100644
--- a/rules/net-snmp.make
+++ b/rules/net-snmp.make
@@ -55,7 +55,7 @@ NET_SNMP_AUTOCONF := \
 	--disable-internal-md5 \
 	--$(call ptx/endis, PTXCONF_NET_SNMP_DOM_SOCK_ONLY)-agentx-dom-sock-only \
 	--enable-mib-config-checking \
-	--disable-mfd-rewrites \
+	--enable-mfd-rewrites \
 	--disable-testing-code \
 	--disable-reentrant \
 	--disable-embedded-perl \
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ptxdist] [PATCH 4/8] net-snmp: added extra menu entries for mib modules
  2013-09-20 13:59 [ptxdist] net-snmp: patch series again Alexander Dahl
                   ` (2 preceding siblings ...)
  2013-09-20 13:59 ` [ptxdist] [PATCH 3/8] net-snmp: enable rewritten mib modules " Alexander Dahl
@ 2013-09-20 13:59 ` Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 5/8] net-snmp: remove no longer used/needed stuff Alexander Dahl
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alexander Dahl @ 2013-09-20 13:59 UTC (permalink / raw)
  To: ptxdist

Previously the MIB modules to be compiled where specified in a space
separated list only. Other packages depending on special modules could
not easily set a dependency. Now there are some extra menu entries to be
referenced by other packages and still the old list. Both are integrated
at build time.

Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/net-snmp.in   |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 rules/net-snmp.make |    9 ++++++++-
 2 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/rules/net-snmp.in b/rules/net-snmp.in
index 95b7d43..a36a915 100644
--- a/rules/net-snmp.in
+++ b/rules/net-snmp.in
@@ -6,6 +6,7 @@ menuconfig NET_SNMP
 	select GCCLIBS_GCC_S	if NET_SNMP_AGENT
 	select LIBC_DL		if NET_SNMP_AGENT || NET_SNMP_APPLICATIONS
 	select LIBNL		if NET_SNMP_AGENT || NET_SNMP_APPLICATIONS
+	select LM_SENSORS	if NET_SNMP_MIB_MODULES_LM_SENSORS
 
 if NET_SNMP
 
@@ -101,10 +102,57 @@ config NET_SNMP_PERSISTENT_DIR
 	string
 	default	"/var/net-snmp"
 
+menu "additional mib modules        "
+
+config NET_SNMP_MIB_MODULES_AGENTX
+	prompt "agentx"
+	bool
+	help
+	  AgentX support (includes both agentx/master and agentx/client).
+
+config NET_SNMP_MIB_MODULES_UCD_SNMP
+	prompt "ucd_snmp"
+	bool
+	help
+	  UCD-SNMP-MIB specific extensions.
+
+config NET_SNMP_MIB_MODULES_LM_SENSORS
+	prompt "ucd-snmp/lmsensorsMib"
+	bool
+	help
+	  hardware monitoring (LM-SENSORS-MIB)
+
 config NET_SNMP_MIB_MODULES
 	prompt "additional mib modules"
 	string
 	default	""
+	help
+	  space separated list of optional modules
+	    tunnel               Linux TUNNEL-MIB support (ifTable extension)
+	    mibII/interfaces     (old ifTable implementation)
+	    misc/ipfwacc         accounting rules IP firewall information
+	    ipfwchains/ipfwchains  firewall chains under ipfw
+	    sctp-mib             support for the SCTP-MIB
+	    etherlike-mib        support for the EtherLike-MIB
+
+config NET_SNMP_WITHOUT_MIB_MODULES
+	prompt "without these mib modules"
+	string
+	default ""
+	help
+	  space separated list of default mib modules compiled into the
+	  agent (which can be removed):
+	    mibII                  support for the mib-II tree.
+	    snmpv3mibs             support for the snmpv3 mib modules.
+	    agent_mibs             NET-SNMP-AGENT-MIB extensions
+	    notification           mibs supporting specification of trap destinations.
+	    target                 Support for the SNMP WGs TARGET-MIB.
+	    utilities              general agent configuration utilities.
+	    disman/event           support for the DISMAN-EVENT-MIB
+	    disman/schedule        support for the DISMAN-SCHEDULE-MIB
+	    host                   host resources mib support.
+
+endmenu
 
 config NET_SNMP_DEFAULT_MIBS
 	prompt "default mib id's to read"
diff --git a/rules/net-snmp.make b/rules/net-snmp.make
index 894946b..fca6417 100644
--- a/rules/net-snmp.make
+++ b/rules/net-snmp.make
@@ -33,6 +33,12 @@ NET_SNMP_PATH	:= PATH=$(CROSS_PATH)
 NET_SNMP_ENV 	:= $(CROSS_ENV)
 NET_SNMP_BINCONFIG_GLOB := net-snmp-config
 
+NET_SNMP_MIB_MODULES-y	:= $(call remove_quotes,$(PTXCONF_NET_SNMP_MIB_MODULES))
+NET_SNMP_MIB_MODULES-	:= $(call remove_quotes,$(PTXCONF_NET_SNMP_WITHOUT_MIB_MODULES))
+NET_SNMP_MIB_MODULES-$(PTXCONF_NET_SNMP_MIB_MODULES_AGENTX) += agentx
+NET_SNMP_MIB_MODULES-$(PTXCONF_NET_SNMP_MIB_MODULES_UCD_SNMP) += ucd_snmp
+NET_SNMP_MIB_MODULES-$(PTXCONF_NET_SNMP_MIB_MODULES_LM_SENSORS) += ucd-snmp/lmsensorsMib
+
 #
 # autoconf
 #
@@ -42,7 +48,8 @@ NET_SNMP_AUTOCONF := \
 	--with-defaults \
 	--disable-manuals \
 	--without-openssl \
-	--with-mib-modules=$(PTXCONF_NET_SNMP_MIB_MODULES) \
+	--with-mib-modules="$(NET_SNMP_MIB_MODULES-y)" \
+	--with-out-mib-modules="$(NET_SNMP_MIB_MODULES-)" \
 	--with-mibs=$(PTXCONF_NET_SNMP_DEFAULT_MIBS) \
 	--with-logfile=$(call remove_quotes,$(PTXCONF_NET_SNMP_LOGFILE)) \
 	--with-persistent-directory=$(call remove_quotes,$(PTXCONF_NET_SNMP_PERSISTENT_DIR)) \
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ptxdist] [PATCH 5/8] net-snmp: remove no longer used/needed stuff
  2013-09-20 13:59 [ptxdist] net-snmp: patch series again Alexander Dahl
                   ` (3 preceding siblings ...)
  2013-09-20 13:59 ` [ptxdist] [PATCH 4/8] net-snmp: added extra menu entries for mib modules Alexander Dahl
@ 2013-09-20 13:59 ` Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 6/8] net-snmp: let user choose MIB files to install Alexander Dahl
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Alexander Dahl @ 2013-09-20 13:59 UTC (permalink / raw)
  To: ptxdist


Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/net-snmp.make |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/rules/net-snmp.make b/rules/net-snmp.make
index fca6417..e0415e8 100644
--- a/rules/net-snmp.make
+++ b/rules/net-snmp.make
@@ -31,7 +31,6 @@ NET_SNMP_DIR		:= $(BUILDDIR)/$(NET_SNMP)
 
 NET_SNMP_PATH	:= PATH=$(CROSS_PATH)
 NET_SNMP_ENV 	:= $(CROSS_ENV)
-NET_SNMP_BINCONFIG_GLOB := net-snmp-config
 
 NET_SNMP_MIB_MODULES-y	:= $(call remove_quotes,$(PTXCONF_NET_SNMP_MIB_MODULES))
 NET_SNMP_MIB_MODULES-	:= $(call remove_quotes,$(PTXCONF_NET_SNMP_WITHOUT_MIB_MODULES))
@@ -160,19 +159,12 @@ else
 NET_SNMP_AUTOCONF += --disable-developer
 endif
 
-##NET_SNMP_AUTOCONF	+= --with-mib-modules=mibII
-##NET_SNMP_AUTOCONF	+= --with-sys-contact=root@localhost
-##NET_SNMP_AUTOCONF	+= --with-sys-location=unknown
-
 NET_SNMP_MAKE_PAR := NO
 
 # ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
 
-NET_SNMP_LIBMAJOR := 25
-NET_SNMP_LIBMINOR := 0.1
-NET_SNMP_LIBVER :=$(NET_SNMP_LIBMAJOR).$(NET_SNMP_LIBMINOR)
 
 NET_SNMP_V1MIBS := RFC1155-SMI.txt RFC1213-MIB.txt RFC-1215.txt
 
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ptxdist] [PATCH 6/8] net-snmp: let user choose MIB files to install
  2013-09-20 13:59 [ptxdist] net-snmp: patch series again Alexander Dahl
                   ` (4 preceding siblings ...)
  2013-09-20 13:59 ` [ptxdist] [PATCH 5/8] net-snmp: remove no longer used/needed stuff Alexander Dahl
@ 2013-09-20 13:59 ` Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 7/8] net-snmp: reorder menu entries (menus on top) Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 8/8] net-snmp: fix vim mode lines Alexander Dahl
  7 siblings, 0 replies; 9+ messages in thread
From: Alexander Dahl @ 2013-09-20 13:59 UTC (permalink / raw)
  To: ptxdist


Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/net-snmp.in   |   85 +++++++++++++++++++++++++++++++++++++++++++++++++--
 rules/net-snmp.make |   80 ++++++++++++++++++++++++++++++++----------------
 2 files changed, 137 insertions(+), 28 deletions(-)

diff --git a/rules/net-snmp.in b/rules/net-snmp.in
index a36a915..6346711 100644
--- a/rules/net-snmp.in
+++ b/rules/net-snmp.in
@@ -27,9 +27,90 @@ config NET_SNMP_SCRIPTS
 	bool
 	prompt "scripts (mib2c, ...)"
 
-config NET_SNMP_MIBS
+menuconfig NET_SNMP_MIBS
 	bool
-	prompt "mib files"
+	prompt "mib files                     "
+
+if NET_SNMP_MIBS
+
+config NET_SNMP_V1MIBS
+	bool
+	prompt "v1 MIBS"
+	default y
+	help
+	  RFC1155-SMI, RFC1213-MIB, RFC-1215
+
+config NET_SNMP_V2MIBS
+	bool
+	prompt "v2 MIBS"
+	default y
+	help
+	  SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, SNMPv2-TM, SNMPv2-MIB
+
+config NET_SNMP_V3MIBS
+	bool
+	prompt "v3 MIBS"
+	default y
+	help
+	  SNMP-FRAMEWORK-MIB, SNMP-MPD-MIB, SNMP-TARGET-MIB,
+	  SNMP-NOTIFICATION-MIB, SNMP-PROXY-MIB, SNMP-USER-BASED-SM-MIB,
+	  SNMP-VIEW-BASED-ACM-MIB, SNMP-COMMUNITY-MIB, TRANSPORT-ADDRESS-MIB
+
+config NET_SNMP_AGENTMIBS
+	bool
+	prompt "agent MIBS"
+	default y
+	help
+	  AGENTX-MIB, SMUX-MIB
+
+config NET_SNMP_IANAMIBS
+	bool
+	prompt "IANA MIBS"
+	default y
+	help
+	  IANAifType-MIB, IANA-LANGUAGE-MIB, IANA-ADDRESS-FAMILY-NUMBERS-MIB
+
+config NET_SNMP_RFCMIBS
+	bool
+	prompt "RFC MIBS"
+	default y
+	help
+	  IF-MIB, IF-INVERTED-STACK-MIB, EtherLike-MIB, IP-MIB,
+	  IP-FORWARD-MIB, IANA-RTPROTO-MIB, TCP-MIB, UDP-MIB,
+	  INET-ADDRESS-MIB, HCNUM-TC, HOST-RESOURCES-MIB,
+	  HOST-RESOURCES-TYPES, RMON-MIB, IPV6-TC, IPV6-MIB, IPV6-ICMP-MIB,
+	  IPV6-TCP-MIB, IPV6-UDP-MIB, DISMAN-EVENT-MIB, DISMAN-SCRIPT-MIB,
+	  DISMAN-SCHEDULE-MIB, NOTIFICATION-LOG-MIB, SNMP-USM-AES-MIB,
+	  SNMP-USM-DH-OBJECTS-MIB
+
+config NET_SNMP_NETSNMPMIBS
+	bool
+	prompt "Net-SNMP MIBS"
+	default y
+	help
+	  NET-SNMP-TC, NET-SNMP-MIB, NET-SNMP-AGENT-MIB,
+	  NET-SNMP-EXAMPLES-MIB, NET-SNMP-EXTEND-MIB, NET-SNMP-PASS-MIB
+
+config NET_SNMP_UCDMIBS
+	bool
+	prompt "UCD MIBS"
+	default y
+	help
+	  UCD-SNMP-MIB, UCD-DEMO-MIB, UCD-IPFWACC-MIB, UCD-DLMOD-MIB,
+	  UCD-DISKIO-MIB
+
+config NET_SNMP_LMSENSORS_MIB
+	bool "lm-sensors MIBS" if NET_SNMP_MIB_MODULES_LM_SENSORS
+	help
+	  LM-SENSORS-MIB
+
+config NET_SNMP_OTHERMIBS
+	bool
+	prompt "other MIBS"
+	help
+	  BRIDGE-MIB, IPV6-FLOW-LABEL-MIB, SCTP-MIB, TUNNEL-MIB
+
+endif
 
 config NET_SNMP_MIB_LOADING
 	bool
diff --git a/rules/net-snmp.make b/rules/net-snmp.make
index e0415e8..c0cc786 100644
--- a/rules/net-snmp.make
+++ b/rules/net-snmp.make
@@ -2,6 +2,7 @@
 #
 # Copyright (C) 2006 by Randall Loomis <rloomis@solectek.com>
 #               2010 Michael Olbrich <m.olbrich@pengutronix.de>
+#               2013 Alexander Dahl <post@lespocky.de>
 #
 # See CREDITS for details about who has contributed to this project.
 #
@@ -165,44 +166,73 @@ NET_SNMP_MAKE_PAR := NO
 # Target-Install
 # ----------------------------------------------------------------------------
 
+NET_SNMP_MIBS :=
 
-NET_SNMP_V1MIBS := RFC1155-SMI.txt RFC1213-MIB.txt RFC-1215.txt
+ifdef PTXCONF_NET_SNMP_MIBS
+
+ifdef PTXCONF_NET_SNMP_V1MIBS
+NET_SNMP_MIBS += RFC1155-SMI.txt RFC1213-MIB.txt RFC-1215.txt
+endif
 
-NET_SNMP_V2MIBS := SNMPv2-CONF.txt SNMPv2-SMI.txt SNMPv2-TC.txt SNMPv2-TM.txt SNMPv2-MIB.txt
+ifdef PTXCONF_NET_SNMP_V2MIBS
+NET_SNMP_MIBS += SNMPv2-CONF.txt SNMPv2-SMI.txt SNMPv2-TC.txt \
+			SNMPv2-TM.txt SNMPv2-MIB.txt
+endif
 
-NET_SNMP_V3MIBS := SNMP-FRAMEWORK-MIB.txt SNMP-MPD-MIB.txt SNMP-TARGET-MIB.txt \
-			SNMP-NOTIFICATION-MIB.txt SNMP-PROXY-MIB.txt \
-			SNMP-USER-BASED-SM-MIB.txt SNMP-VIEW-BASED-ACM-MIB.txt \
+ifdef PTXCONF_NET_SNMP_V3MIBS
+NET_SNMP_MIBS += SNMP-FRAMEWORK-MIB.txt SNMP-MPD-MIB.txt \
+			SNMP-TARGET-MIB.txt SNMP-NOTIFICATION-MIB.txt \
+			SNMP-PROXY-MIB.txt SNMP-USER-BASED-SM-MIB.txt \
+			SNMP-VIEW-BASED-ACM-MIB.txt \
 			SNMP-COMMUNITY-MIB.txt TRANSPORT-ADDRESS-MIB.txt
+endif
 
-NET_SNMP_AGENTMIBS := AGENTX-MIB.txt SMUX-MIB.txt
+ifdef PTXCONF_NET_SNMP_AGENTMIBS
+NET_SNMP_MIBS += AGENTX-MIB.txt SMUX-MIB.txt
+endif
 
-NET_SNMP_IANAMIBS := IANAifType-MIB.txt IANA-LANGUAGE-MIB.txt \
+ifdef PTXCONF_NET_SNMP_IANAMIBS
+NET_SNMP_MIBS += IANAifType-MIB.txt IANA-LANGUAGE-MIB.txt \
 			IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
+endif
 
-NET_SNMP_RFCMIBS := IF-MIB.txt IF-INVERTED-STACK-MIB.txt \
-			EtherLike-MIB.txt \
-			IP-MIB.txt IP-FORWARD-MIB.txt IANA-RTPROTO-MIB.txt \
-			TCP-MIB.txt UDP-MIB.txt \
-			INET-ADDRESS-MIB.txt HCNUM-TC.txt \
-			HOST-RESOURCES-MIB.txt HOST-RESOURCES-TYPES.txt \
-			RMON-MIB.txt \
-			IPV6-TC.txt IPV6-MIB.txt IPV6-ICMP-MIB.txt IPV6-TCP-MIB.txt \
-			IPV6-UDP-MIB.txt \
-			DISMAN-EVENT-MIB.txt DISMAN-SCRIPT-MIB.txt DISMAN-SCHEDULE-MIB.txt \
+ifdef PTXCONF_NET_SNMP_RFCMIBS
+NET_SNMP_MIBS += IF-MIB.txt IF-INVERTED-STACK-MIB.txt \
+			EtherLike-MIB.txt IP-MIB.txt \
+			IP-FORWARD-MIB.txt IANA-RTPROTO-MIB.txt \
+			TCP-MIB.txt UDP-MIB.txt INET-ADDRESS-MIB.txt \
+			HCNUM-TC.txt HOST-RESOURCES-MIB.txt \
+			HOST-RESOURCES-TYPES.txt RMON-MIB.txt \
+			IPV6-TC.txt IPV6-MIB.txt IPV6-ICMP-MIB.txt \
+			IPV6-TCP-MIB.txt IPV6-UDP-MIB.txt \
+			DISMAN-EVENT-MIB.txt DISMAN-SCRIPT-MIB.txt \
+			DISMAN-SCHEDULE-MIB.txt \
 			NOTIFICATION-LOG-MIB.txt SNMP-USM-AES-MIB.txt \
 			SNMP-USM-DH-OBJECTS-MIB.txt
+endif
 
-NET_SNMP_NETSNMPMIBS := NET-SNMP-TC.txt NET-SNMP-MIB.txt NET-SNMP-AGENT-MIB.txt \
-			NET-SNMP-EXAMPLES-MIB.txt NET-SNMP-EXTEND-MIB.txt \
-			NET-SNMP-PASS-MIB.txt
+ifdef PTXCONF_NET_SNMP_NETSNMPMIBS
+NET_SNMP_MIBS += NET-SNMP-TC.txt NET-SNMP-MIB.txt \
+			NET-SNMP-AGENT-MIB.txt \
+			NET-SNMP-EXAMPLES-MIB.txt \
+			NET-SNMP-EXTEND-MIB.txt NET-SNMP-PASS-MIB.txt
+endif
 
-NET_SNMP_UCDMIBS := UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \
+ifdef PTXCONF_NET_SNMP_UCDMIBS
+NET_SNMP_MIBS += UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \
 			UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt
+endif
+
+ifdef PTXCONF_NET_SNMP_LMSENSORS_MIB
+NET_SNMP_MIBS += LM-SENSORS-MIB.txt
+endif
 
-## FIXME:  for now, you need to manually edit this list to represent what mibs to install on target.
-NET_SNMP_MIBS := $(NET_SNMP_V1MIBS) $(NET_SNMP_V2MIBS) $(NET_SNMP_V3MIBS) \
-	$(NET_SNMP_AGENTMIBS) $(NET_SNMP_IANAMIBS) $(NET_SNMP_RFCMIBS) $(NET_SNMP_NETSNMPMIBS) $(NET_SNMP_UCDMIBS)
+ifdef PTXCONF_NET_SNMP_OTHERMIBS
+NET_SNMP_MIBS += BRIDGE-MIB.txt IPV6-FLOW-LABEL-MIB.txt SCTP-MIB.txt \
+			TUNNEL-MIB.txt
+endif
+
+endif
 
 $(STATEDIR)/net-snmp.targetinstall:
 	@$(call targetinfo)
@@ -263,9 +293,7 @@ endif
 # snmplib
 	@$(call install_lib, net-snmp, 0, 0, 0644, libnetsnmp)
 
-# MIB files <TODO: install specified set of mib files>
 ifdef PTXCONF_NET_SNMP_MIBS
-
 	@for i in $(NET_SNMP_MIBS); do \
 		$(call install_copy, net-snmp, 0, 0, 0644, -, \
 		$(call remove_quotes,$(PTXCONF_NET_SNMP_MIB_INSTALL_DIR))/$$i, n) ; \
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ptxdist] [PATCH 7/8] net-snmp: reorder menu entries (menus on top)
  2013-09-20 13:59 [ptxdist] net-snmp: patch series again Alexander Dahl
                   ` (5 preceding siblings ...)
  2013-09-20 13:59 ` [ptxdist] [PATCH 6/8] net-snmp: let user choose MIB files to install Alexander Dahl
@ 2013-09-20 13:59 ` Alexander Dahl
  2013-09-20 13:59 ` [ptxdist] [PATCH 8/8] net-snmp: fix vim mode lines Alexander Dahl
  7 siblings, 0 replies; 9+ messages in thread
From: Alexander Dahl @ 2013-09-20 13:59 UTC (permalink / raw)
  To: ptxdist


Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/net-snmp.in |  187 +++++++++++++++++++++++++++--------------------------
 1 file changed, 94 insertions(+), 93 deletions(-)

diff --git a/rules/net-snmp.in b/rules/net-snmp.in
index 6346711..d3d1524 100644
--- a/rules/net-snmp.in
+++ b/rules/net-snmp.in
@@ -10,22 +10,57 @@ menuconfig NET_SNMP
 
 if NET_SNMP
 
-config NET_SNMP_MINI_AGENT
-	bool
-	default y
-	prompt "minimal agent"
+menu "additional mib modules        "
 
-config NET_SNMP_AGENT
+config NET_SNMP_MIB_MODULES_AGENTX
+	prompt "agentx"
 	bool
-	prompt "agent (snmpd)"
+	help
+	  AgentX support (includes both agentx/master and agentx/client).
 
-config NET_SNMP_APPLICATIONS
+config NET_SNMP_MIB_MODULES_UCD_SNMP
+	prompt "ucd_snmp"
 	bool
-	prompt "apps (snmpget, ...)"
+	help
+	  UCD-SNMP-MIB specific extensions.
 
-config NET_SNMP_SCRIPTS
+config NET_SNMP_MIB_MODULES_LM_SENSORS
+	prompt "ucd-snmp/lmsensorsMib"
 	bool
-	prompt "scripts (mib2c, ...)"
+	help
+	  hardware monitoring (LM-SENSORS-MIB)
+
+config NET_SNMP_MIB_MODULES
+	prompt "additional mib modules"
+	string
+	default	""
+	help
+	  space separated list of optional modules
+	    tunnel               Linux TUNNEL-MIB support (ifTable extension)
+	    mibII/interfaces     (old ifTable implementation)
+	    misc/ipfwacc         accounting rules IP firewall information
+	    ipfwchains/ipfwchains  firewall chains under ipfw
+	    sctp-mib             support for the SCTP-MIB
+	    etherlike-mib        support for the EtherLike-MIB
+
+config NET_SNMP_WITHOUT_MIB_MODULES
+	prompt "without these mib modules"
+	string
+	default ""
+	help
+	  space separated list of default mib modules compiled into the
+	  agent (which can be removed):
+	    mibII                  support for the mib-II tree.
+	    snmpv3mibs             support for the snmpv3 mib modules.
+	    agent_mibs             NET-SNMP-AGENT-MIB extensions
+	    notification           mibs supporting specification of trap destinations.
+	    target                 Support for the SNMP WGs TARGET-MIB.
+	    utilities              general agent configuration utilities.
+	    disman/event           support for the DISMAN-EVENT-MIB
+	    disman/schedule        support for the DISMAN-SCHEDULE-MIB
+	    host                   host resources mib support.
+
+endmenu
 
 menuconfig NET_SNMP_MIBS
 	bool
@@ -112,6 +147,47 @@ config NET_SNMP_OTHERMIBS
 
 endif
 
+choice
+	prompt "debugging"
+	default NET_SNMP_DEFAULT_DEBUGGING
+
+config NET_SNMP_DEFAULT_DEBUGGING
+	bool
+	prompt "default"
+	help
+	  Use default debugging, selectable via -D on the command-line.
+
+config NET_SNMP_FORCE_DEBUGGING
+	bool
+	prompt "enforce"
+	help
+	  Always print all debugging even when not specified on command-line.
+
+config NET_SNMP_STRIP_DEBUGGING
+	bool
+	prompt "strip"
+	help
+	  Strip debugging code entirely.
+
+endchoice
+
+config NET_SNMP_MINI_AGENT
+	bool
+	default y
+	prompt "minimal agent"
+
+config NET_SNMP_AGENT
+	bool
+	prompt "agent (snmpd)"
+
+config NET_SNMP_APPLICATIONS
+	bool
+	prompt "apps (snmpget, ...)"
+
+config NET_SNMP_SCRIPTS
+	bool
+	prompt "scripts (mib2c, ...)"
+
 config NET_SNMP_MIB_LOADING
 	bool
 	prompt "include code that parses and manipulates mib files"
@@ -132,6 +208,14 @@ config NET_SNMP_MD5
 	bool
 	prompt "MD5 authentication"
 
+config NET_SNMP_DOM_SOCK_ONLY
+	bool "Disable UDP/TCP transports for agentx" if NET_SNMP_AGENT
+	default y
+	help
+	  Enable this to disable TCP and UDP connections for subagent
+	  connections with AgentX protocol. Only unix socket connections are
+	  allowed then.
+
 config NET_SNMP_SNMPTRAPD
 	bool
 	prompt "agentx subagent code in snmptrapd"
@@ -140,30 +224,6 @@ config NET_SNMP_LOCAL_SMUX
 	bool
 	prompt "restrict SMUX connections to localhost (by default)"
 
-choice
-	prompt "debugging"
-	default NET_SNMP_DEFAULT_DEBUGGING
-
-config NET_SNMP_DEFAULT_DEBUGGING
-	bool
-	prompt "default"
-	help
-	  Use default debugging, selectable via -D on the command-line.
-
-config NET_SNMP_FORCE_DEBUGGING
-	bool
-	prompt "enforce"
-	help
-	  Always print all debugging even when not specified on command-line.
-
-config NET_SNMP_STRIP_DEBUGGING
-	bool
-	prompt "strip"
-	help
-	  Strip debugging code entirely.
-
-endchoice
-
 config NET_SNMP_DEVELOPER
 	bool
 	prompt "super-duper-extra-compile-warnings using gcc"
@@ -183,58 +243,6 @@ config NET_SNMP_PERSISTENT_DIR
 	string
 	default	"/var/net-snmp"
 
-menu "additional mib modules        "
-
-config NET_SNMP_MIB_MODULES_AGENTX
-	prompt "agentx"
-	bool
-	help
-	  AgentX support (includes both agentx/master and agentx/client).
-
-config NET_SNMP_MIB_MODULES_UCD_SNMP
-	prompt "ucd_snmp"
-	bool
-	help
-	  UCD-SNMP-MIB specific extensions.
-
-config NET_SNMP_MIB_MODULES_LM_SENSORS
-	prompt "ucd-snmp/lmsensorsMib"
-	bool
-	help
-	  hardware monitoring (LM-SENSORS-MIB)
-
-config NET_SNMP_MIB_MODULES
-	prompt "additional mib modules"
-	string
-	default	""
-	help
-	  space separated list of optional modules
-	    tunnel               Linux TUNNEL-MIB support (ifTable extension)
-	    mibII/interfaces     (old ifTable implementation)
-	    misc/ipfwacc         accounting rules IP firewall information
-	    ipfwchains/ipfwchains  firewall chains under ipfw
-	    sctp-mib             support for the SCTP-MIB
-	    etherlike-mib        support for the EtherLike-MIB
-
-config NET_SNMP_WITHOUT_MIB_MODULES
-	prompt "without these mib modules"
-	string
-	default ""
-	help
-	  space separated list of default mib modules compiled into the
-	  agent (which can be removed):
-	    mibII                  support for the mib-II tree.
-	    snmpv3mibs             support for the snmpv3 mib modules.
-	    agent_mibs             NET-SNMP-AGENT-MIB extensions
-	    notification           mibs supporting specification of trap destinations.
-	    target                 Support for the SNMP WGs TARGET-MIB.
-	    utilities              general agent configuration utilities.
-	    disman/event           support for the DISMAN-EVENT-MIB
-	    disman/schedule        support for the DISMAN-SCHEDULE-MIB
-	    host                   host resources mib support.
-
-endmenu
-
 config NET_SNMP_DEFAULT_MIBS
 	prompt "default mib id's to read"
 	string
@@ -249,11 +257,4 @@ config NET_SNMP_MIB_INSTALL_DIR
 	string
 	default	"/usr/share/snmp/mibs"
 
-config NET_SNMP_DOM_SOCK_ONLY
-	bool "Disable UDP/TCP transports for agentx" if NET_SNMP_AGENT
-	default y
-	help
-	  Enable this to disable TCP and UDP connections for subagent
-	  connections with AgentX protocol. Only unix socket connections are
-	  allowed then.
 endif
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [ptxdist] [PATCH 8/8] net-snmp: fix vim mode lines
  2013-09-20 13:59 [ptxdist] net-snmp: patch series again Alexander Dahl
                   ` (6 preceding siblings ...)
  2013-09-20 13:59 ` [ptxdist] [PATCH 7/8] net-snmp: reorder menu entries (menus on top) Alexander Dahl
@ 2013-09-20 13:59 ` Alexander Dahl
  7 siblings, 0 replies; 9+ messages in thread
From: Alexander Dahl @ 2013-09-20 13:59 UTC (permalink / raw)
  To: ptxdist


Signed-off-by: Alexander Dahl <post@lespocky.de>
---
 rules/net-snmp.in   |    2 ++
 rules/net-snmp.make |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/rules/net-snmp.in b/rules/net-snmp.in
index d3d1524..9821328 100644
--- a/rules/net-snmp.in
+++ b/rules/net-snmp.in
@@ -258,3 +258,5 @@ config NET_SNMP_MIB_INSTALL_DIR
 	default	"/usr/share/snmp/mibs"
 
 endif
+
+# vim: ft=kconfig noet tw=72
diff --git a/rules/net-snmp.make b/rules/net-snmp.make
index c0cc786..7338e5b 100644
--- a/rules/net-snmp.make
+++ b/rules/net-snmp.make
@@ -303,4 +303,4 @@ endif
 	@$(call install_finish, net-snmp)
 	@$(call touch)
 
-# vim: syntax=make
+# vim: ft=make noet
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-09-20 14:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-20 13:59 [ptxdist] net-snmp: patch series again Alexander Dahl
2013-09-20 13:59 ` [ptxdist] [PATCH 1/8] net-snmp: improve menu help texts Alexander Dahl
2013-09-20 13:59 ` [ptxdist] [PATCH 2/8] net-snmp: check mib config by default Alexander Dahl
2013-09-20 13:59 ` [ptxdist] [PATCH 3/8] net-snmp: enable rewritten mib modules " Alexander Dahl
2013-09-20 13:59 ` [ptxdist] [PATCH 4/8] net-snmp: added extra menu entries for mib modules Alexander Dahl
2013-09-20 13:59 ` [ptxdist] [PATCH 5/8] net-snmp: remove no longer used/needed stuff Alexander Dahl
2013-09-20 13:59 ` [ptxdist] [PATCH 6/8] net-snmp: let user choose MIB files to install Alexander Dahl
2013-09-20 13:59 ` [ptxdist] [PATCH 7/8] net-snmp: reorder menu entries (menus on top) Alexander Dahl
2013-09-20 13:59 ` [ptxdist] [PATCH 8/8] net-snmp: fix vim mode lines Alexander Dahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox