diff options
author | Max Kalika <max@gentoo.org> | 2003-11-12 16:57:32 +0000 |
---|---|---|
committer | Max Kalika <max@gentoo.org> | 2003-11-12 16:57:32 +0000 |
commit | 89f59c7c57dcff9905d32fa3ee989bd8c6020624 (patch) | |
tree | 6bc2141fa428eebbdc85ba5e1f4a9da05b64dd77 /net-analyzer/net-snmp | |
parent | Bump to version 1.4_rc4. (diff) | |
download | historical-89f59c7c57dcff9905d32fa3ee989bd8c6020624.tar.gz historical-89f59c7c57dcff9905d32fa3ee989bd8c6020624.tar.bz2 historical-89f59c7c57dcff9905d32fa3ee989bd8c6020624.zip |
Add /proc patch from net-snmp CVS. Bump to -r3. Fixes bug 33249.
Diffstat (limited to 'net-analyzer/net-snmp')
-rw-r--r-- | net-analyzer/net-snmp/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/net-snmp/Manifest | 9 | ||||
-rw-r--r-- | net-analyzer/net-snmp/files/digest-net-snmp-5.0.9-r3 (renamed from net-analyzer/net-snmp/files/digest-net-snmp-5.0.9-r2) | 0 | ||||
-rw-r--r-- | net-analyzer/net-snmp/files/net-snmp-proc.patch | 72 | ||||
-rw-r--r-- | net-analyzer/net-snmp/net-snmp-5.0.9-r3.ebuild (renamed from net-analyzer/net-snmp/net-snmp-5.0.9-r2.ebuild) | 9 |
5 files changed, 91 insertions, 7 deletions
diff --git a/net-analyzer/net-snmp/ChangeLog b/net-analyzer/net-snmp/ChangeLog index 8e9398689187..76921f20f80f 100644 --- a/net-analyzer/net-snmp/ChangeLog +++ b/net-analyzer/net-snmp/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-analyzer/net-snmp # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.32 2003/11/01 14:38:59 gmsoft Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/ChangeLog,v 1.33 2003/11/12 16:57:31 max Exp $ + + 12 Nov 2003; <max@gentoo.org> net-snmp-5.0.9-r3.ebuild, + files/net-snmp-proc.patch: + Add /proc patch from net-snmp CVS. Bump to version 5.0.9-r3. Fixes bug 33249. 30 Oct 2003; Max Kalika <max@gentoo.org> files/snmpd.conf, files/snmpd.rc6: Add connection logging example and do away with config file settings -- snmpd @@ -39,7 +43,7 @@ *net-snmp-5.0.9-r1 (19 Sep 2003) - 1 Nov 2003; Guy Martin <gmsoft@gentoo.org> net-snmp-5.0.9-r1.ebuild : + 01 Nov 2003; Guy Martin <gmsoft@gentoo.org> net-snmp-5.0.9-r1.ebuild: Marked stable on hppa. 19 Sep 2003; Max Kalika <max@gentoo.org> net-snmp-5.0.9-r1.ebuild, diff --git a/net-analyzer/net-snmp/Manifest b/net-analyzer/net-snmp/Manifest index 45e51309702f..79e80b481084 100644 --- a/net-analyzer/net-snmp/Manifest +++ b/net-analyzer/net-snmp/Manifest @@ -1,8 +1,9 @@ -MD5 1de2e3214c2ba93283a5587831ac708b ChangeLog 5432 -MD5 9384ae7ba3e9f56b8027ea92f607042d metadata.xml 215 MD5 073e37b8ff6b958da89e55b6f741e383 net-snmp-5.0.9-r1.ebuild 1632 -MD5 031f6ccf28a5fc792760a3a695fae272 net-snmp-5.0.9-r2.ebuild 2113 +MD5 2729f61fc644fd819976e48dae868f1c net-snmp-5.0.9-r3.ebuild 2212 +MD5 ace972d30f898a5c55ae1bc61b555645 ChangeLog 5597 +MD5 9384ae7ba3e9f56b8027ea92f607042d metadata.xml 215 MD5 8cadda02e3a8f7279f531b660164c310 files/digest-net-snmp-5.0.9-r1 67 -MD5 8cadda02e3a8f7279f531b660164c310 files/digest-net-snmp-5.0.9-r2 67 +MD5 8cadda02e3a8f7279f531b660164c310 files/digest-net-snmp-5.0.9-r3 67 MD5 c663bd6122c46cec37f5c2f881b3cdd8 files/snmpd.conf 376 +MD5 1cc5b20de8fc9e7c807195c320ab2f4b files/net-snmp-proc.patch 2448 MD5 73eef100c166c3b252853e49cbd2d6df files/snmpd.rc6 489 diff --git a/net-analyzer/net-snmp/files/digest-net-snmp-5.0.9-r2 b/net-analyzer/net-snmp/files/digest-net-snmp-5.0.9-r3 index 6c16ce856e79..6c16ce856e79 100644 --- a/net-analyzer/net-snmp/files/digest-net-snmp-5.0.9-r2 +++ b/net-analyzer/net-snmp/files/digest-net-snmp-5.0.9-r3 diff --git a/net-analyzer/net-snmp/files/net-snmp-proc.patch b/net-analyzer/net-snmp/files/net-snmp-proc.patch new file mode 100644 index 000000000000..9d68b7b12cda --- /dev/null +++ b/net-analyzer/net-snmp/files/net-snmp-proc.patch @@ -0,0 +1,72 @@ +=================================================================== +RCS file: /cvsroot/net-snmp/net-snmp/agent/mibgroup/ucd-snmp/proc.c,v +retrieving revision 5.4 +retrieving revision 5.6 +diff -u -r5.4 -r5.6 +--- net-snmp/net-snmp/agent/mibgroup/ucd-snmp/proc.c 2002/12/19 15:07:33 5.4 ++++ net-snmp/net-snmp/agent/mibgroup/ucd-snmp/proc.c 2003/02/07 05:17:42 5.6 +@@ -413,13 +413,15 @@ + sh_count_procs(char *procname) + { + DIR *dir; +- char cmdline[512]; ++ char cmdline[512], *tmpc; + struct dirent *ent; + int fd,len,plen=strlen(procname),total = 0; ++ FILE *status; + + if ((dir = opendir("/proc")) == NULL) return -1; + while (NULL != (ent = readdir(dir))) { + if(!(ent->d_name[0] >= '0' && ent->d_name[0] <= '9')) continue; ++#ifdef USE_PROC_CMDLINE /* old method */ + /* read /proc/XX/cmdline */ + sprintf(cmdline,"/proc/%s/cmdline",ent->d_name); + if((fd = open(cmdline, O_RDONLY)) < 0) break; +@@ -430,6 +432,30 @@ + while(--len && !cmdline[len]); + while(--len) if(!cmdline[len]) cmdline[len] = ' '; + if(!strncmp(cmdline,procname,plen)) total++; ++#else ++ /* read /proc/XX/status */ ++ sprintf(cmdline,"/proc/%s/status",ent->d_name); ++ if ((status = fopen(cmdline, "r")) == NULL) ++ break; ++ if (fgets(cmdline, sizeof(cmdline), status) == NULL) { ++ fclose(status); ++ break; ++ } ++ fclose(status); ++ cmdline[sizeof(cmdline)-1] = '\0'; ++ /* XXX: assumes Name: is first */ ++ if (strncmp("Name:",cmdline, 5) != 0) ++ break; ++ tmpc = skip_token(cmdline); ++ if (!tmpc) ++ break; ++ DEBUGMSGTL(("proc","Comparing wanted %s against %s\n", ++ procname, tmpc)); ++ if(!strncmp(tmpc,procname,plen)) { ++ total++; ++ DEBUGMSGTL(("proc", " Matched. total count now=%d\n", total)); ++ } ++#endif + } + closedir(dir); + return total; +@@ -662,8 +688,14 @@ + /* + * Zombie process + */ +- } else if (!strcmp(procname, info.pr_fname)) +- total++; ++ } else { ++ DEBUGMSGTL(("proc","Comparing wanted %s against %s\n", ++ procname, info.pr_fname)); ++ if (!strcmp(procname, info.pr_fname)) { ++ total++; ++ DEBUGMSGTL(("proc", " Matched. total count now=%d\n", total)); ++ } ++ } + + close(fd); + } diff --git a/net-analyzer/net-snmp/net-snmp-5.0.9-r2.ebuild b/net-analyzer/net-snmp/net-snmp-5.0.9-r3.ebuild index fd5db2fb5f17..96ab7596449e 100644 --- a/net-analyzer/net-snmp/net-snmp-5.0.9-r2.ebuild +++ b/net-analyzer/net-snmp/net-snmp-5.0.9-r3.ebuild @@ -1,6 +1,8 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.0.9-r2.ebuild,v 1.5 2003/10/21 04:58:53 max Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/net-snmp/net-snmp-5.0.9-r3.ebuild,v 1.1 2003/11/12 16:57:31 max Exp $ + +inherit eutils DESCRIPTION="Software for generating and retrieving SNMP data." HOMEPAGE="http://net-snmp.sourceforge.net/" @@ -26,6 +28,11 @@ RDEPEND="${DEPEND} perl? ( X? ( dev-perl/perl-tk ) ) !virtual/snmp" +src_unpack() { + unpack ${A} && cd "${S}" + epatch "${FILESDIR}/${PN}-proc.patch" +} + src_compile() { local myconf myconf="${myconf} `use_enable perl embedded-perl`" |