Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-isos106
1 files changed, 106 insertions, 0 deletions
diff --git a/build-isos b/build-isos
new file mode 100755
index 0000000..812590f
--- /dev/null
+++ b/build-isos
@@ -0,0 +1,106 @@
+#!/bin/bash
+
+# to be executed on nlopc43 ... sry for all the hard-coded stuff
+
+set -e
+
+#destination='/mnt/archlinux32/archisos'
+destination='/tmp/bla'
+base_dir=$(
+ readlink -e "${0%/*}"
+)
+
+case "$(hostname -s)" in
+ 'nlopc43')
+ echo 'build isos on nlopc46 ...'
+ rsync "$0" nlopc46:/tmp/
+ isos=$(
+ ssh nlopc46 "/tmp/${0##*/}"
+ )
+ echo '... done.'
+
+ if [ -z "${isos}" ]; then
+ echo 'no isos were built!?'
+ exit 1
+ fi
+
+ echo 'sign and upload isos ...'
+
+ tmp_dir=$(mktemp -d)
+ trap 'cd "${base_dir}"; rm -rf --one-file-system "${tmp_dir}"' EXIT
+
+ rsync -av $(printf 'nlopc46:%s\n' ${isos}) "${tmp_dir}/"
+
+ isos=$(
+ printf '%s\n' "${isos}" | \
+ sed 's,^.*/,,'
+ )
+
+ update_options=''
+
+ cd "${tmp_dir}"
+ cp "${destination}/sha512sums" .
+ cp "${destination}/md5sums" .
+
+ date=$(
+ printf '%s\n' "${isos}" \
+ | sed 's/^.*-\([^-]\+\)-[^-]\+$/\1/' \
+ | sort -u
+ )
+
+ for iso in ${isos}; do
+ gpg --detach-sign "${iso}"
+ done
+ sha512sum ${isos} >> sha512sums
+ md5sum ${isos} >> md5sums
+ sort -k2,2 sha512sums --output sha512sums
+ sort -k2,2 md5sums --output md5sums
+
+ "${base_dir}/al32-mktorrent.sh" -d "${date}" -t "hefur@archlinux32:"
+
+ mv $(
+ printf '%s\n' ${isos}
+ printf '%s.sig\n' ${isos}
+ printf '%s.torrent\n' ${isos}
+ ) feed_dual.rss feed_i686.rss sha512sums md5sums "${destination}/"
+
+ "${base_dir}/update-website" \
+ --torrent-seed-i686 "https://pool.mirror.archlinux32.org/archisos/archlinux-${date}-i686.iso.torrent" \
+ --torrent-seed-dual "https://pool.mirror.archlinux32.org/archisos/archlinux-${date}-dual.iso.torrent" \
+ --update-iso
+
+ echo '... done.'
+ ;;
+ 'nlopc46')
+ if [ "$(whoami)" = 'root' ]; then
+ cd "/usr/share/archiso/configs/$1"
+ rm --one-file-system -rf out work
+ mkdir out work
+ ./build.sh
+ chown "${SUDO_USER}:users" out/archlinux-*.iso
+ mv out/archlinux-*.iso "$2/"
+ exit
+ fi
+
+ rm -rf --one-file-system ~/archisos
+ mkdir ~/archisos
+
+ >&2 echo 'build i686-iso ...'
+
+ >&2 sudo "$0" releng32 ~/archisos/
+
+ >&2 echo '... done.'
+
+ >&2 echo 'build dual-iso ...'
+
+ >&2 sudo "$0" releng-dual ~/archisos/
+
+ >&2 echo '... done.'
+
+ find ~/archisos/ -type f
+ ;;
+ *)
+ >&2 echo 'execute on nlopc43 (or nlopc46) - sry'
+ exit 1
+ ;;
+esac