commit arpwatch for openSUSE:Factory
Hello community, here is the log from the commit of package arpwatch for openSUSE:Factory checked in at 2017-08-28 15:10:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/arpwatch (Old) and /work/SRC/openSUSE:Factory/.arpwatch.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "arpwatch" Mon Aug 28 15:10:15 2017 rev:25 rq:516799 version:2.1a15 Changes: -------- --- /work/SRC/openSUSE:Factory/arpwatch/arpwatch.changes 2015-06-23 11:58:52.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.arpwatch.new/arpwatch.changes 2017-08-28 15:10:25.097638966 +0200 @@ -1,0 +2,11 @@ +Sat Aug 12 16:09:14 UTC 2017 - tchvatal@suse.com + +- Remove initscript support. Fix the service initialization to\ + either allow single full client or user has to symlink the instance + and make sure he can run only one of them. bsc#737527 +- Make sure rcarpwatch is working +- Use install commands for installation of files +- Format with spec-cleaner +- Generate temp files using systemd + +------------------------------------------------------------------- Old: ---- arpwatch.init New: ---- arpwatch.service ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ arpwatch.spec ++++++ --- /var/tmp/diff_new_pack.UqpogP/_old 2017-08-28 15:10:27.669277203 +0200 +++ /var/tmp/diff_new_pack.UqpogP/_new 2017-08-28 15:10:27.673276641 +0200 @@ -1,7 +1,7 @@ # # spec file for package arpwatch # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,36 +16,17 @@ # -%if 0%{?suse_version} > 1140 -%define has_systemd 1 -%endif - Name: arpwatch -BuildRequires: libpcap-devel -BuildRequires: postfix -%if 0%{?has_systemd} -BuildRequires: systemd -%{?systemd_requires} -%endif -Url: http://www-nrg.ee.lbl.gov/nrg.html -Requires: arpwatch-ethercodes -%if 0%{?suse_version} <= 1140 -PreReq: /usr/bin/touch %insserv_prereq %fillup_prereq -%else -PreReq: /usr/bin/touch %fillup_prereq -%endif -Summary: Arpwatch Keeps Track of Ethernet and IP Address Pairings -License: BSD-3-Clause -Group: Productivity/Networking/Diagnostic Version: 2.1a15 Release: 0 +Summary: Keeps Track of Ethernet and IP Address Pairings +License: BSD-3-Clause +Group: Productivity/Networking/Diagnostic +Url: http://www-nrg.ee.lbl.gov/nrg.html Source: %{name}-%{version}.tar.bz2 -%if 0%{?has_systemd} Source10: arpwatch@.service -%else -Source10: arpwatch.init -%endif Source11: sysconfig.arpwatch +Source12: arpwatch.service Patch0: arpwatch-2.1a11-chrootbuild.diff Patch1: arpwatch-no-source-zero.dif Patch3: arpwatch-2.1a11-tokenring.diff @@ -54,7 +35,12 @@ Patch6: arpwatch-2.1a11-drop-privs.dif Patch7: arpwatch-2.1a11-emailaddr.dif Patch8: arpwatch-2.1a15-massagevendor.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: libpcap-devel +BuildRequires: postfix +BuildRequires: systemd-rpm-macros +Requires: arpwatch-ethercodes +Requires(post): %fillup_prereq +Requires(post): coreutils %description Arpwatch keeps track of Ethernet and IP address pairings. It logs @@ -71,7 +57,7 @@ %prep %setup -q -%patch -P 0 -E +%patch0 -E %patch1 -p1 -E %patch3 -p1 -E %patch4 -p1 -E @@ -82,88 +68,63 @@ %build %configure -%{__make} ARPDIR=/var/lib/arpwatch %{?_smp_mflags} +make ARPDIR=%{_localstatedir}/lib/arpwatch %{?_smp_mflags} %install mkdir -p \ -%if 0%{?has_systemd} - $RPM_BUILD_ROOT/%{_unitdir} \ -%else - $RPM_BUILD_ROOT/etc/init.d \ -%endif - $RPM_BUILD_ROOT/%{_sbindir} \ - $RPM_BUILD_ROOT/%{_datadir}/arpwatch \ - $RPM_BUILD_ROOT/%{_mandir}/man8 \ - $RPM_BUILD_ROOT/var/adm/fillup-templates -%makeinstall + %{buildroot}/%{_tmpfilesdir} \ + %{buildroot}/%{_sbindir} \ + %{buildroot}/%{_datadir}/arpwatch \ + %{buildroot}/%{_mandir}/man8 \ + %{buildroot}%{_localstatedir}/adm/fillup-templates +%make_install # ethercodes.dat is in the arpwatch-ethercodes package -rm -f $RPM_BUILD_ROOT/%{_datadir}/arpwatch/ethercodes.dat +rm -f %{buildroot}/%{_datadir}/arpwatch/ethercodes.dat for file in massagevendor euppertolower.awk duplicates.awk p.awk; do - cp -p ${file} $RPM_BUILD_ROOT/%{_datadir}/arpwatch + cp -p ${file} %{buildroot}/%{_datadir}/arpwatch done -make DESTDIR=$RPM_BUILD_ROOT install-man -%if 0%{?has_systemd} -install -m 0644 $RPM_SOURCE_DIR/arpwatch@.service $RPM_BUILD_ROOT/%{_unitdir} -%else -install -m 0754 $RPM_SOURCE_DIR/arpwatch.init $RPM_BUILD_ROOT/etc/init.d/arpwatch -ln -sf ../../etc/init.d/arpwatch $RPM_BUILD_ROOT/%{_sbindir}/rcarpwatch -%endif -cp -p ${RPM_SOURCE_DIR}/sysconfig.arpwatch $RPM_BUILD_ROOT/var/adm/fillup-templates +make DESTDIR=%{buildroot} install-man +install -Dm 0644 %{SOURCE10} %{buildroot}/%{_unitdir}/arpwatch@.service +install -Dm 0644 %{SOURCE12} %{buildroot}/%{_unitdir}/arpwatch.service +ln -s service %{buildroot}%{_sbindir}/rcarpwatch +install -Dm 0644 %{SOURCE11} \ + %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.arpwatch # own the database files -touch $RPM_BUILD_ROOT/var/lib/arpwatch/arp.dat -touch $RPM_BUILD_ROOT/var/lib/arpwatch/arp.dat- +cat > %{buildroot}%{_tmpfilesdir}/arpwatch.conf <<EOF +# See tmpfiles.d(5) for details +d /var/lib/arpwatch - - - - +f /var/lib/arpwatch/arp.dat - - - - +EOF %pre -%if 0%{?has_systemd} -%service_add_pre arpwatch@.service -%endif +%service_add_pre arpwatch.service %preun -%if 0%{?has_systemd} -%service_del_preun arpwatch@.service -%else -%stop_on_removal arpwatch -%endif +%service_del_preun arpwatch.service %post -%if 0%{?has_systemd} -%service_add_post arpwatch@.service +%service_add_post arpwatch.service %fillup_only -%else -%fillup_and_insserv -%endif -if [ ! -f var/lib/arpwatch/arp.dat ]; then - touch var/lib/arpwatch/arp.dat -fi +%tmpfiles_create %{_tmpfilesdir}/arpwatch.conf %postun -%if 0%{?has_systemd} -%service_del_postun arpwatch@.service -%else -%restart_on_update arpwatch -%insserv_cleanup -%endif +%service_del_postun arpwatch.service %files -%defattr(-,root,root) -%if 0%{?has_systemd} +%{_unitdir}/arpwatch.service %{_unitdir}/arpwatch@.service -%else -%config /etc/init.d/arpwatch +%{_tmpfilesdir}/arpwatch.conf %{_sbindir}/rcarpwatch -%endif %{_sbindir}/arpsnmp %{_sbindir}/arpwatch -%dir /var/lib/arpwatch -%ghost %config(noreplace) /var/lib/arpwatch/arp.dat -%ghost %config(noreplace) /var/lib/arpwatch/arp.dat- -/var/adm/fillup-templates/sysconfig.arpwatch -%doc %{_mandir}/man8/arpsnmp.8.gz -%doc %{_mandir}/man8/arpwatch.8.gz +%ghost %dir %{_localstatedir}/lib/arpwatch +%ghost %{_localstatedir}/lib/arpwatch/arp.dat +%{_localstatedir}/adm/fillup-templates/sysconfig.arpwatch +%{_mandir}/man8/arpsnmp.8%{ext_man} +%{_mandir}/man8/arpwatch.8%{ext_man} %doc CHANGES FILES README %files ethercodes-build -%defattr(-,root,root) %{_datadir}/arpwatch %changelog ++++++ arpwatch.service ++++++ [Unit] Description=Arpwatch daemon which keeps track of ethernet/ip address pairings After=network.target Conflicts=arpwatch.target [Service] Type=forking Environment=ARPWATCH_ARGS= EnvironmentFile=-/etc/sysconfig/arpwatch PrivateTmp=yes ExecStartPre=/usr/bin/touch /var/lib/arpwatch/arp.dat ExecStart=/usr/sbin/arpwatch $ARPWATCH_ARGS -f /var/lib/arpwatch/arp.dat [Install] WantedBy=multi-user.target ++++++ arpwatch@.service ++++++ --- /var/tmp/diff_new_pack.UqpogP/_old 2017-08-28 15:10:28.033226005 +0200 +++ /var/tmp/diff_new_pack.UqpogP/_new 2017-08-28 15:10:28.045224317 +0200 @@ -1,6 +1,7 @@ [Unit] Description=Arpwatch daemon which keeps track of ethernet/ip address pairings -After=syslog.target network.target +After=network.target +PartOf=arpwatch.target [Service] Type=forking
participants (1)
-
root@hilbert.suse.de