summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kalika <max@gentoo.org>2003-09-24 04:40:19 +0000
committerMax Kalika <max@gentoo.org>2003-09-24 04:40:19 +0000
commit7423a5b7e2bf6fddf8a3099db60c9b26feb4ffa4 (patch)
tree436a369ac2e2fa5444320ad6404a449b647e8f25 /net-analyzer/ucd-snmp
parentPurge all the no-longer download-able versions and tweak some minor tidbits. (diff)
downloadgentoo-2-7423a5b7e2bf6fddf8a3099db60c9b26feb4ffa4.tar.gz
gentoo-2-7423a5b7e2bf6fddf8a3099db60c9b26feb4ffa4.tar.bz2
gentoo-2-7423a5b7e2bf6fddf8a3099db60c9b26feb4ffa4.zip
Add new version with fixes for openssl-0.9.7, build system, and various cleanups. Fixes bug 25595. Thanks Azarah! Also add metadata.xml.
Diffstat (limited to 'net-analyzer/ucd-snmp')
-rw-r--r--net-analyzer/ucd-snmp/ChangeLog14
-rw-r--r--net-analyzer/ucd-snmp/Manifest18
-rw-r--r--net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.51
-rw-r--r--net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.6-r2 (renamed from net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.6)0
-rw-r--r--net-analyzer/ucd-snmp/files/snmpd.conf10
-rw-r--r--net-analyzer/ucd-snmp/files/snmpd.rc616
-rw-r--r--net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-Makefile-fixes.patch42
-rw-r--r--net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-agent-parallel-fixes.patch41
-rw-r--r--net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-coreutils-2.patch141
-rw-r--r--net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-openssl-0.9.7.patch183
-rw-r--r--net-analyzer/ucd-snmp/metadata.xml6
-rw-r--r--net-analyzer/ucd-snmp/ucd-snmp-4.2.5.ebuild55
-rw-r--r--net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r1.ebuild4
-rw-r--r--net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r2.ebuild74
-rw-r--r--net-analyzer/ucd-snmp/ucd-snmp-4.2.6.ebuild58
15 files changed, 531 insertions, 132 deletions
diff --git a/net-analyzer/ucd-snmp/ChangeLog b/net-analyzer/ucd-snmp/ChangeLog
index e84ae4558a27..e51d139c17d9 100644
--- a/net-analyzer/ucd-snmp/ChangeLog
+++ b/net-analyzer/ucd-snmp/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for net-analyzer/ucd-snmp
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ucd-snmp/ChangeLog,v 1.15 2003/09/19 21:53:46 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ucd-snmp/ChangeLog,v 1.16 2003/09/24 04:40:17 max Exp $
+
+*ucd-snmp-4.2.6-r2 (23 Sep 2003)
+
+ 23 Sep 2003; Max Kalika <max@gentoo.org> ucd-snmp-4.2.5.ebuild,
+ ucd-snmp-4.2.6-r1.ebuild, ucd-snmp-4.2.6-r2.ebuild, ucd-snmp-4.2.6.ebuild,
+ files/snmpd.conf, files/snmpd.rc6,
+ files/ucd-snmp-4.2.6-Makefile-fixes.patch,
+ files/ucd-snmp-4.2.6-agent-parallel-fixes.patch,
+ files/ucd-snmp-4.2.6-coreutils-2.patch,
+ files/ucd-snmp-4.2.6-openssl-0.9.7.patch:
+ Add new version with fixes for openssl-0.9.7, build system, and various
+ cleanups. Fixes bug 25595. Thanks Azarah!
19 Sep 2003; Max Kalika <max@gentoo.org> ucd-snmp-4.2.5.ebuild,
ucd-snmp-4.2.6-r1.ebuild, ucd-snmp-4.2.6.ebuild:
diff --git a/net-analyzer/ucd-snmp/Manifest b/net-analyzer/ucd-snmp/Manifest
index 46f946f644cd..7ab26002443a 100644
--- a/net-analyzer/ucd-snmp/Manifest
+++ b/net-analyzer/ucd-snmp/Manifest
@@ -1,8 +1,12 @@
-MD5 081571f69360d36edf220c8ccc06f30a ucd-snmp-4.2.6-r1.ebuild 1647
-MD5 807ac41969ef54b2f7b1c2586982a8e1 ucd-snmp-4.2.6.ebuild 1643
-MD5 4efe8eff24f1b4d64b2c6e818cafde3e ucd-snmp-4.2.5.ebuild 1491
-MD5 d1c4206bba17b9754fdc76df42a5d007 ChangeLog 2376
-MD5 a39e90a4a13e741a49630ec3b9c80966 files/digest-ucd-snmp-4.2.5 67
-MD5 0b7185775cd34df5a4b4390a49d480fd files/digest-ucd-snmp-4.2.6 67
-MD5 a77f6c5ca8e3d6452181abfb9c9fe73a files/snmpd.rc6 727
+MD5 d9e045d4008d0f44a554a6665cc42e60 ucd-snmp-4.2.6-r1.ebuild 1705
+MD5 011ea64a35c388db71733791c6e002a4 ucd-snmp-4.2.6-r2.ebuild 2195
+MD5 9e5ff1b010453b0f783b16b046b8f217 ChangeLog 2891
+MD5 9384ae7ba3e9f56b8027ea92f607042d metadata.xml 215
+MD5 49b593493c840a940b816caacf7f92fe files/ucd-snmp-4.2.6-coreutils-2.patch 6482
+MD5 4ff916bcceac5a47315c3c25834e45bb files/ucd-snmp-4.2.6-openssl-0.9.7.patch 5417
+MD5 5373330fe4b7a9764712aedc2f9fc36a files/ucd-snmp-4.2.6-agent-parallel-fixes.patch 1648
+MD5 183ae5320f0a2d1d22f8403e0df1cce1 files/snmpd.conf 313
+MD5 44590fec309fff6dd494d4e161eb225b files/ucd-snmp-4.2.6-Makefile-fixes.patch 1218
+MD5 7bd91893f4515cf99b61bcf6b1fc13d7 files/snmpd.rc6 488
MD5 0b7185775cd34df5a4b4390a49d480fd files/digest-ucd-snmp-4.2.6-r1 67
+MD5 0b7185775cd34df5a4b4390a49d480fd files/digest-ucd-snmp-4.2.6-r2 67
diff --git a/net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.5 b/net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.5
deleted file mode 100644
index cbea84281896..000000000000
--- a/net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.5
+++ /dev/null
@@ -1 +0,0 @@
-MD5 615e0b1e760cbb8c63b5392fe2d04b14 ucd-snmp-4.2.5.tar.gz 1707471
diff --git a/net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.6 b/net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.6-r2
index 1e6090e78c69..1e6090e78c69 100644
--- a/net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.6
+++ b/net-analyzer/ucd-snmp/files/digest-ucd-snmp-4.2.6-r2
diff --git a/net-analyzer/ucd-snmp/files/snmpd.conf b/net-analyzer/ucd-snmp/files/snmpd.conf
new file mode 100644
index 000000000000..ce606bbf0333
--- /dev/null
+++ b/net-analyzer/ucd-snmp/files/snmpd.conf
@@ -0,0 +1,10 @@
+# Initial (empty) options.
+SNMPD_FLAGS=""
+
+# Enable syslog and disable file log.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -s -l /dev/null"
+
+# Enable agentx socket as /var/agentx/master
+# *NOTE* Before uncommenting this, make sure
+# the /var/agentx directory exists.
+#SNMPD_FLAGS="${SNMPD_FLAGS} -x /var/agentx/master"
diff --git a/net-analyzer/ucd-snmp/files/snmpd.rc6 b/net-analyzer/ucd-snmp/files/snmpd.rc6
index 6d270049f86a..4e904e895faf 100644
--- a/net-analyzer/ucd-snmp/files/snmpd.rc6
+++ b/net-analyzer/ucd-snmp/files/snmpd.rc6
@@ -1,29 +1,27 @@
#!/sbin/runscript
-# Copyright 1999-2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ucd-snmp/files/snmpd.rc6,v 1.6 2003/02/19 05:24:42 raker Exp $
depend() {
+ use logger
need net
}
checkconfig() {
- if [ ! -e /etc/ucd-snmp/snmpd.conf ] ; then
- eerror "You need an /etc/ucd-snmp/snmpd.conf to run ucd-snmpd"
- eerror "There is an example config in /etc/ucd-snmp/snmpd.conf.dist"
+ if [ ! -e /etc/snmp/snmpd.conf ] ; then
+ eerror "You need an /etc/snmp/snmpd.conf config file to run snmpd"
return 1
fi
}
start() {
checkconfig || return 1
- ebegin "Starting snmpd"
- start-stop-daemon --start --quiet --exec /usr/sbin/snmpd
+ ebegin "Starting ucd-snmpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/snmpd \
+ -- -C -c /etc/snmp/snmpd.conf ${SNMPD_FLAGS}
eend $?
}
stop() {
- ebegin "Stopping snmpd"
+ ebegin "Stopping ucd-snmpd"
start-stop-daemon --stop --quiet --exec /usr/sbin/snmpd
eend $?
}
diff --git a/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-Makefile-fixes.patch b/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-Makefile-fixes.patch
new file mode 100644
index 000000000000..afc3d71213f0
--- /dev/null
+++ b/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-Makefile-fixes.patch
@@ -0,0 +1,42 @@
+--- ucd-snmp-4.2.6/Makefile.in.orig 2003-09-23 02:44:02.631051056 +0200
++++ ucd-snmp-4.2.6/Makefile.in 2003-09-23 02:48:33.872816040 +0200
+@@ -24,7 +24,7 @@
+ all: sedscript EXAMPLE.conf ucd-snmp-config.h subdirs
+
+ test: all
+- ( cd testing; $(MAKE) test )
++ ( cd testing; $(MAKE) test ) || exit 1
+
+ sedscript: sedscript.in config.h $(srcdir)/agent/mibgroup/mibdefs.h
+ $(CPP) -DPREFIX=$(prefix) -DLIBDIR=$(libdir) -DDATADIR=$(datadir) $(srcdir)/sedscript.in | egrep '^s[/#]' | sed 's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript
+@@ -35,7 +35,7 @@
+
+ subdirs:
+ for i in $(SUBDIRS) ; do \
+- ( cd $$i ; $(MAKE) ) ; \
++ ( cd $$i ; $(MAKE) ) || exit 1; \
+ done
+
+
+@@ -43,7 +43,7 @@
+
+ testdirs:
+ for i in $(TESTDIRS) ; do \
+- ( cd $$i ; $(MAKE) ) ; \
++ ( cd $$i ; $(MAKE) ) || exit 1 ; \
+ done
+
+
+@@ -52,10 +52,10 @@
+
+ install: all installdirs
+ for i in $(INSTALLDIRS) ; do \
+- ( cd $$i ; $(MAKE) install ) ; \
++ ( cd $$i ; $(MAKE) install ) || exit 1 ; \
+ done
+ @for i in $(INSTALLHEADERS) ; do \
+- $(INSTALL) $$i $(includedir) ; \
++ $(INSTALL) $$i $(includedir) || exit 1 ; \
+ echo "install: installed $$i in $(includedir)";\
+ done
+
diff --git a/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-agent-parallel-fixes.patch b/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-agent-parallel-fixes.patch
new file mode 100644
index 000000000000..3201c3f11311
--- /dev/null
+++ b/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-agent-parallel-fixes.patch
@@ -0,0 +1,41 @@
+diff -urN agent/Makefile.in agent.parallel/Makefile.in
+--- agent/Makefile.in 2001-10-02 02:38:03.000000000 +0200
++++ agent.parallel/Makefile.in 2003-09-23 23:34:29.002308952 +0200
+@@ -62,15 +62,20 @@
+ getmibstat.o: mibgroup/kernel_sunos5.c
+ $(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $?
+
+-snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS) $(LIBTARG)
++snmpd.fake: ${LIBAGENTOBJS} ${AGENTOBJS}
++
++snmpd$(EXEEXT): snmpd.fake ${LAGENTOBJS} $(USELIBS) $(LIBTARG)
+ $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} $(LOCAL_LIBS) ${LDFLAGS} ${AGENT_LIBS}
+
++libucdagent.fake: ${LIBAGENTOBJS}
+
+-libucdagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION)
++libucdagent.$(LIB_EXTENSION)$(LIB_VERSION): libucdagent.fake ${LLIBAGENTOBJS} libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION)
+ $(LIB_LD_CMD) libucdagent.$(LIB_EXTENSION)$(LIB_VERSION) ${LLIBAGENTOBJS} $(LIB_LD_LIBS)
+ $(RANLIB) libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION)
+
+-libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS}
++libucdmibs.fake: ${MIBOBJS}
++
++libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION): libucdmibs.fake ${LMIBOBJS}
+ $(LIB_LD_CMD) libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION) ${LMIBOBJS} $(LIB_LD_LIBS)
+ $(RANLIB) libucdmibs.$(LIB_EXTENSION)$(LIB_VERSION)
+
+diff -urN agent/mibgroup/Makefile.in agent.parallel/mibgroup/Makefile.in
+--- agent/mibgroup/Makefile.in 2001-10-02 02:38:03.000000000 +0200
++++ agent.parallel/mibgroup/Makefile.in 2003-09-23 23:34:39.344736664 +0200
+@@ -13,7 +13,9 @@
+ LOBJS = @module_list_lo@
+ SRCS = @module_list_c@
+
+-all: $(LOBJS)
++all.fake: $(OBJS)
++
++all: all.fake $(LOBJS)
+
+ TAGS: $(SRCS)
+ etags *.c *.h
diff --git a/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-coreutils-2.patch b/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-coreutils-2.patch
new file mode 100644
index 000000000000..0bf12540aa70
--- /dev/null
+++ b/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-coreutils-2.patch
@@ -0,0 +1,141 @@
+#diff -urpN ucd-snmp-4.2.6/aclocal.m4 ucd-snmp-4.2.6.coreutils/aclocal.m4
+#--- ucd-snmp-4.2.6/aclocal.m4 2002-06-06 10:12:38.000000000 +0200
+#+++ ucd-snmp-4.2.6.coreutils/aclocal.m4 2003-09-23 02:52:25.266638832 +0200
+#@@ -38,7 +38,7 @@ dnl @author Wes Hardaker <wjhardaker@ucd
+# dnl
+# AC_DEFUN([AC_PROMPT_USER],
+# [
+#-MSG_CHECK=`echo "$2" | tail -1`
+#+MSG_CHECK=`echo "$2" | tail -n 1`
+# AC_CACHE_CHECK($MSG_CHECK, ac_cv_user_prompt_$1,
+# [echo "" >&AC_FD_MSG
+# AC_PROMPT_USER_NO_DEFINE($1,[$2],$3)
+#@@ -1516,7 +1516,7 @@ EOF
+# # If the export-symbols file already is a .def file (1st line
+# # is EXPORTS), use it as is.
+# # If DATA tags from a recent dlltool are present, honour them!
+#- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+#+ archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
+# cp $export_symbols $output_objdir/$soname-def;
+# else
+# echo EXPORTS > $output_objdir/$soname-def;
+#@@ -3489,7 +3489,7 @@ darwin* | rhapsody*)
+# lt_cv_file_magic_cmd='/usr/bin/file -L'
+# case "$host_os" in
+# rhapsody* | darwin1.[[012]])
+#- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
+#+ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -n 1`
+# ;;
+# *) # Darwin 1.3 on
+# lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+#diff -urpN ucd-snmp-4.2.6/config.guess ucd-snmp-4.2.6.coreutils/config.guess
+--- ucd-snmp-4.2.6/config.guess 2002-03-01 17:15:14.000000000 +0200
++++ ucd-snmp-4.2.6.coreutils/config.guess 2003-09-23 02:52:19.030586856 +0200
+@@ -340,7 +340,7 @@ EOF
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+- UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
++ UNAME_RELEASE=`(head -n 1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+@@ -509,7 +509,7 @@ EOF
+ fi
+ exit 0 ;;
+ *:AIX:*:[45])
+- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
++ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -n 1 | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+diff -urpN ucd-snmp-4.2.6/configure ucd-snmp-4.2.6.coreutils/configure
+--- ucd-snmp-4.2.6/configure 2002-10-11 14:10:26.000000000 +0200
++++ ucd-snmp-4.2.6.coreutils/configure 2003-09-23 02:52:25.092665280 +0200
+@@ -2089,7 +2089,7 @@ darwin* | rhapsody*)
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
++ lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -n 1`
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+@@ -3836,7 +3836,7 @@ EOF
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is.
+ # If DATA tags from a recent dlltool are present, honour them!
+- archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
++ archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname-def;
+ else
+ echo EXPORTS > $output_objdir/$soname-def;
+@@ -16188,7 +16188,7 @@ fi
+
+ ME=`$WHOAMI`
+ if test -f /etc/resolv.conf; then
+- LOC=`cat /etc/resolv.conf | grep '^domain' | tail -1 | awk '{print $NF}'`
++ LOC=`cat /etc/resolv.conf | grep '^domain' | tail -n 1 | awk '{print $NF}'`
+ else
+ LOC="@no.where"
+ fi
+@@ -16203,7 +16203,7 @@ running on. This information is availab
+ can also be over-ridden using the \"syscontact\" syntax in the agent's
+ configuration files.
+
+-System Contact Information" | tail -1`
++System Contact Information" | tail -n 1`
+ echo $ac_n "checking $MSG_CHECK""... $ac_c" 1>&6
+ echo "configure:16209: checking $MSG_CHECK" >&5
+ if eval "test \"`echo '$''{'ac_cv_user_prompt_SYS_CONTACT'+set}'`\" = set"; then
+@@ -16263,7 +16263,7 @@ MSG_CHECK=`echo "
+ available in the MIB-II tree. this can also be over-ridden using the
+ \"syslocation\" syntax in the agent's configuration files.
+
+-System Location" | tail -1`
++System Location" | tail -n 1`
+ echo $ac_n "checking $MSG_CHECK""... $ac_c" 1>&6
+ echo "configure:16269: checking $MSG_CHECK" >&5
+ if eval "test \"`echo '$''{'ac_cv_user_prompt_SYS_LOC'+set}'`\" = set"; then
+@@ -16329,7 +16329,7 @@ information & errors to. If not defined
+ at the prompt below) the agent will use stdout and stderr instead.
+ (Note: This value can be over-ridden using command line options.)
+
+-Location to write logfile" | tail -1`
++Location to write logfile" | tail -n 1`
+ echo $ac_n "checking $MSG_CHECK""... $ac_c" 1>&6
+ echo "configure:16335: checking $MSG_CHECK" >&5
+ if eval "test \"`echo '$''{'ac_cv_user_prompt_LOGFILE'+set}'`\" = set"; then
+@@ -16394,7 +16394,7 @@ MSG_CHECK=`echo "
+ Enter a directory for the snmp library to store persistent
+ data in the form of a configuration file.
+
+-Location to write persistent information" | tail -1`
++Location to write persistent information" | tail -n 1`
+ echo $ac_n "checking $MSG_CHECK""... $ac_c" 1>&6
+ echo "configure:16400: checking $MSG_CHECK" >&5
+ if eval "test \"`echo '$''{'ac_cv_user_prompt_PERSISTENT_DIRECTORY'+set}'`\" = set"; then
+#diff -urpN ucd-snmp-4.2.6/configure.in ucd-snmp-4.2.6.coreutils/configure.in
+#--- ucd-snmp-4.2.6/configure.in 2002-08-25 03:24:59.000000000 +0200
+#+++ ucd-snmp-4.2.6.coreutils/configure.in 2003-09-23 02:52:25.159655096 +0200
+#@@ -1982,7 +1982,7 @@ fi
+#
+# ME=`$WHOAMI`
+# if test -f /etc/resolv.conf; then
+#- LOC=`cat /etc/resolv.conf | grep '^domain' | tail -1 | awk '{print $NF}'`
+#+ LOC=`cat /etc/resolv.conf | grep '^domain' | tail -n 1 | awk '{print $NF}'`
+# else
+# LOC="@no.where"
+# fi
+diff -urpN ucd-snmp-4.2.6/local/snmp-ucd.sh ucd-snmp-4.2.6.coreutils/local/snmp-ucd.sh
+--- ucd-snmp-4.2.6/local/snmp-ucd.sh 2000-08-01 19:23:03.000000000 +0200
++++ ucd-snmp-4.2.6.coreutils/local/snmp-ucd.sh 2003-09-23 02:52:18.983594000 +0200
+@@ -106,7 +106,7 @@ pidofproc() { # <program>
+ # Try looking for a /var/run file.
+ #
+ [ -f /var/run/$1.pid ] && {
+- pid=`head -1 /var/run/$1.pid`
++ pid=`head -n 1 /var/run/$1.pid`
+
+ [ -n "$pid" ] && {
+ echo $pid
diff --git a/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-openssl-0.9.7.patch b/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-openssl-0.9.7.patch
new file mode 100644
index 000000000000..c0e6d79002c0
--- /dev/null
+++ b/net-analyzer/ucd-snmp/files/ucd-snmp-4.2.6-openssl-0.9.7.patch
@@ -0,0 +1,183 @@
+--- ucd-snmp-4.2.6/snmplib/scapi.c.orig 2003-09-23 01:52:10.454173856 +0200
++++ ucd-snmp-4.2.6/snmplib/scapi.c 2003-09-23 02:33:01.524554520 +0200
+@@ -56,6 +56,16 @@
+ #include <openssl/hmac.h>
+ #include <openssl/evp.h>
+ #include <openssl/rand.h>
++
++#ifdef STRUCT_DES_KS_STRUCT_HAS_WEAK_KEY
++/* these are older names for newer structures that exist in openssl .9.7 */
++#define DES_key_schedule des_key_schedule
++#define DES_cblock des_cblock
++#define DES_key_sched des_key_sched
++#define DES_ncbc_encrypt des_ncbc_encrypt
++#define DES_cbc_encrypt des_cbc_encrypt
++#define OLD_DES
++#endif
+ #endif
+
+ #ifdef QUITFUN
+@@ -322,8 +332,8 @@
+ int rval = SNMPERR_SUCCESS;
+
+ #ifdef USE_OPENSSL
+- EVP_MD *hash(void);
+- HMAC_CTX *c = NULL;
++ const EVP_MD *hashfn;
++ EVP_MD_CTX ctx, *cptr;
+ #endif
+
+ DEBUGTRACE;
+@@ -337,22 +347,50 @@
+ /*
+ * Determine transform type.
+ */
+- c = malloc(sizeof(HMAC_CTX));
+- if (c == NULL)
+- return (SNMPERR_GENERR);
+-
+ if (ISTRANSFORM(hashtype, HMACMD5Auth)) {
+- EVP_DigestInit(&c->md_ctx, (const EVP_MD *) EVP_md5());
++ hashfn = (const EVP_MD *) EVP_md5();
+ }
+ else if (ISTRANSFORM(hashtype, HMACSHA1Auth)) {
+- EVP_DigestInit(&c->md_ctx, (const EVP_MD *) EVP_sha1());
++ hashfn = (const EVP_MD *) EVP_sha1();
+ }
+ else {
+ return(SNMPERR_GENERR);
+ }
+- EVP_DigestUpdate(&c->md_ctx, buf, buf_len);
+- EVP_DigestFinal(&(c->md_ctx), MAC, MAC_len);
+- free(c);
++
++ /** initialize the pointer */
++ memset(&ctx, 0, sizeof(ctx));
++ cptr = &ctx;
++#if defined(OLD_DES)
++ EVP_DigestInit(cptr, hashfn);
++#else /* !OLD_DES */
++ /* this is needed if the runtime library is different than the compiled
++ library since the openssl versions are very different. */
++ if (SSLeay() < 0x907000) {
++ /* the old version of the struct was bigger and thus more
++ memory is needed. should be 152, but we use 256 for safety. */
++ cptr = malloc(256);
++ EVP_DigestInit(cptr, hashfn);
++ } else {
++ EVP_MD_CTX_init(cptr);
++ EVP_DigestInit(cptr, hashfn);
++ }
++#endif
++
++ /** pass the data */
++ EVP_DigestUpdate(cptr, buf, buf_len);
++
++#if defined(OLD_DES)
++ EVP_DigestFinal(cptr, MAC, MAC_len);
++#else /* !OLD_DES */
++ /** do the final pass */
++ if (SSLeay() < 0x907000) {
++ EVP_DigestFinal(cptr, MAC, MAC_len);
++ free(cptr);
++ } else {
++ EVP_DigestFinal_ex(cptr, MAC, MAC_len);
++ EVP_MD_CTX_cleanup(cptr);
++ }
++#endif
+ return (rval);
+ #else /* USE_INTERNAL_MD5 */
+
+@@ -500,8 +538,13 @@
+ u_char pad_block[32]; /* bigger than anything I need */
+ u_char my_iv[32]; /* ditto */
+ int pad, plast, pad_size;
+- des_key_schedule key_sch;
+- des_cblock key_struct;
++#ifdef OLD_DES
++ DES_key_schedule key_sch;
++#else
++ DES_key_schedule key_sched_store;
++ DES_key_schedule *key_sch = &key_sched_store;
++#endif
++ DES_cblock key_struct;
+
+ DEBUGTRACE;
+
+@@ -589,16 +632,16 @@
+
+ if ( ISTRANSFORM(privtype, DESPriv) ) {
+ memcpy(key_struct, key, sizeof(key_struct));
+- (void) des_key_sched(&key_struct, key_sch);
++ (void) DES_key_sched(&key_struct, key_sch);
+
+ memcpy(my_iv, iv, ivlen);
+ /* encrypt the data */
+- des_ncbc_encrypt(plaintext, ciphertext, plast, key_sch,
+- (des_cblock *) my_iv, DES_ENCRYPT);
++ DES_ncbc_encrypt(plaintext, ciphertext, plast, key_sch,
++ (DES_cblock *) my_iv, DES_ENCRYPT);
+ if (pad > 0) {
+ /* then encrypt the pad block */
+- des_ncbc_encrypt(pad_block, ciphertext+plast, pad_size,
+- key_sch, (des_cblock *)my_iv, DES_ENCRYPT);
++ DES_ncbc_encrypt(pad_block, ciphertext+plast, pad_size,
++ key_sch, (DES_cblock *)my_iv, DES_ENCRYPT);
+ *ctlen = plast + pad_size;
+ } else {
+ *ctlen = plast;
+@@ -609,7 +652,11 @@
+ memset(my_iv, 0, sizeof(my_iv));
+ memset(pad_block, 0, sizeof(pad_block));
+ memset(key_struct, 0, sizeof(key_struct));
+- memset(key_sch, 0, sizeof(key_sch));
++#ifdef OLD_DES
++ memset(&key_sch, 0, sizeof(key_sch));
++#else
++ memset(&key_sched_store, 0, sizeof(key_sched_store));
++#endif
+ return rval;
+
+ } /* end sc_encrypt() */
+@@ -668,8 +715,13 @@
+
+ int rval = SNMPERR_SUCCESS;
+ u_char *my_iv[32];
+- des_key_schedule key_sch;
+- des_cblock key_struct;
++#ifdef OLD_DES
++ DES_key_schedule key_sch;
++#else
++ DES_key_schedule key_sched_store;
++ DES_key_schedule *key_sch = &key_sched_store;
++#endif
++ DES_cblock key_struct;
+ u_int properlength,
+ properlength_iv;
+
+@@ -712,17 +764,21 @@
+ memset(my_iv, 0, sizeof(my_iv));
+ if (ISTRANSFORM(privtype, DESPriv)) {
+ memcpy(key_struct, key, sizeof(key_struct));
+- (void) des_key_sched(&key_struct, key_sch);
++ (void) DES_key_sched(&key_struct, key_sch);
+
+ memcpy(my_iv, iv, ivlen);
+- des_cbc_encrypt(ciphertext, plaintext, ctlen, key_sch,
+- (des_cblock *) my_iv, DES_DECRYPT);
++ DES_cbc_encrypt(ciphertext, plaintext, ctlen, key_sch,
++ (DES_cblock *) my_iv, DES_DECRYPT);
+ *ptlen = ctlen;
+ }
+
+ /* exit cond */
+ sc_decrypt_quit:
+- memset(key_sch, 0, sizeof(key_sch));
++#ifdef OLD_DES
++ memset(&key_sch, 0, sizeof(key_sch));
++#else
++ memset(&key_sched_store, 0, sizeof(key_sched_store));
++#endif
+ memset(key_struct, 0, sizeof(key_struct));
+ memset(my_iv, 0, sizeof(my_iv));
+ return rval;
diff --git a/net-analyzer/ucd-snmp/metadata.xml b/net-analyzer/ucd-snmp/metadata.xml
new file mode 100644
index 000000000000..05e6d2289c71
--- /dev/null
+++ b/net-analyzer/ucd-snmp/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer><email>max@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/net-analyzer/ucd-snmp/ucd-snmp-4.2.5.ebuild b/net-analyzer/ucd-snmp/ucd-snmp-4.2.5.ebuild
deleted file mode 100644
index ecfae6b4b3b0..000000000000
--- a/net-analyzer/ucd-snmp/ucd-snmp-4.2.5.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ucd-snmp/ucd-snmp-4.2.5.ebuild,v 1.8 2003/09/19 21:53:46 max Exp $
-
-IUSE="ssl ipv6 tcpd"
-
-S=${WORKDIR}/${P}
-DESCRIPTION="Software for generating and retrieving SNMP data"
-SRC_URI="mirror://sourceforge/net-snmp/${P}.tar.gz"
-HOMEPAGE="http://net-snmp.sourceforge.net/"
-
-PROVIDE="virtual/snmp"
-DEPEND="<sys-libs/db-2
- >=sys-libs/zlib-1.1.4
- ssl? ( >=dev-libs/openssl-0.9.6 )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
-RDEPEND="${DEPEND}
- !virtual/snmp"
-
-SLOT="0"
-LICENSE="as-is"
-KEYWORDS="x86 sparc "
-
-src_compile() {
- local myconf
- use ssl || myconf="${myconf} --enable-internal-md5 --with-openssl=no"
- use tcpd && myconf="${myconf} --with-libwrap"
- use ipv6 && myconf="${myconf} --with-ipv6"
-
- ./configure \
- --with-zlib \
- --prefix=/usr \
- --enable-shared \
- --mandir=/usr/share/man \
- --with-sys-location="Unknown" \
- --with-sys-contact="root@Unknown" \
- --with-logfile=/var/log/snmpd.log \
- --with-persistent-directory=/var/lib/ucd-snmp \
- --host=${CHOST} ${myconf} || die "bad ./configure"
-
- emake || die "compile problem"
-}
-
-src_install () {
- make install \
- prefix=${D}/usr \
- exec_prefix=${D}/usr \
- mandir=${D}/usr/share/man \
- persistentdir=${D}/var/lib/ucd-snmp || die
-
- dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO EXAMPLE.conf
-
- exeinto /etc/init.d
- newexe ${FILESDIR}/snmpd.rc6 snmpd
-}
diff --git a/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r1.ebuild b/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r1.ebuild
index 758368e0e5fb..59dbc4e8f941 100644
--- a/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r1.ebuild
+++ b/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r1.ebuild,v 1.3 2003/09/19 21:53:46 max Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r1.ebuild,v 1.4 2003/09/24 04:40:17 max Exp $
IUSE="ssl ipv6 tcpd"
PROVIDE="virtual/snmp"
@@ -51,6 +51,8 @@ src_install () {
exeinto /etc/init.d
newexe ${FILESDIR}/snmpd.rc6 snmpd
+ exeinto /etc/conf.d
+ newexe ${FILESDIR}/snmpd.conf snmpd
dodir /etc/ucd-snmp
insinto /etc/ucd-snmp
diff --git a/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r2.ebuild b/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r2.ebuild
new file mode 100644
index 000000000000..1f2755bf1f30
--- /dev/null
+++ b/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ucd-snmp/ucd-snmp-4.2.6-r2.ebuild,v 1.1 2003/09/24 04:40:17 max Exp $
+
+inherit flag-o-matic
+
+DESCRIPTION="Software for generating and retrieving SNMP data."
+HOMEPAGE="http://net-snmp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/net-snmp/${P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~hppa"
+IUSE="ssl ipv6 tcpd"
+
+PROVIDE="virtual/snmp"
+DEPEND="virtual/glibc
+ <sys-libs/db-2
+ >=sys-libs/zlib-1.1.4
+ >=sys-apps/sed-4
+ ssl? ( >=dev-libs/openssl-0.9.6d )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
+RDEPEND="${DEPEND}
+ !virtual/snmp"
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ # Fix openssl-0.9.7 support, based on changes done to net-snmp
+ # (bug #25595) - <azarah@gentoo.org> (23 Sep 2003).
+ epatch "${FILESDIR}/${P}-openssl-0.9.7.patch"
+ # Fix head/tail syntax.
+ epatch "${FILESDIR}/${P}-coreutils-2.patch"
+ # Fix race conditions when building parallel.
+ epatch "${FILESDIR}/${P}-agent-parallel-fixes.patch"
+ # Fix build not erroring out when a subdir fails.
+ epatch "${FILESDIR}/${P}-Makefile-fixes.patch"
+}
+
+src_compile() {
+ local myconf
+ myconf="${myconf} `use_with ssl openssl` `use_enable -ssl internal-md5`"
+ myconf="${myconf} `use_with tcpd libwrap`"
+ myconf="${myconf} `use_enable ipv6`"
+
+ if [ "`use ssl`" ] && has_version '=dev-libs/openssl-0.9.6*' ; then
+ einfo "Found openssl version 0.9.6: adding extra flags."
+ append-flags "-DSTRUCT_DES_KS_STRUCT_HAS_WEAK_KEY"
+ fi
+
+ econf \
+ --with-sys-location="Unknown" \
+ --with-sys-contact="root@Unknown" \
+ --with-mib-modules="host smux" \
+ --with-logfile=/var/log/ucd-snmpd.log \
+ --with-persistent-directory=/var/lib/ucd-snmp \
+ --with-zlib \
+ ${myconf}
+
+ emake || die "compile problem"
+}
+
+src_install () {
+ einstall exec_prefix="${D}/usr" persistentdir="${D}/var/lib/net-snmp"
+ keepdir /etc/snmp /var/lib/ucd-snmp
+
+ dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO
+ newdoc EXAMPLE.conf.def EXAMPLE.conf
+
+ exeinto /etc/init.d
+ newexe "${FILESDIR}/snmpd.rc6" snmpd
+ insinto /etc/conf.d
+ newins "${FILESDIR}/snmpd.conf" snmpd
+}
diff --git a/net-analyzer/ucd-snmp/ucd-snmp-4.2.6.ebuild b/net-analyzer/ucd-snmp/ucd-snmp-4.2.6.ebuild
deleted file mode 100644
index 93bcde1abede..000000000000
--- a/net-analyzer/ucd-snmp/ucd-snmp-4.2.6.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/ucd-snmp/ucd-snmp-4.2.6.ebuild,v 1.8 2003/09/19 21:53:46 max Exp $
-
-IUSE="ssl ipv6 tcpd"
-S=${WORKDIR}/${P}
-DESCRIPTION="Software for generating and retrieving SNMP data"
-SRC_URI="mirror://sourceforge/net-snmp/${P}.tar.gz"
-HOMEPAGE="http://net-snmp.sourceforge.net/"
-PROVIDE="virtual/snmp"
-DEPEND="<sys-libs/db-2
- >=sys-libs/zlib-1.1.4
- ssl? ( >=dev-libs/openssl-0.9.6 )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
-RDEPEND="${DEPEND}
- !virtual/snmp"
-SLOT="0"
-LICENSE="as-is"
-KEYWORDS="x86 sparc ppc hppa"
-
-src_compile() {
- export SNMPCONFPATH="/etc/ucd-snmp"
- local myconf
- use ssl || myconf="${myconf} --enable-internal-md5 --with-openssl=no"
- use tcpd && myconf="${myconf} --with-libwrap"
- use ipv6 && myconf="${myconf} --with-ipv6"
-
- ./configure \
- --with-zlib \
- --prefix=/usr \
- --enable-shared \
- --mandir=/usr/share/man \
- --with-sys-location="Unknown" \
- --with-sys-contact="root@Unknown" \
- --with-logfile=/var/log/snmpd.log \
- --with-persistent-directory=/var/lib/ucd-snmp \
- --with-mib-modules=host \
- --host=${CHOST} ${myconf} || die "bad ./configure"
-
- emake || die "compile problem"
-}
-
-src_install () {
- make install \
- prefix=${D}/usr \
- exec_prefix=${D}/usr \
- mandir=${D}/usr/share/man \
- persistentdir=${D}/var/lib/ucd-snmp || die
-
- dodoc AGENT.txt ChangeLog FAQ INSTALL NEWS PORTING README* TODO EXAMPLE.conf
-
- exeinto /etc/init.d
- newexe ${FILESDIR}/snmpd.rc6 snmpd
-
- dodir /etc/ucd-snmp
- insinto /etc/ucd-snmp
- newins EXAMPLE.conf snmpd.conf.dist
-}