packages (AC-branch): net-snmp/net-snmp.spec - move mibs to mibs-net-snmp w...

glen glen at pld-linux.org
Mon Dec 28 15:36:22 CET 2009


Author: glen                         Date: Mon Dec 28 14:36:22 2009 GMT
Module: packages                      Tag: AC-branch
---- Log message:
- move mibs to mibs-net-snmp which uses common mibs dir
- -libs and -utils Suggests mibs, can work ok without mibs db; rel 14

---- Files affected:
packages/net-snmp:
   net-snmp.spec (1.104.2.28 -> 1.104.2.29) 

---- Diffs:

================================================================
Index: packages/net-snmp/net-snmp.spec
diff -u packages/net-snmp/net-snmp.spec:1.104.2.28 packages/net-snmp/net-snmp.spec:1.104.2.29
--- packages/net-snmp/net-snmp.spec:1.104.2.28	Sat Dec 26 15:27:00 2009
+++ packages/net-snmp/net-snmp.spec	Mon Dec 28 15:36:17 2009
@@ -2,8 +2,8 @@
 # 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 it scan for mibs (if not yet) in /usr/share/mibs (and legacy /usr/share/snmp/mibs)
+# - make noarch -n mibs-net-snmp package (need separate .spec then)
+# - FHS: #define NETSNMP_AGENTX_SOCKET "/var/agentx/master"
 #
 # Conditional build:
 %bcond_without	autodeps	# don't BR packages only for deps resolving
@@ -13,7 +13,11 @@
 %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
-#
+
+%ifnarch %{ix86} %{x8664}
+%undefine	with_lm_sensors
+%endif
+
 %include	/usr/lib/rpm/macros.perl
 Summary:	A collection of SNMP protocol tools
 Summary(es.UTF-8):	Agente SNMP de la UCD
@@ -23,7 +27,7 @@
 Summary(uk.UTF-8):	Набір утиліт для протоколу SNMP від UC-Davis
 Name:		net-snmp
 Version:	5.4.2.1
-Release:	13
+Release:	14
 License:	BSD-like
 Group:		Networking/Daemons
 Source0:	http://dl.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
@@ -79,8 +83,8 @@
 BuildRequires:	rpmbuild(macros) >= 1.268
 Requires(post,preun):	/sbin/chkconfig
 Requires:	%{name}-libs = %{version}-%{release}
-Requires:	%{name}-mibs = %{version}-%{release}
 Requires:	/usr/bin/setsid
+Requires:	mibs-%{name} = %{version}-%{release}
 Requires:	rc-scripts >= 0.2.0
 Provides:	snmpd
 Obsoletes:	cmu-snmp
@@ -143,7 +147,7 @@
 Summary:	NET SNMP libraries
 Summary(pl.UTF-8):	Biblioteki SNMP
 Group:		Libraries
-Requires:	%{name}-mibs
+Suggests:	mibs-%{name}
 Obsoletes:	net-snmp-compat-libs
 Obsoletes:	ucd-snmp-libs
 
@@ -274,16 +278,18 @@
 %description compat-static -l pt_BR.UTF-8
 Bibliotecas estáticas para desenvolvimento com ucd-snmp.
 
-%package mibs
-Summary:	MIB database
+%package -n mibs-net-snmp
+Summary:	Net-SNMP provided MIBs
 Summary(pl.UTF-8):	Baza danych MIB
 Group:		Applications/System
+Requires:	mibs-dirs
+Obsoletes:	net-snmp-mibs
 Conflicts:	ucd-snmp-libs
 
-%description mibs
-MIB database.
+%description -n mibs-net-snmp
+Net-SNMP provided MIBs (Management Information Base).
 
-%description mibs -l pl.UTF-8
+%description -n mibs-net-snmp -l pl.UTF-8
 Baza danych MIB.
 
 %package snmptrapd
@@ -311,7 +317,7 @@
 Summary(uk.UTF-8):	Утиліти керування мережею по SNMP з проекту NET-SNMP
 Group:		Applications/System
 Requires:	%{name}-libs = %{version}-%{release}
-Requires:	%{name}-mibs = %{version}-%{release}
+Suggests:	mibs-%{name} = %{version}-%{release}
 Obsoletes:	cmu-snmp-utils
 Obsoletes:	ucd-snmp-utils
 
@@ -437,6 +443,20 @@
 %{__autoconf}
 %{__autoheader}
 cp -f /usr/share/automake/config.sub .
+
+MIBS="\
+host agentx smux \
+mibII/mta_sendmail \
+disman/event disman/schedule \
+ucd-snmp/diskio \
+target \
+misc/ipfwacc \
+"
+
+%if %{with lm_sensors}
+MIBS="$MIBS ucd-snmp/lmSensors"
+%endif
+
 %configure \
 	--disable-debugging \
 	--enable-as-needed \
@@ -455,14 +475,8 @@
 	--with%{!?with_perl:out}-perl-modules \
 	--with%{!?with_python:out}-python-modules \
 	--enable-local-smux \
-	--with-mib-modules="host agentx smux mibII/mta_sendmail \
-%ifarch %{ix86} %{x8664}
-%if %{with lm_sensors}
-			ucd-snmp/lmSensors \
-%endif
-%endif
-			disman/event disman/schedule ucd-snmp/diskio \
-			target misc/ipfwacc" \
+	--with-mibdirs='$HOME/.snmp/mibs:/usr/share/mibs:%{_datadir}/snmp/mibs' \
+	--with-mib-modules="$MIBS" \
 	%{?with_kerberos5:--with-security-modules="ksm"} \
 	--with-sys-contact="root at localhost" \
 	--with-sys-location="Unknown" \
@@ -493,6 +507,7 @@
 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,snmp},/var/log,/var/lib/net-snmp,%{_libdir}/snmp/dlmod}
 
 %{__make} -j1 install \
+	mibdir=%{_datadir}/mibs \
 	DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf
@@ -508,9 +523,6 @@
 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf
 install %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd
 
-#install agent/mibgroup/ipfwchains/IPFWCHAINS-MIB.txt \
-#	$RPM_BUILD_ROOT%{_datadir}/snmp/mibs
-
 cd perl
 %{__make} -j1 install \
 	DESTDIR=$RPM_BUILD_ROOT
@@ -548,8 +560,6 @@
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/*.py
 %endif
 
-touch $RPM_BUILD_ROOT%{_datadir}/snmp/mibs/.index
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -668,12 +678,9 @@
 %{_libdir}/libsnmp.a
 %endif
 
-%files mibs
+%files -n mibs-net-snmp
 %defattr(644,root,root,755)
-%dir %{_datadir}/snmp
-%dir %{_datadir}/snmp/mibs
-%{_datadir}/snmp/mibs/*.txt
-%ghost %{_datadir}/snmp/mibs/.index
+%{_datadir}/mibs/*.txt
 
 %files snmptrapd
 %defattr(644,root,root,755)
@@ -790,6 +797,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.104.2.29  2009/12/28 14:36:17  glen
+- move mibs to mibs-net-snmp which uses common mibs dir
+- -libs and -utils Suggests mibs, can work ok without mibs db; rel 14
+
 Revision 1.104.2.28  2009/12/26 14:27:00  glen
 - missing dir; rel 13
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/net-snmp/net-snmp.spec?r1=1.104.2.28&r2=1.104.2.29&f=u



More information about the pld-cvs-commit mailing list