Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > 0d2ce15c1bb17caabaae4bcd184c1354 > files > 3

net-snmp-5.6.1-7.mga1.src.rpm

diff -Naur net-snmp-5.6/agent/Makefile.in net-snmp-5.6.oden/agent/Makefile.in
--- net-snmp-5.6/agent/Makefile.in	2010-06-08 23:05:11.000000000 +0200
+++ net-snmp-5.6.oden/agent/Makefile.in	2010-10-10 16:13:00.192688045 +0200
@@ -245,8 +245,7 @@
 	$(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $? 
 
 snmpd$(EXEEXT):	${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(MIBLIB) $(LIBTARG) 
-	$(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}
-
+	$(LINK) $(CFLAGS) -o $@ -pie ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}
 
 libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION):    ${LLIBAGENTOBJS} $(USELIBS)
 	$(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
diff -Naur net-snmp-5.6/agent/Makefile.in.orig net-snmp-5.6.oden/agent/Makefile.in.orig
--- net-snmp-5.6/agent/Makefile.in.orig	1970-01-01 01:00:00.000000000 +0100
+++ net-snmp-5.6.oden/agent/Makefile.in.orig	2010-06-08 23:05:11.000000000 +0200
@@ -0,0 +1,296 @@
+#
+# Makefile for snmpd
+#
+
+top_builddir	= ..
+
+# use GNU vpath, if available, to only set a path for source and headers
+# VPATH will pick up objects too, which is bad if you are sharing a
+# source dir...
+@GNU_vpath@ %.h $(srcdir)
+@GNU_vpath@ %.c $(srcdir)
+# fallback to regular VPATH for non-gnu...
+@NON_GNU_VPATH@ $(srcdir)
+
+#
+# what to install
+#
+SUBDIRS=helpers mibgroup
+
+INSTALLSBINPROGS= @SNMPD@
+INSTALLLIBS	= libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION)
+INSTALLPOSTLIBS	= libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
+
+INCLUDESUBDIR=agent
+HEADERS=\
+	agent_read_config.h \
+	agent_registry.h \
+	agent_index.h \
+	agent_sysORTable.h \
+	agent_trap.h \
+	auto_nlist.h \
+	ds_agent.h \
+	snmp_agent.h \
+	snmp_vars.h \
+	var_struct.h \
+	agent_handler.h \
+	net-snmp-agent-includes.h \
+	mib_modules.h \
+	agent_callbacks.h \
+	sysORTable.h \
+	all_helpers.h \
+	baby_steps.h \
+	bulk_to_next.h \
+	cache_handler.h \
+	debug_handler.h \
+	instance.h \
+	mode_end_call.h \
+	multiplexer.h \
+	null.h \
+	old_api.h \
+	read_only.h \
+	row_merge.h \
+	scalar.h \
+	scalar_group.h \
+	serialize.h \
+	snmp_get_statistic.h \
+	stash_cache.h \
+	stash_to_next.h \
+	table_array.h \
+	table_container.h \
+	table.h \
+	table_data.h \
+	table_dataset.h \
+	table_tdata.h \
+	table_iterator.h \
+	watcher.h
+
+HEADERSONLY=mfd.h set_helper.h
+
+INCLUDESUBDIRHEADERS=$(HEADERS) $(HEADERSONLY)
+
+INSTALLBUILTSUBDIRHEADERS=../include/net-snmp/agent/mib_module_config.h \
+			  ../include/net-snmp/agent/agent_module_config.h \
+			mibgroup/mib_module_includes.h
+INSTALLBUILTSUBDIR=agent
+
+INCLUDEMIBGROUPDIR=agent/mibgroup
+INCLUDEMIBGROUPDIRHEADERS=util_funcs.h
+
+OTHERINSTALL=installmibgroupheaders @EMBEDPERLINSTALL@
+OTHERUNINSTALL=@EMBEDPERLUNINSTALL@
+
+# XXX: need to install these  They're really UCD specific, however.
+BROKEINSTALL= \
+	mibgroup/struct.h \
+	mibgroup/util_funcs.h \
+	mibgroup/mibincl.h \
+	mibgroup/ucd-snmp/dlmod.h \
+	mibgroup/utilities/execute.h \
+	mibgroup/header_complex.h
+
+INSTALLUCDHEADERS= \
+	agent_index.h	\
+	agent_read_config.h \
+	agent_registry.h \
+	agent_sysORTable.h \
+	agent_trap.h	\
+	auto_nlist.h	\
+	ds_agent.h	\
+	header_complex.h \
+	mibincl.h	\
+	snmp_agent.h	\
+	ucd-snmp-includes.h	\
+	ucd-snmp-agent-includes.h \
+	util_funcs.h	\
+	var_struct.h
+
+#
+# how to build it info
+#
+USELIBS		= ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION)
+AGENTLIB	= libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION)
+MIBLIB		= libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
+
+LOCAL_LIBS	= -L../snmplib/.libs -L../snmplib -L./.libs
+LAGENTLIBS	= @LAGENTLIBS@
+LMIBLIBS	= @LMIBLIBS@
+PERLLDOPTS_FOR_APPS = @PERLLDOPTS_FOR_APPS@
+PERLLDOPTS_FOR_LIBS = @PERLLDOPTS_FOR_LIBS@
+LIBS		= $(USELIBS) @AGENTLIBS@ $(PERLLDOPTS_FOR_APPS)
+OUR_AGENT_LIBS	= $(AGENTLIB) $(MIBLIB) $(LIBS) @DLLIBS@
+CPPFLAGS	= $(TOP_INCLUDES) -I. $(AGENT_INCLUDES) $(MIBGROUP_INCLUDES) \
+		  $(SNMPLIB_INCLUDES) @CPPFLAGS@ 
+
+
+#
+# Objects
+#
+
+# libnetsnmpmibs objects.
+@mibgroup_list_lo@
+@mibgroup_list_o@
+@agentgroup_list_lo@
+@agentgroup_list_o@
+LMIBOBJS	= $(mibgroup_list_lo) mib_modules.lo auto_nlist.lo
+MIBOBJS		= $(mibgroup_list_o) mib_modules.o auto_nlist.o
+
+# libnetsnmpagent objects
+LIBAGENTOBJS= \
+	agent_handler.o \
+	agent_index.o \
+	agent_read_config.o \
+	agent_registry.o \
+	agent_sysORTable.o \
+	agent_trap.o \
+	kernel.o \
+	snmp_agent.o \
+	snmp_vars.o \
+	$(agentgroup_list_o) \
+	@OTHERAGENTLIBOBJS@ \
+	helpers/all_helpers.o \
+	helpers/baby_steps.o \
+	helpers/bulk_to_next.o \
+	helpers/cache_handler.o \
+	helpers/debug_handler.o \
+	helpers/instance.o \
+	helpers/mode_end_call.o \
+	helpers/multiplexer.o \
+	helpers/null.o \
+	helpers/old_api.o \
+	helpers/read_only.o \
+	helpers/row_merge.o \
+	helpers/scalar.o \
+	helpers/scalar_group.o \
+	helpers/serialize.o \
+	helpers/snmp_get_statistic.o \
+	helpers/stash_cache.o \
+	helpers/stash_to_next.o \
+	helpers/table.o \
+	helpers/table_array.o \
+	helpers/table_container.o \
+	helpers/table_data.o \
+	helpers/table_dataset.o \
+	helpers/table_iterator.o \
+	helpers/table_row.o \
+	helpers/table_tdata.o \
+	helpers/watcher.o
+
+LLIBAGENTOBJS= \
+	agent_handler.lo \
+	agent_index.lo \
+	agent_read_config.lo \
+	agent_registry.lo \
+	agent_sysORTable.lo \
+	agent_trap.lo \
+	kernel.lo \
+	snmp_agent.lo \
+	snmp_vars.lo \
+	$(agentgroup_list_lo) \
+	@OTHERAGENTLIBLOBJS@ \
+	helpers/all_helpers.lo \
+	helpers/baby_steps.lo \
+	helpers/bulk_to_next.lo \
+	helpers/cache_handler.lo \
+	helpers/debug_handler.lo \
+	helpers/instance.lo \
+	helpers/mode_end_call.lo \
+	helpers/multiplexer.lo \
+	helpers/null.lo \
+	helpers/old_api.lo \
+	helpers/read_only.lo \
+	helpers/row_merge.lo \
+	helpers/scalar.lo \
+	helpers/scalar_group.lo \
+	helpers/serialize.lo \
+	helpers/snmp_get_statistic.lo \
+	helpers/stash_cache.lo \
+	helpers/stash_to_next.lo \
+	helpers/table.lo \
+	helpers/table_array.lo \
+	helpers/table_container.lo \
+	helpers/table_data.lo \
+	helpers/table_dataset.lo \
+	helpers/table_iterator.lo \
+	helpers/table_row.lo \
+	helpers/table_tdata.lo \
+	helpers/watcher.lo
+
+# The agent objects.
+AGENTOBJS=snmpd.o @other_agentobjs@
+LAGENTOBJS=snmpd.lo @other_lagentobjs@
+
+#
+# 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
+
+
+all: agentlib subdirs miblib $(INSTALLBINPROGS) $(INSTALLSBINPROGS)
+
+#
+# build stuff targets
+#
+getkstat: getkstat.o
+	$(CC) $(CFLAGS) -o $@ $? $(LOCAL_LIBS) $(LIBS)
+
+getkstat.o: mibgroup/kernel_sunos5.c
+	$(CC) $(CFLAGS) -o $@ -D_GETKSTAT_TEST -DDODEBUG -c $? 
+
+getmibstat: getmibstat.o
+	$(CC) $(CFLAGS) -o $@ $? $(LOCAL_LIBS) $(LIBS)
+
+getmibstat.o: mibgroup/kernel_sunos5.c
+	$(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $? 
+
+snmpd$(EXEEXT):	${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(MIBLIB) $(LIBTARG) 
+	$(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${OUR_AGENT_LIBS}
+
+
+libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION):    ${LLIBAGENTOBJS} $(USELIBS)
+	$(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
+	$(RANLIB) $(AGENTLIB)
+
+libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS)
+	$(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(LIB_LD_LIBS) @AGENTLIBS@
+	$(RANLIB) $(MIBLIB)
+
+agentlib: $(AGENTLIB)
+
+miblib: $(MIBLIB)
+
+libs: $(INSTALLLIBS)
+
+embedperlinstall:
+	  @$(SHELL) $(srcdir)/../mkinstalldirs $(INSTALL_PREFIX)$(snmplibdir)
+	  @$(INSTALL_DATA) $(srcdir)/snmp_perl.pl $(INSTALL_PREFIX)$(snmplibdir)/snmp_perl.pl
+	  @echo "install:  installed snmp_perl.pl in $(INSTALL_PREFIX)$(snmplibdir)"
+
+embedperluninstall:
+	  @rm -f $(INSTALL_PREFIX)$(snmplibdir)/snmp_perl.pl
+	  @echo "removed snmp_perl.pl from $(INSTALL_PREFIX)$(snmplibdir)"
+
+installmibgroupheaders:
+	@if test "$(INCLUDEMIBGROUPDIRHEADERS)" != "" ; then \
+                echo creating directory $(INSTALL_PREFIX)$(includedir)/agent ; \
+                it="$(INCLUDEMIBGROUPDIRHEADERS)" ; \
+                $(SHELL) $(top_srcdir)/mkinstalldirs $(INSTALL_PREFIX)$(includedir)/agent ; \
+                for i in $$it ; do \
+                        $(INSTALL_DATA) $(top_srcdir)/$(INCLUDEMIBGROUPDIR)/$$i $(INSTALL_PREFIX)$(includedir)/agent ; \
+                        echo "installing $$i in $(INSTALL_PREFIX)$(includedir)/agent" ; \
+                done \
+        fi
+
+@module_list_deps@
+@agent_module_list_deps@
+@mib_module_list_deps@
+
+mib_modules.lo: mibgroup/mib_module_inits.h
+#
+# dependency for snmplib object. it's here because the headers listed
+# are relative to the agent directory.
+
+subdirs: agentlib
+# wait for agentlib before building 'subdirs' target
+
diff -Naur net-snmp-5.6/apps/Makefile.in net-snmp-5.6.oden/apps/Makefile.in
--- net-snmp-5.6/apps/Makefile.in	2010-07-02 18:27:52.000000000 +0200
+++ net-snmp-5.6.oden/apps/Makefile.in	2010-10-10 16:11:39.881867769 +0200
@@ -127,7 +127,7 @@
 	$(LINK) ${CFLAGS} -o $@ snmptest.$(OSUFFIX) $(LOCAL_LIBS) ${LDFLAGS} ${LIBS} 
 
 snmptrapd$(EXEEXT):    $(TRAPD_OBJECTS) $(USETRAPLIBS) $(INSTALLLIBS)
-	$(LINK) ${CFLAGS} -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) $(LOCAL_LIBS) ${LDFLAGS} ${TRAPLIBS}
+	$(LINK) ${CFLAGS} -o $@ -pie $(TRAPD_OBJECTS) $(INSTALLLIBS) $(LOCAL_LIBS) ${LDFLAGS} ${TRAPLIBS}
 
 snmptrap$(EXEEXT):    snmptrap.$(OSUFFIX) $(USELIBS)
 	$(LINK) ${CFLAGS} -o $@ snmptrap.$(OSUFFIX) $(LOCAL_LIBS) ${LDFLAGS} ${LIBS}