Package: net-snmp Version: 5.2.2-3 Severity: normal Tags: patch upstream Hello Jochen,
While looking at #355641 ("no shared libraries in latest non-maintainer upload"), I patched snmp to fail immediately on build errors. Since ucd-snmp is going away, I'm not going to bug it, but I'm including now a lightly-tested patch to fix this for net-snmp instead. (It requires a minor change to the existing 03_makefiles.patch) Additionally, while reviewing the packages, I came up with some suggestions to improve the packaging: The preremoval and postinstall scripts are unnecessary, they will be created from scratch by debhelper if they dont exist. Neither the initscript nor fixman are set -e. There are autoconf warnings during build: http://buildd.debian.org/fetch.php?&pkg=net-snmp&ver=5.2.2-3&arch=amd64&stamp=1143163348&file=log&as=raw CFLAGS should always include -g; dh_strip will strip unless DEB_BUILD_OPTIONS=~nostrip; CFLAGS should set -O2 conditionally, when DEB_BUILD_OPTIONS!~noopt. You should consider using -W -Wall, too. In 3 for loops, ./debian/rules doesn't use set -e. ./debian/rules use -$(MAKE); see #325372 for a discussion. ./debian/rules has unuseful comments and duplicated code. There's an example of how to not duplicate all the debhelper foo at: /usr/share/debhelper/dh_make/debianm/rules
diff -Naur orig/net-snmp-5.2.2/Makefile.in net-snmp-5.2.2/Makefile.in --- orig/net-snmp-5.2.2/Makefile.in 2005-10-11 07:49:23.000000000 -0400 +++ net-snmp-5.2.2/Makefile.in 2006-03-29 16:09:13.000000000 -0500 @@ -64,24 +64,24 @@ snmplib: - @(cd snmplib; $(MAKE) ) + @cd snmplib && $(MAKE) agent: - @(cd snmplib; $(MAKE) ) - @(cd agent; $(MAKE) ) + @cd snmplib && $(MAKE) + @cd agent && $(MAKE) apps: - @(cd snmplib; $(MAKE) ) - @(cd apps; $(MAKE) ) + @cd snmplib && $(MAKE) + @cd apps && $(MAKE) snmpget snmpbulkget snmpwalk snmpbulkwalk snmptranslate snmpstatus snmpdelta snmptable snmptest snmpset snmpusm snmpvacm snmpgetnext encode_keychange snmpdf snmptrap: - @(cd snmplib; $(MAKE) ) - @(cd apps; $(MAKE) $@ ) + @cd snmplib && $(MAKE) + @cd apps && $(MAKE) $@ snmptrapd: - @(cd snmplib; $(MAKE) ) - @(cd agent; $(MAKE) libs) - @(cd apps; $(MAKE) $@ ) + @cd snmplib && $(MAKE) + @cd agent && $(MAKE) libs + @cd apps && $(MAKE) $@ # # local build rules @@ -111,7 +111,7 @@ mancp: - @for i in docs/man/man3/* ; do \ + @set -e; for i in docs/man/man3/* ; do \ cp $$i man/netsnmp_`basename $$i` ; \ done @@ -124,7 +124,7 @@ # copypersistentfiles: - @if test "$(COPY_PERSISTENT_FILES)" = "yes" -a -d $(UCDPERSISTENT_DIRECTORY) -a ! -d $(PERSISTENT_DIRECTORY) ; then \ + @set -e; if test "$(COPY_PERSISTENT_FILES)" = "yes" && -d $(UCDPERSISTENT_DIRECTORY) && ! -d $(PERSISTENT_DIRECTORY) ; then \ cp -pr $(UCDPERSISTENT_DIRECTORY) $(PERSISTENT_DIRECTORY) ; \ echo "copying $(UCDPERSISTENT_DIRECTORY) to $(PERSISTENT_DIRECTORY)" ; \ fi @@ -132,14 +132,11 @@ # test targets # test: all testdirs - ( cd testing; $(MAKE) test ) + cd testing && $(MAKE) test testdirs: - for i in $(TESTDIRS) ; do \ - ( cd $$i ; $(MAKE) ) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + set -e; for i in $(TESTDIRS) ; do \ + cd $$i; $(MAKE) ; \ done distall: ${srcdir}/configure ${srcdir}/include/net-snmp/net-snmp-config.h @@ -151,43 +148,31 @@ # perl specific build rules # perlmodules: perlmakefiles - @(cd perl ; $(MAKE)) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi + @cd perl && $(MAKE); perlmakefiles: net-snmp-config-x - @if test ! -f perl/Makefile; then \ - (dir=`pwd`; \ + @set -e; if test ! -f perl/Makefile; then \ + dir=`pwd`; \ cd perl ; \ - perl Makefile.PL -NET-SNMP-IN-SOURCE=true -NET-SNMP-CONFIG="sh $$dir/net-snmp-config" $(PERLARGS) ) ; \ + perl Makefile.PL -NET-SNMP-IN-SOURCE=true -NET-SNMP-CONFIG="sh $$dir/net-snmp-config" $(PERLARGS); \ fi perlinstall: - @(cd perl ; $(MAKE) install) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi + @cd perl && $(MAKE) install; perluninstall: - @(cd perl ; $(MAKE) uninstall) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi + @cd perl && $(MAKE) uninstall; perltest: - @(cd perl ; $(MAKE) test) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi + @cd perl && $(MAKE) test perlclean: - @if test -f perl/Makefile; then \ - ( cd perl ; $(MAKE) clean ) ; \ + @set -e; if test -f perl/Makefile; then \ + cd perl; $(MAKE) clean; fi perlrealclean: - @if test -f perl/Makefile; then \ - ( cd perl ; $(MAKE) realclean ) ; \ + @set -e; if test -f perl/Makefile; then \ + cd perl ; $(MAKE) realclean; \ fi @@ -233,7 +218,7 @@ touch stamp-h stamp-h.in Makefile: Makefile.in config.status Makefile.rules Makefile.top - @if test "x$(NOAUTODEPS)" = "x"; then \ + @set -e; if test "x$(NOAUTODEPS)" = "x"; then \ echo "running config.status because the following file(s) changed:"; \ echo " $?"; \ ./config.status; \ @@ -243,7 +228,7 @@ $(srcdir)/include/net-snmp/net-snmp-config.h.in: stamp-h.in $(srcdir)/stamp-h.in: configure.in acconfig.h - @if test "x$(NOAUTODEPS)" = "x" -a "x$(AUTOHEADER)" != "x:"; then \ + @set -e; if test "x$(NOAUTODEPS)" = "x" && "x$(AUTOHEADER)" != "x:"; then \ cd ${srcdir} && LC_COLLATE=C $(AUTOHEADER); \ echo timestamp > ${srcdir}/stamp-h.in; \ else \ @@ -252,7 +237,7 @@ include/net-snmp/net-snmp-config.h: stamp-h stamp-h: include/net-snmp/net-snmp-config.h.in config.status - @if test "x$(NOAUTODEPS)" = "x"; then \ + @set -e; if test "x$(NOAUTODEPS)" = "x"; then \ echo "running config.status because the following file(s) changed:"; \ echo " $?"; \ ./config.status; \ @@ -262,7 +247,7 @@ fi $(srcdir)/configure: configure.in aclocal.m4 - @if test "x$(NOAUTODEPS)" = "x" -a "x$(AUTOCONF)" != "x:"; then \ + @set -e; if test "x$(NOAUTODEPS)" = "x" && "x$(AUTOCONF)" != "x:"; then \ cd ${srcdir} && $(AUTOCONF); \ echo "Please run configure now."; \ sh -c exit 2; \ @@ -271,7 +256,7 @@ fi config.status: configure - @if test "x$(NOAUTODEPS)" = "x"; then \ + @set -e; if test "x$(NOAUTODEPS)" = "x"; then \ echo "running config.status because $? changed"; \ ./config.status --recheck; \ else \ @@ -288,28 +273,28 @@ # Internal distribution packaging, etc. # version: - @if test "x$(VERSION)" = "x"; then \ + @set -e; if test "x$(VERSION)" = "x"; then \ echo "you need to supply a VERSION string."; \ exit 2; \ fi perl local/Version-Munge.pl -T $(VERSION) -M -V -D -C tag: - @if test "x$(VERSION)" = "x"; then \ + @set -e; if test "x$(VERSION)" = "x"; then \ echo "you need to supply a VERSION string."; \ exit 2; \ fi ${srcdir}/agent/mibgroup/versiontag $(VERSION) tag tar: - @if test "x$(VERSION)" = "x"; then \ + @set -e; if test "x$(VERSION)" = "x"; then \ echo "you need to supply a VERSION string."; \ exit 2; \ fi ${srcdir}/agent/mibgroup/versiontag $(VERSION) tar tarclean: - @if test -x ${srcdir}/agent/mibgroup/versiontag ; then \ + @set -e; if test -x ${srcdir}/agent/mibgroup/versiontag ; then \ ${srcdir}/agent/mibgroup/versiontag Ext clean ; \ fi diff -Naur orig/net-snmp-5.2.2/Makefile.rules net-snmp-5.2.2/Makefile.rules --- orig/net-snmp-5.2.2/Makefile.rules 2005-10-10 14:47:48.000000000 -0400 +++ net-snmp-5.2.2/Makefile.rules 2006-03-29 19:00:22.000000000 -0500 @@ -15,14 +15,11 @@ objs: ${OBJS} ${LOBJS} subdirs: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making all in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) ) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) ; \ done \ fi @@ -50,7 +47,7 @@ installheaders: installlocalheaders @installucdheaders@ installsubdirheaders installlocalheaders: - @if test "$(INSTALLHEADERS)" != "" ; then \ + @set -e; if test "$(INSTALLHEADERS)" != "" ; then \ echo creating directory $(INSTALL_PREFIX)$(includedir) ; \ it="$(INSTALLHEADERS)" ; \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(includedir) ; \ @@ -59,7 +56,7 @@ echo "installing $$i in $(INSTALL_PREFIX)$(includedir)" ; \ done \ fi - @if test "$(INSTALLBUILTHEADERS)" != "" ; then \ + @set -e; if test "$(INSTALLBUILTHEADERS)" != "" ; then \ echo creating directory $(INSTALL_PREFIX)$(includedir) ; \ it="$(INSTALLBUILTHEADERS)" ; \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(includedir) ; \ @@ -68,7 +65,7 @@ echo "installing $$i in $(INSTALL_PREFIX)$(includedir)" ; \ done \ fi - @if test "$(INCLUDESUBDIRHEADERS)" != "" ; then \ + @set -e; if test "$(INCLUDESUBDIRHEADERS)" != "" ; then \ echo creating directory $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR) ; \ it="$(INCLUDESUBDIRHEADERS)" ; \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR) ; \ @@ -77,7 +74,7 @@ echo "installing $$i in $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR)" ; \ done \ fi - @if test "$(INCLUDESUBDIRHEADERS2)" != "" ; then \ + @set -e; if test "$(INCLUDESUBDIRHEADERS2)" != "" ; then \ echo creating directory $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR2) ; \ it="$(INCLUDESUBDIRHEADERS2)" ; \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR2) ; \ @@ -86,7 +83,7 @@ echo "installing $$i in $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR2)" ; \ done \ fi - @if test "$(INSTALLBUILTSUBDIRHEADERS)" != "" ; then \ + @set -e; if test "$(INSTALLBUILTSUBDIRHEADERS)" != "" ; then \ echo creating directory $(INSTALL_PREFIX)$(includedir)/$(INSTALLBUILTSUBDIR) ; \ it="$(INSTALLBUILTSUBDIRHEADERS)" ; \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(includedir)/$(INSTALLBUILTSUBDIR) ; \ @@ -97,7 +94,7 @@ fi installucdheaders: - @if test "$(INSTALLUCDHEADERS)" != "" ; then \ + @set -e; if test "$(INSTALLUCDHEADERS)" != "" ; then \ echo creating directory $(INSTALL_PREFIX)$(ucdincludedir) ; \ it="$(INSTALLUCDHEADERS)" ; \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(ucdincludedir) ; \ @@ -108,47 +105,44 @@ fi installsubdirheaders: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making installheaders in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) installheaders) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) installheaders ; \ done \ fi uninstallheaders: - @if test "$(INSTALLHEADERS)" != "" ; then \ + @set -e; if test "$(INSTALLHEADERS)" != "" ; then \ it="$(INSTALLHEADERS)" ; \ for i in $$it ; do \ rm -f $(INSTALL_PREFIX)$(includedir)/$$i ; \ echo "removing $$i from $(INSTALL_PREFIX)$(includedir)" ; \ done \ fi - @if test "$(INSTALLBUILTHEADERS)" != "" ; then \ + @set -e; if test "$(INSTALLBUILTHEADERS)" != "" ; then \ it="$(INSTALLBUILTHEADERS)" ; \ for i in $$it ; do \ rm -f $(INSTALL_PREFIX)$(includedir)/`basename $$i` ; \ echo "removing $$i from $(INSTALL_PREFIX)$(includedir)" ; \ done \ fi - @if test "$(INCLUDESUBDIRHEADERS)" != "" ; then \ + @set -e; if test "$(INCLUDESUBDIRHEADERS)" != "" ; then \ it="$(INCLUDESUBDIRHEADERS)" ; \ for i in $$it ; do \ rm -f $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR)/$$i ; \ echo "removing $$i from $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR)" ; \ done \ fi - @if test "$(INCLUDESUBDIRHEADERS2)" != "" ; then \ + @set -e; if test "$(INCLUDESUBDIRHEADERS2)" != "" ; then \ it="$(INCLUDESUBDIRHEADERS2)" ; \ for i in $$it ; do \ rm -f $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR2)/$$i ; \ echo "removing $$i from $(INSTALL_PREFIX)$(includedir)/$(INCLUDESUBDIR2)" ; \ done \ fi - @if test "$(INSTALLBUILTSUBDIRHEADERS)" != "" ; then \ + @set -e; if test "$(INSTALLBUILTSUBDIRHEADERS)" != "" ; then \ it="$(INSTALLBUILTSUBDIRHEADERS)" ; \ for i in $$it ; do \ rm -f $(INSTALL_PREFIX)$(includedir)/$(INSTALLBUILTSUBDIR)/`basename $$i` ; \ @@ -164,7 +158,7 @@ installlibs: installlocallibs @installucdlibs@ installsubdirlibs installlocallibs: $(INSTALLLIBS) - @if test "$(INSTALLLIBS)" != ""; then \ + @set -e; if test "$(INSTALLLIBS)" != ""; then \ it="$(INSTALLLIBS)" ; \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(libdir) ; \ $(INSTALL) $(INSTALLLIBS) $(INSTALL_PREFIX)$(libdir) ; \ @@ -176,7 +170,7 @@ fi installucdlibs: $(INSTALLUCDLIBS) - @if test "$(INSTALLUCDLIBS)" != ""; then \ + @set -e; if test "$(INSTALLUCDLIBS)" != ""; then \ it="$(INSTALLUCDLIBS)" ; \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(libdir) ; \ $(INSTALL) $(INSTALLUCDLIBS) $(INSTALL_PREFIX)$(libdir) ; \ @@ -188,19 +182,16 @@ fi installsubdirlibs: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making installlibs in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) installlibs) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) installlibs ; \ done \ fi uninstalllibs: - @if test "$(INSTALLLIBS)" != ""; then \ + @set -e; if test "$(INSTALLLIBS)" != ""; then \ it="$(INSTALLLIBS)" ; \ for i in $$it ; do \ $(UNINSTALL) $(INSTALL_PREFIX)$(libdir)/$$i ; \ @@ -216,7 +207,7 @@ installbin: installlocalbin installsubdirbin installlocalbin: $(INSTALLBINPROGS) - @if test "$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" != " "; then \ + @set -e; if test "$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" != " "; then \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(bindir) ; \ it="$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" ; \ $(INSTALL) $(INSTALLBINPROGS) $(INSTALLBINSCRIPTS) $(INSTALL_PREFIX)$(bindir) ; \ @@ -226,19 +217,16 @@ fi installsubdirbin: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making installbin in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) installbin) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) installbin; \ done \ fi uninstallbin: - @if test "$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" != " "; then \ + @set -e; if test "$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" != " "; then \ it="$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" ; \ for i in $$it ; do \ $(UNINSTALL) $(INSTALL_PREFIX)$(bindir)/$$i ; \ @@ -254,7 +242,7 @@ installsbin: installlocalsbin installsubdirsbin installlocalsbin: $(INSTALLSBINPROGS) - @if test "$(INSTALLSBINPROGS)" != ""; then \ + @set -e; if test "$(INSTALLSBINPROGS)" != ""; then \ it="$(INSTALLSBINPROGS)" ; \ $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(sbindir) ; \ $(INSTALL) $(INSTALLSBINPROGS) $(INSTALL_PREFIX)$(sbindir) ; \ @@ -264,19 +252,16 @@ fi installsubdirsbin: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making installsbin in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) installsbin) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) installsbin; \ done \ fi uninstallsbin: - @if test "$(INSTALLSBINPROGS)" != ""; then \ + @set -e; if test "$(INSTALLSBINPROGS)" != ""; then \ it="$(INSTALLSBINPROGS)" ; \ for i in $$it ; do \ $(UNINSTALL) $(INSTALL_PREFIX)$(sbindir)/$$i ; \ @@ -288,26 +273,20 @@ # general make install target for subdirs # installsubdirs: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making install in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) install) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) install; \ done \ fi uninstallsubdirs: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making uninstall in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) uninstall) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) uninstall; \ done \ fi @@ -319,14 +298,11 @@ rm -rf .libs cleansubdirs: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making clean in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) clean) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) clean; \ done \ fi @@ -337,55 +313,46 @@ # wacky dependency building. # depend: dependdirs - @if test -f Makefile.depend ; then \ + @set -e; if test -f Makefile.depend ; then \ makedepend `echo $(CPPFLAGS) | sed 's/-f[-a-z]*//g'` -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \ fi nosysdepend: nosysdependdirs - @if test -f Makefile.depend ; then \ + @set -e; if test -f Makefile.depend ; then \ makedepend `echo $(CPPFLAGS) | sed 's/-f[-a-z]*//g'` -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \ $(PERL) -n -i.bak $(top_srcdir)/makenosysdepend.pl Makefile ; \ fi distdepend: nosysdepend distdependdirs - @if test -f Makefile.depend ; then \ + @set -e; if test -f Makefile.depend ; then \ $(PERL) $(top_srcdir)/makefileindepend.pl ; \ fi dependdirs: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making depend in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) depend) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) depend; \ done \ fi nosysdependdirs: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making nosysdepend in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) nosysdepend) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) nosysdepend; \ done \ fi distdependdirs: - @if test "$(SUBDIRS)" != ""; then \ + @set -e; if test "$(SUBDIRS)" != ""; then \ it="$(SUBDIRS)" ; \ for i in $$it ; do \ echo "making distdepend in `pwd`/$$i"; \ - ( cd $$i ; $(MAKE) distdepend) ; \ - if test $$? != 0 ; then \ - exit 1 ; \ - fi \ + cd $$i ; $(MAKE) distdepend; \ done \ fi --- orig/net-snmp-5.2.2/debian/patches/03_makefiles.patch 2006-03-29 18:20:46.000000000 -0500 +++ net-snmp-5.2.2/debian/patches/03_makefiles.patch 2006-03-29 18:35:54.000000000 -0500 @@ -44,7 +44,7 @@ @@ -58,7 +58,7 @@ mib2c.made: $(srcdir)/mib2c - if test "x$(PERL)" != "x" ; then \ + set -e; if test "x$(PERL)" != "x" ; then \ - $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;' ${srcdir}/mib2c > mib2c.made; \ + $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;s#/usr/local/etc/snmp#$(SNMPCONFPATH)#;' ${srcdir}/mib2c > mib2c.made; \ else \ diff -Naur orig/net-snmp-5.2.2/dist/Makefile net-snmp-5.2.2/dist/Makefile --- orig/net-snmp-5.2.2/dist/Makefile 2005-11-29 00:34:05.000000000 -0500 +++ net-snmp-5.2.2/dist/Makefile 2006-03-29 16:21:46.000000000 -0500 @@ -62,12 +62,12 @@ $(GZIP_TAR): @echo "Creating a compressed archive of the package's source files..." - (cd $(RPM_BASE)/SOURCES; \ + set -e; cd $(RPM_BASE)/SOURCES; \ cvs -d$(CVSROOT) login; \ cvs -z3 -d$(CVSROOT) export -r$(VERSION_TAG) $(NAME); \ mv $(NAME) $(PKG_VER); \ tar cf $(PKG_VER).tar $(PKG_VER); \ - gzip $(PKG_VER).tar) + gzip $(PKG_VER).tar @echo "A compressed archive of the package's source-file tree has been created." # -------------------------------------------------------------------- @@ -107,16 +107,16 @@ rpm_tree: $(RPM_TREE) all_rpm_files: $(RPM_TREE) $(RPM_SPEC) - (cd $(RPM_BASE)/SPECS; \ - rpmbuild -ba $(RPM_OPTS) $(SPEC_FILE)) + cd $(RPM_BASE)/SPECS && \ + rpmbuild -ba $(RPM_OPTS) $(SPEC_FILE) $(BINARY_RPM): $(RPM_TREE) $(RPM_SPEC) - (cd $(RPM_BASE)/SPECS; \ - rpmbuild -bb $(RPM_OPTS) $(SPEC_FILE)) + cd $(RPM_BASE)/SPECS; \ + rpmbuild -bb $(RPM_OPTS) $(SPEC_FILE) $(SOURCE_RPM): $(RPM_TREE) $(RPM_SPEC) - (cd $(RPM_BASE)/SPECS; \ - rpmbuild -bs $(RPM_OPTS) $(SPEC_FILE)) + cd $(RPM_BASE)/SPECS; \ + rpmbuild -bs $(RPM_OPTS) $(SPEC_FILE) $(RPM_SPEC): $(RPM_BASE)/SPECS $(SPEC_FILE) cp $(SPEC_FILE) $@ diff -Naur orig/net-snmp-5.2.2/local/Makefile.in net-snmp-5.2.2/local/Makefile.in --- orig/net-snmp-5.2.2/local/Makefile.in 2005-10-10 14:47:48.000000000 -0400 +++ net-snmp-5.2.2/local/Makefile.in 2006-03-29 19:00:22.000000000 -0500 @@ -82,21 +82,21 @@ $(SED) -f ../sedscript $(srcdir)/snmpcheck.def > snmpcheck snmpcheck.made: snmpcheck - if test "x$(PERL)" != "x" ; then \ + set -e; if test "x$(PERL)" != "x" ; then \ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%' snmpcheck > snmpcheck.made ; \ else \ touch snmpcheck.made ; \ fi tkmib.made: $(srcdir)/tkmib - if test "x$(PERL)" != "x" ; then \ + set -e; if test "x$(PERL)" != "x" ; then \ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%' ${srcdir}/tkmib > tkmib.made; \ else \ touch tkmib.made; \ fi mib2c.made: $(srcdir)/mib2c - if test "x$(PERL)" != "x" ; then \ + set -e; if test "x$(PERL)" != "x" ; then \ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;' ${srcdir}/mib2c > mib2c.made; \ else \ touch mib2c.made; \ @@ -104,35 +104,35 @@ ipf-mod.pl.made: $(srcdir)/ipf-mod.pl - if test "x$(PERL)" != "x" ; then \ + set -e; if test "x$(PERL)" != "x" ; then \ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%' ${srcdir}/ipf-mod.pl > ipf-mod.pl.made; \ else \ touch ipf-mod.pl.made; \ fi fixproc.made: $(srcdir)/fixproc - if test "x$(PERL)" != "x" ; then \ + set -e; if test "x$(PERL)" != "x" ; then \ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%' ${srcdir}/fixproc > fixproc.made; \ else \ touch fixproc.made; \ fi snmpconf.made: $(srcdir)/snmpconf - if test "x$(PERL)" != "x" ; then \ + set -e; if test "x$(PERL)" != "x" ; then \ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%; s#/usr/local/share#$(datadir)#g; s#/usr/local/etc/snmp#$(SNMPCONFPATH)#g; s#/var/net-snmp#$(PERSISTENT_DIRECTORY)#g' ${srcdir}/snmpconf > snmpconf.made; \ else \ touch snmpconf.made; \ fi traptoemail.made: $(srcdir)/traptoemail - if test "x$(PERL)" != "x" ; then \ + set -e; if test "x$(PERL)" != "x" ; then \ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%; s#/usr/local/share#$(datadir)#g; s#/usr/local/etc/snmp#$(TRAPTOEMAILPATH)#g' ${srcdir}/traptoemail > traptoemail.made; \ else \ touch traptoemail.made; \ fi localinstall: $(SCRIPTSMADEFORPERL) - @if test "x$(PERL)" != "x" ; then \ + @set -e; if test "x$(PERL)" != "x" ; then \ for i in $(PERLSCRIPTS) ; do $(INSTALL) $$i.made $(INSTALL_PREFIX)$(bindir)/$$i ; echo "install: installed $$i in $(INSTALL_PREFIX)$(bindir)" ; done ; \ for i in $(SHELLSCRIPTS) ; do $(INSTALL) $(srcdir)/$$i $(INSTALL_PREFIX)$(bindir)/$$i ; echo "install: installed $$i in $(INSTALL_PREFIX)$(bindir)" ; done ; \ $(SHELL) $(srcdir)/../mkinstalldirs $(INSTALL_PREFIX)$(snmplibdir) ; \ @@ -144,7 +144,7 @@ fi localuninstall: - @if test "x$(PERL)" != "x" ; then \ + @set -e; if test "x$(PERL)" != "x" ; then \ for i in $(PERLSCRIPTS) ; do rm -f $(INSTALL_PREFIX)$(bindir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(bindir)" ; done ; \ for i in $(SHELLSCRIPTS) ; do rm -f $(INSTALL_PREFIX)$(bindir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(bindir)" ; done ; \ for i in $(DATASRCS) ; do rm -f $(INSTALL_PREFIX)$(snmplibdir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(snmplibdir)" ; done ; \ --- orig/net-snmp-5.2.2/man/Makefile.in 2005-10-12 10:46:49.000000000 -0400 +++ net-snmp-5.2.2/man/Makefile.in 2006-03-29 16:26:03.000000000 -0500 @@ -166,39 +166,39 @@ cat default_store.3.h $(srcdir)/default_store.3.bot >> default_store.3 mib2c.conf.5: $(top_srcdir)/local/mib2c mib2c.conf.5.in $(srcdir)/mib2c.extract.pl - @if test "x$(PERL)" != "x" ; then \ + @set -e; if test "x$(PERL)" != "x" ; then \ $(PERL) $(srcdir)/mib2c.extract.pl $(top_srcdir)/local/mib2c $(srcdir)/mib2c.conf.5.in > mib2c.conf.5; \ else \ touch mib2c.conf.5 ; \ fi maninstall: maninstalldirs $(MAN1) $(MAN1G) $(MAN3) $(MAN5G) $(MAN8) - @for i in $(MAN1) ; do $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_PREFIX)$(man1dir) ; echo "install: installed $$i in $(INSTALL_PREFIX)$(man1dir)" ; done + @set -e; for i in $(MAN1) ; do $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_PREFIX)$(man1dir) ; echo "install: installed $$i in $(INSTALL_PREFIX)$(man1dir)" ; done @$(INSTALL_DATA) $(MAN1G) $(INSTALL_PREFIX)$(man1dir) - @for i in $(MAN1G) ; do echo "install: installed $$i in $(INSTALL_PREFIX)$(man1dir)" ; done - @for i in $(MAN3) ; do $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_PREFIX)$(man3dir) ; echo "install: installed $$i in $(INSTALL_PREFIX)$(man3dir)" ; done + @set -e; for i in $(MAN1G) ; do echo "install: installed $$i in $(INSTALL_PREFIX)$(man1dir)" ; done + @set -e; for i in $(MAN3) ; do $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_PREFIX)$(man3dir) ; echo "install: installed $$i in $(INSTALL_PREFIX)$(man3dir)" ; done @$(INSTALL_DATA) $(MAN3G) $(INSTALL_PREFIX)$(man3dir) - @for i in $(MAN3G) ; do echo "install: installed $$i in $(INSTALL_PREFIX)$(man3dir)" ; done + @set -e; for i in $(MAN3G) ; do echo "install: installed $$i in $(INSTALL_PREFIX)$(man3dir)" ; done [EMAIL PROTECTED](INSTALL_DATA) $(MAN5G) $(INSTALL_PREFIX)$(man5dir) - @for i in $(MAN5G) ; do echo "install: installed $$i in $(INSTALL_PREFIX)$(man5dir)" ; done + @set -e; for i in $(MAN5G) ; do echo "install: installed $$i in $(INSTALL_PREFIX)$(man5dir)" ; done @$(INSTALL_DATA) $(MAN8G) $(INSTALL_PREFIX)$(man8dir) - @for i in $(MAN8G) ; do echo "install: installed $$i in $(INSTALL_PREFIX)$(man8dir)" ; done + @set -e; for i in $(MAN8G) ; do echo "install: installed $$i in $(INSTALL_PREFIX)$(man8dir)" ; done manuninstall: - @for i in $(MAN1G) $(MAN1) ; do rm -f $(INSTALL_PREFIX)$(man1dir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(man1dir)" ; done - @for i in $(MAN3G) $(MAN3) ; do rm -f $(INSTALL_PREFIX)$(man3dir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(man3dir)" ; done - @for i in $(MAN5G) ; do rm -f $(INSTALL_PREFIX)$(man5dir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(man5dir)" ; done - @for i in $(MAN8G) ; do rm -f $(INSTALL_PREFIX)$(man8dir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(man8dir)" ; done + @set -e; for i in $(MAN1G) $(MAN1) ; do rm -f $(INSTALL_PREFIX)$(man1dir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(man1dir)" ; done + @set -e; for i in $(MAN3G) $(MAN3) ; do rm -f $(INSTALL_PREFIX)$(man3dir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(man3dir)" ; done + @set -e; for i in $(MAN5G) ; do rm -f $(INSTALL_PREFIX)$(man5dir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(man5dir)" ; done + @set -e; for i in $(MAN8G) ; do rm -f $(INSTALL_PREFIX)$(man8dir)/$$i ; echo "removed $$i from $(INSTALL_PREFIX)$(man8dir)" ; done maninstalldirs: - @$(SHELL) $(srcdir)/../mkinstalldirs $(INSTALL_PREFIX)$(man1dir) $(INSTALL_PREFIX)$(man3dir) $(INSTALL_PREFIX)$(man5dir) $(INSTALL_PREFIX)$(man8dir) + @set -e; $(srcdir)/../mkinstalldirs $(INSTALL_PREFIX)$(man1dir) $(INSTALL_PREFIX)$(man3dir) $(INSTALL_PREFIX)$(man5dir) $(INSTALL_PREFIX)$(man8dir) # # internal administrative # html: $(MANALL) - for i in $(MANALL); do \ + set -e; for i in $(MANALL); do \ if test `wc -l $$i | awk '{print $$1}'` != 1 ; then \ base=`echo $$i | sed 's/.[0-9]$$//;'` ; \ echo "<HTML><BODY bgcolor=\"#ffffff\" background=\"../ucd-snmp-bg3.gif\"><PRE>" > $$base.html; \ diff -Naur orig/net-snmp-5.2.2/mibs/Makefile.in net-snmp-5.2.2/mibs/Makefile.in --- orig/net-snmp-5.2.2/mibs/Makefile.in 2005-01-26 09:19:10.000000000 -0500 +++ net-snmp-5.2.2/mibs/Makefile.in 2006-03-29 19:00:22.000000000 -0500 @@ -56,13 +56,13 @@ all: standardall mibsinstall: installdirs - @for i in $(MIBS) ; do \ + @set -e; for i in $(MIBS) ; do \ $(INSTALL_DATA) $(srcdir)/$$i $(INSTALL_PREFIX)$(mibdir) ; \ echo "install: installed $$i in $(INSTALL_PREFIX)$(mibdir)" ; \ done mibsuninstall: installdirs - @for i in $(MIBS) ; do \ + @set -e; for i in $(MIBS) ; do \ rm -f $(INSTALL_PREFIX)$(mibdir)/$$i ; \ echo "removed $$i from $(INSTALL_PREFIX)$(mibdir)" ; \ done @@ -71,7 +71,7 @@ @$(SHELL) $(srcdir)/../mkinstalldirs $(INSTALL_PREFIX)$(mibdir) htmldir: - @if test ! -d html ; then \ + @set -e; if test ! -d html ; then \ mkdir html ; \ fi rm -f html/index.html ; \ --- orig/net-snmp-5.2.2/mibs/Makefile.mib 2005-03-18 05:32:02.000000000 -0500 +++ net-snmp-5.2.2/mibs/Makefile.mib 2006-03-29 16:30:12.000000000 -0500 @@ -37,7 +37,7 @@ rm -fr $(INSTDIR) mkdir $(INSTDIR) cp $(ALLDIR)/* $(INSTDIR) - if test `uname` = SunOS ; \ + set -e; if test `uname` = SunOS ; \ then gpatch -d $(INSTDIR) < rfcmibs.diff; \ else patch -d $(INSTDIR) < rfcmibs.diff; \ fi @@ -159,7 +159,7 @@ ianamibs: ianalist [ -d $(ALLDIR) ] || mkdir $(ALLDIR) - cat ianalist | while read file mibs; \ + set -e; cat ianalist | while read file mibs; \ do \ if [ "$$file" != "#" ]; \ then \ @@ -169,7 +169,7 @@ rfcmibs: rfclist [ -d $(ALLDIR) ] || mkdir $(ALLDIR) - cat rfclist | while read rfc mibs; \ + set -e; cat rfclist | while read rfc mibs; \ do \ if [ "$$rfc" != "#" ]; \ then \ --- orig/net-snmp-5.2.2/testing/Makefile.in 2005-10-10 14:47:48.000000000 -0400 +++ net-snmp-5.2.2/testing/Makefile.in 2006-03-29 16:40:34.000000000 -0500 @@ -44,7 +44,7 @@ -rm -fr /tmp/snmp-test* install: installdirs $(TARG) - @for i in $(TARG) ; \ + @set -e; for i in $(TARG) ; \ do $(INSTALL) $$i $(INSTALL_PREFIX)$(bindir) ; \ echo "install: installed $$i in $(INSTALL_PREFIX)$(bindir)" ; \ done