public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/vnstat] rawhide: Spec cleanup
@ 2026-11-03 17:14 Adrian Reber
0 siblings, 0 replies; only message in thread
From: Adrian Reber @ 2026-11-03 17:14 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/vnstat
Branch : rawhide
Commit : 208da1897209d0a8bedce3982d7e659b17e47671
Author : Adrian Reber <adrian@lisas.de>
Date : 2026-11-03T17:13:44+00:00
Stats : +4/-15 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/vnstat/c/208da1897209d0a8bedce3982d7e659b17e47671?branch=rawhide
Log:
Spec cleanup
- Drop the sed on cfg/vnstat.conf: upstream's install-data-hook
regenerates /etc/vnstat.conf from "vnstat --showconfig", so the
substitutions never reached the shipped config
- Drop /run/vnstat and its tmpfiles.d config: vnstatd only uses the
pid file in daemon mode and the service file runs it with --nodaemon
- Run the upstream test suite in %check
Signed-off-by: Adrian Reber <adrian@lisas.de>
---
diff --git a/vnstat.spec b/vnstat.spec
index b7ee724..fabec37 100644
--- a/vnstat.spec
+++ b/vnstat.spec
@@ -16,6 +16,7 @@ BuildRequires: gcc
BuildRequires: gd-devel
BuildRequires: systemd
BuildRequires: sqlite-devel
+BuildRequires: check-devel
%description
vnStat is a console-based network traffic monitor that keeps a log of daily
@@ -37,11 +38,6 @@ be outputted either to a file or to standard output.
%setup -q
%patch -P0 -p1
-# disable maximum bandwidth setting and change pidfile location
-sed -i -e "s,/var/run/,/run/vnstat/,g; \
- s,MaxBandwidth 100,MaxBandwidth 0,g;" \
- cfg/vnstat.conf
-
# Create a sysusers.d config file
cat >vnstat.sysusers.conf <<EOF
u vnstat - 'vnStat user' %{_localstatedir}/lib/%{name} -
@@ -54,10 +50,6 @@ EOF
%install
%{__mkdir_p} $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
%{__mkdir_p} $RPM_BUILD_ROOT%{_unitdir}
-%{__mkdir_p} $RPM_BUILD_ROOT%{_tmpfilesdir}
-
-%{__mkdir_p} %{buildroot}/run/
-%{__install} -d -m 0700 %{buildroot}/run/%{name}/
%{__make} install DESTDIR=$RPM_BUILD_ROOT
%{__install} -p -m 644 examples/systemd/vnstat.service $RPM_BUILD_ROOT%{_unitdir}/
@@ -66,13 +58,12 @@ EOF
%{__rm} -rf examples/launchd
%{__rm} -rf examples/upstart
-%{__cat} >> $RPM_BUILD_ROOT/%{_tmpfilesdir}/%{name}.conf << END
-D /run/vnstat 0700 vnstat vnstat
-END
-
install -m0644 -D vnstat.sysusers.conf %{buildroot}%{_sysusersdir}/vnstat.conf
+%check
+%{__make} check
+
%post
%systemd_post vnstat.service
@@ -87,13 +78,11 @@ install -m0644 -D vnstat.sysusers.conf %{buildroot}%{_sysusersdir}/vnstat.conf
%doc CHANGES FAQ README INSTALL examples
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_unitdir}/%{name}.service
-%{_tmpfilesdir}/%{name}.conf
%{_mandir}/man1/vnstat.1*
%{_mandir}/man5/vnstat.conf.5*
%{_mandir}/man8/vnstatd.8*
%{_bindir}/vnstat
%{_sbindir}/vnstatd
-%attr(-,vnstat,vnstat)%dir /run/%{name}/
%attr(-,vnstat,vnstat)%{_localstatedir}/lib/%{name}
%{_sysusersdir}/vnstat.conf
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-03 17:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 17:14 [rpms/vnstat] rawhide: Spec cleanup Adrian Reber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox