From 72ef9238f1a7839f901d12bb42437bd4a85987ab Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Tue, 6 Jun 2023 12:56:58 +0200 Subject: [PATCH] webui: pin down cockpit-* packages versions for gating purposes Some recent regression on cockpit has broken CI. All tests now fail with: Traceback (most recent call last): File "/usr/bin/cockpit-bridge", line 5, in from cockpit.bridge import main ModuleNotFoundError: No module named 'cockpit' Possible Selinux AVC denial causing it: AVC avc: denied { execute_no_trans } for pid=6772 comm="cockpit-ws" path="/usr/bin/cockpit-bridge" dev="overlay" ino=715 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=file permissive=1 This needs to be reverted once the issue is resolved. --- ui/webui/test/build-rpms | 2 +- ui/webui/test/prepare-updates-img | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ui/webui/test/build-rpms b/ui/webui/test/build-rpms index 148ac584d7c..412e892e140 100755 --- a/ui/webui/test/build-rpms +++ b/ui/webui/test/build-rpms @@ -11,7 +11,7 @@ import sys BOTS_DIR = os.path.realpath(f'{__file__}/../../bots') sys.path.append(BOTS_DIR) -missing_packages = "cockpit-ws cockpit-bridge firefox dbus-glib" +missing_packages = "firefox dbus-glib" from machine.machine_core import machine_virtual # NOQA: imported through parent.py diff --git a/ui/webui/test/prepare-updates-img b/ui/webui/test/prepare-updates-img index b6a141e63b8..cd1bf12f1fd 100755 --- a/ui/webui/test/prepare-updates-img +++ b/ui/webui/test/prepare-updates-img @@ -2,6 +2,23 @@ set -eu +# FIXME boot.iso on rawhide does not currently contain the new cockpit dependencies +# This will change once we include this changes upstream and start building boot.iso with the new dependencies +# Then we can safely remove this workaround +ANACONDA_WEBUI_DEPS_URLS=' + https://kojipkgs.fedoraproject.org//packages/cockpit/294/1.fc39/x86_64/cockpit-ws-294-1.fc39.x86_64.rpm + https://kojipkgs.fedoraproject.org//packages/cockpit/294/1.fc39/x86_64/cockpit-bridge-294-1.fc39.x86_64.rpm +' + +mkdir -p tmp/extra-rpms +pushd tmp/extra-rpms +for url in $ANACONDA_WEBUI_DEPS_URLS; do + test -e "$(basename "${url}")" || curl -LO "$url" +done +# shellcheck disable=SC2086,SC2046 +ANACONDA_WEBUI_DEPS_RPMS="$(realpath $(basename -a ${ANACONDA_WEBUI_DEPS_URLS}))" +popd + # switch to root of the repository pushd ../.. # remove old rpms and build new srpm @@ -9,11 +26,12 @@ rm -rf ../../result/build make srpm popd -# build the anaconda srpm (and result RPMs go in `tmp/rpms`) && download cockpit RPMs +# build the anaconda srpm (and result RPMs go in `tmp/rpms`) && download anaconda-webui missing dependencies +# cockpit RPMs are hardcoded above for gating purposes test/build-rpms -v ../../result/build/00-srpm-build/anaconda-*.src.rpm # makeupdates must be run from the top level of the anaconda source tree pushd ../../ # shellcheck disable=SC2086,SC2046 -scripts/makeupdates --add ui/webui/tmp/rpms/anaconda-*.rpm ui/webui/tmp/rpms/cockpit-*.rpm ui/webui/tmp/rpms/firefox-*.rpm ui/webui/tmp/rpms/dbus-glib-*.rpm +scripts/makeupdates --add ui/webui/tmp/rpms/anaconda-*.rpm ${ANACONDA_WEBUI_DEPS_RPMS} ui/webui/tmp/rpms/firefox-*.rpm ui/webui/tmp/rpms/dbus-glib-*.rpm popd