OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 06-Apr-2004 11:33:26
Branch: HEAD Handle: 2004040610332600
Modified files:
openpkg-src/snmp snmp.patch snmp.spec
Log:
upgrading package: snmp 5.0.9 -> 5.1.1
Summary:
Revision Changes Path
1.5 +186 -62 openpkg-src/snmp/snmp.patch
1.63 +2 -2 openpkg-src/snmp/snmp.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/snmp/snmp.patch
============================================================================
$ cvs diff -u -r1.4 -r1.5 snmp.patch
--- openpkg-src/snmp/snmp.patch 26 Aug 2003 09:53:54 -0000 1.4
+++ openpkg-src/snmp/snmp.patch 6 Apr 2004 09:33:26 -0000 1.5
@@ -1,70 +1,141 @@
---- snmplib/system.c.dist Thu Aug 7 16:42:30 2003
-+++ snmplib/system.c Thu Aug 7 16:44:19 2003
-@@ -751,7 +751,7 @@
+Index: agent/auto_nlist.c
+--- agent/auto_nlist.c.orig 2002-05-15 14:53:01.000000000 +0200
++++ agent/auto_nlist.c 2004-04-06 11:29:16.000000000 +0200
+@@ -57,6 +57,7 @@
+ }
+ if (*ptr == 0) {
+ *ptr = (struct autonlist *) malloc(sizeof(struct autonlist));
++ memset(*ptr, 0, sizeof(struct autonlist));
+ it = *ptr;
+ it->left = 0;
+ it->right = 0;
+Index: agent/mibgroup/mibII/tcpTable.c
+--- agent/mibgroup/mibII/tcpTable.c.orig 2004-03-16 00:27:45.000000000 +0100
++++ agent/mibgroup/mibII/tcpTable.c 2004-04-06 11:02:38.000000000 +0200
+@@ -96,6 +96,11 @@
+ #define TCPTABLE_REMOTEPORT pcb.inp_fport
+ #define TCPTABLE_IS_LINKED_LIST
- #ifndef HAVE_SETENV
- int
--setenv(const char *name, const char *value, int overwrite)
-+__netsnmp_setenv(const char *name, const char *value, int overwrite)
- {
- char *cp;
- int ret;
---- include/net-snmp/library/system.h.dist Thu Aug 7 16:41:56 2003
-+++ include/net-snmp/library/system.h Thu Aug 7 16:44:45 2003
-@@ -87,7 +87,8 @@
- char *strdup(const char *);
- #endif
- #ifndef HAVE_SETENV
-- int setenv(const char *, const char *, int);
-+ int __netsnmp_setenv(const char *, const char *, int);
-+# define setenv(a,b,c) __netsnmp_setenv(a,b,c)
- #endif
++#if defined(__FreeBSD__)
++#undef INP_NEXT_SYMBOL
++#define INP_NEXT_SYMBOL inp_next
++#endif
++
+ #endif /* linux */
+ #endif /* WIN32 */
+ #endif /* solaris2 */
+@@ -717,12 +722,17 @@
+ nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb);
+ if (!nnew)
+ break;
++#if defined(__FreeBSD__)
++ memcpy(&(nnew->pcb), &(((struct xinpcb *) xig)->xi_inp),
++ sizeof(struct inpcb));
++#else
+ nnew->state = StateMap[((struct xinpcb *) xig)->xt_tp.t_state];
+ if (nnew->state == 5 /* established */ ||
+ nnew->state == 8 /* closeWait */ )
+ tcp_estab++;
+ memcpy(&(nnew->pcb), &(((struct xinpcb *) xig)->xt_inp),
+ sizeof(struct inpcb));
++#endif
- int calculate_time_diff(struct timeval *,
---- agent/mibgroup/host/hr_swinst.c.dist 2003-08-08 07:59:16.000000000 +0200
-+++ agent/mibgroup/host/hr_swinst.c 2003-08-08 09:35:50.000000000 +0200
-@@ -202,10 +202,10 @@
- * XXX distinguish between rpm-2.5.x and rpm-2.9x
- */
- #ifdef HAVE_RPMGETPATH
-- rpmReadConfigFiles(NULL, NULL);
-+ rpmReadConfigFiles(@OPENPKG_RPMRC@, NULL);
- swi->swi_dbpath = rpmGetPath("%{_dbpath}", NULL);
- #else
-- rpmReadConfigFiles(NULL, NULL, NULL, 0);
-+ rpmReadConfigFiles(@OPENPKG_RPMRC@, NULL, NULL, 0);
- swi->swi_dbpath = rpmGetVar(RPMVAR_DBPATH);
- #endif
- if (swi->swi_directory != NULL)
-@@ -557,7 +557,8 @@
- return;
- if (rpmdbOpen("", &swi->swi_rpmdb, O_RDONLY, 0644) != 0)
- swi->swi_index = -1;
-- Check_HRSW_cache(swi);
-+ else
-+ Check_HRSW_cache(swi);
- #else
- if (swi->swi_directory != NULL) {
- if (swi->swi_dp != NULL) {
-@@ -676,6 +677,9 @@
- {
- SWI_t *swi = &_myswi; /* XXX static for now */
+ nnew->inp_next = tcp_head;
+ tcp_head = nnew;
+Index: agent/mibgroup/mibII/udpTable.c
+--- agent/mibgroup/mibII/udpTable.c.orig 2004-03-16 00:27:45.000000000 +0100
++++ agent/mibgroup/mibII/udpTable.c 2004-04-06 11:29:01.000000000 +0200
+@@ -597,6 +597,7 @@
+ * Unpick this into the constituent 'xinpgen' structures, and extract
+ * the 'inpcb' elements into a linked list (built in reverse)
+ */
++#if !defined(__FreeBSD__)
+ xig = (struct xinpgen *) udpcb_buf;
+ xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
-+ if (swi->swi_index == -1)
-+ return;
-+
- #ifdef HAVE_LIBRPM
- rpmdbClose(swi->swi_rpmdb); /* or only on finishing ? */
- swi->swi_rpmdb = NULL;
---- agent/mibgroup/ucd-snmp/memory_solaris2.c.dist Tue Aug 19 09:46:12 2003
-+++ agent/mibgroup/ucd-snmp/memory_solaris2.c Tue Aug 19 09:51:30 2003
+@@ -604,12 +605,13 @@
+ nnew = SNMP_MALLOC_TYPEDEF(struct inpcb);
+ if (!nnew)
+ break;
+- memcpy(nnew, ((struct xinpcb *) xig)->xi_inp, sizeof(struct inpcb));
++ memcpy(nnew, &((struct xinpcb *) xig)->xi_inp, sizeof(struct inpcb));
+
+ nnew->next = udp_head; /* XXX - ?? Check 'next' pointer */
+ udp_head = nnew;
+ xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
+ }
++#endif
+
+ free(udpcb_buf);
+ if (udp_head) {
+Index: agent/mibgroup/ucd-snmp/diskio.c
+--- agent/mibgroup/ucd-snmp/diskio.c.orig 2004-02-13 20:19:32.000000000 +0100
++++ agent/mibgroup/ucd-snmp/diskio.c 2004-04-06 11:02:38.000000000 +0200
+@@ -69,7 +69,12 @@
+ #endif /* bsdi */
+
+ #if defined (freebsd4) || defined(freebsd5)
++#include <sys/param.h>
++#if __FreeBSD_version >= 500101
++#include <sys/resource.h>
++#else
+ #include <sys/dkstat.h>
++#endif
+ #include <devstat.h>
+ #endif /* freebsd */
+
+@@ -413,7 +418,11 @@
+ }
+ memset(stat->dinfo, 0, sizeof(struct devinfo));
+
++#if defined(freebsd5) && (__FreeBSD_version >= 500107)
++ if ((devstat_getdevs(NULL, stat)) == -1) {
++#else
+ if ((getdevs(stat)) == -1) {
++#endif
+ fprintf(stderr, "Can't get devices:%s\n", devstat_errbuf);
+ return 1;
+ }
+@@ -462,6 +471,20 @@
+ case DISKIO_DEVICE:
+ *var_len = strlen(stat->dinfo->devices[indx].device_name);
+ return (u_char *) stat->dinfo->devices[indx].device_name;
++#if defined(freebsd5) && (__FreeBSD_version >= 500107)
++ case DISKIO_NREAD:
++ long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_READ];
++ return (u_char *) & long_ret;
++ case DISKIO_NWRITTEN:
++ long_ret = (signed long) stat->dinfo->devices[indx].bytes[DEVSTAT_WRITE];
++ return (u_char *) & long_ret;
++ case DISKIO_READS:
++ long_ret = (signed long)
stat->dinfo->devices[indx].operations[DEVSTAT_READ];
++ return (u_char *) & long_ret;
++ case DISKIO_WRITES:
++ long_ret = (signed long)
stat->dinfo->devices[indx].operations[DEVSTAT_WRITE];
++ return (u_char *) & long_ret;
++#else
+ case DISKIO_NREAD:
+ long_ret = (signed long) stat->dinfo->devices[indx].bytes_read;
+ return (u_char *) & long_ret;
+@@ -474,6 +497,7 @@
+ case DISKIO_WRITES:
+ long_ret = (signed long) stat->dinfo->devices[indx].num_writes;
+ return (u_char *) & long_ret;
++#endif
+
+ default:
+ ERROR_MSG("diskio.c: don't know how to handle this request.");
+Index: agent/mibgroup/ucd-snmp/memory_solaris2.c
+--- agent/mibgroup/ucd-snmp/memory_solaris2.c.orig 2004-01-29 14:53:59.000000000
+0100
++++ agent/mibgroup/ucd-snmp/memory_solaris2.c 2004-04-06 11:02:38.000000000
+0200
@@ -1,3 +1,4 @@
+#undef _FILE_OFFSET_BITS /* swapctl doesn't support 64bit off_t */
#include <net-snmp/net-snmp-config.h> /* local SNMP configuration details */
#if HAVE_STRING_H
#include <string.h>
---- agent/mibgroup/ucd-snmp/proc.c.dist 2003-08-19 10:26:49.000000000 +0200
-+++ agent/mibgroup/ucd-snmp/proc.c 2003-08-19 10:27:45.000000000 +0200
+Index: agent/mibgroup/ucd-snmp/proc.c
+--- agent/mibgroup/ucd-snmp/proc.c.orig 2004-02-17 06:40:43.000000000 +0100
++++ agent/mibgroup/ucd-snmp/proc.c 2004-04-06 11:02:38.000000000 +0200
@@ -1,3 +1,6 @@
+#ifdef solaris2
+#undef _FILE_OFFSET_BITS /* solaris procfs doesn't support 64bit off_t */
@@ -72,9 +143,25 @@
#include <net-snmp/net-snmp-config.h>
#ifdef solaris2
---- agent/mibgroup/util_funcs.c.dist 2003-08-26 11:37:52.000000000 +0200
-+++ agent/mibgroup/util_funcs.c 2003-08-26 11:39:00.000000000 +0200
-@@ -372,6 +372,9 @@
+Index: agent/mibgroup/ucd-snmp/vmstat_freebsd2.c
+--- agent/mibgroup/ucd-snmp/vmstat_freebsd2.c.orig 2002-05-23 10:39:41.000000000
+0200
++++ agent/mibgroup/ucd-snmp/vmstat_freebsd2.c 2004-04-06 11:02:38.000000000
+0200
+@@ -10,7 +10,11 @@
+ #include <sys/param.h>
+ #include <sys/time.h>
+ #include <sys/proc.h>
++#if defined(freebsd5) && __FreeBSD_version >= 500101
++#include <sys/resource.h>
++#else
+ #include <sys/dkstat.h>
++#endif
+ #ifdef freebsd5
+ #include <sys/bio.h>
+ #endif
+Index: agent/mibgroup/util_funcs.c
+--- agent/mibgroup/util_funcs.c.orig 2004-02-07 20:10:49.000000000 +0100
++++ agent/mibgroup/util_funcs.c 2004-04-06 11:02:38.000000000 +0200
+@@ -391,6 +391,9 @@
int fd[2][2], i, cnt;
char ctmp[STRMAX], *cptr1, *cptr2, argvs[STRMAX], **argv,
**aptr;
@@ -84,3 +171,40 @@
/*
* Setup our pipes
*/
+Index: include/net-snmp/library/system.h
+--- include/net-snmp/library/system.h.orig 2003-11-30 23:31:42.000000000 +0100
++++ include/net-snmp/library/system.h 2004-04-06 11:02:38.000000000 +0200
+@@ -114,7 +114,8 @@
+ char *strdup(const char *);
+ #endif
+ #ifndef HAVE_SETENV
+- int setenv(const char *, const char *, int);
++ int __netsnmp_setenv(const char *, const char *, int);
++# define setenv(a,b,c) __netsnmp_setenv(a,b,c)
+ #endif
+
+ int calculate_time_diff(struct timeval *,
+Index: include/net-snmp/system/freebsd.h
+--- include/net-snmp/system/freebsd.h.orig 2004-03-05 02:11:29.000000000 +0100
++++ include/net-snmp/system/freebsd.h 2004-04-06 11:27:06.000000000 +0200
+@@ -6,7 +6,7 @@
+ * udp_inpcb list symbol
+ */
+ #undef INP_NEXT_SYMBOL
+-#define INP_NEXT_SYMBOL inp_next
++#define INP_NEXT_SYMBOL inp_list.le_next
+
+ #undef TCP_TTL_SYMBOL
+ #define TCP_TTL_SYMBOL "ip_defttl"
+Index: snmplib/system.c
+--- snmplib/system.c.orig 2004-02-26 06:43:26.000000000 +0100
++++ snmplib/system.c 2004-04-06 11:02:38.000000000 +0200
+@@ -866,7 +866,7 @@
+
+ #ifndef HAVE_SETENV
+ int
+-setenv(const char *name, const char *value, int overwrite)
++__netsnmp_setenv(const char *name, const char *value, int overwrite)
+ {
+ char *cp;
+ int ret;
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/snmp/snmp.spec
============================================================================
$ cvs diff -u -r1.62 -r1.63 snmp.spec
--- openpkg-src/snmp/snmp.spec 7 Feb 2004 17:58:51 -0000 1.62
+++ openpkg-src/snmp/snmp.spec 6 Apr 2004 09:33:26 -0000 1.63
@@ -33,8 +33,8 @@
Class: PLUS
Group: Network
License: BSD
-Version: 5.0.9
-Release: 20040207
+Version: 5.1.1
+Release: 20040406
# package options
%option with_fsl yes
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]