Skip to content

Commit

Permalink
tools: Enable the Python bridge on stable Debian/Ubuntu
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martinpitt committed Sep 8, 2023
1 parent 14c07d7 commit d41a97c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion test/verify/check-client
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions tools/debian/cockpit-bridge.install
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 1 addition & 15 deletions tools/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit d41a97c

Please sign in to comment.