bots: Drop virt-builder-fedora

Nothing uses this any more. This gets rid of libguestfs, which is huge
(~ 400 MB with dependencies like the kernel) and breaks unprivileged
containers.

Closes #12702
This commit is contained in:
Martin Pitt 2019-09-03 17:38:29 +02:00 committed by Martin Pitt
parent b92e2ad989
commit 6c5339040b
2 changed files with 1 additions and 62 deletions

View File

@ -58,7 +58,7 @@ For running integration tests, the following dependencies are required:
Creating VM images locally (not necessary for running tests) needs the following:
$ sudo dnf install virt-install libguestfs-tools-c
$ sudo dnf install virt-install
## Building

View File

@ -1,61 +0,0 @@
#!/bin/bash
#
# Copyright (C) 2015 Red Hat Inc.
# Author: <marius.vollmer@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA.
set -ex
if [ "$#" -lt 3 ]; then
echo >&2 "Usage: virt-builder-fedora IMAGE OS ARCH [SUBSCRIPTION_PATH]"
exit 1
fi
BASE=$(dirname $0)
out=$1
os=$2
arch=$3
test -z "$BOOTSTRAP_VOLUME_SIZE" && BOOTSTRAP_VOLUME_SIZE="8G"
if [ "$VIRT_BUILDER_NO_CACHE" == "yes" ]; then
virt_builder_caching="--no-cache"
fi
# we can't use virt-builder --ssh-inject until all our target systems support this
virt-builder "$os" \
$virt_builder_caching \
--output "$out" \
--size $BOOTSTRAP_VOLUME_SIZE \
--format qcow2 \
--arch "$arch"\
--root-password password:foobar \
--mkdir /root/.ssh \
--chmod 0700:/root/.ssh \
--upload $BASE/../../machine/identity.pub:/root/.ssh/authorized_keys \
--chmod 0600:/root/.ssh/authorized_keys \
--run-command 'chown root:root /root/.ssh/authorized_keys' \
--upload $BASE/../../machine/host_key:/etc/ssh/ssh_host_rsa_key \
--chmod 0600:/etc/ssh/ssh_host_rsa_key \
--upload $BASE/../../machine/host_key.pub:/etc/ssh/ssh_host_rsa_key.pub \
--upload $BASE/../../../test/verify/nested-kvm:/root/nested-kvm \
--upload $BASE/network-ifcfg-eth0:/etc/sysconfig/network-scripts/ifcfg-eth0 \
--upload $BASE/network-ifcfg-eth1:/etc/sysconfig/network-scripts/ifcfg-eth1 \
--run-command "sed -i 's/GRUB_TIMEOUT.*/GRUB_TIMEOUT=0/; /GRUB_CMDLINE_LINUX=/ s/"'"'"$/ net.ifnames=0 biosdevname=0"'"'"/' /etc/default/grub" \
--run-command 'grub2-mkconfig -o /boot/grub2/grub.cfg' \
--selinux-relabel