diff --git a/arpwatch.spec b/arpwatch.spec index e9f4eeb..9ad0e82 100644 --- a/arpwatch.spec +++ b/arpwatch.spec @@ -1,5 +1,4 @@ -# EPEL9: Autoconf version 2.71 or higher is required -%bcond autoreconf 0 +%bcond autoreconf 1 Name: arpwatch Epoch: 14 @@ -25,8 +24,6 @@ SourceLicense: %{shrink: } URL: https://ee.lbl.gov/ -Requires(pre): shadow-utils - Requires: /usr/sbin/sendmail Requires: python3 @@ -51,7 +48,7 @@ Source0: https://ee.lbl.gov/downloads/arpwatch/arpwatch-%{version}.tar.gz # updated), we store the file directly in the repository with the spec file; # see the update-oui-csv script. # -# File oui.csv last fetched 2025-12-11T07:08:04+00:00. +# File oui.csv last fetched 2025-12-11T07:07:44+00:00. Source1: oui.csv Source2: arpwatch.service Source3: arpwatch.sysconfig @@ -59,42 +56,46 @@ Source4: arp2ethers.8 Source5: massagevendor.8 Source6: arpwatch.sysusers -# Latest version of patches 1–9 sent upstream by email 2021-04-24. +# The latest versions of all “arpwatch-3.1-*” patches were sent upstream by +# email 2021-04-24. # Fix section numbers in man page cross-references. With minor changes, this # patch dates all the way back to arpwatch-2.1a4-man.patch, from RHBZ #15442. -Patch1: arpwatch-3.1-man-references.patch +Patch: arpwatch-3.1-man-references.patch # Add, and document, a -u argument to change to a specified unprivileged user # after establishing sockets. This combines and improves multiple previous # patches; see patch header and changelog for notes. -Patch2: arpwatch-3.2-change-user.patch +Patch: arpwatch-3.2-change-user.patch # Fix nonstandard sort flags in arp2ethers script. -Patch3: arpwatch-3.1-arp2ethers-sort-invocation.patch +Patch: arpwatch-3.1-arp2ethers-sort-invocation.patch # Fix stray rm (of an undefined variable) in example arpfetch script. -Patch4: arpwatch-3.1-arpfetch-stray-rm.patch +Patch: arpwatch-3.1-arpfetch-stray-rm.patch # Do not add /usr/local/bin or /usr/local/sbin to the PATH in any scripts -Patch5: arpwatch-3.9-no-usr-local-path.patch +Patch: arpwatch-3.9-no-usr-local-path.patch # Do not attempt to search for local libpcap libraries lying around in the # parent of the build directory, or anywhere else random. This is not expected # to succeed anyway, but it is better to be sure. -Patch6: arpwatch-3.1-configure-no-local-pcap.patch +Patch: arpwatch-3.1-configure-no-local-pcap.patch # RHBZ #244606: Correctly handle -n 0/32 to allow the user to disable reporting # bogons from 0.0.0.0. -Patch7: arpwatch-3.1-all-zero-bogon.patch +Patch: arpwatch-3.1-all-zero-bogon.patch # When arpwatch is terminated cleanly by a signal (INT/TERM/HUP) handler, the # exit code should be zero for success instead of nonzero for failure. -Patch8: arpwatch-3.5-exitcode.patch +Patch: arpwatch-3.5-exitcode.patch # When -i is not given, do not just try the first device found, but keep # checking devices until a usable one is found, if any is available. # Additionally, handle the case where a device provides both supported and # unsupported datalink types. -Patch9: arpwatch-3.5-devlookup.patch +Patch: arpwatch-3.5-devlookup.patch # Replace _getshort(), “a glibc function that hasn't been declared in the # installed headers for many, many years,” with ns_get16(). Fixes C99 # compatibility (https://bugzilla.redhat.com/show_bug.cgi?id=2166336). Sent # upstream by email 2023-02-01. -Patch10: arpwatch-3.3-c99.patch +Patch: arpwatch-3.3-c99.patch + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} %global pkgstatedir %{_sharedstatedir}/arpwatch @@ -129,7 +130,7 @@ awk '/^ \* / { print substr($0, 4); } /^ \*\// { exit }' arpwatch.c | tee LICENSE -%build +%conf %if %{with autoreconf} autoreconf --force --install --verbose %endif @@ -142,6 +143,8 @@ export CPPFLAGS="${CPPFLAGS-} -DTIME_WITH_SYS_TIME=1" %configure --with-sendmail=/usr/sbin/sendmail PYTHON=%{python3} + +%build %make_build ARPDIR=%{pkgstatedir} @@ -211,10 +214,6 @@ fi %systemd_post arpwatch.service -%pre -%sysusers_create_compat %{SOURCE6} - - %postun %systemd_postun_with_restart arpwatch.service