Please find a patch, without using dh-sequence-movetousr, attached.
I hope it is acceptable, and you could upload this soon.

Chris

diff -Nru mdadm-4.3+20240412/debian/changelog mdadm-4.3+20240412/debian/changelog
--- mdadm-4.3+20240412/debian/changelog	2024-04-27 05:20:02.000000000 +0200
+++ mdadm-4.3+20240412/debian/changelog	2024-07-16 01:51:35.000000000 +0200
@@ -1,3 +1,15 @@
+mdadm (4.3+20240412-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Install into usrmerged layout (Closes: #1073726)
+    * Build-Depend on pkgconf, systemd-dev to get udev.pc and thus place
+      udev rules into /usr/lib, update install files.
+    * Patch Makefile to use pkg-config systemd to discover systemd unit dir,
+      update install files.
+    * Patch Makefile to use /usr/sbin instead of /sbin, update install files.
+
+ -- Chris Hofstaedtler <z...@debian.org>  Tue, 16 Jul 2024 01:51:35 +0200
+
 mdadm (4.3+20240412-1) sid; urgency=medium
 
   * Uploading to sid.
diff -Nru mdadm-4.3+20240412/debian/control mdadm-4.3+20240412/debian/control
--- mdadm-4.3+20240412/debian/control	2024-04-27 05:11:21.000000000 +0200
+++ mdadm-4.3+20240412/debian/control	2024-07-16 01:51:08.000000000 +0200
@@ -5,6 +5,8 @@
 Build-Depends:
  debhelper-compat (= 13),
  libudev-dev,
+ pkgconf,
+ systemd-dev,
 Rules-Requires-Root: no
 Standards-Version: 4.7.0
 Homepage: https://raid.wiki.kernel.org
diff -Nru mdadm-4.3+20240412/debian/mdadm.install mdadm-4.3+20240412/debian/mdadm.install
--- mdadm-4.3+20240412/debian/mdadm.install	2024-04-27 05:11:08.000000000 +0200
+++ mdadm-4.3+20240412/debian/mdadm.install	2024-07-16 01:51:35.000000000 +0200
@@ -2,6 +2,5 @@
 debian/local/bin/* usr/share/mdadm
 debian/local/initramfs-tools/* usr/share/initramfs-tools/scripts
 debian/local/reportbug/* usr/share/bug/mdadm
-lib/
 misc/mdcheck usr/share/mdadm/
-sbin/
+usr/
diff -Nru mdadm-4.3+20240412/debian/mdadm.lintian-overrides mdadm-4.3+20240412/debian/mdadm.lintian-overrides
--- mdadm-4.3+20240412/debian/mdadm.lintian-overrides	2024-04-27 05:11:08.000000000 +0200
+++ mdadm-4.3+20240412/debian/mdadm.lintian-overrides	2024-07-16 01:51:35.000000000 +0200
@@ -2,4 +2,4 @@
 init.d-script-possible-missing-stop etc/init.d/mdadm-waitidle 1
 
 # mdadm forks mdmon as required, not sure it should start separately
-systemd-service-file-missing-install-key lib/systemd/system/mdmonitor.service
+systemd-service-file-missing-install-key usr/lib/systemd/system/mdmonitor.service
diff -Nru mdadm-4.3+20240412/debian/mdadm-udeb.install mdadm-4.3+20240412/debian/mdadm-udeb.install
--- mdadm-4.3+20240412/debian/mdadm-udeb.install	2024-04-27 05:11:08.000000000 +0200
+++ mdadm-4.3+20240412/debian/mdadm-udeb.install	2024-07-16 01:51:35.000000000 +0200
@@ -1,2 +1,2 @@
-lib/udev/rules.d/63-md-raid-arrays.rules
-sbin/
+usr/lib/udev/rules.d/63-md-raid-arrays.rules
+usr/sbin/
diff -Nru mdadm-4.3+20240412/debian/patches/debian/0012-Makefile-usrmerged-layout.patch mdadm-4.3+20240412/debian/patches/debian/0012-Makefile-usrmerged-layout.patch
--- mdadm-4.3+20240412/debian/patches/debian/0012-Makefile-usrmerged-layout.patch	1970-01-01 01:00:00.000000000 +0100
+++ mdadm-4.3+20240412/debian/patches/debian/0012-Makefile-usrmerged-layout.patch	2024-07-16 01:51:35.000000000 +0200
@@ -0,0 +1,26 @@
+Index: mdadm/Makefile
+===================================================================
+--- mdadm.orig/Makefile
++++ mdadm/Makefile
+@@ -106,7 +106,11 @@ MAP_PATH = $(MAP_DIR)/$(MAP_FILE)
+ MDMON_DIR = $(RUN_DIR)
+ # place for autoreplace cookies
+ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
+-SYSTEMD_DIR=/lib/systemd/system
++SYSTEMD_DIR := $(shell $(PKG_CONFIG) --variable=systemdsystemunitdir systemd 2>/dev/null)
++ifndef SYSTEMD_DIR
++ SYSTEMD_DIR=/lib/systemd/system
++endif
++
+ LIB_DIR=/usr/libexec/mdadm
+ 
+ COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC)
+@@ -146,7 +150,7 @@ endif
+ 
+ INSTALL = /usr/bin/install
+ DESTDIR =
+-BINDIR  = /sbin
++BINDIR  = /usr/sbin
+ MANDIR  = /usr/share/man
+ MAN4DIR = $(MANDIR)/man4
+ MAN5DIR = $(MANDIR)/man5
diff -Nru mdadm-4.3+20240412/debian/patches/series mdadm-4.3+20240412/debian/patches/series
--- mdadm-4.3+20240412/debian/patches/series	2024-04-27 05:11:08.000000000 +0200
+++ mdadm-4.3+20240412/debian/patches/series	2024-07-16 01:51:35.000000000 +0200
@@ -9,3 +9,4 @@
 debian/0009-randomize-timers.patch
 debian/0010-systemd-honor-debconf-daily-scan.patch
 debian/0011-mdcheck-fix-empty-spaces-in-timer-unit-files.patch
+debian/0012-Makefile-usrmerged-layout.patch

Reply via email to