]> piware.de Git - bin.git/blob - build-cockpit-toolbox
build-cockpit-toolbox: tasks container moved to ghcr.io
[bin.git] / build-cockpit-toolbox
1 #!/bin/sh
2 set -eux
3 NAME=${NAME:-cockpit}
4 TAG=${TAG:-latest}
5
6 toolbox rm --force $NAME || true
7 podman pull quay.io/cockpit/tasks:${TAG}
8 yes | toolbox create --image quay.io/cockpit/tasks:${TAG} -c $NAME
9
10 # install some extra development and desktop tools
11 toolbox run -c "$NAME" sh -exc '
12 # useful hostname
13 echo "cockpit-toolbox" | sudo tee /etc/hostname
14 sudo hostname -F /etc/hostname
15
16 # enable manpages
17 sudo sed -i s/nodocs// /etc/dnf/dnf.conf
18
19 sudo dnf install -y ansible man-pages moreutils gh \
20     python3-boto python3-boto3 libnotify \
21     pandoc texlive-ec texlive-pdfjam texlive-beamer \
22     /usr/bin/scanimage /usr/bin/pngquant /usr/bin/convert \
23     kpcli \
24     calibre qt5-qtwayland \
25     chromium dbus-daemon flatpak-builder flatpak-spawn
26
27 # HACK: tmt-provision-virtual has way too heavy dependencies: https://bugzilla.redhat.com/show_bug.cgi?id=2093717
28 cat <<EOF > /tmp/spec
29 Name: dummy-deps
30 Summary: dummy dependencies
31 Version: 999
32 Release: 1%{?dist}
33 # https://bugzilla.redhat.com/show_bug.cgi?id=2093717
34 Provides: python3-libguestfs
35 Provides: libguestfs-tools-c
36 # also for tmt-provision-virtual
37 Provides: libvirt
38 License: BSD
39
40 %description
41 Dummy dependencies to avoid bloat.
42
43 %files
44 EOF
45 rpmbuild --define "_topdir /tmp/rpmbuild-dummy" -bb /tmp/spec
46 sudo rpm -i --verbose /tmp/rpmbuild-dummy/RPMS/x86_64/dummy-deps-999-1.fc35.x86_64.rpm
47 rm -rf /tmp/rpmbuild-dummy /tmp/spec
48
49 sudo dnf install -y --setopt=install_weak_deps=False tmt tmt-provision-virtual
50
51 # run podman in toolbox
52 printf "flatpak-spawn --host podman \42\$@\42\n" | sudo tee /usr/local/bin/podman >/dev/null
53 sudo chmod a+x /usr/local/bin/podman
54
55 # debugging cockpit crashes
56 sudo dnf debuginfo-install -y glib2 glibc libssh gnutls
57 '