forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build]: enable parallel build for snmpd 5.9 (sonic-net#16671)
Use patches for parallel build from net-snmp upstream and enable parallel build in debian/rules for version 5.9
- Loading branch information
Showing
7 changed files
with
186 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/snmpd/patch-5.9+dfsg/0009-Makefile.in-agent-Makefile.in-Fix-parallel-compilati.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From 855e1c28dad53d6263c6c0c302438d2dc3128cc5 Mon Sep 17 00:00:00 2001 | ||
From: Bart Van Assche <bvanassche@acm.org> | ||
Date: Wed, 14 Apr 2021 09:35:24 -0700 | ||
Subject: [PATCH] Makefile.in, agent/Makefile.in: Fix parallel compilation | ||
|
||
See also https://github.com/net-snmp/net-snmp/issues/283 . | ||
--- | ||
Makefile.in | 2 +- | ||
agent/Makefile.in | 2 +- | ||
2 files changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/Makefile.in b/Makefile.in | ||
index ed729604fc..3271823143 100644 | ||
--- a/Makefile.in | ||
+++ b/Makefile.in | ||
@@ -179,7 +179,7 @@ perlmodules: perlmakefiles subdirs | ||
|
||
perlmakefiles: perl/Makefile net-snmp-config-x | ||
|
||
-perl/Makefile: perl/Makefile.PL | ||
+perl/Makefile: perl/Makefile.PL subdirs | ||
dir=`pwd` && \ | ||
cd perl && \ | ||
if false; then \ | ||
diff --git a/agent/Makefile.in b/agent/Makefile.in | ||
index b5d692d7fe..3dab06eabd 100644 | ||
--- a/agent/Makefile.in | ||
+++ b/agent/Makefile.in | ||
@@ -303,7 +303,7 @@ libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} $(USELIBS) | ||
$(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@ | ||
$(RANLIB) $(AGENTLIB) | ||
|
||
-libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS) | ||
+libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS) subdirs | ||
$(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@ | ||
$(RANLIB) $(MIBLIB) | ||
|
||
-- | ||
2.34.1 | ||
|
41 changes: 41 additions & 0 deletions
41
src/snmpd/patch-5.9+dfsg/0010-Makefile.in-Make-sure-that-sedscript-is-built-before.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
From 9ea3d8b93c9bb7da7fea13ee6c92356a6b82a5fb Mon Sep 17 00:00:00 2001 | ||
From: Bart Van Assche <bvanassche@acm.org> | ||
Date: Wed, 14 Apr 2021 20:03:15 -0700 | ||
Subject: [PATCH] Makefile.in: Make sure that 'sedscript' is built before | ||
subdirectories | ||
|
||
This is a follow-up for commit 855e1c28dad5 ("Makefile.in, agent/Makefile.in: | ||
Fix parallel compilation"). | ||
--- | ||
Makefile.in | 1 + | ||
Makefile.rules | 2 +- | ||
2 files changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/Makefile.in b/Makefile.in | ||
index 3271823143..f1cbbf5ca3 100644 | ||
--- a/Makefile.in | ||
+++ b/Makefile.in | ||
@@ -6,6 +6,7 @@ | ||
VPATH = @srcdir@ | ||
|
||
SUBDIRS = snmplib @MAINSUBS@ | ||
+SUBDIRDEPS = sedscript | ||
FTSUBDIRS = @FTMAINSUBS@ snmplib | ||
TESTDIRS = testing | ||
|
||
diff --git a/Makefile.rules b/Makefile.rules | ||
index 92082e5429..100e0011ee 100644 | ||
--- a/Makefile.rules | ||
+++ b/Makefile.rules | ||
@@ -70,7 +70,7 @@ cleanfeaturessubdirs: | ||
> $(top_builddir)/include/net-snmp/feature-details.h | ||
$(FEATURECHECK) --feature-global $(top_builddir)/include/net-snmp/feature-details.h $(mysubdir) $< $@ $(CC) -E $(CPPFLAGS) $(CFLAGS) -c | ||
|
||
-subdirs: | ||
+subdirs: $(SUBDIRDEPS) | ||
@if test "$(SUBDIRS)" != ""; then \ | ||
it="$(SUBDIRS)" ; \ | ||
for i in $$it ; do \ | ||
-- | ||
2.34.1 | ||
|
46 changes: 46 additions & 0 deletions
46
src/snmpd/patch-5.9+dfsg/0011-agent-Makefile.in-Build-the-MIB-module-code-once.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From 51128ad095074488992982fa23ae641f7c7be4ae Mon Sep 17 00:00:00 2001 | ||
From: Bart Van Assche <bvanassche@acm.org> | ||
Date: Sun, 11 Jul 2021 14:40:56 -0700 | ||
Subject: [PATCH] agent/Makefile.in: Build the MIB module code once | ||
|
||
Fixes: 91033077790c ("remake make's Makefile's to make better making") | ||
Signed-off-by: Srivalli231@github.com | ||
[bvanassche: added patch description] | ||
--- | ||
agent/Makefile.in | 13 ++++++++----- | ||
1 file changed, 8 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/agent/Makefile.in b/agent/Makefile.in | ||
index 634e912b8c..047d880bf4 100644 | ||
--- a/agent/Makefile.in | ||
+++ b/agent/Makefile.in | ||
@@ -15,8 +15,8 @@ mysubdir=agent | ||
# | ||
# what to install | ||
# | ||
-SUBDIRS=helpers mibgroup | ||
-FTSUBDIRS=mibgroup helpers | ||
+SUBDIRS=helpers | ||
+FTSUBDIRS=helpers | ||
|
||
INSTALLSBINPROGS= @SNMPD@ | ||
INSTALLLIBS = libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) | ||
@@ -273,9 +273,12 @@ FTAGENTOBJS=snmpd.ft @other_ftagentobjs@ | ||
# | ||
# Define OBJS and LOBJS for clean target (just this directory) | ||
# | ||
-OBJS = $(LIBAGENTOBJS) $(AGENTOBJS) mib_modules.o auto_nlist.o | ||
-LOBJS = $(LLIBAGENTOBJS) $(LAGENTOBJS) mib_modules.lo auto_nlist.lo | ||
-FTOBJS = $(LLIBAGENTFTS) $(FTAGENTOBJS) mib_modules.ft auto_nlist.ft | ||
+OBJS = $(LIBAGENTOBJS) $(MIBOBJS) $(AGENTOBJS) \ | ||
+ mib_modules.o auto_nlist.o | ||
+LOBJS = $(LLIBAGENTOBJS) $(LMIBOBJS) $(LAGENTOBJS) \ | ||
+ mib_modules.lo auto_nlist.lo | ||
+FTOBJS = $(LLIBAGENTFTS) $(FTMIBOBJS) $(FTAGENTOBJS) \ | ||
+ mib_modules.ft auto_nlist.ft | ||
|
||
FEATUREFILE = $(top_builddir)/include/net-snmp/agent/features.h | ||
|
||
-- | ||
2.34.1 | ||
|
30 changes: 30 additions & 0 deletions
30
src/snmpd/patch-5.9+dfsg/0012-agent-Makefile.in-Unbreak-the-enable-minimalist-buil.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 51f315046a0bec13934930edde9c145b31bf7d53 Mon Sep 17 00:00:00 2001 | ||
From: Bart Van Assche <bvanassche@acm.org> | ||
Date: Sun, 24 Jul 2022 16:45:05 -0700 | ||
Subject: [PATCH] agent/Makefile.in: Unbreak the --enable-minimalist build | ||
|
||
Build the features rules in the mibgroup directory before building the | ||
features rules in the helpers directory. | ||
|
||
Fixes: 51128ad09507 ("agent/Makefile.in: Build the MIB module code once") | ||
Fixes: https://github.com/net-snmp/net-snmp/issues/438 | ||
--- | ||
agent/Makefile.in | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/agent/Makefile.in b/agent/Makefile.in | ||
index 047d880bf4..44f8818d29 100644 | ||
--- a/agent/Makefile.in | ||
+++ b/agent/Makefile.in | ||
@@ -16,7 +16,7 @@ mysubdir=agent | ||
# what to install | ||
# | ||
SUBDIRS=helpers | ||
-FTSUBDIRS=helpers | ||
+FTSUBDIRS=mibgroup helpers | ||
|
||
INSTALLSBINPROGS= @SNMPD@ | ||
INSTALLLIBS = libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION) | ||
-- | ||
2.34.1 | ||
|
18 changes: 18 additions & 0 deletions
18
src/snmpd/patch-5.9+dfsg/0013-enable-parallel-build-for-net-snmp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/debian/rules b/debian/rules | ||
index b23b335..d37413c 100755 | ||
--- a/debian/rules | ||
+++ b/debian/rules | ||
@@ -31,10 +31,6 @@ endif | ||
%: | ||
dh $@ | ||
|
||
-# The net-snmp Makefiles cannot handle parallel builds | ||
-override_dh_auto_build: | ||
- dh_auto_build --no-parallel | ||
- | ||
override_dh_auto_configure: | ||
dh_auto_configure -- --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \ | ||
--with-persistent-directory=/var/lib/snmp \ | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters