public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/arpwatch] epel10: Use various long options
@ 2026-06-25  9:22 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-06-25  9:22 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/arpwatch
Branch : epel10
Commit : 412846113499d996fc79645d638e68e1aaa7825b
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-06-25T07:05:34+01:00
Stats  : +36/-22 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/arpwatch/c/412846113499d996fc79645d638e68e1aaa7825b?branch=epel10

Log:
Use various long options

---
diff --git a/arpwatch.spec b/arpwatch.spec
index fefffe2..c8d83dc 100644
--- a/arpwatch.spec
+++ b/arpwatch.spec
@@ -115,16 +115,19 @@ will automatically keep track of the IP addresses on your network.
 %autosetup -p1
 
 # Substitute absolute paths to awk scripts in shell scripts
-sed -r -i 's|(-f *)([^[:blank:]+]\.awk)|\1%{_datadir}/arpwatch/\2|' arp2ethers
+sed --regexp-extended --in-place \
+    's|(-f *)([^[:blank:]+]\.awk)|\1%{_datadir}/arpwatch/\2|' arp2ethers
 
 # Fix default directory in man pages to match ARPDIR in build section. This was
 # formerly done by arpwatch-dir-man.patch. For thoroughness, do the same
 # replacement in update-ethercodes.sh.in and bihourly.sh, even though they are
 # not installed.
-sed -r -i 's|/usr/local/arpwatch|%{pkgstatedir}|g' *.8.in *.sh.in *.sh
+sed --regexp-extended --in-place \
+    's|/usr/local/arpwatch|%{pkgstatedir}|g' *.8.in *.sh.in *.sh
 
 # Fix Python interpreter path (but note that this script is not installed)
-sed -r -i 's|/usr/local/bin/python|%{python3}|g' update-ethercodes.sh.in
+sed --regexp-extended --in-place \
+    's|/usr/local/bin/python|%{python3}|g' update-ethercodes.sh.in
 
 # Emailed upstream requesting a separate LICENSE/COPYING file 2022-07-30.
 # For now, we extract it from the main source file’s “header” comment.
@@ -151,53 +154,63 @@ export CPPFLAGS="${CPPFLAGS-} -DTIME_WITH_SYS_TIME=1"
 
 
 %install
-install -p -D -m 0644 %{SOURCE6} '%{buildroot}%{_sysusersdir}/arpwatch.conf'
+install -D --preserve-timestamps --mode 0644 %{SOURCE6} \
+    '%{buildroot}%{_sysusersdir}/arpwatch.conf'
 
 # The upstream Makefile does not create the directories it requires, so we must
 # do it manually. Additionally, it attempts to comment out the installation of
 # the init script on non-FreeBSD platforms, but this does not quite work as
 # intended. We just let it install the file, then remove it afterwards.
-install -d %{buildroot}%{_mandir}/man8 \
-    %{buildroot}%{_sbindir} \
+install --directory \
     %{buildroot}%{_datadir}/arpwatch \
-    %{buildroot}%{pkgstatedir} \
+    %{buildroot}%{_mandir}/man8 \
+    %{buildroot}%{_prefix}/etc/rc.d \
+    %{buildroot}%{_sbindir} \
     %{buildroot}%{_unitdir} \
-    %{buildroot}%{_prefix}/etc/rc.d
+    %{buildroot}%{pkgstatedir}
 
 %make_install
 
 # Make install uses mode 0555, which is unconventional, and which can interfere
 # with debuginfo generation since the file is not writable by its owner.
-chmod -v 0755 %{buildroot}%{_sbindir}/arpwatch %{buildroot}%{_sbindir}/arpsnmp
+chmod --verbose 0755 %{buildroot}%{_sbindir}/arp{snmp,watch}
 
-install -p -t %{buildroot}%{_datadir}/arpwatch -m 0644 *.awk
-install -p -t %{buildroot}%{_sbindir} arp2ethers
-install -p massagevendor.py %{buildroot}%{_sbindir}/massagevendor
+install --preserve-timestamps --mode 0644 \
+    --target %{buildroot}%{_datadir}/arpwatch *.awk
+install --preserve-timestamps \
+    --target %{buildroot}%{_sbindir} arp2ethers
+install --preserve-timestamps massagevendor.py \
+    %{buildroot}%{_sbindir}/massagevendor
 
-install -p -t %{buildroot}%{pkgstatedir} -m 0644 *.dat
+install --preserve-timestamps --mode 0644 \
+    --target %{buildroot}%{pkgstatedir} *.dat
 touch %{buildroot}%{pkgstatedir}/arp.dat- \
     %{buildroot}%{pkgstatedir}/arp.dat.new
 
-install -p -t %{buildroot}%{_unitdir} -m 0644 %{SOURCE2}
-%{python3} massagevendor.py < %{SOURCE1} \
+install --preserve-timestamps --mode 0644 \
+    --target %{buildroot}%{_unitdir} %{SOURCE2}
+%{python3} massagevendor.py \
+    < %{SOURCE1} \
     > %{buildroot}%{pkgstatedir}/ethercodes.dat
-touch -r %{SOURCE1} ethercodes.dat
+touch --reference %{SOURCE1} ethercodes.dat
 
 # Add an environment/sysconfig file:
-install -d %{buildroot}%{_sysconfdir}/sysconfig
-install -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/arpwatch
+install --directory %{buildroot}%{_sysconfdir}/sysconfig
+install --preserve-timestamps --mode 0644 \
+    %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/arpwatch
 
 # Add extra man pages not provided upstream:
-install -p -t %{buildroot}%{_mandir}/man8 -m 0644 %{SOURCE4} %{SOURCE5}
+install --preserve-timestamps --mode 0644 \
+    --target %{buildroot}%{_mandir}/man8 %{SOURCE4} %{SOURCE5}
 
 # Remove legacy init scripts:
-rm -rvf %{buildroot}%{_prefix}/etc/rc.d
+rm --recursive --verbose %{buildroot}%{_prefix}/etc/rc.d
 
 
 %check
 # Verify the sed script in the prep section did not miss fixing the ARPDIR
 # anywhere
-if grep -FrnI '/usr/local/arpwatch' .
+if grep --fixed --recursive --line-number -I '/usr/local/arpwatch' .
 then
   echo 'Missed fixing ARPDIR in at least one file' 1>&2
   exit 1
@@ -205,7 +218,8 @@ fi
 
 # Verify we did not miss any PATH alterations in
 # arpwatch-no-usr-local-path.patch.
-if grep -ErnI --exclude=mkdep --exclude='config.*' '^[^#].*/usr/local/s?bin' .
+if grep --extended-regexp --recursive --line-number -I \
+    --exclude=mkdep --exclude='config.*' '^[^#].*/usr/local/s?bin' .
 then
   echo 'Probably missed an uncommented PATH alteration with /usr/local' 1>&2
   exit 1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-25  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25  9:22 [rpms/arpwatch] epel10: Use various long options Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox