diff options
Diffstat (limited to 'builders')
11 files changed, 112 insertions, 7 deletions
diff --git a/builders/milou/binhost-update b/builders/milou/binhost-update index 8a304dd..d48e15e 100755 --- a/builders/milou/binhost-update +++ b/builders/milou/binhost-update @@ -113,15 +113,26 @@ emerge --sync -q &>> ${TMPFILE} anyfail=0 +nspawn_command=(systemd-nspawn --bind /var/cache/distfiles --bind-ro /var/db/repos/gentoo --tmpfs=/var/tmp:mode=1777,size=${TMPFS_SIZE}g) for n in ${NSPAWN_NAMES} ; do + machinedir=/var/lib/machines/${n} echo Machine ${n} &>> ${TMPFILE} echo &>> ${TMPFILE} - cd /var/lib/machines/${n}/etc/binhost &>> ${TMPFILE} + cd ${machinedir}/etc/binhost &>> ${TMPFILE} git reset --hard &>> ${TMPFILE} git pull &>> ${TMPFILE} cd /root &>> ${TMPFILE} - systemd-nspawn --bind /var/cache/distfiles --bind-ro /var/db/repos/gentoo --tmpfs=/var/tmp:mode=1777,size=${TMPFS_SIZE}g -M ${n} /root/bin/run-update &>> ${TMPFILE} - let "anyfail+=$?" + "${nspawn_command[@]}" -M ${n} /root/bin/run-update &>> ${TMPFILE} + ret=$? + let "anyfail+=${ret}" + if [[ ${ret} = 0 ]]; then + builder=$(readlink ${machinedir}/etc/portage) + for variant in ${machinedir}/${builder}/variants/*; do + [[ -d ${variant} ]] || break + "${nspawn_command[@]}" --ephemeral --bind ${machinedir}/var/cache/binpkgs -M ${n} /root/bin/run-update ${variant##*/} &>> ${TMPFILE} + let "anyfail+=$?" + done + fi done diff --git a/builders/milou/gnome-23/portage/variants/lucky/.run_marker b/builders/milou/gnome-23/portage/variants/lucky/.run_marker new file mode 100644 index 0000000..722c3eb --- /dev/null +++ b/builders/milou/gnome-23/portage/variants/lucky/.run_marker @@ -0,0 +1 @@ +I'm feeling lucky! diff --git a/builders/milou/gnome-23/portage/variants/nopulse/package.use/nopulse b/builders/milou/gnome-23/portage/variants/nopulse/package.use/nopulse new file mode 100644 index 0000000..3f33baa --- /dev/null +++ b/builders/milou/gnome-23/portage/variants/nopulse/package.use/nopulse @@ -0,0 +1 @@ +*/* -pulseaudio -screencast diff --git a/builders/milou/gnome-23/portage/variants/unstable/buildpkgonly b/builders/milou/gnome-23/portage/variants/unstable/buildpkgonly new file mode 100755 index 0000000..e344f3c --- /dev/null +++ b/builders/milou/gnome-23/portage/variants/unstable/buildpkgonly @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +# We must use buildpkgonly here since we do not want to actually install +# unstable packages. buildpkgonly will fatally error if any dependencies aren't +# installed. +emerge --buildpkgonly sys-devel/gcc:15 sys-devel/gcc:14 sys-devel/gcc:12 +# ... and clean it up +rm /etc/portage/package.accept_keywords/gcc diff --git a/builders/milou/gnome-23/portage/variants/unstable/package.accept_keywords/gcc b/builders/milou/gnome-23/portage/variants/unstable/package.accept_keywords/gcc new file mode 100644 index 0000000..8b9d7eb --- /dev/null +++ b/builders/milou/gnome-23/portage/variants/unstable/package.accept_keywords/gcc @@ -0,0 +1,2 @@ +sys-devel/gcc ~amd64 +<sys-devel/gcc-15.0.9999:15 ** diff --git a/builders/milou/gnome-23/run-update b/builders/milou/gnome-23/run-update index 02cdf8a..84bf589 100755 --- a/builders/milou/gnome-23/run-update +++ b/builders/milou/gnome-23/run-update @@ -3,6 +3,40 @@ # if one thing fails, abort entirely set -e -emerge -uDNkq --changed-deps --backtrack=100 --keep-going world +to_install=(world) -emerge --depclean --quiet-unmerge-warn +if [[ $1 = lucky ]]; then + eix-update + eix --stable --only-names | grep -E -v '^(acct|virtual|sec)-' | sort -u > /tmp/stable + eix --installed --only-names | sort -u > /tmp/installed + comm -23 /tmp/stable /tmp/installed > /tmp/uninstalled-stable + sed -i 's/--binpkg-respect-use//' /etc/portage/make.conf + + to_install=(--autounmask --autounmask-keep-keywords --autounmask-write --autounmask-continue $(shuf -n1 /tmp/uninstalled-stable)) +elif [[ $1 ]]; then + pushd /etc/portage/variants/$1 + while read -r -d '' line; do + dest=../../${line%.footer} + if [[ ${line} = world* ]]; then + dest=/var/lib/portage/world + fi + + if [[ ${line} = world.remove ]]; then + emerge -C $(<"${line}") + elif [[ ${line} = *.footer ]]; then + cat "${line}" >> "${dest}" + else + cp "${line}" "${dest}" + fi + done < <(find . -type f -printf '%P\0') + if [[ -f buildpkgonly ]]; then + ./buildpkgonly + fi + popd +fi + +emerge -uDNkq --changed-deps --backtrack=100 --keep-going "${to_install[@]}" + +if [[ ! $1 ]]; then + emerge --depclean --quiet-unmerge-warn +fi diff --git a/builders/milou/gnome-v3-23/portage/variants/lucky/.run_marker b/builders/milou/gnome-v3-23/portage/variants/lucky/.run_marker new file mode 100644 index 0000000..722c3eb --- /dev/null +++ b/builders/milou/gnome-v3-23/portage/variants/lucky/.run_marker @@ -0,0 +1 @@ +I'm feeling lucky! diff --git a/builders/milou/gnome-v3-23/portage/variants/nopulse/package.use/nopulse b/builders/milou/gnome-v3-23/portage/variants/nopulse/package.use/nopulse new file mode 100644 index 0000000..3f33baa --- /dev/null +++ b/builders/milou/gnome-v3-23/portage/variants/nopulse/package.use/nopulse @@ -0,0 +1 @@ +*/* -pulseaudio -screencast diff --git a/builders/milou/gnome-v3-23/portage/variants/unstable/buildpkgonly b/builders/milou/gnome-v3-23/portage/variants/unstable/buildpkgonly new file mode 100755 index 0000000..e344f3c --- /dev/null +++ b/builders/milou/gnome-v3-23/portage/variants/unstable/buildpkgonly @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +# We must use buildpkgonly here since we do not want to actually install +# unstable packages. buildpkgonly will fatally error if any dependencies aren't +# installed. +emerge --buildpkgonly sys-devel/gcc:15 sys-devel/gcc:14 sys-devel/gcc:12 +# ... and clean it up +rm /etc/portage/package.accept_keywords/gcc diff --git a/builders/milou/gnome-v3-23/portage/variants/unstable/package.accept_keywords/gcc b/builders/milou/gnome-v3-23/portage/variants/unstable/package.accept_keywords/gcc new file mode 100644 index 0000000..8b9d7eb --- /dev/null +++ b/builders/milou/gnome-v3-23/portage/variants/unstable/package.accept_keywords/gcc @@ -0,0 +1,2 @@ +sys-devel/gcc ~amd64 +<sys-devel/gcc-15.0.9999:15 ** diff --git a/builders/milou/gnome-v3-23/run-update b/builders/milou/gnome-v3-23/run-update index 02cdf8a..84bf589 100755 --- a/builders/milou/gnome-v3-23/run-update +++ b/builders/milou/gnome-v3-23/run-update @@ -3,6 +3,40 @@ # if one thing fails, abort entirely set -e -emerge -uDNkq --changed-deps --backtrack=100 --keep-going world +to_install=(world) -emerge --depclean --quiet-unmerge-warn +if [[ $1 = lucky ]]; then + eix-update + eix --stable --only-names | grep -E -v '^(acct|virtual|sec)-' | sort -u > /tmp/stable + eix --installed --only-names | sort -u > /tmp/installed + comm -23 /tmp/stable /tmp/installed > /tmp/uninstalled-stable + sed -i 's/--binpkg-respect-use//' /etc/portage/make.conf + + to_install=(--autounmask --autounmask-keep-keywords --autounmask-write --autounmask-continue $(shuf -n1 /tmp/uninstalled-stable)) +elif [[ $1 ]]; then + pushd /etc/portage/variants/$1 + while read -r -d '' line; do + dest=../../${line%.footer} + if [[ ${line} = world* ]]; then + dest=/var/lib/portage/world + fi + + if [[ ${line} = world.remove ]]; then + emerge -C $(<"${line}") + elif [[ ${line} = *.footer ]]; then + cat "${line}" >> "${dest}" + else + cp "${line}" "${dest}" + fi + done < <(find . -type f -printf '%P\0') + if [[ -f buildpkgonly ]]; then + ./buildpkgonly + fi + popd +fi + +emerge -uDNkq --changed-deps --backtrack=100 --keep-going "${to_install[@]}" + +if [[ ! $1 ]]; then + emerge --depclean --quiet-unmerge-warn +fi |