# TODO
# - package or remove:
# %{_datadir}/snmp/snmp_perl.pl
-# - make noarch -n mibs-net-snmp package, most of the files are same as libsmi packages
+# - make noarch -n mibs-net-snmp package (need separate .spec then)
# - FHS: #define NETSNMP_AGENTX_SOCKET "/var/agentx/master"
+# - php-snmp (and likely other bindings) use only %{_libdir}/libnetsnmp.so.*, move other libs back to main (daemon) package?
#
# Conditional build:
%bcond_without autodeps # don't BR packages only for deps resolving
%undefine with_lm_sensors
%endif
+%define so_version 20
+
%include /usr/lib/rpm/macros.perl
Summary: A collection of SNMP protocol tools
Summary(es.UTF-8): Agente SNMP de la UCD
Summary(ru.UTF-8): Набор утилит для протокола SNMP от UC-Davis
Summary(uk.UTF-8): Набір утиліт для протоколу SNMP від UC-Davis
Name: net-snmp
-Version: 5.4.2.1
-Release: 15.6
+Version: 5.5
+Release: 3
License: BSD-like
Group: Networking/Daemons
Source0: http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
-# Source0-md5: 984932520143f0c8bf7b7ce1fc9e1da1
+# Source0-md5: 5b2551e7bd024fbbee84dca22a5f13a1
Source1: %{name}d.init
Source2: %{name}d.conf
Source3: %{name}d.sysconfig
Patch10: %{name}-lvalue.patch
Patch11: %{name}-defaultconfig.patch
Patch12: %{name}-use-rpm-hrmib.patch
-Patch13: %{name}-snmpnetstat-getbulk.patch
+Patch13: net-snmp-5.5-missing-bcast.patch
Patch14: %{name}-lm_sensors_3.patch
-Patch15: %{name}-subcontainer.patch
-Patch16: %{name}-netlink.patch
+Patch15: net-snmp-5.5-tcp-pid.patch
Patch17: %{name}-TCP_STATS_CACHE_TIMEOUT.patch
-Patch18: %{name}-src-dst-confusion.patch
Patch19: %{name}-loadave-writable.patch
URL: http://www.net-snmp.org/
BuildRequires: autoconf >= 2.61-3
BuildRequires: rpmbuild(macros) >= 1.268
Requires(post,preun): /sbin/chkconfig
Requires: %{name}-libs = %{version}-%{release}
-Requires: mibs-%{name} = %{version}-%{release}
Requires: /usr/bin/setsid
+Requires: mibs-%{name} = %{version}-%{release}
Requires: rc-scripts >= 0.2.0
Provides: snmpd
Obsoletes: cmu-snmp
Summary: NET SNMP libraries
Summary(pl.UTF-8): Biblioteki SNMP
Group: Libraries
-Requires: mibs-%{name}
+Suggests: mibs-%{name}
Obsoletes: net-snmp-compat-libs
Obsoletes: ucd-snmp-libs
Requires: %{name}-libs = %{version}-%{release}
Requires: elfutils-devel
%{?with_kerberos5:Requires: heimdal-devel}
+Requires: libnl-devel >= 1:1.1
Requires: libwrap-devel
%{?with_lm_sensors:Requires: lm_sensors-devel >= 3.0.1}
Requires: openssl-devel >= 0.9.7c
Summary(uk.UTF-8): Утиліти керування мережею по SNMP з проекту NET-SNMP
Group: Applications/System
Requires: %{name}-libs = %{version}-%{release}
-Requires: mibs-%{name} = %{version}-%{release}
+Suggests: mibs-%{name} = %{version}-%{release}
Obsoletes: cmu-snmp-utils
Obsoletes: ucd-snmp-utils
%prep
%setup -q -a7
-%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
-%patch14 -p0
+%patch14 -p1
%patch15 -p1
-%patch16 -p1
%patch17 -p1
-%patch18 -p3
%patch19 -p1
%build
%{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
cp -f /usr/share/automake/config.sub .
--disable-debugging \
--enable-as-needed \
%{!?with_static_libs:--disable-static} \
- --with-cflags="%{rpmcflags} -I/usr/include/et" \
+ --with-cflags="%{rpmcflags} %{rpmcppflags} -I/usr/include/et" \
--with-ldflags="%{rpmldflags}" \
--with-defaults \
--with-default-snmp-version=3 \
%{__perl} Makefile.PL \
-NET-SNMP-IN-SOURCE=true \
INSTALLDIRS=vendor \
- OPTIMIZE="%{rpmcflags}" \
+ OPTIMIZE="%{rpmcflags} %{rpmcppflags}" \
</dev/null
# avoid rpaths generated by MakeMaker
%attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
%attr(755,root,root) %{_sbindir}/snmpd
+%attr(755,root,root) %{_bindir}/net-snmp-create-v3-user
%dir %{_libdir}/snmp
%dir %{_libdir}/snmp/dlmod
+%{_mandir}/man1/net-snmp-create-v3-user.1*
%{_mandir}/man5/snmpd.conf.5*
%{_mandir}/man5/snmpd.examples.5*
%{_mandir}/man5/snmpd.internal.5*
%files libs
%defattr(644,root,root,755)
%dir %{_sysconfdir}/snmp
+%dir %{_datadir}/snmp
%attr(755,root,root) %{_libdir}/libnetsnmp.so.*.*
%attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.*
%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.*
%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.*
%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.15
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.15
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.15
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.15
-%attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.15
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.%{so_version}
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.%{so_version}
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.%{so_version}
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.%{so_version}
+%attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.%{so_version}
%files devel
%defattr(644,root,root,755)