build-cockpit-toolbox: Work around too heavy tmt-provision-virtual dependencies
authorMartin Pitt <martin@piware.de>
Sun, 5 Jun 2022 15:27:21 +0000 (17:27 +0200)
committerMartin Pitt <martin@piware.de>
Sat, 11 Jun 2022 07:07:46 +0000 (09:07 +0200)
See https://bugzilla.redhat.com/show_bug.cgi?id=2093717

build-cockpit-toolbox

index 7998e8fc93dbcc3001058d8753af0b1e5032579e..55d87eb6e947b5a6625d187cd0d74ed292500721 100755 (executable)
@@ -22,7 +22,31 @@ sudo dnf install -y ansible man-pages moreutils gh \
     /usr/bin/scanimage /usr/bin/pngquant /usr/bin/convert \
     kpcli \
     calibre qt5-qtwayland \
-    chromium dbus-daemon tmt tmt-provision-virtual flatpak-builder flatpak-spawn
+    chromium dbus-daemon flatpak-builder flatpak-spawn
+
+# HACK: tmt-provision-virtual has way too heavy dependencies: https://bugzilla.redhat.com/show_bug.cgi?id=2093717
+cat <<EOF > /tmp/spec
+Name: dummy-deps
+Summary: dummy dependencies
+Version: 999
+Release: 1%{?dist}
+# https://bugzilla.redhat.com/show_bug.cgi?id=2093717
+Provides: python3-libguestfs
+Provides: libguestfs-tools-c
+# also for tmt-provision-virtual
+Provides: libvirt
+License: BSD
+
+%description
+Dummy dependencies to avoid bloat.
+
+%files
+EOF
+rpmbuild --define "_topdir /tmp/rpmbuild-dummy" -bb /tmp/spec
+sudo rpm -i --verbose /tmp/rpmbuild-dummy/RPMS/x86_64/dummy-deps-999-1.fc35.x86_64.rpm
+rm -rf /tmp/rpmbuild-dummy /tmp/spec
+
+sudo dnf install -y --setopt=install_weak_deps=False tmt tmt-provision-virtual
 
 # run podman in toolbox
 printf "flatpak-spawn --host podman \42\$@\42\n" | sudo tee /usr/local/bin/podman >/dev/null