diff --git a/builder/website/rhel-aarch64.sh b/builder/website/rhel-aarch64.sh new file mode 100755 index 000000000..99d19f850 --- /dev/null +++ b/builder/website/rhel-aarch64.sh @@ -0,0 +1,162 @@ +#!/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. + +unset CDPATH +export LANG=C +set -e +set -x + +# Hack for RWMJ +unset http_proxy + +if [ $# -ne 1 ]; then + echo "$0 VERSION" + exit 1 +fi + +version=$1 +output=rhel-$version-aarch64 +tmpname=tmp-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8) +guestroot=/dev/sda4 + +case $version in + 7.*) + major=7 + topurl=http://download.eng.rdu2.redhat.com/nightly/RHEL-$version/compose + tree=$topurl/Server/aarch64/os + baseurl=$tree + srpms=$topurl/Server/source/tree + optional=$topurl/Server-optional/x86_64/os + optionalsrpms=$topurl/Server-optional/source/tree + bootfs=ext4 + rootfs=xfs + ;; + *) + echo "$0: version $version not supported by this script yet" + exit 1 +esac + +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 +@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 + +# Yum configuration. +yum=$(mktemp) +cat > $yum <> $yum <