Source: concordance
Version: 1.5-2
Severity: normal
Tags: patch
User: helm...@debian.org
Usertags: dep17m2

Dear Maintainer,

your package installs files related to udev, into /lib. These
files need to be moved to /usr/lib as part of Debian's usr-merge
effort [1].

Attached you will find a patch using udev.pc to place the udev files
(using pkg-config). This works today in unstable and also for
bookworm, and is safe to do now.
Once udev.pc in unstable points to /usr/lib, your package will
benefit automatically after a binNMU or any other upload.

If during the trixie cycle your package will undergo structural
changes or any other file moves, please see the wiki and upload
to experimental first when these changes are done.

Later during the trixie cycle I expect this bug class to raise in
priority.

Thank you for considering,
Chris

[1] https://wiki.debian.org/UsrMerge
diff -Nru concordance-1.5/debian/changelog concordance-1.5/debian/changelog
--- concordance-1.5/debian/changelog	2022-04-29 00:28:56.000000000 +0200
+++ concordance-1.5/debian/changelog	2023-12-17 01:30:14.000000000 +0100
@@ -1,3 +1,10 @@
+concordance (1.5-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Use udev.pc to place udev files. (Closes: #-1)
+
+ -- Chris Hofstaedtler <z...@debian.org>  Sun, 17 Dec 2023 01:30:14 +0100
+
 concordance (1.5-2) unstable; urgency=medium
 
   * Update Standards-Version to 4.6.0 (no changes needed)
diff -Nru concordance-1.5/debian/concordance-common.install concordance-1.5/debian/concordance-common.install
--- concordance-1.5/debian/concordance-common.install	2018-05-08 05:16:38.000000000 +0200
+++ concordance-1.5/debian/concordance-common.install	2023-12-17 01:30:14.000000000 +0100
@@ -1,2 +1,2 @@
-lib/udev
+${env:UDEVDIR}
 debian/concordance.metainfo.xml /usr/share/metainfo
diff -Nru concordance-1.5/debian/control concordance-1.5/debian/control
--- concordance-1.5/debian/control	2022-04-29 00:27:00.000000000 +0200
+++ concordance-1.5/debian/control	2023-12-17 01:28:33.000000000 +0100
@@ -14,6 +14,7 @@
  pkg-config,
  python3-all-dev,
  python3-setuptools,
+ systemd-dev,
 Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/debian/concordance
 Vcs-Git: https://salsa.debian.org/debian/concordance.git
diff -Nru concordance-1.5/debian/patches/Makefile-UDEVDIR.patch concordance-1.5/debian/patches/Makefile-UDEVDIR.patch
--- concordance-1.5/debian/patches/Makefile-UDEVDIR.patch	1970-01-01 01:00:00.000000000 +0100
+++ concordance-1.5/debian/patches/Makefile-UDEVDIR.patch	2023-12-17 01:28:15.000000000 +0100
@@ -0,0 +1,51 @@
+Index: concordance-1.5/libconcord/INSTALL.linux
+===================================================================
+--- concordance-1.5.orig/libconcord/INSTALL.linux
++++ concordance-1.5/libconcord/INSTALL.linux
+@@ -116,9 +116,9 @@ to work.
+ 
+ NOTE:
+ By default udev files will install in /lib/udev. You can override this by setting
+-the UDEVLIBDIR environment variable (as root):
++the UDEVDIR environment variable (as root):
+ 
+-  UDEVLIBDIR=/etc/udev make install_udev
++  UDEVDIR=/etc/udev make install_udev
+ 
+ The policykit/consolekit files will install in datarootdir which is a subset
+ of prefix, meaning, by default /usr/local/share. This will not work, so if you
+Index: concordance-1.5/libconcord/Makefile.am
+===================================================================
+--- concordance-1.5.orig/libconcord/Makefile.am
++++ concordance-1.5/libconcord/Makefile.am
+@@ -9,8 +9,7 @@ include_HEADERS = libconcord.h
+ libconcord_la_CPPFLAGS = -Wall
+ libconcord_la_LDFLAGS = -version-info 6:0:0 $(LIBCONCORD_LDFLAGS) -lzip -lcurl
+ libconcord_la_CXXFLAGS = $(ZIP_CFLAGS)
+-UDEVROOT ?= /
+-UDEVLIBDIR ?= $(UDEVROOT)/lib
++UDEVDIR ?= /lib/udev
+ 
+ # udev and friends support
+ udev:
+@@ -23,15 +22,15 @@ generic_udev:
+ 	./gen_udev_support -g
+ 
+ install_udev_common:
+-	$(MKDIR_P) $(DESTDIR)$(UDEVLIBDIR)/udev/rules.d
++	$(MKDIR_P) $(DESTDIR)$(UDEVDIR)/rules.d
+ 	$(install_sh_DATA) libconcord.rules \
+-		$(DESTDIR)$(UDEVLIBDIR)/udev/rules.d/60-libconcord.rules
++		$(DESTDIR)$(UDEVDIR)/rules.d/60-libconcord.rules
+ 	$(install_sh_DATA) libconcord-usbnet.rules \
+-		$(DESTDIR)$(UDEVLIBDIR)/udev/rules.d/80-libconcord-usbnet.rules
++		$(DESTDIR)$(UDEVDIR)/rules.d/80-libconcord-usbnet.rules
+ 	$(install_sh_SCRIPT) start_concordance_dhcpd.sh \
+-		$(DESTDIR)$(UDEVLIBDIR)/udev/
++		$(DESTDIR)$(UDEVDIR)/
+ 	$(install_sh_SCRIPT) start_concordance_dhcpd_wrapper.sh \
+-		$(DESTDIR)$(UDEVLIBDIR)/udev/
++		$(DESTDIR)$(UDEVDIR)/
+ 
+ install_udev: udev install_udev_common
+ install_old_udev: old_udev install_udev_common
diff -Nru concordance-1.5/debian/patches/series concordance-1.5/debian/patches/series
--- concordance-1.5/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ concordance-1.5/debian/patches/series	2023-12-17 01:26:00.000000000 +0100
@@ -0,0 +1 @@
+Makefile-UDEVDIR.patch
diff -Nru concordance-1.5/debian/rules concordance-1.5/debian/rules
--- concordance-1.5/debian/rules	2022-04-27 22:40:22.000000000 +0200
+++ concordance-1.5/debian/rules	2023-12-17 01:30:14.000000000 +0100
@@ -5,6 +5,8 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+export UDEVDIR = $(shell pkg-config --variable=udevdir udev)
+
 PY3VERS=$(shell py3versions -vr)
 
 DEBIAN_DIR := $(shell echo ${MAKEFILE_LIST} | awk '{print $$1}' | xargs dirname )
@@ -46,7 +48,7 @@
 
 override_dh_auto_install: $(PY3VERS:%=install-ext3-%)
 	( cd libconcord/ && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install )
-	( cd libconcord/ && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install_udev )
+	( cd libconcord/ && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp UDEVDIR=$(UDEVDIR) install_udev )
 	( cd concordance/ && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install )
 
 override_dh_install:

Reply via email to