rpms/vnstat/devel vnstat.spec,1.6,1.7

Adrian Reber (adrian) fedora-extras-commits at redhat.com
Mon Feb 26 20:26:57 UTC 2007


Author: adrian

Update of /cvs/extras/rpms/vnstat/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22299

Modified Files:
	vnstat.spec 
Log Message:
* Mon Feb 26 2007 Adrian Reber <adrian at lisas.de> - 1.4-9
- applied patch for spec file cleanup (#229037)



Index: vnstat.spec
===================================================================
RCS file: /cvs/extras/rpms/vnstat/devel/vnstat.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vnstat.spec	15 Sep 2006 19:49:50 -0000	1.6
+++ vnstat.spec	26 Feb 2007 20:26:25 -0000	1.7
@@ -1,23 +1,26 @@
 Summary:	Console-based network traffic monitor
 Name:		vnstat
 Version:	1.4
-Release:	8%{?dist}
+Release:	9%{?dist}
 
 License:	GPL
 Group:		System Environment/Daemons
 URL:		http://humdi.net/vnstat/
 Source0:	http://humdi.net/vnstat/vnstat-%{version}.tar.gz
 Source1:	FAQ.vnstat
+Requires(pre):	/usr/sbin/useradd
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
-vnStat is a console-based network traffic monitor that uses the
-/proc -filesystem to get the needed information. This means that vnStat wont
-actually be sniffing any traffic. See the webpage for few 'screenshots'.
+vnStat is a console-based network traffic monitor that keeps a log of daily
+network traffic for the selected interface(s). vnStat isn't a packet sniffer.
+The traffic information is analyzed from the /proc-filesystem, so vnStat can
+be used without root permissions. See the webpage for few 'screenshots'.
 
 %prep
 %setup -q
 %{__cp} %{SOURCE1} FAQ
+%{__sed} -i 's/ifconfig/ip addr show/' src/vnstat.c
 
 %build
 %{__make} %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
@@ -36,7 +39,7 @@
 
 %{__cat} >> $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/%{name} << END
 MAILTO=root
-# to enable intrerface monitoring via vnstat remove comment on next line
+# to enable interface monitoring via vnstat remove comment on next line
 # */5 * * * *  vnstat %{_sbindir}/%{name}.cron
 END
 
@@ -69,12 +72,8 @@
 %{__rm} -rf $RPM_BUILD_ROOT
 
 %pre
-useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/%{name} -c 'vnstat user' %{name} >/dev/null 2>&1 ||:
-
-%preun
-if [ "$1" -eq "0" ]; then
-        userdel %{name}
-fi
+%{_sbindir}/useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/%{name} \
+	-M -c "vnStat user" %{name} > /dev/null 2>&1 || :
 
 %files
 %defattr(-,root,root,-)
@@ -87,6 +86,9 @@
 %attr(-,vnstat,vnstat)%{_localstatedir}/lib/%{name}
 
 %changelog
+* Mon Feb 26 2007 Adrian Reber <adrian at lisas.de> - 1.4-9
+- applied patch for spec file cleanup (#229037)
+
 * Fri Sep 15 2006 Adrian Reber <adrian at lisas.de> - 1.4-8
 - rebuilt
 




More information about the scm-commits mailing list