build-devtoolbox: Fix resolv.conf link
[bin.git] / build-rhtoolbox
1 #!/bin/sh
2 set -eux
3 NAME=redhat
4 RELEASE=32
5
6 toolbox rm --force $NAME || true
7 yes | toolbox create --release $RELEASE -c $NAME
8
9 # install cockpit's build deps and other development tools
10 toolbox run -c "$NAME" sh -exc '
11 # useful hostname
12 echo "redhat" | sudo tee /etc/hostname
13 sudo hostname -F /etc/hostname
14
15 sudo dnf update -y
16
17 # this just refuses to rpm -i normally
18 sudo dnf install -y cpio
19 rpm2cpio ~martin/Dokumente/Arbeit/RedHat/redhat-internal-cert-install-0.1-7.el7.csb.noarch.rpm | sudo cpio -id --directory=/ --verbose "./etc/pki/*"
20 sudo update-ca-trust
21
22 (cd /etc/yum.repos.d; sudo curl -O --location https://download.devel.redhat.com/rel-eng/RCMTOOLS/rcm-tools-fedora.repo)
23 sudo dnf install -y rhpkg krb5-workstation
24
25 # 1minutetip
26 sudo umount /mnt  # HACK: rhts-test-env-5.0-2.fc32eng.noarch wants to fiddle with it
27 sudo wget -O /etc/yum.repos.d/qa-tools.repo http://liver.brq.redhat.com/repo/qa-tools.repo
28 sudo wget -O /etc/yum.repos.d/beaker-client.repo http://download.lab.bos.redhat.com/beakerrepos/beaker-client-Fedora.repo
29 sudo dnf install -y qa-tools-workstation-1minutetip
30
31 sudo dnf clean packages
32
33 # unbreak kerberos; https://github.com/debarshiray/toolbox/issues/235
34 cat <<EOF | sudo tee /etc/krb5.conf.d/0_file_ccache
35 [libdefaults]
36     default_ccache_name = FILE:/tmp/krb5.ccache
37 EOF
38 '