diff --git a/net-snmp.spec b/net-snmp.spec index 24ce120..c8f4ed0 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -8,7 +8,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: %{major_ver} -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 License: BSD and MIT @@ -28,7 +28,6 @@ Patch2: net-snmp-5.5-dir-fix.patch Patch3: net-snmp-5.5-multilib.patch Patch4: net-snmp-5.5-sensors3.patch -Requires(pre): chkconfig Requires(post): chkconfig Requires(preun): chkconfig # for /sbin/service @@ -43,15 +42,14 @@ BuildRequires: libselinux-devel, elfutils-libelf-devel, rpm-devel BuildRequires: perl-devel, perl(ExtUtils::Embed), gawk, procps BuildRequires: python-devel, python-setuptools BuildRequires: chrpath +# for netstat, needed by 'make tests' +BuildRequires: net-tools %ifnarch s390 s390x BuildRequires: lm_sensors-devel >= 3 %endif %if %{tcp_wrappers} BuildRequires: tcp_wrappers-devel %endif -BuildRequires: perl, coreutils, grep, sed, findutils - -#%define __libtoolize /bin/true %description SNMP (Simple Network Management Protocol) is a protocol used for @@ -150,8 +148,6 @@ Net-SNMP toolkit library. %prep %setup -q -n %{name}-%{major_ver} -# TODO: check, there is /etc/mtab in net-snmp-config.h on all architectures -# %patch1 -p1 -b .mnttab %ifnarch ia64 %patch1 -p1 -b .pie @@ -161,15 +157,7 @@ Net-SNMP toolkit library. %patch3 -p1 -b .multilib %patch4 -p1 -b .sensors -# Do this patch with a perl hack... -perl -pi -e "s|'\\\$install_libdir'|'%{_libdir}'|" ltmain.sh - %build -%ifarch ia64 x86_64 s390x ppc64 sparc64 -export LDFLAGS="-L%{_libdir}" -%endif -export LIBDIR="%{_libdir}" - MIBS="host agentx smux \ ucd-snmp/diskio tcp-mib udp-mib mibII/mta_sendmail \ ip-mib/ipv4InterfaceTable ip-mib/ipv6InterfaceTable \ @@ -177,18 +165,15 @@ MIBS="host agentx smux \ ip-mib/ipDefaultRouterTable/ipDefaultRouterTable \ ip-mib/ipv6ScopeZoneIndexTable ip-mib/ipIfStatsTable \ sctp-mib rmon-mib etherlike-mib" + %ifnarch s390 s390x +# there are no lm_sensors on s390 MIBS="$MIBS ucd-snmp/lmsensorsMib" %endif %configure \ --disable-static --enable-shared \ --with-cflags="$RPM_OPT_FLAGS -D_RPM_4_4_COMPAT" \ -%ifnarch s390 s390x - --with-ldflags="$LDFLAGS -lcrypto -lsensors" \ -%else - --with-ldflags="$LDFLAGS -lcrypto" \ -%endif --with-sys-location="Unknown" \ --with-logfile="/var/log/snmpd.log" \ --with-persistent-directory="/var/lib/net-snmp" \ @@ -207,7 +192,6 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib" --enable-mfd-rewrites \ --enable-local-smux \ --with-sys-contact="root@localhost" </dev/null || : + %preun if [ $1 = 0 ]; then service snmpd stop >/dev/null 2>&1 @@ -332,6 +321,7 @@ if [ $1 = 0 ]; then /sbin/chkconfig --del snmptrapd fi + %postun if [ "$1" -ge "1" ]; then service snmpd condrestart >/dev/null 2>&1 || : @@ -419,6 +409,12 @@ rm -rf ${RPM_BUILD_ROOT} %{_datadir}/snmp/mibs/* %changelog +* Wed Nov 25 2009 Jan Safranek 1:5.5-3 +- prepare the .spec file for review +- run automatic regression suite after the compilation of the package + to check for obvious regressions +- remove unnecessary package dependencies + * Tue Nov 24 2009 Jan Safranek 1:5.5-2 - introduce /etc/sysconfig/snmptrapd. Use it to specify snmptrapd command line options. /etc/snmp/snmptrapd.options is not used anymore (#540799)