在 2024-08-03星期六的 21:28 +0200,Michael Biebl写道:
> [adding back #1077038 to CC]
> Am 03.08.24 um 17:29 schrieb YunQiang Su:
> > 在 2024-08-03星期六的 13:31 +0200,Michael Biebl写道:
> > > On Thu, 25 Jul 2024 14:05:44 +0200 Helmut Grohne
> > > <[email protected]>
> > > wrote:
> > > > Package: ipwatchd
> > > > Version: 1.3.0-1+nmu1
> > > > Severity: serious
> > > > Justification: do not introduce aliased files into trixie
> > > > X-Debbugs-Cc: YunQiang Su <[email protected]>
> > > > User: [email protected]
> > > > Usertags: dep17m2
> > > > Filename: /lib/systemd/system/ipwatchd.service
> > > >
> > > > Hi,
> > > >
> >
> > I am planing to upload a new version with this debdiff.
> > Any idea?
>
> Looks ok to me.
>
> Keep in mind that dh-sequence-movetousr is not a permanent solution.
>
> Ideally upstream would use pkg-config as outlined by Helmut instead
> of
> hard-coding /lib/system in src/Makefile
Thanks. I am using pkgconf now.
I just uploaded a new very with this debdiff, and with 5 days delay.
diff -Nru ipwatchd-1.3.0/debian/changelog ipwatchd-1.3.0/debian/changelog
--- ipwatchd-1.3.0/debian/changelog 2024-07-14 17:59:30.000000000 +0800
+++ ipwatchd-1.3.0/debian/changelog 2024-08-03 23:10:58.000000000 +0800
@@ -1,3 +1,17 @@
+ipwatchd (1.3.0-1+nmu2) unstable; urgency=medium
+
+ * Bump standard version to 4.7.0.
+ * Patch src/Makefile to install system service to output of
+ pkgconf --variable systemdsystemunitdir systemd.
+ - Closes: #1077038
+ - Build depends on systemd-dev, pkgconf.
+ * Rewrite debian/rules with debhelper 7 override style.
+ * Pre-Depends on ${misc:Pre-Depends} instead of hardcoded
+ init-system-helpers (>= 1.66).
+ * Refresh patch with -p ab --no-timestamps --no-index.
+
+ -- YunQiang Su <[email protected]> Sat, 03 Aug 2024 23:10:58 +0800
+
ipwatchd (1.3.0-1+nmu1) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru ipwatchd-1.3.0/debian/control ipwatchd-1.3.0/debian/control
--- ipwatchd-1.3.0/debian/control 2024-07-14 17:59:30.000000000 +0800
+++ ipwatchd-1.3.0/debian/control 2024-08-03 23:10:58.000000000 +0800
@@ -2,13 +2,13 @@
Section: net
Priority: optional
Maintainer: Jaroslav Imrich <[email protected]>
-Build-Depends: debhelper-compat (= 13), libpcap-dev, libnet1-dev
-Standards-Version: 3.9.2
+Build-Depends: debhelper-compat (= 13), libpcap-dev, libnet1-dev, pkgconf, systemd-dev
+Standards-Version: 4.7.0
Homepage: http://ipwatchd.sf.net
Package: ipwatchd
Architecture: linux-any
-Pre-Depends: init-system-helpers (>= 1.66)
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: IP conflict detection tool
IPwatchD is a simple daemon that analyses all incoming ARP packets in order
diff -Nru ipwatchd-1.3.0/debian/patches/fix-cflags.diff ipwatchd-1.3.0/debian/patches/fix-cflags.diff
--- ipwatchd-1.3.0/debian/patches/fix-cflags.diff 2024-07-14 17:59:30.000000000 +0800
+++ ipwatchd-1.3.0/debian/patches/fix-cflags.diff 2024-08-03 23:10:58.000000000 +0800
@@ -1,7 +1,5 @@
-Index: ipwatchd-1.3.0/src/Makefile
-===================================================================
---- ipwatchd-1.3.0.orig/src/Makefile
-+++ ipwatchd-1.3.0/src/Makefile
+--- a/src/Makefile
++++ b/src/Makefile
@@ -1,8 +1,8 @@
# IPwatchD - IP conflict detection tool for Linux
# Copyright (C) 2007-2018 Jaroslav Imrich <jariq(at)jariq(dot)sk>
diff -Nru ipwatchd-1.3.0/debian/patches/series ipwatchd-1.3.0/debian/patches/series
--- ipwatchd-1.3.0/debian/patches/series 2024-07-14 17:59:30.000000000 +0800
+++ ipwatchd-1.3.0/debian/patches/series 2024-08-03 23:10:58.000000000 +0800
@@ -1 +1,2 @@
fix-cflags.diff
+systemd-service-path.diff
diff -Nru ipwatchd-1.3.0/debian/patches/systemd-service-path.diff ipwatchd-1.3.0/debian/patches/systemd-service-path.diff
--- ipwatchd-1.3.0/debian/patches/systemd-service-path.diff 1970-01-01 08:00:00.000000000 +0800
+++ ipwatchd-1.3.0/debian/patches/systemd-service-path.diff 2024-08-03 23:10:58.000000000 +0800
@@ -0,0 +1,30 @@
+Index: yyy/src/Makefile
+===================================================================
+--- yyy.orig/src/Makefile
++++ yyy/src/Makefile
+@@ -44,14 +44,14 @@ distclean: clean
+
+ install:
+ mkdir -p $(DESTDIR)/etc
+- mkdir -p $(DESTDIR)/lib/systemd/system
++ mkdir -p $(DESTDIR)/$(SYSTEMD_UNITDIR)
+ mkdir -p $(DESTDIR)/usr/sbin
+ mkdir -p $(DESTDIR)/usr/share/man/man8
+ mkdir -p $(DESTDIR)/usr/share/man/man5
+ mkdir -p $(DESTDIR)/usr/share/man/man1
+ cp ipwatchd $(DESTDIR)/usr/sbin
+ cp ipwatchd-script $(DESTDIR)/usr/sbin
+- cp ipwatchd.service $(DESTDIR)/lib/systemd/system
++ cp ipwatchd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
+ cp ipwatchd.conf $(DESTDIR)/etc
+ cp ../doc/ipwatchd.8.gz $(DESTDIR)/usr/share/man/man8
+ cp ../doc/ipwatchd.conf.5.gz $(DESTDIR)/usr/share/man/man5
+@@ -60,7 +60,7 @@ install:
+ uninstall:
+ rm $(DESTDIR)/usr/sbin/ipwatchd
+ rm $(DESTDIR)/usr/sbin/ipwatchd-script
+- rm $(DESTDIR)/lib/systemd/system/ipwatchd.service
++ rm $(DESTDIR)/$(SYSTEMD_UNITDIR)/ipwatchd.service
+ rm $(DESTDIR)/etc/ipwatchd.conf
+ rm $(DESTDIR)/usr/share/man/man8/ipwatchd.8.gz
+ rm $(DESTDIR)/usr/share/man/man5/ipwatchd.conf.5.gz
diff -Nru ipwatchd-1.3.0/debian/rules ipwatchd-1.3.0/debian/rules
--- ipwatchd-1.3.0/debian/rules 2024-07-14 17:59:30.000000000 +0800
+++ ipwatchd-1.3.0/debian/rules 2024-08-03 23:10:58.000000000 +0800
@@ -1,60 +1,21 @@
#!/usr/bin/make -f
-# -*- makefile -*-
+include /usr/share/dpkg/buildtools.mk
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-export DEB_BUILD_MAINT_OPTIONS=hardening=+all
-
-build: build-stamp
-
-build-stamp:
- dh_testdir
- CPPFLAGS=`dpkg-buildflags --get CPPFLAGS` \
- CFLAGS="`dpkg-buildflags --get CFLAGS` $$CPPFLAGS" \
- LDFLAGS=`dpkg-buildflags --get LDFLAGS` \
- CC=$(DEB_HOST_GNU_TYPE)-gcc \
- $(MAKE) -C src
- touch $@
-
-# Added just to remove lintian warning debian-rules-missing-recommended-target
-build-arch build-indep: build
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
+export DH_VERBOSE = 1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export CC
+export SYSTEMD_UNITDIR = $(shell pkgconf --variable systemdsystemunitdir systemd)
+
+%:
+ dh $@
+
+override_dh_auto_clean:
$(MAKE) -C src distclean
- dh_clean
-install: build
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs
+override_dh_auto_build:
+ CFLAGS="$(CFLAGS) $(CPPFLAGS)" $(MAKE) -C src
+
+override_dh_auto_install:
+ echo $(SYSTEMD_UNITDIR)
$(MAKE) -C src DESTDIR=$(CURDIR)/debian/ipwatchd install
- # Remove upstream manpages causing lintian error manpage-not-compressed-with-max-compression
- rm $(CURDIR)/debian/ipwatchd/usr/share/man/man1/ipwatchd-script.1.gz
- rm $(CURDIR)/debian/ipwatchd/usr/share/man/man5/ipwatchd.conf.5.gz
- rm $(CURDIR)/debian/ipwatchd/usr/share/man/man8/ipwatchd.8.gz
-
-binary-indep: install
-
-binary-arch: install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installman debian/ipwatchd.8 debian/ipwatchd.conf.5 debian/ipwatchd-script.1
- dh_installinit
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure