From 04324fa1ac1916b7a3db7928b26d4660c099d35c Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 18 Jun 2025 17:22:36 +0800 Subject: [PATCH] deb: use variable expansion to support systemd unit dir changes Ubuntu changed the systemd unit directory location between releases: - Jammy (22.04): /lib/systemd/system - Noble (24.04): /usr/lib/systemd/system To maintain compatibility across both versions, update .install files to use brace expansion pattern {usr/,}lib/systemd/system/. This pattern works because dh_install uses bsd_glob() with GLOB_CSH flags, which expands braces and matches files in both locations depending on where CMakeLists.txt actually installed them. Fixes installation issues when building packages on Noble while maintaining backward compatibility with Jammy builds. Signed-off-by: Kefu Chai --- debian/ceph-base.install | 2 +- debian/ceph-common.install | 4 ++-- debian/ceph-exporter.install | 2 +- debian/ceph-fuse.install | 2 +- debian/ceph-immutable-object-cache.install | 2 +- debian/ceph-mds.install | 2 +- debian/ceph-mgr.install | 2 +- debian/ceph-mon.install | 2 +- debian/ceph-osd.install | 2 +- debian/ceph-volume.install | 2 +- debian/cephfs-mirror.install | 2 +- debian/radosgw.install | 2 +- debian/rbd-mirror.install | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/debian/ceph-base.install b/debian/ceph-base.install index a3d7757a585..140551187ba 100644 --- a/debian/ceph-base.install +++ b/debian/ceph-base.install @@ -1,5 +1,5 @@ etc/init.d/ceph -lib/systemd/system/ceph-crash.service +{usr/,}lib/systemd/system/ceph-crash.service usr/bin/ceph-crash usr/bin/ceph-debugpack usr/bin/ceph-run diff --git a/debian/ceph-common.install b/debian/ceph-common.install index fc4da0a179c..d6e3db77456 100755 --- a/debian/ceph-common.install +++ b/debian/ceph-common.install @@ -4,8 +4,8 @@ etc/bash_completion.d/ceph etc/bash_completion.d/rados etc/bash_completion.d/radosgw-admin etc/bash_completion.d/rbd -lib/systemd/system/ceph.target -lib/systemd/system/rbdmap.service +{usr/,}lib/systemd/system/ceph.target +{usr/,}lib/systemd/system/rbdmap.service usr/bin/ceph usr/bin/ceph-authtool usr/bin/ceph-conf diff --git a/debian/ceph-exporter.install b/debian/ceph-exporter.install index 1ac0edcd2a1..ed6440cd92b 100644 --- a/debian/ceph-exporter.install +++ b/debian/ceph-exporter.install @@ -1,2 +1,2 @@ -lib/systemd/system/ceph-exporter* +{usr/,}lib/systemd/system/ceph-exporter* usr/bin/ceph-exporter diff --git a/debian/ceph-fuse.install b/debian/ceph-fuse.install index 565ef25dda4..6372957542b 100644 --- a/debian/ceph-fuse.install +++ b/debian/ceph-fuse.install @@ -1,4 +1,4 @@ -lib/systemd/system/ceph-fuse* +{usr/,}lib/systemd/system/ceph-fuse* usr/bin/ceph-fuse usr/sbin/mount.fuse.ceph sbin usr/share/man/man8/ceph-fuse.8 diff --git a/debian/ceph-immutable-object-cache.install b/debian/ceph-immutable-object-cache.install index 76daf1928c3..f182e453fba 100644 --- a/debian/ceph-immutable-object-cache.install +++ b/debian/ceph-immutable-object-cache.install @@ -1,3 +1,3 @@ -lib/systemd/system/ceph-immutable-object-cache* +{usr/,}lib/systemd/system/ceph-immutable-object-cache* usr/bin/ceph-immutable-object-cache usr/share/man/man8/ceph-immutable-object-cache.8 diff --git a/debian/ceph-mds.install b/debian/ceph-mds.install index a26d5596c59..b9b1bc41106 100644 --- a/debian/ceph-mds.install +++ b/debian/ceph-mds.install @@ -1,3 +1,3 @@ -lib/systemd/system/ceph-mds* +{usr/,}lib/systemd/system/ceph-mds* usr/bin/ceph-mds usr/share/man/man8/ceph-mds.8 diff --git a/debian/ceph-mgr.install b/debian/ceph-mgr.install index 9535b1e60bc..11a4a9ce4e2 100644 --- a/debian/ceph-mgr.install +++ b/debian/ceph-mgr.install @@ -1,4 +1,4 @@ -lib/systemd/system/ceph-mgr* +{usr/,}lib/systemd/system/ceph-mgr* usr/bin/ceph-mgr usr/share/ceph/mgr/mgr_module.* usr/share/ceph/mgr/mgr_util.* diff --git a/debian/ceph-mon.install b/debian/ceph-mon.install index ff429f17a6a..cdba732e1c3 100644 --- a/debian/ceph-mon.install +++ b/debian/ceph-mon.install @@ -1,4 +1,4 @@ -lib/systemd/system/ceph-mon* +{usr/,}lib/systemd/system/ceph-mon* usr/bin/ceph-mon usr/bin/ceph-monstore-tool usr/share/man/man8/ceph-mon.8 diff --git a/debian/ceph-osd.install b/debian/ceph-osd.install index 7e6f62e34f6..217c9bea719 100755 --- a/debian/ceph-osd.install +++ b/debian/ceph-osd.install @@ -1,6 +1,6 @@ #! /usr/bin/dh-exec -lib/systemd/system/ceph-osd* +{usr/,}lib/systemd/system/ceph-osd* usr/bin/ceph-bluestore-tool usr/bin/ceph-clsinfo usr/bin/ceph-erasure-code-tool diff --git a/debian/ceph-volume.install b/debian/ceph-volume.install index b43f08ae828..9f02cdde9ac 100644 --- a/debian/ceph-volume.install +++ b/debian/ceph-volume.install @@ -1,4 +1,4 @@ -lib/systemd/system/ceph-volume@.service +{usr/,}lib/systemd/system/ceph-volume@.service usr/lib/python*/dist-packages/ceph_volume/* usr/lib/python*/dist-packages/ceph_volume-* usr/sbin/ceph-volume diff --git a/debian/cephfs-mirror.install b/debian/cephfs-mirror.install index ca0807e27c0..ad54d6e898d 100644 --- a/debian/cephfs-mirror.install +++ b/debian/cephfs-mirror.install @@ -1,3 +1,3 @@ -lib/systemd/system/cephfs-mirror* +{usr/,}lib/systemd/system/cephfs-mirror* usr/bin/cephfs-mirror usr/share/man/man8/cephfs-mirror.8 diff --git a/debian/radosgw.install b/debian/radosgw.install index be74a52c1a9..074f769a181 100644 --- a/debian/radosgw.install +++ b/debian/radosgw.install @@ -1,4 +1,4 @@ -lib/systemd/system/ceph-radosgw* +{usr/,}lib/systemd/system/ceph-radosgw* usr/bin/ceph-diff-sorted usr/bin/radosgw usr/bin/radosgw-es diff --git a/debian/rbd-mirror.install b/debian/rbd-mirror.install index cc617a55304..7ddfdcb7161 100644 --- a/debian/rbd-mirror.install +++ b/debian/rbd-mirror.install @@ -1,3 +1,3 @@ -lib/systemd/system/ceph-rbd-mirror* +{usr/,}lib/systemd/system/ceph-rbd-mirror* usr/bin/rbd-mirror usr/share/man/man8/rbd-mirror.8 -- 2.39.5