From 174bdb482cd1d2ae3cb4853961cd53b6026a4127 Mon Sep 17 00:00:00 2001 From: mudler Date: Sat, 8 Oct 2016 19:18:50 +0200 Subject: [PATCH] rpi-openrc: add experimental flavor --- rpi-openrc/.gitignore | 1 + rpi-openrc/Dockerfile | 16 ++++++++++++++++ rpi-openrc/scripts/setup.sh | 29 +++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 rpi-openrc/.gitignore create mode 100644 rpi-openrc/Dockerfile create mode 100755 rpi-openrc/scripts/setup.sh diff --git a/rpi-openrc/.gitignore b/rpi-openrc/.gitignore new file mode 100644 index 0000000..52811b4 --- /dev/null +++ b/rpi-openrc/.gitignore @@ -0,0 +1 @@ +confs/entropy_arm diff --git a/rpi-openrc/Dockerfile b/rpi-openrc/Dockerfile new file mode 100644 index 0000000..23feb4e --- /dev/null +++ b/rpi-openrc/Dockerfile @@ -0,0 +1,16 @@ +FROM sabayon/rpi-armhfp + +MAINTAINER mudler + +# Set locales to en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 + +# Perform post-upgrade tasks (mirror sorting, updating repository db) +ADD ./scripts/setup.sh /setup.sh +RUN /bin/bash /setup.sh && rm -rf /setup.sh + +# Set environment variables. +ENV HOME /root + +# Define working directory. +WORKDIR / diff --git a/rpi-openrc/scripts/setup.sh b/rpi-openrc/scripts/setup.sh new file mode 100755 index 0000000..6ec7473 --- /dev/null +++ b/rpi-openrc/scripts/setup.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +/usr/sbin/env-update +. /etc/profile +export ACCEPT_LICENSE=* +UPGRADE_REPO="sabayon-limbo" + +sed -i 's/multifetch = 3/#multifetch = 3/' /etc/entropy/client.conf +if [ -n "${UPGRADE_REPO}" ]; then + echo "Upgrading system by enabling ${UPGRADE_REPO}" + equo repo enable "${UPGRADE_REPO}" + FORCE_EAPI=2 equo update + + /usr/bin/equo repo mirrorsort "${UPGRADE_REPO}" # ignore errors + /usr/bin/equo repo mirrorsort sabayonlinux.org + + ETP_NONINTERACTIVE=1 equo upgrade --fetch + ETP_NONINTERACTIVE=1 equo upgrade --purge + echo "-5" | equo conf update +fi +# Be sure to have this on the image, always. +/usr/bin/equo i sys-apps/sysvinit sys-apps/openrc +/usr/bin/equo mask sys-apps/systemd-sysv-utils app-misc/sabayon-version + +echo -5 | equo conf update && equo cleanup +sed -i 's/#multifetch = 3/multifetch = 3/' /etc/entropy/client.conf + + +exit 0