]> piware.de Git - bin.git/blob - build-devtoolbox
ff11b23215d6e63e5374504e2f45f6416b6fa8fd
[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 sudo dnf update -y
23
24 # this just refuses to rpm -i normally
25 sudo dnf install -y cpio
26 rpm2cpio ~martin/Dokumente/Arbeit/RedHat/redhat-internal-cert-install-0.1-7.el7.csb.noarch.rpm | sudo cpio -id --directory=/ --verbose "./etc/pki/*"
27 sudo update-ca-trust
28
29 sudo dnf builddep -y cockpit
30 sudo dnf install -y make npm fontconfig git valgrind chromium \
31     libvirt-daemon-kvm libvirt-client python3-libvirt \
32     virt-viewer virt-install libappstream-glib \
33     expect python3-pycodestyle python3-pyflakes \
34     fedpkg /usr/bin/oc /usr/bin/genisoimage /usr/bin/pip \
35     man-pages socat wget genisoimage vim-enhanced \
36     ansible python3-boto python3-boto3 standard-test-roles rsync strace diffstat \
37     pwgen glibc-langpack-en tig twine dbus-daemon \
38     pandoc texlive-ec texlive-pdfjam \
39     /usr/bin/scanimage /usr/bin/pngquant /usr/bin/convert \
40     calibre qt5-qtwayland keepassxc
41
42 sudo dnf debuginfo-install -y glib2 glibc libssh gnutls
43
44 # HACK: rcmtools not available for F33 yet
45 if [ "$VERSION_ID" != 33 ]; then
46     (cd /etc/yum.repos.d; sudo curl -O --location https://download.devel.redhat.com/rel-eng/RCMTOOLS/rcm-tools-fedora.repo)
47     sudo dnf install -y rhpkg
48 fi
49
50 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)
51
52 # 1minutetip
53 # HACK: not available for F33 yet
54 if [ "$VERSION_ID" != 33 ]; then
55     sudo umount /mnt  # HACK: rhts-test-env-5.0-2.fc32eng.noarch wants to fiddle with it
56     sudo wget -O /etc/yum.repos.d/qa-tools.repo http://liver.brq.redhat.com/repo/qa-tools.repo
57     sudo wget -O /etc/yum.repos.d/beaker-client.repo http://download.lab.bos.redhat.com/beakerrepos/beaker-client-Fedora.repo
58     sudo dnf install -y qa-tools-workstation-1minutetip
59 fi
60
61 sudo dnf clean packages
62
63 # unbreak kerberos; https://github.com/debarshiray/toolbox/issues/235
64 cat <<EOF | sudo tee /etc/krb5.conf.d/0_file_ccache
65 [libdefaults]
66     default_ccache_name = FILE:/tmp/krb5.ccache
67 EOF
68 '