]> piware.de Git - bin.git/blob - build-devtoolbox
build-devtoolbox: Drop aws CLI, using Ansible now
[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 # https://bugzilla.redhat.com/show_bug.cgi?id=1785244
18 if [ ! -e /etc/resolv.conf ]; then
19     sudo ln -sfn /run/host/monitor/resolv.conf /etc/resolv.conf
20 fi
21
22 # useful hostname
23 . /etc/os-release
24 echo "${ID}-${VERSION_ID}" | sudo tee /etc/hostname
25 sudo hostname -F /etc/hostname
26
27 # this just refuses to rpm -i normally
28 sudo dnf install -y cpio
29 rpm2cpio ~martin/Dokumente/Arbeit/RedHat/redhat-internal-cert-install-0.1-7.el7.csb.noarch.rpm | sudo cpio -id --directory=/ --verbose "./etc/pki/*"
30 sudo update-ca-trust
31
32 (cd /etc/yum.repos.d; sudo curl -O --location https://download.devel.redhat.com/rel-eng/RCMTOOLS/rcm-tools-fedora.repo)
33
34 sudo dnf builddep -y cockpit
35 sudo dnf install -y make npm fontconfig git valgrind chromium \
36     libvirt-daemon-kvm libvirt-client python3-libvirt \
37     virt-viewer virt-install libappstream-glib \
38     expect python3-pycodestyle python3-pyflakes \
39     fedpkg rhpkg /usr/bin/oc /usr/bin/genisoimage /usr/bin/pip \
40     man-pages socat wget genisoimage vim-enhanced \
41     ansible python3-boto3 standard-test-roles rsync strace diffstat \
42     pwgen glibc-langpack-en tig twine dbus-daemon waiverdb-cli \
43     /usr/bin/scanimage /usr/bin/pngquant /usr/bin/convert /usr/bin/pdfjoin
44
45 sudo dnf debuginfo-install -y glib2 glibc libssh gnutls
46
47 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)
48
49 sudo dnf clean packages
50
51 # unbreak kerberos; https://github.com/debarshiray/toolbox/issues/235
52 cat <<EOF | sudo tee /etc/krb5.conf.d/0_file_ccache
53 [libdefaults]
54     default_ccache_name = FILE:/tmp/krb5.ccache
55 EOF
56 '