summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeep-42-thought <github@eckner.net>2017-10-11 07:44:45 +0200
committerGitHub <noreply@github.com>2017-10-11 07:44:45 +0200
commit2fd91fdfb3318eb9fd6985d75f4644946a980a36 (patch)
tree155ba454d74a43f3a55446b1b7507fbf7a442074
parentb240d4ed7768132cef9c790318b747222ffc1fbd (diff)
parent4ba768b51693d67c451ff8c4c46f7ea087d5ec4e (diff)
downloadreleng-2fd91fdfb3318eb9fd6985d75f4644946a980a36.tar.xz
Merge pull request #1 from tyzoid/master
Added i686 iso build script, using Vagrant
-rwxr-xr-xbuild-i686.sh64
1 files changed, 64 insertions, 0 deletions
diff --git a/build-i686.sh b/build-i686.sh
new file mode 100755
index 0000000..22c5550
--- /dev/null
+++ b/build-i686.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+mkdir build-i686
+cd build-i686
+
+cat << "END" > Vagrantfile
+Vagrant.configure("2") do |config|
+ config.vm.box = "archlinux/archlinux"
+ config.vm.provision "shell", path: "provision.sh", run: "once"
+end
+END
+
+cat << "__ENDOFPROVISION.SH__" > provision.sh
+#!/bin/bash
+set -e
+tmpFile="$(mktemp)"
+curl -o "${tmpFile}" "https://arch.eckner.net/archlinuxewe/masterkeys.gpg"
+pacman-key --add "${tmpFile}"
+rm -f "${tmpFile}"
+pacman-key --lsign-key 0x43BF68D3
+pacman-key --lsign-key 0x20194BA1
+if ! grep -q "^Server = https://arch\.eckner\.net" /etc/pacman.d/mirrorlist
+then
+ ml="$(
+ curl "https://arch.eckner.net/archlinuxewe/os/any/" 2> /dev/null | \
+ tr "<>" "\n\n" | \
+ grep "^pacman-mirrorlist-.*\.pkg\.tar\.xz\$" | \
+ tail -n1
+ )"
+ curl "https://arch.eckner.net/archlinuxewe/os/any/${ml}" 2> /dev/null | \
+ tar -OxJ etc/pacman.d/mirrorlist > \
+ /etc/pacman.d/mirrorlist
+fi
+if ! grep -q "^\[archlinuxewe\]\$" /etc/pacman.conf
+then
+ tmpFile="$(mktemp)"
+ cat /etc/pacman.conf | \
+ (
+ while read s
+ do
+ if [[ "$s" = "# The testing repositories"* ]]
+ then
+ echo '[archlinuxewe]'
+ echo 'SigLevel = Required'
+ echo 'Include = /etc/pacman.d/mirrorlist'
+ echo ''
+ fi
+ echo "${s}"
+ done
+ ) > "${tmpFile}"
+ cat "${tmpFile}" > /etc/pacman.conf
+ rm -f "${tmpFile}"
+fi
+
+sudo pacman --noconfirm -Syu archiso32
+__ENDOFPROVISION.SH__
+
+vagrant up
+vagrant ssh -c "sudo reboot";
+vagrant ssh -c "sudo bash -c '/usr/share/archiso/configs/releng/build.sh'";
+
+vagrant ssh-config > config.txt
+scp -rF config.txt default:/home/vagrant/out ../
+
+vagrant destroy -f