From d41a97c73f95a7b1f43a6117a40f685e97290e15 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 8 Sep 2023 11:27:26 +0200 Subject: [PATCH] tools: Enable the Python bridge on stable Debian/Ubuntu By now we have enough faith in it that we can drop the special case. This only leaves the C bridge for RHEL/CentOS 8, which will be branched off and thus disappear in about half a year. --- test/verify/check-client | 2 +- tools/debian/cockpit-bridge.install | 2 ++ tools/debian/rules | 16 +--------------- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/test/verify/check-client b/test/verify/check-client index 1ae43c3ffc33..87ddb019b8fc 100755 --- a/test/verify/check-client +++ b/test/verify/check-client @@ -20,7 +20,7 @@ import testlib -@testlib.skipImage("needs pybridge", "debian-stable", "ubuntu-2204", "rhel-8*", "centos-8*") +@testlib.skipImage("needs pybridge", "rhel-8*", "centos-8*") # enable this once our cockpit/ws container can beiboot @testlib.skipOstree("client setup does not work with ws container") class TestClient(testlib.MachineCase): diff --git a/tools/debian/cockpit-bridge.install b/tools/debian/cockpit-bridge.install index 2ed824c70783..2fcae46391dc 100644 --- a/tools/debian/cockpit-bridge.install +++ b/tools/debian/cockpit-bridge.install @@ -1,7 +1,9 @@ etc/cockpit/machines.d usr/bin/cockpit-bridge usr/lib/cockpit/cockpit-askpass +usr/lib/cockpit/cockpit-beiboot usr/lib/cockpit/cockpit-ssh +usr/lib/python* usr/share/cockpit/base1/ usr/share/cockpit/ssh/ usr/share/man/man1/cockpit-bridge.1 diff --git a/tools/debian/rules b/tools/debian/rules index 5a2e3a02311e..cfabee88aac3 100755 --- a/tools/debian/rules +++ b/tools/debian/rules @@ -2,12 +2,6 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) -# Keep the older C bridge on stable releases -OLD_BRIDGE = $(filter $(shell . /etc/os-release; echo $${VERSION_ID:-unstable}),11 12 22.04) -ifneq ($(OLD_BRIDGE),) -CONFIG_OPTIONS += --enable-old-bridge -endif - # riscv is an emulated architecture for now, and too slow to run expensive unit tests # hppa's threading is absurdly slow (#981127) SLOW_ARCHES = $(filter $(shell dpkg-architecture -qDEB_BUILD_ARCH),riscv64 hppa) @@ -53,25 +47,17 @@ override_dh_install: rm debian/tmp/usr/share/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml dh_install -Xusr/src/debug -ifeq ($(OLD_BRIDGE),) # we don't need this, it contains full build paths and breaks reproducibility rm -r debian/tmp/usr/lib/python*/*-packages/*.dist-info - dh_install -p cockpit-bridge debian/tmp/usr/lib/python* - dh_install -p cockpit-bridge debian/tmp/usr/lib/cockpit/cockpit-beiboot -endif make install-tests DESTDIR=debian/cockpit-tests execute_after_dh_install-indep: # avoid dh_missing failure -ifeq ($(OLD_BRIDGE),) rm -r debian/tmp/usr/lib/python* debian/tmp/usr/lib/cockpit/cockpit-beiboot -endif # run pytests *after* installation, so that we can make sure that we installed the right files execute_after_dh_install-arch: ifeq (, $(findstring nocheck, $(DEB_BUILD_OPTIONS))) -ifeq ($(OLD_BRIDGE),) - pytest -vv -k 'not linter and not test_descriptions' -opythonpath=$$(ls -d debian/cockpit-bridge/usr/lib/python3*/dist-packages) -endif + python3 -m pytest -vv -k 'not linter and not test_descriptions' -opythonpath=$$(ls -d debian/cockpit-bridge/usr/lib/python3*/dist-packages) endif