From: Kefu Chai Date: Sun, 21 Jun 2026 08:14:49 +0000 (+0800) Subject: cmake,deb,rpm: exclude CI and test directories from installed modules X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a7299c455b19bef1282a18d8fd3c6f8c8b2596f;p=ceph.git cmake,deb,rpm: exclude CI and test directories from installed modules The mgr module install rule already excluded tests/*, but that glob only dropped the files inside tests/ and left an empty tests/ directory in the installed tree. The ci/ directories, which hold Dockerfiles, e2e test scripts, and cluster specs used only for upstream CI pipelines, were not excluded at all and were shipped by ceph-mgr-dashboard and ceph-mgr-rook. Change the install pattern from tests/* to tests so the whole directory is pruned, and add a ci pattern. Both patterns live in the exclude list shared by every mgr module install rule (the module list, dashboard, and rook), so this covers all of them in one place. This supersedes the per-package excludes added in 8a2e0eb2fc and d74b88500b, so drop them from ceph.spec.in and debian/rules. Signed-off-by: Kefu Chai --- diff --git a/ceph.spec.in b/ceph.spec.in index 186cacb9a86..b0fba106c2c 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -2345,7 +2345,6 @@ fi %files mgr-dashboard %{_datadir}/ceph/mgr/dashboard -%exclude %{_datadir}/ceph/mgr/dashboard/ci %ceph_mgr_module_scripts mgr-dashboard @@ -2466,7 +2465,6 @@ fi %files mgr-rook %{_datadir}/ceph/mgr/rook -%exclude %{_datadir}/ceph/mgr/rook/ci %ceph_mgr_module_scripts mgr-rook @@ -2477,7 +2475,6 @@ fi %files mgr-cephadm %{_datadir}/ceph/mgr/cephadm -%exclude %{_datadir}/ceph/mgr/cephadm/tests %ceph_mgr_module_scripts mgr-cephadm diff --git a/debian/rules b/debian/rules index d27dac6a664..48b8634a1c4 100755 --- a/debian/rules +++ b/debian/rules @@ -158,10 +158,7 @@ override_dh_python3: dh_python3 -p ceph-fuse --shebang=/usr/bin/python3 dh_python3 -p ceph-volume --shebang=/usr/bin/python3 -override_dh_install: - dh_install --exclude=mgr/cephadm/tests --exclude=mgr/dashboard/ci --exclude=mgr/rook/ci - # do not run tests override_dh_auto_test: -.PHONY: override_dh_autoreconf override_dh_auto_configure override_dh_auto_clean override_dh_auto_install override_dh_installlogrotate override_dh_installinit override_dh_install override_dh_strip override_dh_auto_test +.PHONY: override_dh_autoreconf override_dh_auto_configure override_dh_auto_clean override_dh_auto_install override_dh_installlogrotate override_dh_installinit override_dh_strip override_dh_auto_test diff --git a/src/pybind/mgr/CMakeLists.txt b/src/pybind/mgr/CMakeLists.txt index 9edfe705dee..342b2b942d7 100644 --- a/src/pybind/mgr/CMakeLists.txt +++ b/src/pybind/mgr/CMakeLists.txt @@ -4,7 +4,8 @@ set(mgr_module_install_excludes PATTERN "tox.ini" EXCLUDE PATTERN "requirements*.txt" EXCLUDE PATTERN "constraints*.txt" EXCLUDE - PATTERN "tests/*" EXCLUDE) + PATTERN "tests" EXCLUDE + PATTERN "ci" EXCLUDE) add_subdirectory(dashboard)