diff --git a/jenkins/scripts/install-distro-packages.sh b/jenkins/scripts/install-distro-packages.sh index 875e4b5755..d4f45b86ee 100755 --- a/jenkins/scripts/install-distro-packages.sh +++ b/jenkins/scripts/install-distro-packages.sh @@ -46,6 +46,10 @@ until $BINDEP -b -f $PACKAGES test; do sudo PATH=/usr/sbin:/sbin:$PATH DEBIAN_FRONTEND=noninteractive \ apt-get -q --option "Dpkg::Options::=--force-confold" \ --assume-yes install `$BINDEP -b -f $PACKAGES test` + elif emerge --version >/dev/null 2>&1 ; then + sudo emerge -uDNq --jobs=4 @world + sudo PATH=/usr/sbin:/sbin:$PATH emerge -q --jobs=4 \ + `$BINDEP -b -f $PACKAGES` else sudo PATH=/usr/sbin:/sbin:$PATH $YUM install -y \ `$BINDEP -b -f $PACKAGES test` diff --git a/nodepool/elements/cache-bindep/install.d/50-cache-pkgs b/nodepool/elements/cache-bindep/install.d/50-cache-pkgs index 1869774e09..80fa341b89 100755 --- a/nodepool/elements/cache-bindep/install.d/50-cache-pkgs +++ b/nodepool/elements/cache-bindep/install.d/50-cache-pkgs @@ -51,6 +51,17 @@ PACKAGELIST=`echo "$PACKAGES" | /usr/bindep-env/bin/bindep -b -f - || true` if [ -f /usr/bin/apt-get ] ; then # --ignore-missing conflicts with set -e, so force it to be ok apt-get -y --ignore-missing -d install $PACKAGELIST || true +elif [ -f /usr/bin/emerge ] ; then + # write out use config (won't install/fetch without it) + # This lays down install / compile time options needed for bindep to + # install / fetch the needed packages. + USE_FILE=/etc/portage/package.use/bindep.use + cat > $USE_FILE < /dev/null ; then update-grub else + if [[ $DISTRO_NAME == gentoo ]]; then + GRUB_CFG=/boot/grub/grub.cfg + else + GRUB_CFG=/boot/grub2/grub.cfg + fi # If update-grub isn't available, use grub2-mkconfig directly - /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg + /usr/sbin/grub2-mkconfig -o "${GRUB_CFG}" fi elif [ -f /boot/grub/grub.conf ] ; then sed -i -e 's/^timeout=[0-9]\+/timeout=0/' /boot/grub/grub.conf diff --git a/nodepool/elements/puppet/install.d/95-clean-repos b/nodepool/elements/puppet/install.d/95-clean-repos index dbbce2926c..1c37a5f44f 100755 --- a/nodepool/elements/puppet/install.d/95-clean-repos +++ b/nodepool/elements/puppet/install.d/95-clean-repos @@ -39,6 +39,12 @@ case $OS_FAMILY in # time updating. update="" ;; + "Gentoo") + # make a fake repo to satisfy the removal below + touch /tmp/fakerepo + repo=/tmp/fakerepo + update="" + ;; *) die "Don't know how to cleanup!" ;; diff --git a/nodepool/elements/zuul-worker/pkg-map b/nodepool/elements/zuul-worker/pkg-map index e4440b94ee..36e677f2c8 100644 --- a/nodepool/elements/zuul-worker/pkg-map +++ b/nodepool/elements/zuul-worker/pkg-map @@ -2,6 +2,9 @@ "family": { "debian": { "libselinux-python": "" + }, + "gentoo": { + "libselinux-python": "sys-libs/libselinux" } } }