From 64787d8ec25d7664ff816bc8fa739eda700162c6 Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Mon, 22 Jun 2020 18:37:30 -0500 Subject: [PATCH] add musl profile to gentoo Change-Id: Id954ffe4d9b019c7e7bb648725ff7f976c929b4d --- .../gentoo/pre-install.d/02-gentoo-00-set-profile | 12 +++++++----- .../elements/gentoo/pre-install.d/02-gentoo-02-flags | 2 +- .../pre-install.d/02-gentoo-03-enable-overlays | 6 +----- .../elements/gentoo/root.d/10-gentoo-image | 3 +++ 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-00-set-profile b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-00-set-profile index 13a1dc57..d32f94b9 100755 --- a/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-00-set-profile +++ b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-00-set-profile @@ -12,8 +12,10 @@ ln -sf ../.."${PORTDIR}/profiles/${GENTOO_PROFILE}" /etc/portage/make.profile # Set timezone echo 'UTC' > /etc/timezone -# Set locale -echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen -echo 'en_US ISO-8859-1' >> /etc/locale.gen -locale-gen -q -eselect locale set en_US.utf8 +if [[ "${GENTOO_PROFILE}" != *"musl"* ]]; then + # Set locale + echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen + echo 'en_US ISO-8859-1' >> /etc/locale.gen + locale-gen -q + eselect locale set en_US.utf8 +fi diff --git a/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags index 673eeb70..d44b9f21 100755 --- a/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags +++ b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags @@ -39,7 +39,7 @@ fi if [[ "${GENTOO_PROFILE}" == *"musl"* ]]; then echo "dev-vcs/git -gpg" >> /etc/portage/package.use/musl # gpg doesn't build on musl profiles - echo "=sys-block/open-iscsi-2.0.874-r1 ~amd64" >> /etc/portage/package.accept_keywords/musl + echo "~sys-block/open-iscsi-2.0.878 ~amd64" >> /etc/portage/package.accept_keywords/musl echo "=sys-block/open-isns-0.97 ~amd64" >> /etc/portage/package.accept_keywords/musl echo "sys-libs/pam cracklib" >> /etc/portage/package.use/musl fi diff --git a/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays index 2fc3caa3..d4d18bc5 100755 --- a/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays +++ b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-03-enable-overlays @@ -19,13 +19,9 @@ if [[ ${GENTOO_OVERLAYS} != '' ]]; then emerge-webrsync -q fi - # upstream has problems with supporting other libcs still - if [[ "${GENTOO_PROFILE}" == *"musl"* ]]; then - echo '=sys-block/open-iscsi-2.0.877' >> /etc/portage/package.accept_keywords/open-iscsi - fi emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --oneshot openssl openssh # install layman - emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --oneshot --deep --ignore-built-slot-operator-deps=y layman + emerge ${GENTOO_EMERGE_DEFAULT_OPTS} --deep --ignore-built-slot-operator-deps=y layman # sync the initial overlay list layman -S # enable the various overlays, ignore failures (overlay my already be enabled) diff --git a/diskimage_builder/elements/gentoo/root.d/10-gentoo-image b/diskimage_builder/elements/gentoo/root.d/10-gentoo-image index a84785a1..ee1a0075 100755 --- a/diskimage_builder/elements/gentoo/root.d/10-gentoo-image +++ b/diskimage_builder/elements/gentoo/root.d/10-gentoo-image @@ -51,6 +51,9 @@ elif [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.1/hardened" ]]; then elif [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.1/no-multilib/hardened" ]]; then FILENAME_BASE='gentoo-stage3-hardened-nomultilib' SIGNED_SOURCE_SUFFIX='-hardened+nomultilib' +elif [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.0/musl/hardened" ]]; then + FILENAME_BASE='gentoo-stage3-hardened-musl' + SIGNED_SOURCE_SUFFIX='-musl-hardened' elif [[ "${GENTOO_PROFILE}" == "default/linux/amd64/17.1/systemd" ]]; then FILENAME_BASE='gentoo-stage3-systemd' SIGNED_SOURCE_SUFFIX='-systemd'