X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=blobdiff_plain;f=build-cockpit-toolbox;h=55d87eb6e947b5a6625d187cd0d74ed292500721;hp=e2e8d90fb46404b5e7738c920d046b63889bf624;hb=7967276a9bf38337192ca1a342f707f7ad0d9167;hpb=25088d445d73692fd4981724f9ca2bf53ab7c1e2 diff --git a/build-cockpit-toolbox b/build-cockpit-toolbox index e2e8d90..55d87eb 100755 --- a/build-cockpit-toolbox +++ b/build-cockpit-toolbox @@ -1,11 +1,13 @@ #!/bin/sh set -eux -NAME=cockpit +NAME=${NAME:-cockpit} +TAG=${TAG:-latest} toolbox rm --force $NAME || true -yes | toolbox create --image quay.io/cockpit/tasks -c $NAME +podman pull quay.io/cockpit/tasks:${TAG} +yes | toolbox create --image quay.io/cockpit/tasks:${TAG} -c $NAME -# install cockpit's build deps and other development tools +# install some extra development and desktop tools toolbox run -c "$NAME" sh -exc ' # useful hostname echo "cockpit-toolbox" | sudo tee /etc/hostname @@ -14,13 +16,42 @@ sudo hostname -F /etc/hostname # enable manpages sudo sed -i s/nodocs// /etc/dnf/dnf.conf -sudo dnf install -y ansible man-pages standard-test-roles pwgen moreutils \ +sudo dnf install -y ansible man-pages moreutils gh \ python3-boto python3-boto3 libnotify \ - pandoc texlive-ec texlive-pdfjam \ + pandoc texlive-ec texlive-pdfjam texlive-beamer \ /usr/bin/scanimage /usr/bin/pngquant /usr/bin/convert \ - calibre qt5-qtwayland + kpcli \ + calibre qt5-qtwayland \ + chromium dbus-daemon flatpak-builder flatpak-spawn -sudo dnf debuginfo-install -y glib2 glibc libssh gnutls +# HACK: tmt-provision-virtual has way too heavy dependencies: https://bugzilla.redhat.com/show_bug.cgi?id=2093717 +cat < /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 -type gh >/dev/null 2>&1 || sudo dnf install -y $(curl -s https://api.github.com/repos/cli/cli/releases/latest | grep -o https:.*_linux_amd64.rpm) +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 +sudo chmod a+x /usr/local/bin/podman + +# debugging cockpit crashes +sudo dnf debuginfo-install -y glib2 glibc libssh gnutls '