On 2010/05/19 14:34, Johan Karlsson wrote:
> Hi! Sorry for the late reply,
> 
> Today I tried the patch on the 4.7 release.
> 
> Patch output:

your mail client mangled the diff.

you could try cleaning your port, fetching a copy of the diff from a
web archive e.g. http://marc.info/?l=openbsd-ports&m=127041568724559&q=raw
and reapplying.

however, first can you please confirm that 64-bit counters are not
already available? looks like support was already added...


PatchSet 23
Date: 2007/09/26 21:03:42
Author: rui
Branch: HEAD
Tag: (none)
Log:
update net-snmp to 5.4.1, also adds a patch from claudio@ to allow 64bit
network counters.
Changelog: http://net-snmp.sourceforge.net/about/ChangeLog.html

tested by Graeme Lee, ok mbalmer@







> ---
> 
> Patching file Makefile using Plan A...
> Hunk #1 succeeded at 6.
> Hunk #2 succeeded at 38.
> Hmm...  The next patch looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
> |Index: patches/patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c
> |===================================================================
> |RCS file: 
> /cvs/ports/net/net-snmp/patches/patch-agent_mibgroup_if-mib_data_access_interface_sysctl_
>                c,v
> |retrieving revision 1.1
> |diff -u -p -r1.1 patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c
> |--- patches/patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c 26 
> Sep 2007 20:03:42 -0000                     1.1
> |+++ patches/patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c 13 
> Mar 2010 01:32:38 -0000
> --------------------------
> Patching file 
> patches/patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c using Plan 
> A...
> Hunk #1 succeeded at 1.
> Hmm...  Ignoring the trailing garbage.
> done
> 
> ---
> 
> But the make fails:
> 
> ---
> 
> ===>  Patching for net-snmp-5.4.2.1
> patch: **** malformed patch at line 5: *spee  #endif
> ***>   patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c did not 
> apply cleanly
> ===>   Ignoring patchfile 
> patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c.orig
> *** Error code 1
> 
> ---
> 
> Regards,
> Johan
> 
> -----Original Message-----
> From: Stuart Henderson [mailto:s...@spacehopper.org] 
> Sent: den 4 april 2010 23:11
> To: Johan Karlsson; ports@openbsd.org
> Subject: Re: net-snmp 64bit interface counters
> 
> did anyone interested in 64-bit counters for net-snmp try this?
> 
> On 2010/03/13 01:35, Stuart Henderson wrote:
> > On 2010/03/12 23:45, Stuart Henderson wrote:
> > > On 2010/03/12 14:26, J.C. Roberts wrote:
> > > > On Thu, 11 Mar 2010 17:27:12 +0100 Johan Karlsson 
> > > > <johan.karls...@deltamanagement.se> wrote:
> > > > 
> > > > > I've synced the ports tree from -current and added 
> > > > > "--enable-mfd-rewrites" to the CONFIGURE_ARGS variable in the 
> > > > > net-snmp (net-snmp-5.4.2.1p3) port's Makefile.
> > > 
> > > do you specifically need Net-SNMP? snmpd in base (/usr/sbin/snmpd) 
> > > works fine with 64-bit counters and a few other things (I 
> > > particularly like interface descriptions from 'ifconfig xxx descr').
> > > 
> > > > > 
> > > > > But the compilation fails:
> > > > 
> > > > http://www.openbsd.org/faq/faq15.html#NoFun
> > > 
> > > I think it's more than that, these things happen on -current too if 
> > > you try and enable 64-bit counters.
> > > 
> > 
> > untested, but this diff at least makes it build.
> > 
> > (there is also a 5.5 release and a 5.4.3 release candidate, if 
> > anyone's interested in looking at them mail me, I don't have them 
> > building yet but have diffs which will get you part-way..)
> > 
> 
> ? .todo
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/net-snmp/Makefile,v
> retrieving revision 1.42
> diff -u -p -r1.42 Makefile
> --- Makefile  9 Feb 2010 12:23:59 -0000       1.42
> +++ Makefile  13 Mar 2010 01:32:38 -0000
> @@ -6,7 +6,7 @@ COMMENT-tkmib=        graphical SNMP MIB browse
>  
>  V=           5.4.2.1
>  DISTNAME=    net-snmp-${V}
> -PKGNAME-main=        ${DISTNAME}p3
> +PKGNAME-main=        ${DISTNAME}p4
>  PKGNAME-perl=        p5-SNMP-${V}p1
>  PKGNAME-tkmib=       net-snmp-tkmib-${V}
>  SHARED_LIBS= netsnmp         8.0     \
> @@ -38,6 +38,7 @@ USE_LIBTOOL=        Yes
>  CONFIGURE_STYLE= gnu
>  CONFIGURE_ARGS=      ${CONFIGURE_SHARED} \
>       --enable-ipv6 \
> +     --enable-mfd-rewrites \
>       --with-libwrap \
>       --with-perl-modules \
>       --with-copy-persistent-files="no" \
> Index: patches/patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c
> ===================================================================
> RCS file: 
> /cvs/ports/net/net-snmp/patches/patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c
> --- patches/patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c        
> 26 Sep 2007 20:03:42 -0000      1.1
> +++ patches/patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c        
> 13 Mar 2010 01:32:38 -0000
> @@ -1,7 +1,27 @@
>  $OpenBSD: patch-agent_mibgroup_if-mib_data_access_interface_sysctl_c,v 1.1 
> 2007/09/26 20:03:42 rui Exp $
> ---- agent/mibgroup/if-mib/data_access/interface_sysctl.c.orig        Wed Jun 
> 20 22:34:24 2007
> -+++ agent/mibgroup/if-mib/data_access/interface_sysctl.c     Mon Sep 24 
> 11:01:51 2007
> -@@ -451,22 +451,22 @@ netsnmp_arch_interface_container_load(netsnmp_containe
> +--- agent/mibgroup/if-mib/data_access/interface_sysctl.c.orig        Sat Mar 
> 13 01:01:16 2010
> ++++ agent/mibgroup/if-mib/data_access/interface_sysctl.c     Sat Mar 13 
> 01:01:09 2010
> +@@ -183,6 +183,7 @@ netsnmp_sysctl_ifmedia_to_speed(int media, u_int 
> +*spee  #endif
> +             }
> +             break;
> ++#if defined(IFM_TOKEN)
> +         case IFM_TOKEN:
> +             switch (IFM_SUBTYPE(media)) {
> +                 case IFM_TOK_STP4:
> +@@ -201,9 +202,10 @@ netsnmp_sysctl_ifmedia_to_speed(int media, u_int *spee
> +                     *speed = 100000000;
> +                     *speed_high = 100;
> +                     break;
> +-#endif
> ++#endif /* IFM_TOKEN */
> +             }
> +             break;
> ++#endif
> + #ifdef IFM_ATM
> +         case IFM_ATM:
> +             switch (IFM_SUBTYPE(media)) { @@ -451,22 +453,22 @@ 
> +netsnmp_arch_interface_container_load(netsnmp_containe
>               NETSNMP_INTERFACE_FLAGS_HAS_V6_REASMMAX;
>   
>           /* get counters */
> 

Reply via email to