Source: smartmontools
Source-Version: 7.3-1
Severity: important
Tags: patch

Hi!

This package fails to build on the Hurd, and includes in its build
dependencies some now obsolete architectures that got recently
removed from dpkg and which might cause archive issues once the
host running dak gets upgraded to that dpkg version.

Attached a pair of patches fixing these. Test built on hurd-i386.

Thanks,
Guillem
From 16b6f07ebf31662309bdcbf83d9b4681c1a99928 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guil...@debian.org>
Date: Fri, 24 Nov 2023 02:06:57 +0100
Subject: [PATCH 1/2] Do not use libsystemd on non-Linux ports

Do not enable libsystemd usage on non-linux where it does not even
exist, and switch its arch restriction in Build-Depends to the list
of architectures that are supported instead of the ones that are not,
which is not maintainable is currently wildly incomplete.
---
 debian/control | 2 +-
 debian/rules   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/debian/control b/debian/control
index ce27941..086de79 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Build-Depends: autoconf,
                libcap-ng-dev [!kfreebsd-any !hurd-any !sparc !avr32],
                libselinux1-dev [linux-any],
                libusb2-dev [kfreebsd-any],
-               libsystemd-dev [!kfreebsd-any],
+               libsystemd-dev [linux-any],
                pkg-config,
 Vcs-Git: https://salsa.debian.org/debian/smartmontools.git
 Vcs-Browser: https://salsa.debian.org/debian/smartmontools
diff --git a/debian/rules b/debian/rules
index 6828efe..e3c610b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,6 +14,9 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 	CONFIGURE_ARGS += --with-selinux
+	CONFIGURE_ARGS += --with-systemdenvfile=/etc/default/smartmontools
+	CONFIGURE_ARGS += --with-systemdsystemunitdir=/lib/systemd/system
+	CONFIGURE_ARGS += --with-libsystemd=auto
 endif
 
 ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
@@ -45,9 +48,6 @@ override_dh_auto_configure:
 	    --with-savestates=/var/lib/smartmontools/smartd. \
 	    --with-smartdplugindir=/etc/smartmontools/smartd_warning.d \
 	    --with-smartdscriptdir=/usr/share/smartmontools \
-	    --with-systemdenvfile=/etc/default/smartmontools \
-	    --with-systemdsystemunitdir=/lib/systemd/system \
-	    --with-libsystemd=auto \
 	    ${CONFIGURE_ARGS} \
 	;
 
-- 
2.42.0

From d5c5606dcd63193bda145658671e9a44d0f7bad0 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guil...@debian.org>
Date: Fri, 24 Nov 2023 02:06:57 +0100
Subject: [PATCH 2/2] Fix libcap-ng-dev Build-Depends arch restrictions

Switch its arch restrictions in Build-Depends to the list of
architectures that are supported instead of the ones that are not,
which is not maintainable and currently includes obsolete arches
that got removed from dpkg recently.
---
 debian/control | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 086de79..fcfc8e0 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends: autoconf,
                debhelper-compat (= 13),
                freebsd-glue [kfreebsd-any],
                libcam-dev [kfreebsd-any],
-               libcap-ng-dev [!kfreebsd-any !hurd-any !sparc !avr32],
+               libcap-ng-dev [linux-any],
                libselinux1-dev [linux-any],
                libusb2-dev [kfreebsd-any],
                libsystemd-dev [linux-any],
-- 
2.42.0

Reply via email to