Bug#1052312: cloudflare-ddns will FTFBS when systemd.pc changes the system unit? directory

2023-10-16 Thread Helmut Grohne
On Mon, Oct 16, 2023 at 09:28:08AM +0200, Andrea Pappacoda wrote:
> While this fixes this specific issue, other systemd-related paths are
> still hardcoded in the .install file. Is the approach you proposed here
> the only way? Should I manually export all the systemd pkg-config
> variables used in the upstream build system (sysusers.d, for instance)?

The paths below /lib are subject to move. For other paths, I am not
aware of such an intention. While you could discover them in a similar
way, I think that would be premature abstraction.

Besides units, what also will move is udev rules. Unfortunately, those
tend to be located in M-A:same packages and therefore require a more
elaborate mechanism for moving.

When more (types of) files are involved, I think the way to go is
dh_movetousr (which is not yet available in unstable). cloudflare-ddns
has received a patch, because this relatively simple mechanism was
sufficient to entirely solve it already. Once applied, a binNMU can
handle the conversion.

Helmut



Bug#1052312: cloudflare-ddns will FTFBS when systemd.pc changes the system unit directory

2023-10-16 Thread Andrea Pappacoda
On Wed, 20 Sep 2023 10:37:49 +0200 Helmut Grohne  wrote:
> systemd wants to change the location of system units in systemd.pc to
> point below /usr. Since the last upload, cloudflare-ddns consumes this
> value, but it fails to build once the value is changed, because it is
> only integrated into the upstream build system, but the .install file
> hard codes the location. I'm attaching a patch that fixes this future
> FTBFS.

Hi Helmut, thanks for your patch and for your work on /usr-merge!

While this fixes this specific issue, other systemd-related paths are
still hardcoded in the .install file. Is the approach you proposed here
the only way? Should I manually export all the systemd pkg-config
variables used in the upstream build system (sysusers.d, for instance)?

Thanks again :D



Bug#1052312: cloudflare-ddns will FTFBS when systemd.pc changes the system unit directory

2023-09-20 Thread Helmut Grohne
Source: cloudflare-ddns
Version: 2.0.0-4
Tags: ftbfs patch
User: helm...@debian.org
Usertags: dep17m2

Hi,

systemd wants to change the location of system units in systemd.pc to
point below /usr. Since the last upload, cloudflare-ddns consumes this
value, but it fails to build once the value is changed, because it is
only integrated into the upstream build system, but the .install file
hard codes the location. I'm attaching a patch that fixes this future
FTBFS.

Helmut
diff -Nru cloudflare-ddns-2.0.0/debian/changelog 
cloudflare-ddns-2.0.0/debian/changelog
--- cloudflare-ddns-2.0.0/debian/changelog  2023-04-13 15:29:29.0 
+0200
+++ cloudflare-ddns-2.0.0/debian/changelog  2023-09-20 10:25:10.0 
+0200
@@ -1,3 +1,10 @@
+cloudflare-ddns (2.0.0-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Do not fail building if systemd.pc moves the unit directory. (Closes: #-1)
+
+ -- Helmut Grohne   Wed, 20 Sep 2023 10:25:10 +0200
+
 cloudflare-ddns (2.0.0-4) unstable; urgency=medium
 
   * d/patches: use systemd.pc to get systemd paths.
diff -Nru cloudflare-ddns-2.0.0/debian/cloudflare-ddns.install 
cloudflare-ddns-2.0.0/debian/cloudflare-ddns.install
--- cloudflare-ddns-2.0.0/debian/cloudflare-ddns.install2023-04-13 
15:20:20.0 +0200
+++ cloudflare-ddns-2.0.0/debian/cloudflare-ddns.install2023-09-20 
10:25:10.0 +0200
@@ -1,5 +1,5 @@
 #!/usr/bin/dh-exec
-[linux-any] lib/systemd/
+[linux-any] ${systemd_system_unit_dir}
 [linux-any] usr/lib/sysusers.d/
 etc/
 usr/bin/
diff -Nru cloudflare-ddns-2.0.0/debian/rules cloudflare-ddns-2.0.0/debian/rules
--- cloudflare-ddns-2.0.0/debian/rules  2023-04-13 09:34:05.0 +0200
+++ cloudflare-ddns-2.0.0/debian/rules  2023-09-20 10:25:10.0 +0200
@@ -3,6 +3,8 @@
 # optimize=-lto because I use Meson's LTO
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto qa=+all
 
+export systemd_system_unit_dir=$(shell pkg-config 
--variable=systemd_system_unit_dir systemd | sed s,^/,,)
+
 %:
dh $@