]> piware.de Git - bin.git/blob - build-devmock
build-devmock: Add libappstream-glib
[bin.git] / build-devmock
1 #!/bin/sh
2 set -eux
3 MOCK="mock -r ${OS:-default}"
4
5 $MOCK --clean
6
7 # install cockpit's build deps and other development tools
8 $MOCK -i $(sed -n '/^BuildRequires:/ {s/^.*: //; s/>=.*$//; s/%{.*}//; p}' ~/upstream/cockpit/tools/cockpit.spec) \
9     npm fontconfig git valgrind chromium-headless \
10     libvirt-daemon-kvm libvirt-client python3-libvirt \
11     virt-viewer libguestfs-tools-c libappstream-glib \
12     expect python3-pycodestyle python3-pyflakes \
13     fedpkg /usr/bin/oc /usr/bin/genisoimage \
14     man-pages socat wget genisoimage vim-enhanced \
15     ansible standard-test-roles rsync
16
17 # interactive shell sessions work as user martin, not builder
18 $MOCK --unpriv --copyin /dev/stdin /builddir/.bashrc <<EOF
19 export HOME=/home/martin
20 export TERM=xterm
21 cd
22
23 # Source global definitions
24 if [ -f /etc/bashrc ]; then
25         . /etc/bashrc
26 fi
27 . ~/.bashrc
28 EOF
29
30 # make mock compatible with ostree's /home → /var/home structure
31 $MOCK --chroot -- ln -sf /home /var/home
32
33 # install rhpkg
34 $MOCK -i ~martin/Dokumente/Arbeit/RedHat/redhat-internal-cert-install-0.1-7.el7.csb.noarch.rpm
35 $MOCK --chroot --cwd=/etc/yum.repos.d -- 'echo >> /etc/dnf/dnf.conf; curl --location https://download.devel.redhat.com/rel-eng/RCMTOOLS/rcm-tools-fedora.repo >> /etc/dnf/dnf.conf'
36 $MOCK -i rhpkg
37
38 # ssh looks at passwd, not $HOME
39 $MOCK --chroot --unpriv -- rm -rf /builddir/.ssh
40 $MOCK --chroot --unpriv -- ln -s /home/martin/.ssh /builddir/.ssh
41 $MOCK --chroot --unpriv -- ln -s /home/martin/upstream /builddir/upstream