]> piware.de Git - bin.git/blob - build-devtoolbox
build-devtoolbox: Skip 1minutetip for Fedora 33
[bin.git] / build-devtoolbox
1 #!/bin/sh
2 set -eux
3 NAME=devel
4
5 if [ -n "${TOOLBOX_RELEASE:-}" ]; then
6     RELEASE="--release $TOOLBOX_RELEASE"
7     NAME="$NAME-$TOOLBOX_RELEASE"
8 else
9     RELEASE=''
10 fi
11
12 toolbox rm --force $NAME || true
13 yes | toolbox create $RELEASE -c $NAME
14
15 # install cockpit's build deps and other development tools
16 toolbox run -c "$NAME" sh -exc '
17 # useful hostname
18 . /etc/os-release
19 echo "${ID}-${VERSION_ID}" | sudo tee /etc/hostname
20 sudo hostname -F /etc/hostname
21
22 # https://github.com/containers/toolbox/issues/552
23 if [ "$VERSION_ID" = 33 ]; then
24     sudo rm -f /etc/yum.repos.d/*rawhide*
25     sudo dnf config-manager --set-enabled fedora --set-enabled updates
26 fi
27
28 sudo dnf update -y
29
30 # this just refuses to rpm -i normally
31 sudo dnf install -y cpio
32 rpm2cpio ~martin/Dokumente/Arbeit/RedHat/redhat-internal-cert-install-0.1-7.el7.csb.noarch.rpm | sudo cpio -id --directory=/ --verbose "./etc/pki/*"
33 sudo update-ca-trust
34
35 sudo dnf builddep -y cockpit
36 sudo dnf install -y make npm fontconfig git valgrind chromium \
37     libvirt-daemon-kvm libvirt-client python3-libvirt \
38     virt-viewer virt-install libappstream-glib \
39     expect python3-pycodestyle python3-pyflakes \
40     fedpkg /usr/bin/oc /usr/bin/genisoimage /usr/bin/pip \
41     man-pages socat wget genisoimage vim-enhanced \
42     ansible python3-boto python3-boto3 standard-test-roles rsync strace diffstat \
43     pwgen glibc-langpack-en tig twine dbus-daemon \
44     pandoc texlive-ec texlive-pdfjam \
45     /usr/bin/scanimage /usr/bin/pngquant /usr/bin/convert \
46     calibre qt5-qtwayland keepassxc
47
48 sudo dnf debuginfo-install -y glib2 glibc libssh gnutls
49
50 # HACK: rcmtools not available for F33 yet
51 if [ "$VERSION_ID" != 33 ]; then
52     (cd /etc/yum.repos.d; sudo curl -O --location https://download.devel.redhat.com/rel-eng/RCMTOOLS/rcm-tools-fedora.repo)
53     sudo dnf install -y rhpkg
54 fi
55
56 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)
57
58 # 1minutetip
59 # HACK: not available for F33 yet
60 if [ "$VERSION_ID" != 33 ]; then
61     sudo umount /mnt  # HACK: rhts-test-env-5.0-2.fc32eng.noarch wants to fiddle with it
62     sudo wget -O /etc/yum.repos.d/qa-tools.repo http://liver.brq.redhat.com/repo/qa-tools.repo
63     sudo wget -O /etc/yum.repos.d/beaker-client.repo http://download.lab.bos.redhat.com/beakerrepos/beaker-client-Fedora.repo
64     sudo dnf install -y qa-tools-workstation-1minutetip
65 fi
66
67 sudo dnf clean packages
68
69 # unbreak kerberos; https://github.com/debarshiray/toolbox/issues/235
70 cat <<EOF | sudo tee /etc/krb5.conf.d/0_file_ccache
71 [libdefaults]
72     default_ccache_name = FILE:/tmp/krb5.ccache
73 EOF
74 '