>
>
>>I've managed to compile 4.2.5 on cooker, but it requires changing a
>>number of patches (or disabling them). I'll leave that to the maintainer
>>of the package. My 4.2.5. src.rpm is available on request.
>>
>>
>
>I would like to have the spec file (and patches if nessesary) so that I can
>learn how you did it, thanks.
>
For the 4.2.5 version I just disabled all the patches that didn't work
(lazy me!),
# %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
and I had to change the
name of the libs (wasn't too happy with that).
%files -n libsnmp%{major}
%defattr(-,root,root,-)
%{_libdir}/*-*.so
Beware that I didn't test the package...
>>Maybe he wants to go for the new 5.x series of net-snmp...
>>
>>
>
>Yes, that makes sense.
>
:-)
%define major 0
Summary: A collection of SNMP protocol tools from UC-Davis.
Name: ucd-snmp
Version: 4.2.5
Release: 1mdk
License: BSDish
Group: System/Servers
Source0: http://prdownloads.sourceforge.net/net-snmp/%{name}-%{version}.tar.bz2
Source1: ucd-snmpd.init
Source2: snmpd.conf
Source3: ucd-snmpd.logrotate
BuildRoot: %{_tmppath}/%{name}-buildroot
Prereq: /sbin/chkconfig
BuildRequires: openssl-devel
BuildRequires: tcp_wrappers-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.1-libtool.patch.bz2
Patch7: ucd-snmp-4.2.3-snmpnetstat.patch.bz2
Patch8: ucd-snmp-4.2.1-perlpath.patch.bz2
%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 libsnmp%{major}
Group: System/Libraries
Summary: Librairies for Network management (SNMP), from the NET-SNMP project.
Obsoletes: ucd-snmp
Provides: ucd-snmp
%description -n libsnmp%{major}
The libsnmp%{major} package contains the libraries for use with the NET-SNMP
project's network management tools.
%package -n libsnmp%{major}-devel
Group: Development/C
Summary: The development environment for the NET-SNMP project.
Provides: %{name}-devel
Provides: libsnmp-devel
Requires: libsnmp%{major} = %{version}
Obsoletes: ucd-snmp-devel
Provides: ucd-snmp-devel
%description -n libsnmp%{major}-devel
The libsnmp%{major}-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
%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
%build
#libtoolize --force
#aclocal
#autoconf
%serverbuild
./configure \
--prefix=%{_prefix} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--mandir=%{_mandir} \
--enable-static \
--enable-shared \
--includedir=%{_includedir/snmp} \
--with-sys-location="Unknown" \
--with-mib-modules="host smux agentx target tunnel ucd-snmp/dlmod" \
--with-logfile="/var/log/snmpd.log" \
--with-persistent-directory="/var/lib/ucd-snmp" \
--with-openssl \
--with-libwrap \
--with-zlib \
--disable-debugging \
--enable-ipv6 \
--enable-reentrant \
--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
%post
%_post_service snmpd
%post -n libsnmp%{major} -p /sbin/ldconfig
%preun
%_preun_service snmpd
%postun -n libsnmp%{major} -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
%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/snmpdelta.1*
%attr(0644,root,root) %{_mandir}/man1/snmpget.1*
%attr(0644,root,root) %{_mandir}/man1/snmpgetnext.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 libsnmp%{major}
%defattr(-,root,root,-)
%{_libdir}/*-*.so
%files -n libsnmp%{major}-devel
%defattr(0644,root,root,755)
%defattr(-,root,root,-)
%{_libdir}/libsnmp.so
%{_libdir}/libsnmp.a
%{_libdir}/libsnmp.la
%{_includedir}/ucd-snmp
%{_mandir}/man3/*
%changelog
* Sun Jun 9 2002 Stefan van der Eijk <[EMAIL PROTECTED]> 4.2.5-1mdk
- 4.2.5
- fix %%configure
- fix %%files section
* Thu Feb 14 2002 Vincent Danen <[EMAIL PROTECTED]> 4.2.3-2mdk
- fix initscript (restart was acting like restop)
- bzip2 all patches
- re-include perlpath patch
* Wed Feb 13 2002 Vincent Danen <[EMAIL PROTECTED]> 4.2.3-1mdk
- 4.2.3
- merge patches from RedHat
* Tue Nov 6 2001 Jeff Garzik <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 4.2.2-1mdk
- new version
- removed P3, it's merged upstream
- made rpmlint happy.
* Mon Sep 24 2001 Vincent Saugey <[EMAIL PROTECTED]> 4.2.1-5mdk
- Change release
* Sat Sep 22 2001 Vincent Saugey <[EMAIL PROTECTED]> 4.2.1-4mdk
- Change require on openssl.
* Sun Sep 16 2001 Oden Eriksson <[EMAIL PROTECTED]> 4.2.1-3mdk
- added patch 2 and 3
- build with OpenSSL support
* Mon Aug 25 2001 Vincent Saugey <[EMAIL PROTECTED]> 4.2.1-2mdk
- Add obsolete
* Thu Apr 5 2001 Vincent Saugey <[EMAIL PROTECTED]> 4.2.1-1mdk
- Up to 4.2.1
- Libification
- Merging rh patch
* Fri Jun 9 2000 Vincent Saugey <[EMAIL PROTECTED]> 4.1.2-1mdk
- Up to 4.1.2
- Clean in %file
* Tue Jun 6 2000 Chmouel Boudjnah <[EMAIL PROTECTED]> 4.1.1-6mdk
- Remove crappy perl-PDL dependences.
* Thu May 25 2000 Chmouel Boudjnah <[EMAIL PROTECTED]> 4.1.1-5mdk
- libtoolizifications.
* Wed Apr 12 2000 Vincent Saugey <[EMAIL PROTECTED]> 4.1.1-4mdk
- Correct ldconfig in postun
* Sat Mar 25 2000 Vincent Saugey <[EMAIL PROTECTED]> 4.1.1-3mdk
- many change in config snmpd file
* Thu Mar 23 2000 Vincent Saugey <[EMAIL PROTECTED]> 4.1.1-2mdk
- Remove tkmib
- Patch for broken link in man page
* Thu Mar 21 2000 Vincent Saugey <[EMAIL PROTECTED]> 4.1.1-1mdk
- Update to 4.1.1
- Modification in spec file
- corrected group
* Mon Jan 24 2000 Francis Galiegue <[EMAIL PROTECTED]>
- Fixed spec file (%install tried to mkdir /var/ucd-snmp)
* Tue Nov 30 1999 Axalon Bloodstone <[EMAIL PROTECTED]>
- --with-libwrap, not --with-libwrap="-lwrap -lnsl" (rh on crack)
- bump spec to 3mdk to get above Chmouel
* Sun Oct 31 1999 Axalon Bloodstone <[EMAIL PROTECTED]>
- SMP check/build
- 4.0.1 + redhat patches
* Sat Jul 17 1999 Axalon Bloodstone <[EMAIL PROTECTED]>
- 3.6.2
* Wed May 05 1999 Bernhard Rosenkraenzer <[EMAIL PROTECTED]>
- Mandrake adaptions
* Thu Apr 8 1999 Wes Hardaker <[EMAIL PROTECTED]>
- fix Source0 location.
- fix the snmpd.conf file to use real community names.
* Sun Mar 21 1999 Cristian Gafton <[EMAIL PROTECTED]>
- auto rebuild in the new build environment (release 3)
* Fri Mar 19 1999 Preston Brown <[EMAIL PROTECTED]>
- upgrade to 3.6.1, fix configuration file stuff.
* Wed Feb 24 1999 Preston Brown <[EMAIL PROTECTED]>
- Injected new description and group.
* Tue Feb 2 1999 Jeff Johnson <[EMAIL PROTECTED]>
- restore host resources mib
- simplified config file
- rebuild for 6.0.
* Tue Dec 22 1998 Bill Nottingham <[EMAIL PROTECTED]>
- remove backup file to fix perl dependencies
* Tue Dec 8 1998 Jeff Johnson <[EMAIL PROTECTED]>
- add all relevant rpm scalars to host resources mib.
* Sun Dec 6 1998 Jeff Johnson <[EMAIL PROTECTED]>
- enable libwrap (#253)
- enable host module (rpm queries over SNMP!).
* Mon Oct 12 1998 Cristian Gafton <[EMAIL PROTECTED]>
- strip binaries
* Fri Oct 2 1998 Jeff Johnson <[EMAIL PROTECTED]>
- update to 3.5.3.
- don't include snmpcheck until perl-SNMP is packaged.
* Thu Aug 13 1998 Jeff Johnson <[EMAIL PROTECTED]>
- ucd-snmpd.init: start daemon w/o -f.
* Tue Aug 4 1998 Jeff Johnson <[EMAIL PROTECTED]>
- don't start snmpd unless requested
- start snmpd after pcmcia.
* Sun Jun 21 1998 Jeff Johnson <[EMAIL PROTECTED]>
- all but config (especially SNMPv2p) ready for prime time
* Sat Jun 20 1998 Jeff Johnson <[EMAIL PROTECTED]>
- update to 3.5.
* Tue Dec 30 1997 Otto Hammersmith <[EMAIL PROTECTED]>
- created the package... possibly replace cmu-snmp with this.