[Midnightbsd-cvs] mports [22361] trunk/net-mgmt/net-snmp/files: patchset fix

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Feb 25 14:20:43 EST 2017


Revision: 22361
          http://svnweb.midnightbsd.org/mports/?rev=22361
Author:   laffer1
Date:     2017-02-25 14:20:43 -0500 (Sat, 25 Feb 2017)
Log Message:
-----------
patchset fix

Modified Paths:
--------------
    trunk/net-mgmt/net-snmp/files/extra-patch-local_Makefile.in
    trunk/net-mgmt/net-snmp/files/net-snmp.conf
    trunk/net-mgmt/net-snmp/files/pkg-message.in
    trunk/net-mgmt/net-snmp/files/snmptrapd.in

Removed Paths:
-------------
    trunk/net-mgmt/net-snmp/files/patch-agent_Makefile.in
    trunk/net-mgmt/net-snmp/files/patch-agent__auto_nlist.c
    trunk/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c
    trunk/net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swrun_kinfo.c
    trunk/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
    trunk/net-mgmt/net-snmp/files/patch-freebsd8.h
    trunk/net-mgmt/net-snmp/files/patch-freebsd9.h
    trunk/net-mgmt/net-snmp/files/patch-generic.h
    trunk/net-mgmt/net-snmp/files/patch-hr_storage.h
    trunk/net-mgmt/net-snmp/files/patch-local:fixproc
    trunk/net-mgmt/net-snmp/files/patch-local:ipf-mod.pl
    trunk/net-mgmt/net-snmp/files/patch-local:mib2c
    trunk/net-mgmt/net-snmp/files/patch-local:snmpcheck.def
    trunk/net-mgmt/net-snmp/files/patch-local:snmpconf
    trunk/net-mgmt/net-snmp/files/patch-local:tkmib
    trunk/net-mgmt/net-snmp/files/patch-local:traptoemail
    trunk/net-mgmt/net-snmp/files/patch-net-snmp-includes.h
    trunk/net-mgmt/net-snmp/files/patch-sctpScalars.h
    trunk/net-mgmt/net-snmp/files/patch-sctpTables.h
    trunk/net-mgmt/net-snmp/files/patch-sctpTables_common.h
    trunk/net-mgmt/net-snmp/files/patch-sctpTables_freebsd.c
    trunk/net-mgmt/net-snmp/files/snmpd.sh.in
    trunk/net-mgmt/net-snmp/files/test.t

Modified: trunk/net-mgmt/net-snmp/files/extra-patch-local_Makefile.in
===================================================================
--- trunk/net-mgmt/net-snmp/files/extra-patch-local_Makefile.in	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/extra-patch-local_Makefile.in	2017-02-25 19:20:43 UTC (rev 22361)
@@ -9,14 +9,3 @@
  SHELLSCRIPTS=mib2c-update
  SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
  	ipf-mod.pl.made snmpconf.made traptoemail.made snmp-bridge-mib.made \
---- local/Makefile.in.orig	2015-01-19 14:37:56 UTC
-+++ local/Makefile.in
-@@ -16,7 +16,7 @@ OTHERUNINSTALL=localuninstall
- #
- SNMPCONFPATH=@SNMPCONFPATH@
- PERSISTENT_DIRECTORY=@PERSISTENT_DIRECTORY@
--PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert
-+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert
- SHELLSCRIPTS=mib2c-update
- SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
- 	ipf-mod.pl.made snmpconf.made traptoemail.made snmp-bridge-mib.made \

Modified: trunk/net-mgmt/net-snmp/files/net-snmp.conf
===================================================================
--- trunk/net-mgmt/net-snmp/files/net-snmp.conf	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/net-snmp.conf	2017-02-25 19:20:43 UTC (rev 22361)
@@ -4,9 +4,3 @@
 #
 # logfilename          [owner:group]    mode count size when  flags [/pid_file] [sig_num]
 /var/log/snmpd.log     			644  7	   100	*     J	    /var/run/net_snmpd.pid
-# configuration file for newsyslog for net-snmp
-#
-# see newsyslog.conf(5) for details
-#
-# logfilename          [owner:group]    mode count size when  flags [/pid_file] [sig_num]
-/var/log/snmpd.log     			644  7	   100	*     J	    /var/run/net_snmpd.pid

Deleted: trunk/net-mgmt/net-snmp/files/patch-agent_Makefile.in
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-agent_Makefile.in	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-agent_Makefile.in	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,22 +0,0 @@
---- agent/Makefile.in.orig	2015-01-19 16:46:08 UTC
-+++ agent/Makefile.in
-@@ -120,7 +120,7 @@ LMIBLIBS	= @LMIBLIBS@
- VAL_LIBS	= @VAL_LIBS@
- PERLLDOPTS_FOR_APPS = @PERLLDOPTS_FOR_APPS@
- PERLLDOPTS_FOR_LIBS = @PERLLDOPTS_FOR_LIBS@
--LIBS		= $(USELIBS) @AGENTLIBS@ $(PERLLDOPTS_FOR_APPS) $(VAL_LIBS)
-+LIBS		= $(USELIBS) @AGENTLIBS@ $(PERLLDOPTS_FOR_APPS) $(VAL_LIBS) -lpkg
- OUR_AGENT_LIBS	= $(AGENTLIB) $(MIBLIB) $(LIBS) @DLLIBS@
- CPPFLAGS	= $(TOP_INCLUDES) -I. $(AGENT_INCLUDES) $(MIBGROUP_INCLUDES) \
- 		  $(SNMPLIB_INCLUDES) @CPPFLAGS@ 
---- agent/Makefile.in.orig	2015-01-19 16:46:08 UTC
-+++ agent/Makefile.in
-@@ -120,7 +120,7 @@ LMIBLIBS	= @LMIBLIBS@
- VAL_LIBS	= @VAL_LIBS@
- PERLLDOPTS_FOR_APPS = @PERLLDOPTS_FOR_APPS@
- PERLLDOPTS_FOR_LIBS = @PERLLDOPTS_FOR_LIBS@
--LIBS		= $(USELIBS) @AGENTLIBS@ $(PERLLDOPTS_FOR_APPS) $(VAL_LIBS)
-+LIBS		= $(USELIBS) @AGENTLIBS@ $(PERLLDOPTS_FOR_APPS) $(VAL_LIBS) -lpkg
- OUR_AGENT_LIBS	= $(AGENTLIB) $(MIBLIB) $(LIBS) @DLLIBS@
- CPPFLAGS	= $(TOP_INCLUDES) -I. $(AGENT_INCLUDES) $(MIBGROUP_INCLUDES) \
- 		  $(SNMPLIB_INCLUDES) @CPPFLAGS@ 

Deleted: trunk/net-mgmt/net-snmp/files/patch-agent__auto_nlist.c
===================================================================
Deleted: trunk/net-mgmt/net-snmp/files/patch-agent__mibgroup__agent__extend.c
===================================================================
Deleted: trunk/net-mgmt/net-snmp/files/patch-agent__mibgroup__host__data_access__swrun_kinfo.c
===================================================================
Deleted: trunk/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,36 +0,0 @@
---- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig	2008-05-27 21:47:30.000000000 +0900
-+++ agent/mibgroup/hardware/cpu/cpu_sysctl.c	2008-11-14 16:41:12.000000000 +0900
-@@ -16,6 +16,8 @@
- #if !defined(CPUSTATES)
- #include <sys/dkstat.h>
- #endif
-+#elif defined(__FreeBSD__)
-+#define NETSNMP_KERN_CPU  0               /* FreeBSD - dummy value, sysctlnametomib(2) should be used */
- #else
- #include <sys/sched.h>
- #endif
-@@ -117,7 +119,7 @@
-     #define NS_VM_SWAPIN	v_swapin
-     #define NS_VM_SWAPOUT	v_swapout
- 
--#elif defined(VM_METER)                   /* OpenBSD, NetBSD */
-+#elif defined(VM_METER) && !defined(__FreeBSD__)                   /* OpenBSD, NetBSD */
- #define NETSNMP_VM_STATS       VM_METER
- #define NETSNMP_VM_STATS_TYPE  struct vmtotal
- 
-@@ -130,6 +132,15 @@
-     #undef  NS_VM_PAGEOUT
-     #define NS_VM_SWAPIN	v_swpin
-     #define NS_VM_SWAPOUT	v_swpout
-+#elif defined(__FreeBSD__)                   /* FreeBSD */
-+#define NETSNMP_VM_STATS       VM_METER
-+#define NETSNMP_VM_STATS_TYPE  struct vmmeter
-+    #define NS_VM_INTR          v_intr
-+    #define NS_VM_SWTCH         v_swtch
-+    #define NS_VM_PAGEIN        v_swappgsin
-+    #define NS_VM_PAGEOUT       v_swappgsout
-+    #define NS_VM_SWAPIN        v_swapin
-+    #define NS_VM_SWAPOUT       v_swapout
- #endif
- 
- 

Deleted: trunk/net-mgmt/net-snmp/files/patch-freebsd8.h
===================================================================
Deleted: trunk/net-mgmt/net-snmp/files/patch-freebsd9.h
===================================================================
Deleted: trunk/net-mgmt/net-snmp/files/patch-generic.h
===================================================================
Deleted: trunk/net-mgmt/net-snmp/files/patch-hr_storage.h
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-hr_storage.h	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-hr_storage.h	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,11 +0,0 @@
---- agent/mibgroup/host/hr_storage.h.orig	Tue Feb 25 22:17:48 2003
-+++ agent/mibgroup/host/hr_storage.h	Wed May  5 15:27:40 2004
-@@ -12,6 +12,7 @@
- #define	HRS_TYPE_MBUF		1
- #define	HRS_TYPE_MEM		2
- #define	HRS_TYPE_SWAP		3
--#define	HRS_TYPE_FIXED_MAX	3     /* the largest fixed type */
-+#define	HRS_TYPE_MBUFCLUSTER	4
-+#define	HRS_TYPE_FIXED_MAX	4     /* the largest fixed type */
- 
- #endif                          /* _MIBGROUP_HRSTORAGE_H */

Deleted: trunk/net-mgmt/net-snmp/files/patch-local:fixproc
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-local:fixproc	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-local:fixproc	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,90 +0,0 @@
---- local/fixproc.orig	Wed May 25 01:23:54 2005
-+++ local/fixproc	Wed Nov 30 12:16:05 2005
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl
-+#!%%PERL%%
- # 
- # fixproc [-min n] [-max n] [-check | -kill | -restart | -exist | -fix] proc ...
- # 
-@@ -131,7 +131,7 @@
- 
- use File::Temp qw(tempfile);
- 
--$database_file = '/local/etc/fixproc.conf';
-+$database_file = '%%PREFIX%%/etc/fixproc.conf';
- 
- $debug = 0;			# specify debug level using -dN
- 				# currently defined: -d1
-@@ -157,6 +157,14 @@
- $shell_header = "#!/bin/sh\n";
- $shell_end_marker = 'shell_end_marker';
- 
-+open(command, "/bin/ps -p $$ |") || die "$0: can't run ps command\n";
-+if (split(' ', <command>) > 4) {
-+        $ps_opts = 'ax';
-+} else {
-+	$ps_opts = '-e';
-+}
-+close command;
-+
- &read_args();
- &read_database();
- # &dump_database();		# debug only
-@@ -305,41 +313,47 @@
- 
-   # first try kill
-   $! = $fixproc_error;
--  open (COMMAND, "/bin/ps -e | /bin/grep $proc |")
-+  open (COMMAND, "/bin/ps $ps_opts |")
-     || die "$0: can't run ps-grep-awk command\n";
-   while (<COMMAND>)
-     {
--      # match the first field of ps -e
-+     if /$proc/ {
-+      # match the first field of ps $ps_opts
-       $! = $fixproc_error;
--      /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
--      system "kill $1";
-+      /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
-+      kill 15, $1;
-+     }
-     }
-+  close COMMAND;
- 
-   # if process still exist, try kill -9
-   sleep 2;
-   $! = $fixproc_error;
--  open (COMMAND, "/bin/ps -e | /bin/grep $proc |")
-+  open (COMMAND, "/bin/ps $ps_opts |")
-     || die "$0: can't run ps-grep-awk command\n";
-   $second_kill_needed = 0;
-   while (<COMMAND>)
-     {
--      # match the first field of ps -e
-+     if /$proc/ {
-+      # match the first field of ps $ps_opts
-       $! = $fixproc_error;
--      /^\s*(\d+)\s/ || die "$0: can't match ps -e output\n";
--      system "kill -9 $1";
-+      /^\s*(\d+)\s/ || die "$0: can't match ps $ps_opts output\n";
-+      kill 9, $1;
-       $second_kill_needed = 1;
-     }
-+  close COMMAND;
-   return ($no_error) if ($second_kill_needed == 0);
- 
-   # see if kill -9 worked
-   sleep 2;
-   $! = $fixproc_error;
--  open (COMMAND, "/bin/ps -e | /bin/grep $proc |")
-+  open (COMMAND, "/bin/ps $ps_opts |")
-     || die "$0: can't run ps-grep-awk command\n";
-   while (<COMMAND>)
-     {				# a process still exist, return error
--      return $cannot_kill_error;
-+      return $cannot_kill_error if /$proc/;
-     }
-+  close COMMAND;
-   return $no_error;		# good, all dead
- }
- 

Deleted: trunk/net-mgmt/net-snmp/files/patch-local:ipf-mod.pl
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-local:ipf-mod.pl	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-local:ipf-mod.pl	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,21 +0,0 @@
---- local/ipf-mod.pl.orig	Thu May 29 05:30:19 2003
-+++ local/ipf-mod.pl	Thu May 29 05:40:13 2003
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl -s
-+#!%%PERL%% -s
- ##
- ## IP Filter UCD-SNMP pass module
- ##
-@@ -9,10 +9,10 @@
- ## Date: $ Tue Dec  1 10:24:08 EET 1998 $
- ## Version: 1.1a
- 
--# Put this file in /usr/local/bin/ipf-mod.pl and then add the following 
-+# Put this file in %%PREFIX%%/bin/ipf-mod.pl and then add the following 
- # line to your snmpd.conf file (without the # at the front):
- #
--#   pass .1.3.6.1.4.1.2021.13.2 /usr/local/bin/ipf-mod.pl
-+#   pass .1.3.6.1.4.1.2021.13.2 %%PREFIX%%/bin/ipf-mod.pl
- 
- # enterprises.ucdavis.ucdExperimental.ipFilter	= .1.3.6.1.4.1.2021.13.2
- # ipfInTable.ipfInEntry.ipfInIndex		integer	= 1.1.1

Deleted: trunk/net-mgmt/net-snmp/files/patch-local:mib2c
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-local:mib2c	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-local:mib2c	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,21 +0,0 @@
---- local/mib2c.orig	Fri Sep 10 21:30:15 2004
-+++ local/mib2c	Mon Oct 25 08:38:30 2004
-@@ -1,5 +1,4 @@
--#!/usr/bin/perl
--#!/usr/bin/perl -w
-+#!%%PERL%%
- 
- #
- # $Id: patch-local:mib2c,v 1.1 2007-01-25 21:39:21 laffer1 Exp $
-@@ -60,8 +59,9 @@
- if($ENV{MIB2C_DIR}) {
-    push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR});
- }
--push @def_search_dirs, "/usr/local/share/snmp/";
--push @def_search_dirs, "/usr/local/share/snmp/mib2c-data";
-+push @def_search_dirs, "%%PREFIX%%/share/snmp/";
-+push @def_search_dirs, "%%PREFIX%%/etc/snmp/";
-+push @def_search_dirs, "%%PREFIX%%/share/snmp/mib2c-data";
- push @def_search_dirs, "./mib2c-conf.d";
- 
- sub usage {

Deleted: trunk/net-mgmt/net-snmp/files/patch-local:snmpcheck.def
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-local:snmpcheck.def	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-local:snmpcheck.def	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,8 +0,0 @@
---- local/snmpcheck.def.orig	Thu May 29 05:28:22 2003
-+++ local/snmpcheck.def	Thu May 29 05:29:49 2003
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl -w
-+#!%%PERL%% -w
- 
- use strict 'refs';
- require Net::Ping;

Deleted: trunk/net-mgmt/net-snmp/files/patch-local:snmpconf
===================================================================
Deleted: trunk/net-mgmt/net-snmp/files/patch-local:tkmib
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-local:tkmib	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-local:tkmib	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,9 +0,0 @@
---- local/tkmib.orig	Thu May 29 05:30:19 2003
-+++ local/tkmib	Thu May 29 05:31:46 2003
-@@ -1,5 +1,4 @@
--#!/usr/bin/perl
--#!/usr/bin/perl -w
-+#!%%PERL%% -w
- 
- require 5;
- 

Deleted: trunk/net-mgmt/net-snmp/files/patch-local:traptoemail
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-local:traptoemail	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-local:traptoemail	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,16 +0,0 @@
---- local/traptoemail.orig	Thu May 29 05:30:19 2003
-+++ local/traptoemail	Thu May 29 05:35:13 2003
-@@ -1,11 +1,11 @@
--#!/usr/bin/perl
-+#!%%PERL%%
- 
- # This is a snmptrapd handler script to convert snmp traps into email
- # messages.
- 
- # Usage:
- # Put a line like the following in your snmptrapd.conf file:
--#  traphandle TRAPOID|default /usr/local/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
-+#  traphandle TRAPOID|default %%PREFIX%%/bin/traptoemail [-f FROM] [-s SMTPSERVER]b ADDRESSES
- #     FROM defaults to "root"
- #     SMTPSERVER defaults to "localhost"
- 

Deleted: trunk/net-mgmt/net-snmp/files/patch-net-snmp-includes.h
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-net-snmp-includes.h	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-net-snmp-includes.h	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,13 +0,0 @@
---- include/net-snmp/net-snmp-includes.h.orig	Mon Jan 24 08:24:47 2005
-+++ include/net-snmp/net-snmp-includes.h	Mon Jan 24 08:25:11 2005
-@@ -49,6 +49,10 @@
- # endif
- #endif
- 
-+#if HAVE_UNISTD_H
-+#include <unistd.h>
-+#endif
-+
- /*
-  * Must be right after system headers, but before library code for best usage 
-  */

Deleted: trunk/net-mgmt/net-snmp/files/patch-sctpScalars.h
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-sctpScalars.h	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-sctpScalars.h	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,11 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpScalars.h.orig	2009-04-08 12:29:04.000000000 -0300
-+++ agent/mibgroup/sctp-mib/sctpScalars.h	2010-06-01 11:02:56.000000000 -0300
-@@ -7,7 +7,7 @@
- config_require(sctp-mib/sctpScalars_common)
- #if defined( linux )
- config_require(sctp-mib/sctpScalars_linux)
--#elif defined( freebsd8 ) || defined ( freebsd7 )
-+#elif defined( freebsd9 ) || defined( freebsd8 ) || defined ( freebsd7 )
- config_require(sctp-mib/sctpScalars_freebsd)	 
- #else
- /*

Deleted: trunk/net-mgmt/net-snmp/files/patch-sctpTables.h
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-sctpTables.h	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-sctpTables.h	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,11 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpTables.h.orig	2010-06-01 10:57:14.000000000 -0300
-+++ agent/mibgroup/sctp-mib/sctpTables.h	2010-06-01 10:17:28.000000000 -0300
-@@ -15,7 +15,7 @@
- #if defined( linux )
- config_require(sctp-mib/sctpTables_linux)
- config_require(util_funcs/get_pid_from_inode)
--#elif defined( freebsd7 ) || defined( freebsd8 )
-+#elif defined( freebsd7 ) || defined( freebsd8 ) || defined( freebsd9 )
- config_require(sctp-mib/sctpTables_freebsd)
- #else
- config_error(SCTP-MIB is not available in tihs environment)

Deleted: trunk/net-mgmt/net-snmp/files/patch-sctpTables_common.h
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-sctpTables_common.h	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-sctpTables_common.h	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,11 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpTables_common.h.orig	2010-06-01 10:58:20.000000000 -0300
-+++ agent/mibgroup/sctp-mib/sctpTables_common.h	2010-06-01 10:18:02.000000000 -0300
-@@ -1,7 +1,7 @@
- #ifndef SCTP_TABLES_COMMON_H
- #define SCTP_TABLES_COMMON_H
- 
--#if defined(freebsd8) || defined(freebsd7)
-+#if defined(freebsd9) || defined(freebsd8) || defined(freebsd7)
- #define netsnmp_table_registration_info_free SNMP_FREE
- #endif
- 

Deleted: trunk/net-mgmt/net-snmp/files/patch-sctpTables_freebsd.c
===================================================================
--- trunk/net-mgmt/net-snmp/files/patch-sctpTables_freebsd.c	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/patch-sctpTables_freebsd.c	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,252 +0,0 @@
---- agent/mibgroup/sctp-mib/sctpTables_freebsd.c.orig	2009-03-07 23:31:54.000000000 +0900
-+++ agent/mibgroup/sctp-mib/sctpTables_freebsd.c	2009-03-07 23:55:04.000000000 +0900
-@@ -0,0 +1,249 @@
-+#include <net-snmp/net-snmp-config.h>
-+#include <net-snmp/net-snmp-includes.h>
-+#include <net-snmp/agent/net-snmp-agent-includes.h>
-+
-+#include "sctpAssocTable.h"
-+#include "sctpAssocLocalAddrTable.h"
-+#include "sctpAssocRemAddrTable.h"
-+#include "sctpTables_common.h"
-+
-+#include <util_funcs.h>
-+
-+#include <stdio.h>
-+#include <errno.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#include <stdint.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <netinet/sctp.h>
-+#include <netinet/sctp_constants.h>
-+
-+
-+static int
-+parse_assoc_local_addresses(sctpTables_containers * containers,
-+							struct xsctp_laddr *xladdr)
-+{
-+  int ret;
-+  sctpAssocLocalAddrTable_entry *entry;
-+  entry = sctpAssocLocalAddrTable_entry_create();
-+  if (entry == NULL)
-+	return SNMP_ERR_GENERR;
-+
-+  entry->sctpAssocId = 0;
-+  if (xladdr->address.sa.sa_family == AF_INET) {
-+	entry->sctpAssocLocalAddrType = INETADDRESSTYPE_IPV4;
-+	entry->sctpAssocLocalAddr_len = 4;
-+	memcpy(entry->sctpAssocLocalAddr,
-+		   &xladdr->address.sin.sin_addr,
-+		   entry->sctpAssocLocalAddr_len);
-+  } else if (xladdr->address.sa.sa_family == AF_INET6) {
-+	entry->sctpAssocLocalAddrType = INETADDRESSTYPE_IPV6;
-+	entry->sctpAssocLocalAddr_len = 16;
-+	memcpy(entry->sctpAssocLocalAddr,
-+		   &xladdr->address.sin6.sin6_addr,
-+		   entry->sctpAssocLocalAddr_len);
-+  }
-+  entry->sctpAssocLocalAddrStartTime = xladdr->start_time.tv_sec;
-+  ret = sctpAssocLocalAddrTable_add_or_update(containers->sctpAssocLocalAddrTable,
-+											  entry);
-+  if (ret != SNMP_ERR_NOERROR)
-+	return SNMP_ERR_GENERR;
-+
-+  return SNMP_ERR_NOERROR;
-+}
-+
-+static int
-+parse_assoc_xstcb(sctpTables_containers * containers, struct xsctp_tcb *xstcb)
-+{
-+  long            inode;
-+  char           *token;
-+  int             ret;
-+  sctpAssocTable_entry *entry;
-+
-+  entry = sctpAssocTable_entry_create();
-+  if (entry == NULL)
-+	return SNMP_ERR_GENERR;
-+
-+  switch (xstcb->state) {
-+  case SCTP_STATE_INUSE:
-+	entry->sctpAssocState = SCTPASSOCSTATE_DELETETCB;
-+	break;
-+  case SCTP_STATE_COOKIE_WAIT:
-+	entry->sctpAssocState = SCTPASSOCSTATE_COOKIEWAIT;
-+	break;
-+  case SCTP_STATE_COOKIE_ECHOED:
-+	entry->sctpAssocState = SCTPASSOCSTATE_COOKIEECHOED;
-+	break;
-+  case SCTP_STATE_OPEN:
-+	entry->sctpAssocState = SCTPASSOCSTATE_ESTABLISHED;
-+	break;
-+  case SCTP_STATE_SHUTDOWN_SENT:
-+	entry->sctpAssocState = SCTPASSOCSTATE_SHUTDOWNSENT;
-+	break;
-+  case SCTP_STATE_SHUTDOWN_RECEIVED:
-+	entry->sctpAssocState = SCTPASSOCSTATE_SHUTDOWNRECEIVED;
-+	break;
-+  case SCTP_STATE_SHUTDOWN_ACK_SENT:
-+	entry->sctpAssocState = SCTPASSOCSTATE_SHUTDOWNACKSENT;
-+	break;
-+  default:
-+  case SCTP_STATE_EMPTY:
-+	entry->sctpAssocState = SCTPASSOCSTATE_CLOSED;
-+	break;
-+  };
-+  entry->sctpAssocHeartBeatInterval = xstcb->heartbeat_interval;
-+  entry->sctpAssocId = 0;
-+  entry->sctpAssocPrimProcess = xstcb->primary_process;
-+  entry->sctpAssocLocalPort = xstcb->local_port;
-+  entry->sctpAssocRemPort = xstcb->remote_port;
-+  entry->sctpAssocHeartBeatInterval = xstcb->heartbeat_interval;
-+  entry->sctpAssocInStreams = xstcb->in_streams;
-+  entry->sctpAssocOutStreams = xstcb->out_streams;
-+  entry->sctpAssocMaxRetr = xstcb->max_nr_retrans;
-+  entry->sctpAssocT1expireds = xstcb->T1_expireries;
-+  entry->sctpAssocRtxChunks = xstcb->retransmitted_tsns;
-+  entry->sctpAssocT2expireds = xstcb->T2_expireries; 
-+  entry->sctpAssocRemHostName[0] = 0;
-+  entry->sctpAssocRemHostName_len = 0;
-+  entry->sctpAssocDiscontinuityTime = xstcb->discontinuity_time.tv_sec;
-+  entry->sctpAssocStartTime = xstcb->start_time.tv_sec;	
-+
-+  ret = sctpAssocTable_add_or_update(containers->sctpAssocTable, entry);
-+  if (ret != SNMP_ERR_NOERROR) {
-+	return ret;
-+  }
-+
-+  return SNMP_ERR_NOERROR;
-+}
-+
-+
-+static int
-+parse_remaddr_xraddr(sctpTables_containers * containers,
-+					 struct xsctp_raddr *xraddr)
-+{
-+  char           *token;
-+  int             ret;
-+  sctpAssocRemAddrTable_entry *entry;
-+
-+  entry = sctpAssocRemAddrTable_entry_create();
-+  if (entry == NULL)
-+	return SNMP_ERR_GENERR;
-+
-+	
-+  entry->sctpAssocId = 0;
-+
-+  if(xraddr->active) 
-+    entry->sctpAssocRemAddrActive = TRUTHVALUE_TRUE;
-+  else
-+	entry->sctpAssocRemAddrActive = TRUTHVALUE_FALSE;
-+  
-+  if (xraddr->heartbeat_enabled) 
-+	entry->sctpAssocRemAddrHBActive = TRUTHVALUE_TRUE;
-+  else
-+	entry->sctpAssocRemAddrHBActive = TRUTHVALUE_FALSE;
-+
-+  entry->sctpAssocRemAddrRTO = xraddr->rto;
-+  entry->sctpAssocRemAddrMaxPathRtx = xraddr->max_path_rtx;
-+  entry->sctpAssocRemAddrRtx = xraddr->rtx;
-+  entry->sctpAssocRemAddrStartTime = xraddr->start_time.tv_sec;
-+
-+  if (xraddr->address.sa.sa_family == AF_INET) {
-+	entry->sctpAssocRemAddrType = INETADDRESSTYPE_IPV4;
-+	entry->sctpAssocRemAddr_len = 4;
-+	memcpy(entry->sctpAssocRemAddr,
-+		   &xraddr->address.sin.sin_addr,
-+		   entry->sctpAssocRemAddr_len);
-+  } else if (xraddr->address.sa.sa_family == AF_INET6) {
-+	entry->sctpAssocRemAddrType = INETADDRESSTYPE_IPV6;
-+	entry->sctpAssocRemAddr_len = 16;
-+	memcpy(entry->sctpAssocRemAddr,
-+		   &xraddr->address.sin6.sin6_addr,
-+		   entry->sctpAssocRemAddr_len);
-+  }
-+  ret =
-+	sctpAssocRemAddrTable_add_or_update(containers->
-+										sctpAssocRemAddrTable, entry);
-+  if (ret != SNMP_ERR_NOERROR) {
-+	return ret;
-+  }
-+  return SNMP_ERR_NOERROR;
-+}
-+
-+
-+int
-+sctpTables_arch_load(sctpTables_containers * containers, u_long * flags)
-+{
-+  int             ret = SNMP_ERR_NOERROR;
-+  size_t len;
-+  caddr_t buf;
-+  unsigned int offset;
-+  struct xsctp_inpcb *xinp;
-+  struct xsctp_tcb *xstcb;
-+  struct xsctp_laddr *xladdr;
-+  struct xsctp_raddr *xraddr;
-+  sa_family_t family;
-+  void *addr;
-+
-+
-+  *flags |= SCTP_TABLES_LOAD_FLAG_DELETE_INVALID;
-+  *flags |= SCTP_TABLES_LOAD_FLAG_AUTO_LOOKUP;
-+  len = 0;
-+  if (sysctlbyname("net.inet.sctp.assoclist", 0, &len, 0, 0) < 0) {
-+	printf("Error %d (%s) could not get the assoclist\n", errno, strerror(errno));
-+	return(-1);
-+  }
-+  if ((buf = (caddr_t)malloc(len)) == 0) {
-+	printf("malloc %lu bytes failed.\n", (long unsigned)len);
-+	return(-1);
-+  }
-+  if (sysctlbyname("net.inet.sctp.assoclist", buf, &len, 0, 0) < 0) {
-+	printf("Error %d (%s) could not get the assoclist\n", errno, strerror(errno));
-+	free(buf);
-+	return(-1);
-+  }
-+  offset = 0;
-+  xinp = (struct xsctp_inpcb *)(buf + offset);
-+  while (xinp->last == 0) {
-+	/* for each INP */
-+	offset += sizeof(struct xsctp_inpcb);
-+	/* Local addresses */
-+	xladdr = (struct xsctp_laddr *)(buf + offset);
-+	while (xladdr->last == 0) {
-+	  offset += sizeof(struct xsctp_laddr);
-+	  xladdr = (struct xsctp_laddr *)(buf + offset);
-+	}
-+	offset += sizeof(struct xsctp_laddr);
-+	/* Associations */
-+	xstcb = (struct xsctp_tcb *)(buf + offset);
-+	while (xstcb->last == 0) {
-+	  xstcb = (struct xsctp_tcb *)(buf + offset);
-+	  offset += sizeof(struct xsctp_tcb);
-+	  parse_assoc_xstcb(containers, xstcb);
-+	  /* Local addresses */
-+	  xladdr = (struct xsctp_laddr *)(buf + offset);
-+	  while (xladdr->last == 0) {
-+		parse_assoc_local_addresses(containers, xladdr);
-+		offset += sizeof(struct xsctp_laddr);
-+		xladdr = (struct xsctp_laddr *)(buf + offset);
-+	  }
-+	  offset += sizeof(struct xsctp_laddr);
-+
-+	  /* Remote addresses */
-+	  xraddr = (struct xsctp_raddr *)(buf + offset);
-+	  while (xraddr->last == 0) {
-+		parse_remaddr_xraddr(containers, xraddr);
-+		offset += sizeof(struct xsctp_raddr);
-+		xraddr = (struct xsctp_raddr *)(buf + offset);
-+	  }
-+	  offset += sizeof(struct xsctp_raddr);
-+	  xstcb = (struct xsctp_tcb *)(buf + offset);
-+	}
-+	offset += sizeof(struct xsctp_tcb);
-+	xinp = (struct xsctp_inpcb *)(buf + offset);
-+  }
-+  free((void *)buf);
-+  return ret;
-+}

Modified: trunk/net-mgmt/net-snmp/files/pkg-message.in
===================================================================
--- trunk/net-mgmt/net-snmp/files/pkg-message.in	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/pkg-message.in	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,7 +1,7 @@
-**** This port installs snmp daemon, header files and libraries but don't
-     invokes snmpd by default.
-     If you want to invoke snmpd and/or snmptrapd at startup, put these
-     lines into /etc/rc.conf.
+**** This port installs snmpd, header files and libraries but does not
+     start snmpd by default.
+     If you want to auto-start snmpd and snmptrapd:, add the following to
+     /etc/rc.conf:
 
 	snmpd_enable="YES"
 	snmpd_flags="-a"
@@ -9,9 +9,9 @@
 	snmptrapd_enable="YES"
 	snmptrapd_flags="-a -p /var/run/snmptrapd.pid"
 
-**** You may specify the following make variables:
+**** You may also specify the following make variables:
 
-	NET_SNMP_SYS_CONTACT="zi at FreeBSD.org"
+	NET_SNMP_SYS_CONTACT=""
 	NET_SNMP_SYS_LOCATION="USA"
 	DEFAULT_SNMP_VERSION=3
 	NET_SNMP_MIB_MODULES="host smux mibII/mta_sendmail ucd-snmp/diskio"
@@ -18,10 +18,10 @@
 	NET_SNMP_LOGFILE=/var/log/snmpd.log
 	NET_SNMP_PERSISTENTDIR=/var/net-snmp
 
-     to define default values (or overwriting defaults).  At least
-     setting first two variables, you will not be prompted during
-     configuration process.  You may also set
+     to define default values (or to override the defaults).  To avoid being
+     prompted during the configuration process, you should (minimally) define
+     the first two variables. (NET_SNMP_SYS_*)
 
+     You may also define the following to avoid all interactive configuration:
+
 	BATCH="yes"
-
-     to avoid interactive configuration.

Deleted: trunk/net-mgmt/net-snmp/files/snmpd.sh.in
===================================================================
--- trunk/net-mgmt/net-snmp/files/snmpd.sh.in	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/snmpd.sh.in	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,80 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/net-mgmt/net-snmp/files/snmpd.sh.in,v 1.9 2010/03/27 00:14:24 dougb Exp $
-#
-# PROVIDE: snmpd
-# REQUIRE: DAEMON
-#
-# Add the following line to /etc/rc.conf to enable snmpd:
-#
-# snmpd_enable="YES"
-# snmpd_flags="<set as needed>"
-#
-
-snmpd_enable=${snmpd_enable-"NO"}
-snmpd_pidfile=${snmpd_pidfile-"/var/run/snmpd.pid"}
-snmpd_conffile=${snmpd_conffile-""}
-snmpd_flush_cache=${snmpd_flush_cache-"NO"}
-
-. /etc/rc.subr
-
-load_rc_config net_snmpd
-
-if [ ! -z "$net_snmpd_enable" ]; then
-    echo "Warning: \$net_snmpd_enable is obsoleted."
-    echo "         Use \$snmpd_enable instead."
-    snmpd_enable="$net_snmpd_enable"
-    [ ! -z "$net_snmpd_flags" ] && snmpd_flags="$net_snmpd_flags"
-fi
-
-name=snmpd
-rcvar=`set_rcvar`
-
-command=%%PREFIX%%/sbin/${name}
-pidfile=${snmpd_pidfile}
-start_precmd=snmpd_precmd
-
-load_rc_config ${name}
-
-snmpd_precmd () {
-    if checkyesno snmpd_flush_cache; then
-	rm -vf /var/net-snmp/.snmp-exec-cache
-    fi
-}
-
-case "${snmpd_flags}" in
-*-p\ *)
-	echo "Warning: \$snmpd_flags includes -p option." \
-		"Please use \$snmpd_pidfile instead."
-	;;
-*)
-	snmpd_flags="-p ${snmpd_pidfile} ${snmpd_flags}"
-	;;
-esac
-
-for conffile in ${snmpd_conffile}; do
-	if [ ! -z ${conffile} -a -f ${conffile} ]; then
-	       if [ -z ${snmpd_conffile_set} ]; then
-		       snmpd_conffile_set="${conffile}"
-	       else
-		       snmpd_conffile_set="${snmpd_conffile_set},${conffile}"
-	       fi
-	else
-	       echo "snmpd configuration file $conffile not set or not found."
-	       exit 1
-	fi
-done
-
-case "${snmpd_flags}" in
-*-c\ *)
-	echo "Warning: \$snmpd_flags includes -c option." \
-		"Please use \$snmpd_conffile instead."
-	;;
-*)
-	if [ ! -z "${snmpd_conffile_set}" ]; then
-		snmpd_flags="-c ${snmpd_conffile_set} ${snmpd_flags}"
-	fi
-	;;
-esac
-
-run_rc_command "$1"

Modified: trunk/net-mgmt/net-snmp/files/snmptrapd.in
===================================================================
--- trunk/net-mgmt/net-snmp/files/snmptrapd.in	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/snmptrapd.in	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD$
+# $FreeBSD: head/net-mgmt/net-snmp/files/snmptrapd.in 340872 2014-01-24 00:14:07Z mat $
 #
 # PROVIDE: snmptrapd
 # REQUIRE: DAEMON

Deleted: trunk/net-mgmt/net-snmp/files/test.t
===================================================================
--- trunk/net-mgmt/net-snmp/files/test.t	2017-02-25 19:20:04 UTC (rev 22360)
+++ trunk/net-mgmt/net-snmp/files/test.t	2017-02-25 19:20:43 UTC (rev 22361)
@@ -1,12 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $FreeBSD$
-
-use strict;
-use Test::More tests => 1;
-
-my $cmd = 'snmpwalk -c public -v 1 localhost';
-
-# ports/86572
-my $output = `$cmd hrSWRunType`;
-like($output, qr/operatingSystem/, 'hrSWRunType');



More information about the Midnightbsd-cvs mailing list