From: Kefu Chai Date: Wed, 18 Jun 2025 09:22:36 +0000 (+0800) Subject: deb: use variable expansion to support systemd unit dir changes X-Git-Tag: v20.1.0~179^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F64014%2Fhead;p=ceph.git 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 (cherry picked from commit 04324fa1ac1916b7a3db7928b26d4660c099d35c) --- diff --git a/debian/ceph-base.install b/debian/ceph-base.install index a3d7757a585e..140551187bad 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 fc4da0a179c8..d6e3db774568 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 1ac0edcd2a18..ed6440cd92b9 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 565ef25dda4c..6372957542b7 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 76daf1928c3a..f182e453fba5 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 a26d5596c59a..b9b1bc41106b 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 9535b1e60bca..11a4a9ce4e2a 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 ff429f17a6af..cdba732e1c34 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 7e6f62e34f66..217c9bea719d 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 b43f08ae8281..9f02cdde9ac6 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 ca0807e27c02..ad54d6e898db 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 be74a52c1a9c..074f769a181f 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 cc617a553047..7ddfdcb71615 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