rpms/ntop/devel .cvsignore, 1.3, 1.4 ntop.spec, 1.4, 1.5 sources, 1.3, 1.4

Peter Vrabec pvrabec at fedoraproject.org
Mon Mar 2 18:09:43 UTC 2009


Author: pvrabec

Update of /cvs/extras/rpms/ntop/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7164

Modified Files:
	.cvsignore ntop.spec sources 
Log Message:
- upgrade
- invalid certificate fix (#486725)



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/ntop/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore	22 Oct 2008 13:36:48 -0000	1.3
+++ .cvsignore	2 Mar 2009 18:09:12 -0000	1.4
@@ -1 +1,4 @@
-ntop-3.3.8.tar.gz
+GeoIP.tar.gz
+GeoIPASNum.dat.gz
+GeoLiteCity.dat.gz
+ntop-3.3.9.tar.gz


Index: ntop.spec
===================================================================
RCS file: /cvs/extras/rpms/ntop/devel/ntop.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ntop.spec	26 Feb 2009 06:19:10 -0000	1.4
+++ ntop.spec	2 Mar 2009 18:09:12 -0000	1.5
@@ -1,6 +1,6 @@
 Name:           ntop
-Version:        3.3.8
-Release:        3%{?dist}
+Version:        3.3.9
+Release:        1%{?dist}
 Summary:        A network traffic probe similar to the UNIX top command
 Group:          Applications/Internet
 License:        GPLv2
@@ -8,17 +8,21 @@
 Source0:        http://downloads.sourceforge.net/ntop/ntop-%{version}.tar.gz
 Source1:        ntop.init
 Source2:        ntop.conf
+Source3:        GeoIP.tar.gz
+Source4:        GeoLiteCity.dat.gz
+Source5:        GeoIPASNum.dat.gz
 Patch1:         ntop-am.patch
 Patch2:         ntop-running-user.patch
 Patch3:         ntop-dbfile-default-dir.patch
 Patch4:         ntop-enable-sslv3.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:  autoconf, automake, pkgconfig, libtool, groff, libpcap-devel
+BuildRequires:  autoconf, automake, pkgconfig, libtool, groff, libpcap-devel wget
 BuildRequires:  gdbm-devel, gd-devel, rrdtool-devel, openssl-devel
 BuildRequires:  net-snmp-devel, lm_sensors-devel, pcre-devel, mysql-devel
 BuildRequires:  tcp_wrappers-devel, perl(ExtUtils::Embed)
 Requires:       initscripts, graphviz
 Requires(post): /sbin/chkconfig       
+Requires(post): openssl >= 0.9.7f-4, /bin/cat
 Requires(preun):/sbin/chkconfig       
 
 
@@ -46,6 +50,10 @@
 
 %prep
 %setup -q -n ntop-%{version}
+#this looks stupid, ask upstream
+cp %SOURCE3 ./ && tar xvfz GeoIP.tar.gz
+cp %SOURCE4 ./ && gunzip GeoLiteCity.dat.gz
+cp %SOURCE5 ./ && gunzip GeoIPASNum.dat.gz
 
 # executable bits are set on some config files and docs that go into
 # %%{_sysconfdir}/ntop and %%{_datadir}, and some debug source files.  Remove
@@ -59,8 +67,21 @@
 %patch3 -p1 -b .dbfile-default-dir
 %patch4 -p1 -b .sslv3
 
+#fix files not in UTF-8
+for file in {geoiplookup.1.in,geoiplookup6.1.in,geoipupdate.1.in} 
+do
+    mv GeoIP-1.4.6/man/"$file" GeoIP-1.4.6/man/"$file".ISO;
+    iconv -f ISO_8859-1 -t UTF8 GeoIP-1.4.6/man/"$file".ISO >  GeoIP-1.4.6/man/"$file";
+done
 
 %build
+#take care of GeoIP
+cd GeoIP-1.4.6
+%{configure} --disable-static --libdir=/usr/%{_lib}
+#rpath problem
+sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+cd ..
+
 #run ntop own autoconf wrapper
 ./autogen.sh --noconfig
 
@@ -70,6 +91,11 @@
              --enable-snmp                             \
              --enable-mysql                            \
              --disable-static
+#rpath problem
+sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+
+#take care of GeoIP
+cd GeoIP-1.4.6 && make %{?_smp_mflags} && cd ..
 
 make %{?_smp_mflags}
 
@@ -91,11 +117,16 @@
 rm -f $RPM_BUILD_ROOT/%{_datadir}/ntop/html/ntop.html
 # fix permissions
 chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/ntop/plugins/*
-
-# Create files to be %ghost'ed - %ghost'ed files must exist in the buildroot
+# create files to be %ghost'ed - %ghost'ed files must exist in the buildroot
 install -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd
 install -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd/{flows,graphics,interfaces}
 touch      $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/{addressQueue,dnsCache,fingerprint,LsWatch,macPrefix,ntop_pw,prefsCache}.db
+#remove expired certificate
+rm -rf  $RPM_BUILD_ROOT/%{_sysconfdir}/ntop/ntop-cert.pem
+
+#get a rid of GeoIP devel stuff
+rm -rf $RPM_BUILD_ROOT/%{_includedir}
+rm -rf $RPM_BUILD_ROOT/%{_libdir}/lib{GeoIP,GeoIPUpdate}.so
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -109,10 +140,27 @@
 fi
 
 %post
+/sbin/ldconfig
 if [ $1 = 1 ]; then
   /sbin/chkconfig --add %{name} &> /dev/null || :
 fi
 
+# create new self-signed certificate
+%define sslcert %{_sysconfdir}/ntop/ntop-cert.pem
+FQDN=`hostname`
+if [ "x${FQDN}" = "x" ]; then
+   FQDN=localhost.localdomain
+fi
+cat << EOF | %{_bindir}/openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout %{sslcert}  -out %{sslcert} 2>/dev/null
+--
+SomeState
+SomeCity
+SomeOrganization
+SomeOrganizationalUnit
+${FQDN}
+root@${FQDN}
+EOF
+
 %preun
 if [ $1 = 0 ]; then
   /sbin/service %{name} stop    &> /dev/null || :
@@ -120,6 +168,7 @@
 fi
 
 %postun
+/sbin/ldconfig
 if [ "$1" -ge "1" ]; then
   /sbin/service %{name} condrestart &> /dev/null || :
 fi
@@ -132,12 +181,16 @@
 %doc docs/1STRUN.txt NEWS README SUPPORT_NTOP.txt THANKS
 %config(noreplace) %{_sysconfdir}/ntop.conf
 %config(noreplace) %{_sysconfdir}/ntop
+%config(noreplace) %{_sysconfdir}/GeoIP.conf
+%config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %{_initrddir}/ntop
 %{_sbindir}/*
-%{_libdir}/lib*%{version}*.so
-%{_libdir}/ntop
+%{_bindir}/*
+%{_libdir}/*
+%{_mandir}/man1/*
 %{_mandir}/man8/*
 %{_datadir}/ntop
+%{_datadir}/GeoIP
 %dir %{_localstatedir}/lib/ntop
 %defattr(0644,root,root,-)
 %ghost %{_localstatedir}/lib/ntop/addressQueue.db
@@ -154,8 +207,9 @@
 %{_localstatedir}/lib/ntop/rrd
 
 %changelog
-* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.3.8-3
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+* Fri Feb 27 2009 Peter Vrabec <pvrabec at redhat.com> - 3.3.9-1
+- upgrade
+- invalid certificate fix (#486725)
 
 * Sat Jan 24 2009 Rakesh Pandit <rakesh at fedoraproject.org> - 3.3.8-2
 - Bumped - for new update in mysql


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/ntop/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	22 Oct 2008 13:36:48 -0000	1.3
+++ sources	2 Mar 2009 18:09:12 -0000	1.4
@@ -1 +1,4 @@
-19c6a582c285ffae18bf0c3b599d184e  ntop-3.3.8.tar.gz
+cb14b1beeb40631a12676b11ca0c309a  GeoIP.tar.gz
+32997e6d3b1df64cbbb3ecc0adfb9ad8  GeoIPASNum.dat.gz
+1838a3a68f2c7a9eb310cee8f82b6a64  GeoLiteCity.dat.gz
+0c22038e0f2aa003110437b5a5d5a6a5  ntop-3.3.9.tar.gz




More information about the fedora-extras-commits mailing list