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 <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2021-10-27 10:13:53 +02:00
parent 1c90561a17
commit c03da37716

View File

@ -278,6 +278,8 @@ for atom in portage.settings.packages:
[[ -z ${myNCURSES} ]] && myNCURSES="sys-libs/ncurses" [[ -z ${myNCURSES} ]] && myNCURSES="sys-libs/ncurses"
# Flatcar: install curl with BOOTSTRAP_USE=ssl to fetch from https URLs # Flatcar: install curl with BOOTSTRAP_USE=ssl to fetch from https URLs
[[ -z ${myCURL} ]] && myCURL="net-misc/curl" [[ -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? # Do we really want gettext/nls?
[[ ${USE_NLS} != 1 ]] && myGETTEXT= [[ ${USE_NLS} != 1 ]] && myGETTEXT=
@ -300,6 +302,7 @@ einfo "Using texinfo : ${myTEXINFO}"
einfo "Using zlib : ${myZLIB}" einfo "Using zlib : ${myZLIB}"
einfo "Using ncurses : ${myNCURSES}" einfo "Using ncurses : ${myNCURSES}"
einfo "Using curl : ${myCURL}" einfo "Using curl : ${myCURL}"
einfo "Using openssl : ${myOPENSSL}"
echo ------------------------------------------------------------------------------- echo -------------------------------------------------------------------------------
show_status 1 Configuring environment show_status 1 Configuring environment
echo ------------------------------------------------------------------------------- echo -------------------------------------------------------------------------------
@ -339,6 +342,8 @@ if [ ${BOOTSTRAP_STAGE} -le 2 ] ; then
STRAP_EMERGE_POSARGS="\ STRAP_EMERGE_POSARGS="\
${myOS_HEADERS} ${myTEXINFO} ${myGETTEXT} ${myBINUTILS} \ ${myOS_HEADERS} ${myTEXINFO} ${myGETTEXT} ${myBINUTILS} \
${myGCC} ${myLIBC} ${myCURL} ${myBASELAYOUT} ${myZLIB}" ${myGCC} ${myLIBC} ${myCURL} ${myBASELAYOUT} ${myZLIB}"
# Flatcar
STRAP_EMERGE_POSARGS="${STRAP_EMERGE_POSARGS} ${myOPENSSL}"
fi fi
${V_ECHO} emerge ${STRAP_EMERGE_OPTS} ${STRAP_EMERGE_POSARGS} || cleanup 1 ${V_ECHO} emerge ${STRAP_EMERGE_OPTS} ${STRAP_EMERGE_POSARGS} || cleanup 1
echo ------------------------------------------------------------------------------- echo -------------------------------------------------------------------------------