builder: Add script for building Fedora i686 (32 bit) images.

This commit is contained in:
Richard W.M. Jones
2015-08-11 13:34:55 +01:00
parent 8cb82aec12
commit 864ca489ac
3 changed files with 157 additions and 13 deletions

100
builder/website/fedora-i686.sh Executable file
View File

@@ -0,0 +1,100 @@
#!/bin/bash -
# virt-builder
# Copyright (C) 2013-2015 Red Hat Inc.
#
# 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.
# This script was used to create the Fedora templates used by
# virt-builder.
unset CDPATH
export LANG=C
set -e
set -x
if [ $# -ne 1 ]; then
echo "$0 VERSION"
exit 1
fi
version=$1
if [ $version -lt 21 ]; then
tree=http://mirror.bytemark.co.uk/fedora/linux/releases/$version/Fedora/i386/os/
else
tree=http://mirror.bytemark.co.uk/fedora/linux/releases/$version/Server/i386/os/
fi
output=fedora-$version-i686
tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)
rm -f $output $output.old $output.xz
# Generate the kickstart to a temporary file.
ks=$(mktemp)
cat > $ks <<'EOF'
install
text
reboot
lang en_US.UTF-8
keyboard us
network --bootproto dhcp
rootpw builder
firewall --enabled --ssh
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
zerombr
clearpart --all --initlabel
autopart --type=plain
# Halt the system once configuration has finished.
poweroff
%packages
@core
%end
%post
# Enable Xen domU support:
pushd /etc/dracut.conf.d
echo 'add_drivers+="xen:vbd xen:vif"' > virt-builder-xen-drivers.conf
popd
# Rerun dracut for the installed kernel (not the running kernel):
KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
%end
EOF
# Clean up function.
cleanup ()
{
rm -f $ks
virsh undefine $tmpname ||:
}
trap cleanup INT QUIT TERM EXIT ERR
virt-install \
--name=$tmpname \
--ram=2048 \
--cpu=host --vcpus=2 \
--os-type=linux --os-variant=fedora22 \
--initrd-inject=$ks \
--extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200 proxy=$http_proxy" \
--disk $(pwd)/$output,size=6,format=raw \
--serial pty \
--location=$tree \
--nographics \
--noreboot
source $(dirname "$0")/compress.sh $output

View File

@@ -372,6 +372,28 @@ notes=Fedora 22 Server.
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
[fedora-22]
name=Fedora® 22 Server (i686)
osinfo=fedora22
arch=i686
file=fedora-22-i686.xz
checksum=3547b94d5c418792e722786cfae41decd41f0725d529d65a2c719094c0b815eaa4fae195514a14d42fa19b57b895bcdbfdb305edf918b1b3722f30f338042d31
format=raw
size=6442450944
compressed_size=225185592
expand=/dev/sda3
notes=Fedora 22 Server (i686)
This Fedora image contains only unmodified @Core group packages.
It is thus very minimal. The kickstart and install script can be
found in the libguestfs source tree:
builder/website/fedora-i686.sh
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
[fedora-22]
name=Fedora® 22 Server (aarch64)
osinfo=fedora22

View File

@@ -375,6 +375,28 @@ notes=Fedora 22 Server.
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
[fedora-22]
name=Fedora® 22 Server (i686)
osinfo=fedora22
arch=i686
file=fedora-22-i686.xz
checksum=3547b94d5c418792e722786cfae41decd41f0725d529d65a2c719094c0b815eaa4fae195514a14d42fa19b57b895bcdbfdb305edf918b1b3722f30f338042d31
format=raw
size=6442450944
compressed_size=225185592
expand=/dev/sda3
notes=Fedora 22 Server (i686)
This Fedora image contains only unmodified @Core group packages.
It is thus very minimal. The kickstart and install script can be
found in the libguestfs source tree:
builder/website/fedora-i686.sh
Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
Source and further information is available from http://fedoraproject.org/
[fedora-22]
name=Fedora® 22 Server (aarch64)
osinfo=fedora22
@@ -528,17 +550,17 @@ notes=Ubuntu 14.04 (Trusty).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJVZifcAAoJEJFzj3Pht2ig6dMQAIO506ZAgUkargpLWChBI9N7
E3i/WTe1UFLtcBgfo7mlqYB4JZLSYGqccPAHvbo+c3beXoyDNc9/WFfSooxENVGL
PK6EIOBgAuvIjw87T+l5F5Otorm50dtmXUd8R2uHhFlQ92GgvxoIIFeUaXcDqk5k
doqidt8SgJTrpVOBmrxPw4T3N7jboDfz86MlI/sQ7MCDveHIPdNXM6D5TCQy0Kgp
cPX/D/2UDGF0RBFozHRWvpIqk1s5WtTuX/8XbHZGnz3EgkSM+hYUfQFHscczS4Q7
i2ydrq6m/ang/4njQPJbJVrC70wQT7uF5lhC5zOxBkd6DBlCd2seeuaaiOwvhMXQ
P70CRO4X0rvVVPHRbOh8bXMWHPbPzpSBjqrYpRn6vnDT7DgpdYmIeYP5ddaC3hWs
kwFImy3d107VCORs9YFJuYMMPVDz3+3tOIzKAQaPJD3EnsyeUCP7rAmY+j87a9AG
28kDivjIGqe1Q4rGocnc5RvLj/07scjna/Eb+Ik5qZ4yO8nx25+JBk8hngR4Hwgi
KE7WmreXhnaC5f9f0HI7XuREIM4R30KJYYgCR0CW3cUoe4kvI8QBThznunjRUDRj
evs5ApGQiaMMY67jXWPH92dpY4PNeGCAeMOnriySd34Z/KIadamDexApXy9omp6/
92Vbu59oVEAZn9w/luR4
=Uu7r
iQIcBAEBAgAGBQJVyfDjAAoJEJFzj3Pht2igm+QP+QEYtJ0oXuHjoQ4xap5TLW6u
bgu4LEwc/sdlbbpZRGBAm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