Skip to contentSkip to conversation

Pull request for branch snmp-fix

GIT PULL New Thomas Petazzoni 2 participants 5 messages Aug 4, 2009

lore
Share & tools
lore
#0 lore raw

The following changes since commit 5b72dda69f72e1953dfc7987dd1b418e1afe79a4:
Peter Korsgaard (1):

        buildroot: fix fallout after qtopia4 -> qt rename

are available in the git repository at:

git://git.busybox.net/~tpetazzoni/git/buildroot snmp-fix

Thomas Petazzoni (3):
netsnmp: convert to autotools.in and fix build issues
netsnmp: update TODO
netsnmp: add patch to fix CVE-2008-6123

 TODO                                               |   10 +
 .../netsnmp/netsnmp-5.4.2.1-CVE-2008-6123.patch    |   29 +++
 .../netsnmp-5.4.2.1-build-system-fixup.patch       |   29 +++
 package/netsnmp/netsnmp.mk                         |  179 ++++++--------------
 4 files changed, 119 insertions(+), 128 deletions(-)
 create mode 100644 package/netsnmp/netsnmp-5.4.2.1-CVE-2008-6123.patch
 create mode 100644 package/netsnmp/netsnmp-5.4.2.1-build-system-fixup.patch

Thanks,

Signature · 1 line
Thomas Petazzoni
#1 lore raw

PATCH 1/3 netsnmp: convert to autotools.in and fix build issues

In order to fix build issues on net-snmp with openssl configured reported on the mailing-list, this patch converts net-snmp to the Makefile.autotools.in infrastructure. This allows to fix build issues.

This patch removes support for the Perl stuff in net-snmp because it doesn't build. This is most likely not a problem, since Perl support was dependent on BR2_HAVE_PERL, a configuration symbol that doesn't exist in Buildroot since several years.

Moreover, we introduce a patch to the build system so that it doesn't call ldconfig on /usr/lib at install time, which is completely useless when doing cross-compilation.

---
 .../netsnmp-5.4.2.1-build-system-fixup.patch       |   29 +++
 package/netsnmp/netsnmp.mk                         |  179 ++++++--------------
 2 files changed, 80 insertions(+), 128 deletions(-)
 create mode 100644 package/netsnmp/netsnmp-5.4.2.1-build-system-fixup.patch
package/netsnmp/netsnmp-5.4.2.1-build-system-fixup.patch new file +29 -0
new file mode 100644
index 0000000..f9c50ab
@@ -0,0 +1,29 @@
+Index: net-snmp-5.4.2.1/Makefile.rules
+===================================================================
+--- net-snmp-5.4.2.1.orig/Makefile.rules
++++ net-snmp-5.4.2.1/Makefile.rules
+@@ -172,7 +172,6 @@
+ 			echo "installing $$i in $(INSTALL_PREFIX)$(libdir)"; \
+ 			$(RANLIB) $(INSTALL_PREFIX)$(libdir)/$$i ; \
+ 		done ; \
+-		$(LIB_LDCONFIG_CMD) ; \
+ 	fi
+ 
+ installpostlibs: $(INSTALLPOSTLIBS)
+@@ -184,7 +183,6 @@
+ 			echo "installing $$i in $(INSTALL_PREFIX)$(libdir)"; \
+ 			$(RANLIB) $(INSTALL_PREFIX)$(libdir)/$$i ; \
+ 		done ; \
+-		$(LIB_LDCONFIG_CMD) ; \
+ 	fi
+ 
+ installucdlibs: $(INSTALLUCDLIBS)
+@@ -196,7 +194,6 @@
+ 			echo "installing $$i in $(INSTALL_PREFIX)$(libdir)"; \
+ 			$(RANLIB) $(INSTALL_PREFIX)$(libdir)/$$i ; \
+ 		done ; \
+-		$(LIB_LDCONFIG_CMD) ; \
+ 	fi
+ 
+ installsubdirlibs:
+
package/netsnmp/netsnmp.mk +51 -128

204 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#2 lore raw

PATCH 1/3 netsnmp: convert to autotools.in and fix build issues

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Thomas> Moreover, we introduce a patch to the build system so that it Thomas> doesn't call ldconfig on /usr/lib at install time, which is Thomas> completely useless when doing cross-compilation.

Wouldn't it be simpler to just provide a different value to LIB_LDCONFIG_CMD on the make commandline instead of the patch?

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 2/3 netsnmp: update TODO

In reply to Thomas Petazzoni
---
 TODO |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
TODO +10 -0
index bf98fea..8a73c7f 100644
@@ -15,3 +15,13 @@ Buildroot2 TODOs
   present, and rerun the configuration... with the wrong environment
   variables (STRIP= is missing). An autoreconf on this package is
   probably necessary.
+
+- net-snmp:
+   - Figure out why the net-snmp build systems hardcodes rpath into
+     the libraries (and these rpath are completely wrong since they
+     are based on the host directory hierarchy)
+   - Figure out how to get the Perl support compiled
+   - Find someone more knowledgeable in net-snmp usage to tell how the
+     packaging could be improve (many files installed in /usr/share/,
+     many tools in /usr/bin, is this all necessary ? should it be
+     split in subpackages somehow ?)
Signature · 1 line
1.6.0.4
#4 lore raw

PATCH 3/3 netsnmp: add patch to fix CVE-2008-6123

In reply to Thomas Petazzoni
---
 .../netsnmp/netsnmp-5.4.2.1-CVE-2008-6123.patch    |   29 ++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100644 package/netsnmp/netsnmp-5.4.2.1-CVE-2008-6123.patch
package/netsnmp/netsnmp-5.4.2.1-CVE-2008-6123.patch new file +29 -0
new file mode 100644
index 0000000..2ecc1bb
@@ -0,0 +1,29 @@
+This patch fixes CVE-2008-6123, according to
+http://bugs.gentoo.org/show_bug.cgi?id=250429. It has been found
+upstream at
+http://net-snmp.svn.sourceforge.net/viewvc/net-snmp/branches/V5-4-patches/net-snmp/snmplib/snmpUDPDomain.c?view=patch&r1=17367&r2=17366&pathrev=17367.
+
+---
+ snmplib/snmpUDPDomain.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: netsnmp-5.4.2.1/snmplib/snmpUDPDomain.c
+===================================================================
+--- netsnmp-5.4.2.1.orig/snmplib/snmpUDPDomain.c
++++ netsnmp-5.4.2.1/snmplib/snmpUDPDomain.c
+@@ -104,12 +104,12 @@
+ 	char tmp[64];
+         to = (struct sockaddr_in *) &(addr_pair->remote_addr);
+         if (to == NULL) {
+-            sprintf(tmp, "UDP: [%s]->unknown",
++            sprintf(tmp, "UDP: unknown->[%s]",
+                     inet_ntoa(addr_pair->local_addr));
+         } else {
+-            sprintf(tmp, "UDP: [%s]->", inet_ntoa(addr_pair->local_addr));
+-            sprintf(tmp + strlen(tmp), "[%s]:%hd",
++            sprintf(tmp, "UDP: [%s]:%hu->",
+                     inet_ntoa(to->sin_addr), ntohs(to->sin_port));
++            sprintf(tmp + strlen(tmp), "[%s]", inet_ntoa(addr_pair->local_addr));
+         }
+         return strdup(tmp);
+     }
Signature · 1 line
1.6.0.4