From c03da377165d93373afe287dfc26126c7fdedaa2 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Wed, 27 Oct 2021 10:13:53 +0200 Subject: [PATCH] script/bootstrap: update openssl before stage3 Right now our bootstrap flow is different then gentoo's - we don't update the seed when building stage1 and use a different ebuilds snapshot for stage1 compared to stage2 and stage3. This is causing us trouble now, because we introduced openssl-3, but seed/stage1 still contains openssl-1.1. During `emerge -e @system` in stage3, some packages that depend on openssl may build against the stage1 version, which results in an error during depcleaning (they would need to be rebuilt instead). Stage3 is not extensible, so instead, explicitly update openssl in stage2. This workaround can be removed as soon as we release a seed with openssl-3. Signed-off-by: Jeremi Piotrowski --- .../src/third_party/portage-stable/scripts/bootstrap.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk_container/src/third_party/portage-stable/scripts/bootstrap.sh b/sdk_container/src/third_party/portage-stable/scripts/bootstrap.sh index 8301064d17..aa8c91b30b 100755 --- a/sdk_container/src/third_party/portage-stable/scripts/bootstrap.sh +++ b/sdk_container/src/third_party/portage-stable/scripts/bootstrap.sh @@ -278,6 +278,8 @@ for atom in portage.settings.packages: [[ -z ${myNCURSES} ]] && myNCURSES="sys-libs/ncurses" # Flatcar: install curl with BOOTSTRAP_USE=ssl to fetch from https URLs [[ -z ${myCURL} ]] && myCURL="net-misc/curl" +# Flatcar: upgrade to openssl-3 before system rebuild in stage3 +[[ -z ${myOPENSSL} ]] && myOPENSSL="dev-libs/openssl" # Do we really want gettext/nls? [[ ${USE_NLS} != 1 ]] && myGETTEXT= @@ -300,6 +302,7 @@ einfo "Using texinfo : ${myTEXINFO}" einfo "Using zlib : ${myZLIB}" einfo "Using ncurses : ${myNCURSES}" einfo "Using curl : ${myCURL}" +einfo "Using openssl : ${myOPENSSL}" echo ------------------------------------------------------------------------------- show_status 1 Configuring environment echo ------------------------------------------------------------------------------- @@ -339,6 +342,8 @@ if [ ${BOOTSTRAP_STAGE} -le 2 ] ; then STRAP_EMERGE_POSARGS="\ ${myOS_HEADERS} ${myTEXINFO} ${myGETTEXT} ${myBINUTILS} \ ${myGCC} ${myLIBC} ${myCURL} ${myBASELAYOUT} ${myZLIB}" + # Flatcar + STRAP_EMERGE_POSARGS="${STRAP_EMERGE_POSARGS} ${myOPENSSL}" fi ${V_ECHO} emerge ${STRAP_EMERGE_OPTS} ${STRAP_EMERGE_POSARGS} || cleanup 1 echo -------------------------------------------------------------------------------