%define major 0 %define libname %mklibname snmp %{major} Summary: A collection of SNMP protocol tools from UC-Davis. Name: ucd-snmp Version: 4.2.3 Release: 8.1.100mdk License: BSDish Group: System/Servers Source0: ftp://ucd-snmp.ucdavis.edu/ucd-snmp-%{version}.tar.bz2 Source1: ucd-snmpd.init Source2: snmpd.conf Source3: ucd-snmpd.logrotate BuildRoot: %{_tmppath}/%{name}-buildroot Prereq: /sbin/chkconfig PreReq: rpm-helper Requires: openssl BuildRequires: openssl-devel URL: http://net-snmp.sourceforge.net/ Patch0: ucd-snmp-4.2-rpm40.patch.bz2 Patch1: ucd-snmp-4.2-ia64.patch.bz2 Patch2: ucd-snmp-4.2.1-manpage.patch.bz2 Patch3: ucd-snmp-4.2.1-walk.patch.bz2 Patch4: ucd-snmp-4.2.1-security3.patch.bz2 Patch5: ucd-snmp-4.2.1-tests_num.patch.bz2 Patch6: ucd-snmp-4.2.3-libtool.patch.bz2 Patch7: ucd-snmp-4.2.3-snmpnetstat.patch.bz2 Patch8: ucd-snmp-4.2.1-perlpath.patch.bz2 Patch9: ucd-snmp-4.2.3-openssl-fixes.patch.bz2 Patch10: ucd-snmp-4.2.3-64bit-fixes.patch.bz2 Patch11: ucd-snmp-4.2.3-lib64.patch.bz2 Patch12: ucd-snmp-4.2.5-DoS.patch %description SNMP (Simple Network Management Protocol) is a protocol used for network management (hence the name). The NET-SNMP project includes various SNMP tools; an extensible agent, an SNMP library, tools for requesting or setting information from SNMP agents, tools for generating and handling SNMP traps, a version of the netstat command which uses SNMP, and a Tk/Perl mib browser. This package contains the snmpd and snmptrapd daemons, documentation, etc. Install the ucd-snmp package if you need network management tools. You will probably also want to install the ucd-snmp-utils package, which contains NET-SNMP utilities. %package -n %{libname} Group: System/Libraries Summary: Librairies for Network management (SNMP), from the NET-SNMP project. Obsoletes: ucd-snmp Provides: ucd-snmp %description -n %{libname} The %{libname} package contains the libraries for use with the NET-SNMP project's network management tools. %package -n %{libname}-devel Group: Development/C Summary: The development environment for the NET-SNMP project. Provides: %{name}-devel = %{version}-%{release} Provides: libsnmp-devel = %{version}-%{release} Requires: %{libname} = %{version} Obsoletes: ucd-snmp-devel Provides: ucd-snmp-devel %description -n %{libname}-devel The %{libname}-devel package contains the development libraries and header files for use with the NET-SNMP project's network management tools. Install the ucd-snmp-devel package if you would like to develop applications for use with the NET-SNMP project's network management tools. You'll also need to have the ucd-snmp and ucd-snmp-utils packages installed. %package utils Group: Networking/Other Summary: Network management utilities using SNMP, from the NET-SNMP project. Obsoletes: ucd-snmp-util Provides: ucd-snmp-util Requires: openssl %description utils The ucd-snmp package contains various utilities for use with the UCD-SNMP network management project. Install this package if you need utilities for managing your network using the SNMP protocol. You'll also need to install the ucd-snmp package. %prep %setup -q %patch0 -p1 -b .rpm40 %patch1 -p1 -b .ia64 %patch2 -p1 -b .manpage %patch3 -p1 -b .walk %patch4 -p1 -b .security3 %patch5 -p1 -b .tests_num %patch6 -p1 -b .libtool %patch7 -p1 -b .snmpnetstat %patch8 -p1 -b .perlpath %patch9 -p1 -b .openssl-fixes %patch10 -p1 -b .64bit-fixes %patch11 -p1 -b .lib64 %patch12 -p1 -b .can-2005-2177 autoconf # Get rid of CVS bits find local -name ".cvsignore" | xargs rm -f %build %serverbuild %{?__cputoolize: %{__cputoolize}} ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} \ --mandir=%{_mandir} \ --disable-debugging \ --enable-ipv6 \ --enable-reentrant \ --enable-static \ --enable-shared \ --includedir=%{_includedir/snmp} \ --with-logfile="/var/log/snmpd.log" \ --with-mib-modules="host smux agentx target tunnel ucd-snmp/dlmod" \ --with-persistent-directory="/var/lib/ucd-snmp" \ --with-openssl \ --with-sys-location="Unknown" \ --with-libwrap \ --with-zlib=%{_prefix} \ --with-sys-contact="root@localhost" \ --build=%_target_platform \ --host=%_target_platform \ --target=%_target_platform # Hack to enable snmp in php (Oden Eriksson) # Check: http://www.php.net/manual/en/ref.snmp.php # PHP hint: use "--with-openssl=%{_prefix} --with-snmp=%{_prefix} --enable-ucd-snmp-hack" perl -p -i -e "s|/\* #define NO_ZEROLENGTH_COMMUNITY 1 \*/|#define NO_ZEROLENGTH_COMMUNITY 1|g" config.h %make %install rm -rf ${RPM_BUILD_ROOT} %makeinstall \ persistentdir=%{buildroot}/var/lib/ucd-snmp \ includedir=%{buildroot}%{_includedir}/ucd-snmp install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/snmpd install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp install -m 644 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmpd.conf install -d ${RPM_BUILD_ROOT}%{_initrddir} install -m 755 %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/snmpd # [gb] grmpf, nuke buildroot in *.la files perl -pi -e "s,$RPM_BUILD_ROOT,,g" $RPM_BUILD_ROOT%{_libdir}/*.la %post %_post_service snmpd %post -n %{libname} -p /sbin/ldconfig %preun %_preun_service snmpd %postun -n %{libname} -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc AGENT.txt COPYING ChangeLog EXAMPLE.conf FAQ NEWS PORTING README* TODO local %config(noreplace) %{_sysconfdir}/logrotate.d/snmpd %dir %{_sysconfdir}/snmp %config(noreplace) %{_sysconfdir}/snmp/snmpd.conf %config(noreplace) %{_initrddir}/snmpd %{_datadir}/snmp %{_sbindir}/* %attr(0644,root,root) %{_mandir}/man1/snmpd.1* %attr(0644,root,root) %{_mandir}/man5/* %attr(0644,root,root) %{_mandir}/man8/snmptrapd.8* %files utils %defattr(-,root,root,-) %{_bindir}/* %attr(0644,root,root) %{_mandir}/man1/snmpbulkwalk.1* %attr(0644,root,root) %{_mandir}/man1/snmpbulkget.1* %attr(0644,root,root) %{_mandir}/man1/snmpcmd.1* %attr(0644,root,root) %{_mandir}/man1/snmpconf.1* %attr(0644,root,root) %{_mandir}/man1/snmpdelta.1* %attr(0644,root,root) %{_mandir}/man1/snmpdf.1* %attr(0644,root,root) %{_mandir}/man1/snmpget.1* %attr(0644,root,root) %{_mandir}/man1/snmpgetnext.1* %attr(0644,root,root) %{_mandir}/man1/snmpinform.1* %attr(0644,root,root) %{_mandir}/man1/snmpnetstat.1* %attr(0644,root,root) %{_mandir}/man1/snmpset.1* %attr(0644,root,root) %{_mandir}/man1/snmpstatus.1* %attr(0644,root,root) %{_mandir}/man1/snmptable.1* %attr(0644,root,root) %{_mandir}/man1/snmptest.1* %attr(0644,root,root) %{_mandir}/man1/snmptranslate.1* %attr(0644,root,root) %{_mandir}/man1/snmptrap.1* %attr(0644,root,root) %{_mandir}/man1/snmpusm.1* %attr(0644,root,root) %{_mandir}/man1/snmpwalk.1* %files -n %{libname} %defattr(-,root,root,-) %{_libdir}/*.so.* %files -n %{libname}-devel %defattr(0644,root,root,755) %defattr(-,root,root,-) %{_libdir}/*.so %{_libdir}/*.a %{_libdir}/*.la %{_includedir}/ucd-snmp %{_mandir}/man3/* %changelog * Tue Aug 09 2005 Vincent Danen <vdanen@mandriva.com> 4.2.3-8.1.100mdk - P12: security update for CAN-2005-2177 * Fri Sep 5 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.2.3-8mdk - mklibname, recognize amd64, libtool, lib64 & 64-bit fixes * Fri Aug 1 2003 Götz Waschk <waschk@linux-mandrake.com> 4.2.3-7mdk - drop requires on libopenssl0 * Fri Jun 06 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 4.2.3-6mdk - use double %%'s in changelog * Fri Feb 7 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.2.3-5mdk - Fix build, maintainer please test * Fri Jul 26 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 4.2.3-4mdk - rpmlint fixes: configure-without-libdir-spec, hardcoded-library-path * Mon Jun 10 2002 Stefan van der Eijk <stefan@eijk.nu> 4.2.3-3mdk - BuildRequires - fix %%configure * Thu Feb 14 2002 Vincent Danen <vdanen@mandrakesoft.com> 4.2.3-2mdk - fix initscript (restart was acting like restop) - bzip2 all patches - re-include perlpath patch * Wed Feb 13 2002 Vincent Danen <vdanen@mandrakesoft.com> 4.2.3-1mdk - 4.2.3 - merge patches from RedHat * Tue Nov 6 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 4.2.2-2mdk - pass --build/--host/--target when not using %%configure - add URL (rpmlint) - Add Provides for what is Obsolete (rpmlint) * Wed Oct 10 2001 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.2.2-1mdk - new version - removed P3, it's merged upstream - made rpmlint happy. * Mon Sep 24 2001 Vincent Saugey <vince@mandrakesoft.com> 4.2.1-5mdk - Change release * Sat Sep 22 2001 Vincent Saugey <vince@mandrakesoft.com> 4.2.1-4mdk - Change require on openssl. * Sun Sep 16 2001 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.2.1-3mdk - added patch 2 and 3 - build with OpenSSL support * Mon Aug 25 2001 Vincent Saugey <vince@mandrakesoft.com> 4.2.1-2mdk - Add obsolete * Thu Apr 5 2001 Vincent Saugey <vince@mandrakesoft.com> 4.2.1-1mdk - Up to 4.2.1 - Libification - Merging rh patch * Fri Jun 9 2000 Vincent Saugey <vince@mandrakesoft.com> 4.1.2-1mdk - Up to 4.1.2 - Clean in %%file * Tue Jun 6 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 4.1.1-6mdk - Remove crappy perl-PDL dependences. * Thu May 25 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 4.1.1-5mdk - libtoolizifications. * Wed Apr 12 2000 Vincent Saugey <vince@mandrakesoft.com> 4.1.1-4mdk - Correct ldconfig in postun * Sat Mar 25 2000 Vincent Saugey <vince@mandrakesoft.com> 4.1.1-3mdk - many change in config snmpd file * Thu Mar 23 2000 Vincent Saugey <vince@mandrakesoft.com> 4.1.1-2mdk - Remove tkmib - Patch for broken link in man page * Thu Mar 21 2000 Vincent Saugey <vince@mandrakesoft.com> 4.1.1-1mdk - Update to 4.1.1 - Modification in spec file - corrected group * Mon Jan 24 2000 Francis Galiegue <francis@mandrakesoft.com> - Fixed spec file (%%install tried to mkdir /var/ucd-snmp) * Tue Nov 30 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - --with-libwrap, not --with-libwrap="-lwrap -lnsl" (rh on crack) - bump spec to 3mdk to get above Chmouel * Sun Oct 31 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - SMP check/build - 4.0.1 + redhat patches * Sat Jul 17 1999 Axalon Bloodstone <axalon@linux-mandrake.com> - 3.6.2 * Wed May 05 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com> - Mandrake adaptions * Thu Apr 8 1999 Wes Hardaker <wjhardaker@ucdavis.edu> - fix Source0 location. - fix the snmpd.conf file to use real community names. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> - auto rebuild in the new build environment (release 3) * Fri Mar 19 1999 Preston Brown <pbrown@redhat.com> - upgrade to 3.6.1, fix configuration file stuff. * Wed Feb 24 1999 Preston Brown <pbrown@redhat.com> - Injected new description and group. * Tue Feb 2 1999 Jeff Johnson <jbj@redhat.com> - restore host resources mib - simplified config file - rebuild for 6.0. * Tue Dec 22 1998 Bill Nottingham <notting@redhat.com> - remove backup file to fix perl dependencies * Tue Dec 8 1998 Jeff Johnson <jbj@redhat.com> - add all relevant rpm scalars to host resources mib. * Sun Dec 6 1998 Jeff Johnson <jbj@redhat.com> - enable libwrap (#253) - enable host module (rpm queries over SNMP!). * Mon Oct 12 1998 Cristian Gafton <gafton@redhat.com> - strip binaries * Fri Oct 2 1998 Jeff Johnson <jbj@redhat.com> - update to 3.5.3. - don't include snmpcheck until perl-SNMP is packaged. * Thu Aug 13 1998 Jeff Johnson <jbj@redhat.com> - ucd-snmpd.init: start daemon w/o -f. * Tue Aug 4 1998 Jeff Johnson <jbj@redhat.com> - don't start snmpd unless requested - start snmpd after pcmcia. * Sun Jun 21 1998 Jeff Johnson <jbj@redhat.com> - all but config (especially SNMPv2p) ready for prime time * Sat Jun 20 1998 Jeff Johnson <jbj@redhat.com> - update to 3.5. * Tue Dec 30 1997 Otto Hammersmith <otto@redhat.com> - created the package... possibly replace cmu-snmp with this.