From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 16 Dec 2003 19:36:16 +0300 From: Alexey Tourbin To: devel@altlinux.ru Message-ID: <20031216163616.GP18450@julia.office.altlinux.ru> Mail-Followup-To: devel@altlinux.ru References: <20031203145633.GA10929@basalt.office.altlinux.org> <20031203152912.GZ4940@julia.office.altlinux.ru> <20031210151832.7d6c66ec.kt@tyumen.ru> <20031210121301.GM27405@julia.office.altlinux.ru> <20031212173037.GQ18450@julia.office.altlinux.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3vPM4r6bCybeb41V" Content-Disposition: inline In-Reply-To: <20031212173037.GQ18450@julia.office.altlinux.ru> Subject: [devel] Re: net-snmp X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.3 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2003 16:36:20 -0000 Archived-At: List-Archive: List-Post: --3vPM4r6bCybeb41V Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, Dec 12, 2003 at 08:30:37PM +0300, Alexey Tourbin wrote: > > > > Этот модуль теперь входит в net-snmp bundle и не распространяется > > > > через CPAN. Так что он должен собираться из самого net-snmp. > > > > Попробую сейчас этим заняться. > > > есть ли какие новости? > > > > Нет. :( > > Появились новости. Технически это нужно собирать так, как это есть в > прилагаемом патче. Фактически оно заваливается на тестах, т.е. > признается, что не работает. Чтобы "заткнуть дыру", я "пошел на сделку с совестью" и отключил тесты. 2incoming: perl-SNMP-4.2.0-alt1.src.rpm нужно удалить. > Кто-нибудь может посмотреть, что там по существу не работает? Я в SNMP > плохо разбираюсь. И у меня локальная сеть периодически отваливается. :) > > И ещё вопрос: откуда взялся perlmodules.patch? $ srpmcmp --deep net-snmp-5.0.9-alt1.src.rpm net-snmp-5.0.9-alt2.src.rpm --- net-snmp-5.0.9-alt1/net-snmp.spec 2003-11-27 13:31:18 +0000 +++ net-snmp-5.0.9-alt2/net-snmp.spec 2003-12-16 16:27:53 +0000 @@ -1,12 +1,14 @@ Name: net-snmp Version: 5.0.9 -Release: alt1 +Release: alt2 Summary: Tools and servers for the SNMP protocol License: BSD-like Group: System/Servers +Url: http://net-snmp.sourceforge.net +Packager: Konstantin Timoshenko -Source0: http://prdownloads.sourceforge.net/net-snmp/net-snmp-%{version}.tar.bz2 +Source0: http://prdownloads.sourceforge.net/net-snmp/net-snmp-%version.tar.bz2 Source1: %name.init Source2: %name.conf Source3: %name.logrotate @@ -26,8 +28,14 @@ Obsoletes: cmu-snmp ucd-snmp BuildPreReq: librpm-devel >= 4.0.4, rpm-build >= 4.0.4, autoconf_2.13 -# Automatically added by buildreq on Wed Oct 22 2003 (-bi) -BuildRequires: XFree86-libs bzlib-devel glibc-devel-static libbeecrypt-devel libdb4.0-devel libelf-devel libpopt-devel librpm-devel libssl-devel libwrap-devel perl-Term-ReadLine-Gnu perl-Tk perl-i18n perl-libnet zlib-devel +%def_disable static +%{?_enable_static:BuildPreReq: glibc-devel-static} + +# we've got perl modules linked against libnetsnmp.so +%define __spec_autodep_custom_pre export LD_LIBRARY_PATH=%buildroot%_libdir + +# Automatically added by buildreq on Tue Dec 16 2003 (-bi) +BuildRequires: XFree86-libs chrpath libdb4.0-devel libelf-devel libpopt-devel librpm-devel libssl-devel libwrap-devel pdksh perl-Term-ReadLine-Gnu perl-Tk perl-devel perl-i18n perl-libnet %package -n lib%name Summary: The shared libraries for the Net-SNMP project @@ -69,6 +77,11 @@ Group: Development/C Obsoletes: libucd-snmp-devel-static Requires: libucd-snmp-devel = %version-%release +%package -n perl-SNMP +Summary: Perl SNMP Extension Module +Group: Development/Perl +Requires: lib%name = %version-%release + %description SNMP (Simple Network Management Protocol) is a protocol used for network management (hence the name). The Net-SNMP project includes various SNMP @@ -121,6 +134,12 @@ statically linked applications for use w network management tools. You'll also need to have the libucd-snmp-devel package installed. +%description -n perl-SNMP +This is the Perl5 'SNMP' extension module. The SNMP module provides +a full featured, tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) API. +The SNMP module also provides an interface to the SMI MIB parse-tree +for run-time access to parsed MIB data. + %prep %setup -q %patch0 -p0 @@ -133,7 +152,8 @@ package installed. %build %set_autoconf_version 2.13 %__autoconf -%configure \ +%{?!_enable_static:export lt_cv_prog_cc_static_works=no} +%configure %{subst_enable static} \ --enable-shared \ --with-cflags="$RPM_OPT_FLAGS" \ --with-sys-location="Unknown" \ @@ -151,6 +171,26 @@ package installed. %make +# XXX tests fail +%def_without test + +#if [ ! -d /proc/1 ]; then +#: /proc not available, removing some tests +#%__rm -fv t/bulkwalk.t t/get.t +#fi + +# this subset of perl modules is recommended in perl/Makefile.PL +# the order matters for tests! +%define perl_subdirs default_store ASN SNMP OID agent + +# build perl modules +for d in %perl_subdirs; do + pushd perl/$d + export PERL5LIB="$PERL5LIB:$PWD/blib/lib:$PWD/blib/arch" + %perl_vendor_build --NET_SNMP_CONFIG=../../net-snmp-config --NET_SNMP_IN_SOURCE=true + popd +done + %install %makeinstall INSTALL='$(LIBTOOL) --mode=install /usr/bin/install -c' \ includedir=$RPM_BUILD_ROOT%_includedir/%name \ @@ -166,11 +206,24 @@ package installed. # Remove tkmib. %__rm -fv $RPM_BUILD_ROOT%_bindir/tkmib -%post -n lib%name -p /sbin/ldconfig -%postun -n lib%name -p /sbin/ldconfig +# install perl modules +for d in %perl_subdirs; do + pushd perl/$d + %perl_vendor_install + popd +done + +# perl loadable objects contain $RPM_BUILD_DIR-dependent RPATH +chrpath -d `find $RPM_BUILD_ROOT%perl_vendor_autolib -type f -name '*.so'` + +%post -n lib%name -p %post_ldconfig +%postun -n lib%name -p %postun_ldconfig + +%post -n libucd-snmp -p %post_ldconfig +%postun -n libucd-snmp -p %postun_ldconfig %post -/usr/sbin/useradd -r -d /dev/null -s /dev/null -n snmp &> /dev/null ||: +/usr/sbin/useradd -r -d /dev/null -s /dev/null -n snmp >/dev/null 2>&1 ||: %post_service snmpd %preun @@ -204,13 +257,17 @@ package installed. %_libdir/libnetsnmphelpers.so %_libdir/libnetsnmpmibs.so %_includedir/%name -%_mandir/man3/* +%_man3dir/* +%exclude %perl_vendor_man3dir/SNMP* +%exclude %perl_vendor_man3dir/NetSNMP* +%if_enabled static %files -n lib%name-devel-static %_libdir/libnetsnmp.a %_libdir/libnetsnmpagent.a %_libdir/libnetsnmphelpers.a %_libdir/libnetsnmpmibs.a +%endif %files -n libucd-snmp %_libdir/libsnmp.so.* @@ -219,10 +276,26 @@ package installed. %_libdir/libsnmp.so %_includedir/ucd-snmp +%if_enabled static %files -n libucd-snmp-devel-static %_libdir/libsnmp.a +%endif + +%files -n perl-SNMP +%doc perl/SNMP/{examples,README,BUG,TODO} +%perl_vendor_man3dir/SNMP* +%perl_vendor_man3dir/NetSNMP* +%perl_vendor_archlib/SNMP* +%perl_vendor_autolib/SNMP* +%perl_vendor_archlib/NetSNMP* +%perl_vendor_autolib/NetSNMP* %changelog +* Tue Dec 16 2003 Alexey Tourbin 5.0.9-alt2 +- perl-SNMP package built +- lib{net,ucd}-snmp-devel-static not packaged by default +- additional spec conventions enforcement + * Wed Oct 22 2003 Konstantin Timoshenko 5.0.9-alt1 - 5.0.9 End of diff --3vPM4r6bCybeb41V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/3zSAfBKgtDjnu0YRAvuPAJ9OvwnVsY8b/zPA8PmrsC4GfcxHkwCgnCa8 Lc+RCvy6CD/1du1Mevz2rXU= =WR51 -----END PGP SIGNATURE----- --3vPM4r6bCybeb41V--