From 537fcf581c267e1bb2628adc5363d97746772bde Mon Sep 17 00:00:00 2001 From: Alexander Mankuta Date: Fri, 30 Oct 2015 21:17:02 +0200 Subject: [PATCH] Add Gentoo bootstrapping Includes support for all three major package managers. --- bootstrap/_gentoo_common.sh | 23 +++++++++++++++++++++++ bootstrap/gentoo.sh | 1 + bootstrap/install-deps.sh | 3 +++ letsencrypt-auto | 3 +++ 4 files changed, 30 insertions(+) create mode 100755 bootstrap/_gentoo_common.sh create mode 120000 bootstrap/gentoo.sh diff --git a/bootstrap/_gentoo_common.sh b/bootstrap/_gentoo_common.sh new file mode 100755 index 000000000..a718db7ff --- /dev/null +++ b/bootstrap/_gentoo_common.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +PACKAGES="dev-vcs/git + dev-lang/python:2.7 + dev-python/virtualenv + dev-util/dialog + app-admin/augeas + dev-libs/openssl + dev-libs/libffi + app-misc/ca-certificates + virtual/pkgconfig" + +case "$PACKAGE_MANAGER" in + (paludis) + cave resolve --keep-targets if-possible $PACKAGES -x + ;; + (pkgcore) + pmerge --noreplace $PACKAGES + ;; + (portage|*) + emerge --noreplace $PACKAGES + ;; +esac diff --git a/bootstrap/gentoo.sh b/bootstrap/gentoo.sh new file mode 120000 index 000000000..125d6a592 --- /dev/null +++ b/bootstrap/gentoo.sh @@ -0,0 +1 @@ +_gentoo_common.sh \ No newline at end of file diff --git a/bootstrap/install-deps.sh b/bootstrap/install-deps.sh index c159858c5..3cb0fc274 100755 --- a/bootstrap/install-deps.sh +++ b/bootstrap/install-deps.sh @@ -23,6 +23,9 @@ elif [ -f /etc/arch-release ] ; then elif [ -f /etc/redhat-release ] ; then echo "Bootstrapping dependencies for RedHat-based OSes..." $SUDO $BOOTSTRAP/_rpm_common.sh +elif [ -f /etc/gentoo-release ] ; then + echo "Bootstrapping dependencies for Gentoo-based OSes..." + $SUDO $BOOTSTRAP/_gentoo_common.sh elif uname | grep -iq FreeBSD ; then echo "Bootstrapping dependencies for FreeBSD..." $SUDO $BOOTSTRAP/freebsd.sh diff --git a/letsencrypt-auto b/letsencrypt-auto index 769f5a1d9..aba8baec1 100755 --- a/letsencrypt-auto +++ b/letsencrypt-auto @@ -47,6 +47,9 @@ then elif [ -f /etc/redhat-release ] ; then echo "Bootstrapping dependencies for RedHat-based OSes..." $SUDO $BOOTSTRAP/_rpm_common.sh + elif [ -f /etc/gentoo-release ] ; then + echo "Bootstrapping dependencies for Gentoo-based OSes..." + $SUDO $BOOTSTRAP/_gentoo_common.sh elif uname | grep -iq FreeBSD ; then echo "Bootstrapping dependencies for FreeBSD..." $SUDO $BOOTSTRAP/freebsd.sh