[Pkg-libvirt-commits] [libguestfs] 44/65: builder: Add fedora-ppc64le script and build ppc64le template.

Hilko Bengen bengen at moszumanska.debian.org
Tue Apr 21 12:11:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit c65bba313d848d5d6a700df2c803bd89caadd2c6
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue Apr 14 18:09:29 2015 +0100

    builder: Add fedora-ppc64le script and build ppc64le template.
---
 builder/website/fedora-ppc64le.sh | 92 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/builder/website/fedora-ppc64le.sh b/builder/website/fedora-ppc64le.sh
new file mode 100755
index 0000000..6f2026f
--- /dev/null
+++ b/builder/website/fedora-ppc64le.sh
@@ -0,0 +1,92 @@
+#!/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.
+
+# Build Fedora images for ppc64le (secondary arch).
+
+unset CDPATH
+export LANG=C
+set -e
+set -x
+
+if [ $# -ne 1 ]; then
+    echo "$0 VERSION"
+    exit 1
+fi
+
+version=$1
+tree=https://download.fedoraproject.org/pub/fedora-secondary/releases/21/Server/ppc64le/os/
+output=fedora-$version-ppc64le
+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
+ at core
+%end
+
+%post
+# 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=4096 \
+    --vcpus=2 \
+    --os-type=linux --os-variant=fedora21 \
+    --arch ppc64le --machine pseries \
+    --initrd-inject=$ks \
+    --extra-args="ks=file:/`basename $ks` console=tty0 console=ttyS0,115200 proxy=$http_proxy" \
+    --disk $(pwd)/$output,size=6 \
+    --serial pty \
+    --location=$tree \
+    --nographics \
+    --noreboot
+
+source $(dirname "$0")/compress.sh $output

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list