]> git.pld-linux.org Git - packages/net-snmp.git/commitdiff
- updated to 5.9 (new sonames) auto/th/net-snmp-5.9-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 4 Oct 2020 17:22:54 +0000 (19:22 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 4 Oct 2020 17:22:54 +0000 (19:22 +0200)
- updated config-noflags,link patches
- removed obsolete llinterfaces patch
- now python3 module is built, keep building python2 module additionally

net-snmp-config-noflags.patch
net-snmp-link.patch
net-snmp-llinterfaces.patch [deleted file]
net-snmp.spec

index cec0ea84ca0777a0b3eaf83bb7bd00cf96e5c48a..e40c9c48803ff07b97be179cc578f1d0136fc088 100644 (file)
@@ -1,15 +1,15 @@
---- net-snmp-5.6/net-snmp-config.in.orig       2010-05-30 22:19:04.000000000 +0200
-+++ net-snmp-5.6/net-snmp-config.in    2010-10-24 10:12:12.899734339 +0200
-@@ -46,7 +46,7 @@
- includedir=@includedir@
+--- net-snmp-5.9/net-snmp-config.in.orig       2020-08-14 23:41:47.000000000 +0200
++++ net-snmp-5.9/net-snmp-config.in    2020-10-04 16:22:22.709873262 +0200
+@@ -49,7 +49,7 @@
  libdir=@libdir@
- datarootdir=@datarootdir@
+ # Avoid that configure complains that this script ignores @datarootdir@
+ echo "@datarootdir@" >/dev/null
 -NSC_LDFLAGS="@LDFLAGS@"
 +NSC_LDFLAGS=""
  
  NSC_LIBS="@LIBS@"
  NSC_LNETSNMPLIBS="@LNETSNMPLIBS@"
-@@ -124,10 +124,10 @@
+@@ -143,10 +143,10 @@
        ;;
      #################################################### compile
      --base-cflags)
        ;;
      --srcdir)
        echo $NSC_SRCDIR
-@@ -585,7 +585,7 @@
+@@ -660,7 +660,7 @@
          echo "Ack.  Can't create $tmpfile."
        exit 1
        fi
 -      cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I${NSC_INCLUDEDIR} -o $outname $tmpfile $cfiles $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS $ldflags"
 +      cmd="@CC@ $cflags @DEVFLAGS@ -I. -I${NSC_INCLUDEDIR} -o $outname $tmpfile $cfiles $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS $ldflags"
        echo "running: $cmd"
-       `$cmd`
-       if test "x$norm" != "x1" ; then
+       echo `$cmd`
+       result=$?
index dd01ae3a93309e0bcce5d51968073df12f8c1f05..c8641e01650291427785814842945e7debd5b168 100644 (file)
@@ -1,6 +1,6 @@
---- net-snmp-5.6/agent/Makefile.in.orig        2010-06-08 23:05:11.000000000 +0200
-+++ net-snmp-5.6/agent/Makefile.in     2010-10-24 10:33:36.007741043 +0200
-@@ -108,7 +108,7 @@
+--- net-snmp-5.9/agent/Makefile.in.orig        2020-08-14 23:41:47.000000000 +0200
++++ net-snmp-5.9/agent/Makefile.in     2020-10-04 16:24:10.739288016 +0200
+@@ -111,7 +111,7 @@
  #
  # how to build it info
  #
@@ -9,17 +9,17 @@
  AGENTLIB      = libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION)
  MIBLIB                = libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION)
  
-@@ -249,11 +249,11 @@
+@@ -300,11 +300,11 @@
+       $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} ${LDFLAGS} ${OUR_AGENT_LIBS}
  
  libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION):    ${LLIBAGENTOBJS} $(USELIBS)
--      $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
-+      $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) $(LDFLAGS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
+-      $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
++      $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) $(LDFLAGS) ${LAGENTLIBS} @LD_NO_UNDEFINED@ $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
        $(RANLIB) $(AGENTLIB)
  
  libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS)
--      $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
-+      $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(LDFLAGS) $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
+-      $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ $(LDFLAGS) ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
++      $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(LDFLAGS) $(AGENTLIB) $(USELIBS) @LD_NO_UNDEFINED@ ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
        $(RANLIB) $(MIBLIB)
  
  agentlib: $(AGENTLIB)
diff --git a/net-snmp-llinterfaces.patch b/net-snmp-llinterfaces.patch
deleted file mode 100644 (file)
index 739c7b6..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -ur net-snmp-5.2.orig/agent/mibgroup/mibII/interfaces.c net-snmp-5.2/agent/mibgroup/mibII/interfaces.c
---- net-snmp-5.2.orig/agent/mibgroup/mibII/interfaces.c        2004-10-06 22:10:16.000000000 +0200
-+++ net-snmp-5.2/agent/mibgroup/mibII/interfaces.c     2004-12-29 21:27:25.939529536 +0100
-@@ -1383,9 +1383,9 @@
-     unsigned long   rec_pkt, rec_oct, rec_err, rec_drop;
-     unsigned long   snd_pkt, snd_oct, snd_err, snd_drop, coll;
-     const char     *scan_line_2_2 =
--        "%lu %lu %lu %lu %*lu %*lu %*lu %*lu %lu %lu %lu %lu %*lu %lu";
-+        "%llu %llu %llu %llu %*llu %*llu %*llu %*llu %llu %llu %llu %llu %*llu %llu"
-     const char     *scan_line_2_0 =
--        "%lu %lu %*lu %*lu %*lu %lu %lu %*lu %*lu %lu";
-+        "%llu %llu %*llu %*llu %*llu %llu %llu %*llu %*llu %llu";
- #endif
-     const char     *scan_line_to_use;
-     struct timeval et;                              /* elapsed time */
index c5b01cfd4bb587f287654662758d038fb937e4b9..c4a2e90370f1f16ee6a1bbdaf531c49a64d7434f 100644 (file)
@@ -3,18 +3,19 @@
 # - FHS: #define NETSNMP_AGENTX_SOCKET "/var/agentx/master"
 #
 # Conditional build:
-%bcond_without rpm             # don't include RPM support
-%bcond_without kerberos5       # don't include kerberos support
-%bcond_without lm_sensors      # don't include sensors support
-%bcond_without perl            # don't include Perl modules and utils
-%bcond_without python          # don't include Python modules
-%bcond_without static_libs     # don't build static library
+%bcond_without rpm             # RPM support
+%bcond_without kerberos5       # Kerberos support
+%bcond_without lm_sensors      # LM sensors support
+%bcond_without perl            # Perl modules and utils
+%bcond_without python          # Python (3.x) modules
+%bcond_without python2         # Python 2.x modules
+%bcond_without static_libs     # static library
 
 %ifnarch %{ix86} %{x8664} x32
 %undefine      with_lm_sensors
 %endif
 
-%define                so_version      35
+%define                so_version      40
 Summary:       A collection of SNMP protocol tools
 Summary(es.UTF-8):     Agente SNMP de la UCD
 Summary(pl.UTF-8):     Kolekcja narzędzi do obsługi protokołu SNMP
@@ -22,13 +23,12 @@ Summary(pt_BR.UTF-8):       Agente SNMP da UCD
 Summary(ru.UTF-8):     Набор утилит для протокола SNMP от UC-Davis
 Summary(uk.UTF-8):     Набір утиліт для протоколу SNMP від UC-Davis
 Name:          net-snmp
-# NOTE: 5.7.x is LTS version
-Version:       5.8
-Release:       5
+Version:       5.9
+Release:       1
 License:       BSD-like
 Group:         Networking/Daemons
 Source0:       http://downloads.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
-# Source0-md5: 63bfc65fbb86cdb616598df1aff6458a
+# Source0-md5: 382da80138897f294299badf9c62c699
 Source1:       %{name}d.init
 Source2:       %{name}d.conf
 Source3:       %{name}d.sysconfig
@@ -43,11 +43,10 @@ Patch1:             %{name}-rpm-implicit-libs.patch
 Patch2:                %{name}-config-noflags.patch
 Patch3:                %{name}-manpage.patch
 Patch4:                %{name}-link.patch
-Patch5:                %{name}-llinterfaces.patch
 Patch6:                %{name}-kernel_headers.patch
 Patch7:                %{name}-rpmpath.patch
 Patch8:                %{name}-python.patch
-Patch9:        %{name}-lvalue.patch
+Patch9:                %{name}-lvalue.patch
 Patch10:       %{name}-defaultconfig.patch
 Patch11:       %{name}-use-rpm-hrmib.patch
 Patch12:       %{name}-TCP_STATS_CACHE_TIMEOUT.patch
@@ -72,9 +71,14 @@ BuildRequires:       pcre-devel
 BuildRequires: perl-devel >= 1:5.8.0
 BuildRequires: pkgconfig >= 1:0.9.0
 %if %{with python}
-BuildRequires: python-devel
-BuildRequires: python-modules
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.5
+BuildRequires: python-modules >= 1:2.5
 BuildRequires: python-setuptools
+%endif
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-setuptools
 BuildRequires: rpm-pythonprov
 %endif
 %if %{with rpm}
@@ -427,8 +431,8 @@ MIB browser in Tk.
 Przeglądarka MIB-ów w Tk.
 
 %package -n python-netsnmp
-Summary:       Python netsnmp extension module
-Summary(pl.UTF-8):     Moduł rozszerzenia netsnmp dla Pythona
+Summary:       Python netsnmp extension module
+Summary(pl.UTF-8):     Moduł rozszerzenia netsnmp dla Pythona 2
 Group:         Libraries/Python
 Requires:      %{name}-libs = %{version}-%{release}
 
@@ -440,13 +444,26 @@ tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API.
 Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie
 SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
 
+%package -n python3-netsnmp
+Summary:       Python 3 netsnmp extension module
+Summary(pl.UTF-8):     Moduł rozszerzenia netsnmp dla Pythona 3
+Group:         Libraries/Python
+Requires:      %{name}-libs = %{version}-%{release}
+
+%description -n python3-netsnmp
+The 'netsnmp' Python extension module provides a full featured,
+tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API.
+
+%description -n python3-netsnmp -l pl.UTF-8
+Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie
+SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
+
 %prep
 %setup -q -a7
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
@@ -514,8 +531,11 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
 
 %{__make} -j1
 
+TOPDIR="$(pwd)"
+
 cd perl
 %{__perl} -I. Makefile.PL \
+       -NET-SNMP-CONFIG="${TOPDIR}/net-snmp-config" \
        -NET-SNMP-IN-SOURCE=true \
        INSTALLDIRS=vendor \
        OPTIMIZE="%{rpmcflags} %{rpmcppflags}" \
@@ -524,9 +544,16 @@ cd perl
 # avoid rpaths generated by MakeMaker
 %{__perl} -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile
 
-bd=$(cd ..; pwd)
 %{__make} \
-       LDFLAGS="%{rpmldflags} -L$bd/snmplib/.libs/ -L$bd/agent/.libs/"
+       LDFLAGS="%{rpmldflags} -L${TOPDIR}/snmplib/.libs/ -L${TOPDIR}/agent/.libs/"
+cd ..
+
+%if %{with python2}
+cd python
+%py_build \
+       --basedir=$TOPDIR
+cd ..
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -584,6 +611,15 @@ done
 %endif
 
 %if %{with python}
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/netsnmp/tests
+%endif
+
+%if %{with python2}
+cd python
+%py_install \
+       --basedir=$TOPDIR
+cd ..
+
 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/tests
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/*.py
 %endif
@@ -689,6 +725,8 @@ fi
 %{_libdir}/libnetsnmpmibs.la
 %{_libdir}/libnetsnmptrapd.la
 %{_includedir}/net-snmp
+%{_pkgconfigdir}/netsnmp.pc
+%{_pkgconfigdir}/netsnmp-agent.pc
 %{_datadir}/snmp/mib2c*
 %{_mandir}/man1/mib2c.1*
 %{_mandir}/man1/mib2c-update.1*
@@ -833,7 +871,7 @@ fi
 %{_mandir}/man1/tkmib.1*
 %endif
 
-%if %{with python}
+%if %{with python2}
 %files -n python-netsnmp
 %defattr(644,root,root,755)
 %dir %{py_sitedir}/netsnmp
@@ -841,3 +879,13 @@ fi
 %{py_sitedir}/netsnmp/*.py[co]
 %{py_sitedir}/netsnmp_python-*.egg-info
 %endif
+
+%if %{with python}
+%files -n python3-netsnmp
+%defattr(644,root,root,755)
+%dir %{py3_sitedir}/netsnmp
+%attr(755,root,root) %{py3_sitedir}/netsnmp/client_intf.cpython-*.so
+%{py3_sitedir}/netsnmp/*.py
+%{py3_sitedir}/netsnmp/__pycache__
+%{py3_sitedir}/netsnmp_python-*.egg-info
+%endif
This page took 0.213845 seconds and 4 git commands to generate.