[Pkg-libvirt-commits] [libguestfs] 11/72: aarch64: builder: Add script for building Fedora aarch64 images.

Hilko Bengen bengen at moszumanska.debian.org
Sun Apr 5 15:19:47 UTC 2015


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

bengen pushed a commit to branch master
in repository libguestfs.

commit 539087877d50302adf7d32317243f64986c0fd97
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu Feb 12 16:35:46 2015 +0000

    aarch64: builder: Add script for building Fedora aarch64 images.
    
    (cherry picked from commit 5809a5a802f4999d759e247eec5bbdf664835e80)
---
 builder/website/fedora-aarch64.sh | 103 ++++++++++++++++++++++++++++++++++++++
 builder/website/index             |  25 +++++++++
 builder/website/index.asc         |  51 ++++++++++++++-----
 3 files changed, 166 insertions(+), 13 deletions(-)

diff --git a/builder/website/fedora-aarch64.sh b/builder/website/fedora-aarch64.sh
new file mode 100755
index 0000000..3426e07
--- /dev/null
+++ b/builder/website/fedora-aarch64.sh
@@ -0,0 +1,103 @@
+#!/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 aarch64 (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/aarch64/os/
+output=fedora-$version-aarch64
+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=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel no_timer_check printk.time=1 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 --nvram $tmpname ||:
+}
+trap cleanup INT QUIT TERM EXIT ERR
+
+# virt-install nvram_template option is broken for non-root users
+# https://bugzilla.redhat.com/show_bug.cgi?id=1189143
+# work around it:
+vars=$(mktemp)
+cp /usr/share/AAVMF/AAVMF_VARS.fd $vars
+
+virt-install \
+    --name=$tmpname \
+    --ram=4096 \
+    --cpu=host --vcpus=2 \
+    --os-type=linux --os-variant=fedora21 \
+    --boot loader=/usr/share/AAVMF/AAVMF_CODE.fd,loader_ro=yes,loader_type=pflash,nvram=$vars \
+    --initrd-inject=$ks \
+    --extra-args="ks=file:/`basename $ks` earlyprintk=pl011,0x9000000 ignore_loglevel console=ttyAMA0 no_timer_check printk.time=1 proxy=$http_proxy" \
+    --disk $(pwd)/$output,size=6 \
+    --serial pty \
+    --location=$tree \
+    --nographics \
+    --noreboot
+
+# NB: We need to preserve the nvram after installation since
+# it contains the EFI boot variables set by grub.
+cp $vars $output-nvram
+xz --best $output-nvram
+
+source $(dirname "$0")/compress.sh $output
diff --git a/builder/website/index b/builder/website/index
index 3244601..1467425 100644
--- a/builder/website/index
+++ b/builder/website/index
@@ -214,6 +214,31 @@ notes=Fedora 21 Server.
  Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
  Source and further information is available from http://fedoraproject.org/
 
+[fedora-21]
+name=Fedora® 21 Server (aarch64)
+osinfo=fedora21
+arch=aarch64
+file=fedora-21-aarch64.xz
+checksum=57026dd867cbc2e49894dd056ffdc1c397548f4f7e296f393a77ee55343a17f684ddcd3ff7661f514b54209c472f41fce809f2e36064fb66d4f92d8dce5e9b62
+format=raw
+size=4294967296
+compressed_size=186616612
+expand=/dev/sda3
+notes=Fedora 21 Server (aarch64)
+ 
+ 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-aarch64.sh
+ 
+ Please note you will need to use the associated EFI NVRAM variables:
+ http://libguestfs.org/download/builder/fedora-21-aarch64-nvram.xz
+ 
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
 [scientificlinux-6]
 name=Scientific Linux 6.5
 osinfo=centos6.5
diff --git a/builder/website/index.asc b/builder/website/index.asc
index dd9be84..1abef97 100644
--- a/builder/website/index.asc
+++ b/builder/website/index.asc
@@ -217,6 +217,31 @@ notes=Fedora 21 Server.
  Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
  Source and further information is available from http://fedoraproject.org/
 
+[fedora-21]
+name=Fedora® 21 Server (aarch64)
+osinfo=fedora21
+arch=aarch64
+file=fedora-21-aarch64.xz
+checksum=57026dd867cbc2e49894dd056ffdc1c397548f4f7e296f393a77ee55343a17f684ddcd3ff7661f514b54209c472f41fce809f2e36064fb66d4f92d8dce5e9b62
+format=raw
+size=4294967296
+compressed_size=186616612
+expand=/dev/sda3
+notes=Fedora 21 Server (aarch64)
+ 
+ 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-aarch64.sh
+ 
+ Please note you will need to use the associated EFI NVRAM variables:
+ http://libguestfs.org/download/builder/fedora-21-aarch64-nvram.xz
+ 
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
+ Source and further information is available from http://fedoraproject.org/
+
 [scientificlinux-6]
 name=Scientific Linux 6.5
 osinfo=centos6.5
@@ -323,17 +348,17 @@ notes=Ubuntu 14.04 (Trusty).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
-iQIcBAEBAgAGBQJUh0qYAAoJEJFzj3Pht2igo4gP/jHI52b2SNlKDkIFMjM26ztL
-UxtxHlU+70y8pOq/78beVHuiGYFGpkgmbU6lzPpVDivZP4riX1VWUWDWppmu2eEr
-SatDQEaUI1dlETFULXA2kpebH0Q4HsuALZeTt8y9j2U8l/JbKmqBM95f4YOxZiaf
-/UCfF+Er23Lp0whbPVlKDlWQvEVuGANllhoP0lGzLjaz5AHdjLewC+VcJrax74TO
-Lo/aelcZ6M0IYHyXJKUFHl1MrudoWcPvwvTevS7T9zTWJv4Pr+cfCquRxuZ2WZez
-hlwDcMYAO8XF7GsIjGl5ay2Y2H0Anm9iIFwR/bfGMr2EnLLxYZ0qYmeZeO9ZCQFK
-or57RjBebb4qvl5LQQ6JcagRUBPpQ7V5H0sbKTZgLbTDyuUWy+3xJ1MOIZPlnVvB
-gqVgbim9oPatIAgDUS60v4Gu5IFWoi8rgKoPUbY2eSmCfLd8wf1TeC2wQ4vKYJjj
-pMnnmR74gOUL5uUSFV+kM9PqdO65T5YJEG0Be09WCWqkvXbDsOpWDnBz4d5rfxbA
-78lAILtBcDZJvYk+dEekK2TKcWEBfqOPJ5ecWSoogn8pCdnvx3mMzGDaFzDiiiC+
-75nhFNimJs/akwOFh2DLkML0dfIMoaRwTrSoyAfAY+k9rCXBxNVsR0PtThEXaNYo
-RnA1DWswrHxjgIEj4pao
-=TEYf
+iQIcBAEBAgAGBQJU3OLmAAoJEJFzj3Pht2ig95MP/17rtuZ3ndrXX4vbIGx5tn7n
+SYwMUmi6ActhDkahTeYfksase9g2UmUjyOoG3OEp1dWOevn7kT964kyUO1APuosw
+PoOuJSCqjkhhBtYe49ngCHQPFTV262pa9jpMwQytaLVg0RmR6qVB1/hsu29s2tqS
+4KtjlrrPXEsU1L3ta0xBG6cAVIFw4us4WHbaEDwF+mZzM2PH1MeB/3IAor3gcDf7
+Qu9d3UFk3rGB8VAFeN04DhdICGvdGY7V2zZlL7jcRnlv2BksSAGGAvrDTPTXzogI
+Y4C6l48aoCpapcH5oSFmLcWZr2gV0nsUdBfTDlOd/sumXdIwFSnDESA4jhtXVpnL
+5QndMUbgdOc7hbrmmm+ry/oe6vFsjCCJLpU88BjCy9BsmIgmK8OAcD/cFn+xf1GA
+6rQC+mwfGTwyeKbY+GYfVocIIKlLtLut+kS0SZ3M2Ra2eo8GdDlubsjbnPcEZQZG
+q5PvMjgaWr+3or20tV7lBmVUGNOyulqIBHFUr1tbBJZW7LYjZrpRuBYa3wgfVhie
+JbsoMAw2fD8OqRtKnM7hr635K/8IoEgYAdXrQNLsDk00FF7C585wiQ73+lALp+Ka
+0Gtf6TySZE/pPERuCNrhwuUXVf6ukuRHFKIMWLWZEnHsJEUm35JtBJLzLE9nIRRw
+PcgoNe6c8JzC/pMFaJI6
+=k1fY
 -----END PGP SIGNATURE-----

-- 
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