upgrade to ucd-snmp 4.2.2

This commit is contained in:
danh 2001-10-11 19:16:19 +00:00
parent 4115aa3662
commit a8a264afd9
10 changed files with 298 additions and 97 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.30 2001/10/08 16:07:12 danh Exp $
# $OpenBSD: Makefile,v 1.31 2001/10/11 19:16:19 danh Exp $
COMMENT= "extendable SNMP implementation"
DISTNAME= ucd-snmp-4.2.1
DISTNAME= ucd-snmp-4.2.2
CATEGORIES= net
NEED_VERSION= 1.456
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
@ -17,18 +17,14 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
CONFIGURE_STYLE= autoconf dest
CONFIGURE_STYLE= gnu dest
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
CONFIGURE_ARGS+= --with-defaults --with-logfile='/var/log/snmpd' \
--with-persistent-directory='/var/ucd-snmp' \
--with-libwrap='/usr' --with-openssl --with-zlib \
--with-sys-contact='default@' \
--with-sys-location='Default Location'
CONFIGURE_ENV= VERSION_INFO='42:0:0'
PATCH_LIST= ${PORTSDIR}/infrastructure/patches/patch-lt1.3.4-ltconfig \
${PORTSDIR}/infrastructure/patches/patch-lt1.3.4-ltmain_sh \
patch-*
CONFIGURE_ENV= VERSION_INFO='42:2:0'
SNMP_BIN= encode_keychange snmpbulkget snmpbulkwalk snmpdelta \
snmpdf snmpget snmpgetnext snmpnetstat snmpset snmpstatus \
@ -36,6 +32,9 @@ SNMP_BIN= encode_keychange snmpbulkget snmpbulkwalk snmpdelta \
snmpwalk
SNMP_SBIN= snmpd snmptrapd
post-extract:
@cp ${FILESDIR}/openbsd3.h ${WRKSRC}/s/openbsd3.h
post-install:
@cd ${PREFIX}/bin && strip ${SNMP_BIN}
@cd ${PREFIX}/sbin && strip ${SNMP_SBIN}

View File

@ -1,3 +1,3 @@
MD5 (ucd-snmp-4.2.1.tar.gz) = 192d467185c8e7142c155d5e162b1e97
RMD160 (ucd-snmp-4.2.1.tar.gz) = d882c0834f978912d77a16e7853bc5eb1dc06e0c
SHA1 (ucd-snmp-4.2.1.tar.gz) = a335b207640597a3b6f035ee49823ba701042ef9
MD5 (ucd-snmp-4.2.2.tar.gz) = 8feb7deb7f2d168646af4a1484a88e1a
RMD160 (ucd-snmp-4.2.2.tar.gz) = da327b851cefc7a2985f53cb36da42e72b488d76
SHA1 (ucd-snmp-4.2.2.tar.gz) = 5c416f837490beaf70e548ce6306bb8e7362daff

View File

@ -0,0 +1,5 @@
#include "netbsd.h"
#define netbsd1 1 /* we're really close to this */
#undef TOTAL_MEMORY_SYMBOL

View File

@ -1,12 +1,16 @@
$OpenBSD: patch-agent_mibgroup_ucd_snmp_h,v 1.2 2001/09/24 16:03:39 danh Exp $
--- agent/mibgroup/ucd_snmp.h.orig Wed Apr 4 11:31:36 2001
+++ agent/mibgroup/ucd_snmp.h Sun Sep 16 18:08:26 2001
@@ -34,6 +34,8 @@ config_arch_require(netbsd1, ucd-snmp/vm
$OpenBSD: patch-agent_mibgroup_ucd_snmp_h,v 1.3 2001/10/11 19:16:19 danh Exp $
--- agent/mibgroup/ucd_snmp.h.orig Sun Sep 16 17:16:16 2001
+++ agent/mibgroup/ucd_snmp.h Thu Oct 11 14:23:12 2001
@@ -32,8 +32,10 @@ config_arch_require(freebsd5, ucd-snmp/v
config_arch_require(freebsd5, ucd-snmp/memory_freebsd2)
config_arch_require(netbsd1, ucd-snmp/vmstat_netbsd1)
config_arch_require(netbsd1, ucd-snmp/memory_netbsd1)
config_arch_require(openbsd2, ucd-snmp/vmstat_freebsd2)
config_arch_require(openbsd2, ucd-snmp/memory_freebsd2)
-config_arch_require(openbsd2, ucd-snmp/vmstat_netbsd1)
-config_arch_require(openbsd2, ucd-snmp/memory_netbsd1)
+config_arch_require(openbsd2, ucd-snmp/vmstat_freebsd2)
+config_arch_require(openbsd2, ucd-snmp/memory_freebsd2)
+config_arch_require(openbsd3, ucd-snmp/vmstat_netbsd1)
+config_arch_require(openbsd3, ucd-snmp/memory_netbsd1)
config_arch_require(bsdi4, ucd-snmp/vmstat_bsdi4)
config_add_mib(UCD-SNMP-MIB)
config_add_mib(UCD-DEMO-MIB)
config_arch_require(darwin1, ucd-snmp/vmstat_freebsd2)
config_arch_require(darwin1, ucd-snmp/memory_freebsd2)

View File

@ -0,0 +1,152 @@
$OpenBSD: patch-configure,v 1.3 2001/10/11 19:16:19 danh Exp $
--- configure.orig Mon Oct 8 14:33:57 2001
+++ configure Thu Oct 11 13:33:42 2001
@@ -2114,6 +2114,16 @@ newos6*)
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
+openbsd*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ else
+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+ fi
+ ;;
+
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
@@ -3118,7 +3128,14 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ case "$host_os" in
+ openbsd*)
+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ ;;
+ *)
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ ;;
+ esac
fi
# Allow CC to be a program name with arguments.
@@ -3641,7 +3658,9 @@ cygwin* | mingw* | pw32* )
with_gnu_ld=no
fi
;;
-
+openbsd*)
+ with_gnu_ld=no
+ ;;
esac
ld_shlibs=yes
@@ -4045,10 +4064,24 @@ else
;;
openbsd*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-R$libdir'
+ ;;
+ esac
+ fi
;;
os2*)
@@ -4537,9 +4570,22 @@ newsos6)
openbsd*)
version_type=sunos
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- need_version=no
+ need_lib_prefix=no
+ need_version=no
+ sys_lib_search_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec="/usr/lib /usr/local/lib"
+ if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+ case "$host_os" in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
fi
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
@@ -6425,27 +6471,6 @@ fi
echo "$ac_t""$EXTRACPPFLAGS" 1>&6
-if test "x$prefix" = "xNONE"; then
- prefix=/usr/local
-fi
-
-fch=`echo $prefix | sed 's/\(.\).*/\1/'`
-if test $fch != "/" ; then
- prefix=`pwd`/$prefix
- echo "adjusting prefix to $prefix"
-fi
-
-if test "x$exec_prefix" = "xNONE"; then
- exec_prefix=$prefix
-fi
-
-fch=`echo $exec_prefix | sed 's/\(.\).*/\1/'`
-if test $fch != "/" ; then
- exec_prefix=`pwd`/$exec_prefix
- echo "adjusting exec_prefix to $exec_prefix"
-fi
-
-
SNMPLIBPATH=""
tmpset="$libdir/snmp"
while test "x$tmpset" != "x$SNMPLIBPATH"; do
@@ -7344,6 +7369,7 @@ echo "configure:7344: checking for TCP w
cat > conftest.$ac_ext <<EOF
#line 7346 "configure"
#include "confdefs.h"
+#include <sys/types.h>
#include <tcpd.h>
int allow_severity = 0;
int deny_severity = 0;
@@ -7468,6 +7494,7 @@ echo "configure:7468: checking for TCP w
cat > conftest.$ac_ext <<EOF
#line 7470 "configure"
#include "confdefs.h"
+#include <sys/types.h>
#include <tcpd.h>
int allow_severity = 0;
int deny_severity = 0;
@@ -15153,6 +15180,7 @@ s%@AUTOCONF@%$AUTOCONF%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@UNAMEPROG@%$UNAMEPROG%g
s%@VERSION@%$VERSION%g
+s%@VERSION_INFO@%$VERSION_INFO%g
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g

View File

@ -1,66 +0,0 @@
$OpenBSD: patch-configure_in,v 1.5 2001/01/05 09:19:46 danh Exp $
--- configure.in.orig Fri Dec 1 10:56:07 2000
+++ configure.in Sat Dec 23 14:21:54 2000
@@ -348,6 +348,7 @@ dnl get version number.
AC_MSG_CHECKING(for ucd-snmp version number)
VERSION=`cat $srcdir/version.h | sed 's/";//;s/.*"//;s/pre/0./;'`
AC_SUBST(VERSION)
+AC_SUBST(VERSION_INFO)
AC_MSG_RESULT($VERSION)
dnl super type checking
@@ -461,22 +462,10 @@ if test "x$prefix" = "xNONE"; then
prefix=/usr/local
fi
-fch=`echo $prefix | sed 's/\(.\).*/\1/'`
-if test $fch != "/" ; then
- prefix=`pwd`/$prefix
- echo "adjusting prefix to $prefix"
-fi
-
if test "x$exec_prefix" = "xNONE"; then
exec_prefix=$prefix
fi
-fch=`echo $exec_prefix | sed 's/\(.\).*/\1/'`
-if test $fch != "/" ; then
- exec_prefix=`pwd`/$exec_prefix
- echo "adjusting exec_prefix to $exec_prefix"
-fi
-
dnl Set SNMPLIBPATH & SNMPSHAREPATH
SNMPLIBPATH=""
@@ -932,10 +921,11 @@ AC_ARG_WITH(libwrap,
AC_CHECK_HEADER(tcpd.h,
LIBS="$LIBS -lwrap"
AC_MSG_CHECKING(for TCP wrappers library -lwrap)
- AC_TRY_LINK([#include <tcpd.h>
- int allow_severity = 0;
- int deny_severity = 0;
- ],[hosts_access((void *)0)],
+ AC_TRY_LINK([#include <sys/types.h>
+#include <tcpd.h>
+int allow_severity = 0;
+int deny_severity = 0;
+],[hosts_access((void *)0)],
AC_MSG_RESULT(yes)
AC_DEFINE(USE_LIBWRAP)
test "$with_libwrap" != no && WRAPLIBS="-L$with_libwrap/lib"
@@ -945,10 +935,11 @@ AC_ARG_WITH(libwrap,
AC_CHECK_FUNC(yp_get_default_domain, ,
AC_CHECK_LIB(nsl, yp_get_default_domain))
AC_MSG_CHECKING(for TCP wrappers library -lwrap linked with -lnsl)
- AC_TRY_LINK([#include <tcpd.h>
- int allow_severity = 0;
- int deny_severity = 0;
- ],[hosts_access((void *)0)],
+ AC_TRY_LINK([#include <sys/types.h>
+#include <tcpd.h>
+int allow_severity = 0;
+int deny_severity = 0;
+],[hosts_access((void *)0)],
AC_MSG_RESULT(yes)
test "$with_libwrap" != no && WRAPLIBS="-L$with_libwrap/lib"
WRAPLIBS="$WRAPLIBS -lwrap", AC_MSG_RESULT(no)),

View File

@ -0,0 +1,89 @@
$OpenBSD: patch-ltmain_sh,v 1.4 2001/10/11 19:16:19 danh Exp $
--- ltmain.sh.orig Thu Oct 11 10:05:17 2001
+++ ltmain.sh Thu Oct 11 10:16:40 2001
@@ -1031,12 +1031,34 @@ compiler."
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
esac
fi
deplibs="$deplibs $arg"
continue
;;
+ -pthread)
+ case $host in
+ *-*-openbsd*)
+ deplibs="$deplibs $arg"
+ ;;
+ *)
+ continue
+ ;;
+ esac
+ ;;
+
-module)
module=yes
continue
@@ -2408,6 +2430,9 @@ compiler."
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
*)
# Add libc to deplibs on all other systems if necessary.
if test $build_libtool_need_lc = "yes"; then
@@ -4412,40 +4437,6 @@ relink_command=\"$relink_command\""
# Exit here if they wanted silent mode.
test "$show" = ":" && exit 0
- echo "----------------------------------------------------------------------"
- echo "Libraries have been installed in:"
- for libdir in $libdirs; do
- echo " $libdir"
- done
- echo
- echo "If you ever happen to want to link against installed libraries"
- echo "in a given directory, LIBDIR, you must either use libtool, and"
- echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
- echo "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- echo " during execution"
- fi
- if test -n "$runpath_var"; then
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
- echo " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- echo " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- echo " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- echo
- echo "See any operating system documentation about shared libraries for"
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "----------------------------------------------------------------------"
exit 0
;;

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-s_openbsd_h,v 1.1 2001/10/11 19:16:19 danh Exp $
--- s/openbsd.h.orig Thu Oct 11 14:17:38 2001
+++ s/openbsd.h Thu Oct 11 14:22:03 2001
@@ -1,7 +1,6 @@
#include "netbsd.h"
#define netbsd1 1 /* we're really close to this */
-#define UVM
#undef MBPOOL_SYMBOL
#undef MCLPOOL_SYMBOL

View File

@ -1,5 +1,5 @@
@comment $OpenBSD: PFRAG.shared,v 1.2 2001/01/05 09:19:48 danh Exp $
lib/libsnmp.so.42.0
lib/libucdagent.so.42.0
lib/libucdmibs.so.42.0
@comment $OpenBSD: PFRAG.shared,v 1.3 2001/10/11 19:16:19 danh Exp $
lib/libsnmp.so.42.2
lib/libucdagent.so.42.2
lib/libucdmibs.so.42.2
DYNLIBDIR(%B)

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.7 2001/05/22 19:21:34 danh Exp $
@comment $OpenBSD: PLIST,v 1.8 2001/10/11 19:16:19 danh Exp $
@unexec rm -f %D/share/snmp/mibs/.index
@mode 0555
bin/encode_keychange
@ -39,10 +39,12 @@ include/ucd-snmp/header_complex.h
include/ucd-snmp/int64.h
include/ucd-snmp/keytools.h
include/ucd-snmp/mib.h
include/ucd-snmp/mib_module_config.h
include/ucd-snmp/mibincl.h
include/ucd-snmp/parse.h
include/ucd-snmp/read_config.h
include/ucd-snmp/scapi.h
include/ucd-snmp/snmp-tc.h
include/ucd-snmp/snmp.h
include/ucd-snmp/snmp_agent.h
include/ucd-snmp/snmp_alarm.h
@ -65,13 +67,6 @@ include/ucd-snmp/ucd-snmp-includes.h
include/ucd-snmp/util_funcs.h
include/ucd-snmp/var_struct.h
include/ucd-snmp/version.h
lib/libsnmp.a
lib/libsnmp.la
lib/libucdagent.a
lib/libucdagent.la
lib/libucdmibs.a
lib/libucdmibs.la
%%SHARED%%
man/man1/snmpbulkget.1
man/man1/snmpbulkwalk.1
man/man1/snmpcmd.1
@ -113,9 +108,12 @@ man/man3/shutdown_mib.3
man/man3/snmp_agent_api.3
man/man3/snmp_alarm.3
man/man3/snmp_api.3
man/man3/snmp_api_errstring.3
man/man3/snmp_close.3
man/man3/snmp_error.3
man/man3/snmp_free_pdu.3
man/man3/snmp_open.3
man/man3/snmp_perror.3
man/man3/snmp_read.3
man/man3/snmp_select_info.3
man/man3/snmp_send.3
@ -125,6 +123,7 @@ man/man3/snmp_sess_close.3
man/man3/snmp_sess_error.3
man/man3/snmp_sess_init.3
man/man3/snmp_sess_open.3
man/man3/snmp_sess_perror.3
man/man3/snmp_sess_read.3
man/man3/snmp_sess_select_info.3
man/man3/snmp_sess_send.3
@ -206,6 +205,14 @@ share/snmp/snmpconf/snmpd.conf/system
share/snmp/snmpconf/snmpd.conf/trapsinks
share/snmp/snmpconf/snmptrapd.conf/formatting
share/snmp/snmpconf/snmptrapd.conf/traphandle
@mode
lib/libsnmp.a
lib/libsnmp.la
lib/libucdagent.a
lib/libucdagent.la
lib/libucdmibs.a
lib/libucdmibs.la
%%SHARED%%
@dirrm share/snmp/snmpconf/snmptrapd.conf
@dirrm share/snmp/snmpconf/snmpd.conf
@dirrm share/snmp/snmpconf/snmp.conf