[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 2aceab45a9352f126ce5b7f8b04687fe1c28409d Author: Georgy Yakovlev gentoo org> AuthorDate: Mon Sep 26 16:30:25 2022 + Commit: Matt Turner gentoo org> CommitDate: Thu Oct 13 16:17:10 2022 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=2aceab45 targets: build initial baselayout with USE=build current flow is the following: update seed install baselayout with USE=-build (for reasons unknown) install @system with USE=build this leads to a problem on usrmerged systems, because baselayout with USE=-build that's installed initially does not create usrmerge symlinks at all, so /bin /sbin are missing. anything that installs files to those locations will be lost. after installing baselayout initially with USE=-build --nodeps we install the following bzip2 gzip tar xz-utils baselayout[build] so everything installed before line above ^ loses / files completely. This commit will change initial baselayout to USE=build Closes: https://github.com/gentoo/catalyst/pull/10 Thanks-to: Mike Gilbert gentoo.org> Signed-off-by: Georgy Yakovlev gentoo.org> Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index 08b9da46..e0587b59 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -61,9 +61,9 @@ mkdir -p "$ROOT" ## START BUILD # First, we drop in a known-good baselayout -[ -e ${clst_make_conf} ] && echo "USE=\"${USE} -build\"" >> ${clst_make_conf} +[ -e ${clst_make_conf} ] && echo "USE=\"${USE} build\"" >> ${clst_make_conf} run_merge --oneshot --nodeps sys-apps/baselayout -sed -i "/USE=\"${USE} -build\"/d" ${clst_make_conf} +sed -i "/USE=\"${USE} build\"/d" ${clst_make_conf} echo "$locales" > /etc/locale.gen for etc in /etc "$ROOT"/etc; do
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: b3f782a0725da0f4858cba3e887f973e324755c7 Author: Matt Turner gentoo org> AuthorDate: Sun Jan 17 23:29:05 2021 + Commit: Matt Turner gentoo org> CommitDate: Sat Jan 23 16:19:07 2021 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b3f782a0 targets: Update the @changed-subslot set by default In portage commit 1789fdf2ee81 (Add @changed-subslot package set) I added this: the set of upgradable packages for which the highest visible version has a different subslot than the currently installed version. Updating the entire stage is expensive and unnecessary (since we're going to build the latest packages in stage1 and then rebuild everything in stage3). What we definitely do need to update in the original stage3 however, is any package that would trigger a subslot rebuild. For example: gcc links with libmpfr.so from dev-libs/mpfr. mpfr's SONAME changes from libmpfr.so.4 (SLOT="0/4") to libmpfr.so.6 (SLOT="0/6"). If the seed stage's dev-libs/mpfr is not updated before emerging gcc, gcc will link with libmpfr.so.4, but the latest version of dev-libs/mpfr will be built and libmpfr.so.6 included into the stage1. Since the old libmpfr.so.4 is not included in the stage1, gcc will not work, breaking subsequent stage builds. Our current options to update the seed are too large a hammer (e.g., "--update --deep --newuse @world" or "--update --deep --newuse --complete-graph --rebuild-if-new-ver gcc") and spend too much time updating seed stages for no gain beyond updating only packages for whom the subslot has changed. Bug: https://bugs.gentoo.org/739004 Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index 9b34ced8..08b9da46 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -37,6 +37,8 @@ if [ -n "${clst_update_seed}" ]; then echo "Updating seed stage..." if [ -n "${clst_update_seed_command}" ]; then ROOT=/ run_merge --buildpkg=n "${clst_update_seed_command}" + elif grep -q '^\[changed-subslot\]' /usr/share/portage/config/sets/portage.conf; then + ROOT=/ run_merge --ignore-built-slot-operator-deps y @changed-subslot else ROOT=/ run_merge --update --deep --newuse --complete-graph --rebuild-if-new-ver gcc fi
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 9d6a5c43a4a051be88a0af76fdd648f6d0f232b1 Author: Matt Turner gentoo org> AuthorDate: Mon Jan 18 18:23:34 2021 + Commit: Matt Turner gentoo org> CommitDate: Sat Jan 23 16:19:07 2021 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9d6a5c43 targets: Update BINPKG_COMPRESS to new zstd default In portage commit 230595cf600c (Default BINPKG_COMPRESSION to zstd (bug 715108)) the default BINPKG_COMPRESSION setting was changed to zstd. But to retain compatibility with binpkg consumers, the default is unchanged for existing installations, so we need to update our BINPKG_COMPRESSION. Bug: https://bugs.gentoo.org/715108 Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index 50afef4a..9b34ced8 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -24,6 +24,9 @@ BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)" FEATURES="${FEATURES} nodoc noman noinfo" +sed -i -e 's:BINPKG_COMPRESS="bzip2":BINPKG_COMPRESS="zstd":' \ + /usr/share/portage/config/make.globals + # We need to ensure the base stage3 has USE="bindist" # if BINDIST is set to avoid issues with openssl / openssh [ -e ${clst_make_conf} ] && echo "USE=\"${BINDIST} ${USE}\"" >> ${clst_make_conf}
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: d1ce4b31637d143eda05472d2216db40d001169c Author: Matt Turner gentoo org> AuthorDate: Tue Dec 15 03:42:52 2020 + Commit: Matt Turner gentoo org> CommitDate: Tue Dec 15 03:42:52 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d1ce4b31 targets: Rename clst_buildpkgs -> buildpkgs And remove the unnecessary export. Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index 2a8dc59b..dac52dfc 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -3,7 +3,7 @@ source /tmp/chroot-functions.sh # We do this first, so we know our package list for --debug -export clst_buildpkgs="$(/tmp/build.py)" +buildpkgs="$(/tmp/build.py)" # Setup our environment [ -n "${clst_BINDIST}" ] && BINDIST="bindist" @@ -12,7 +12,7 @@ BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)" FEATURES="${FEATURES} nodoc noman noinfo" ## Sanity check profile -if [ -z "${clst_buildpkgs}" ] +if [ -z "${buildpkgs}" ] then echo "Your profile seems to be broken." echo "Could not build a list of build packages." @@ -72,7 +72,7 @@ if [ -e ${clst_make_conf} ]; then done fi -run_merge "--oneshot ${clst_buildpkgs}" +run_merge "--oneshot ${buildpkgs}" # TODO: Drop this when locale-gen in stable glibc supports ROOT. #
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: c27fd976e4dc4fd1ce269a002a9d00c979e53287 Author: Matt Turner gentoo org> AuthorDate: Wed Dec 16 03:00:25 2020 + Commit: Matt Turner gentoo org> CommitDate: Wed Dec 16 03:01:26 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c27fd976 catalyst: Remove dead comment Fixes: 220df6a5d255 ("catalyst: Drop ancient portage support") Signed-off-by: Matt Turner gentoo.org> targets/stage1/build.py | 1 - 1 file changed, 1 deletion(-) diff --git a/targets/stage1/build.py b/targets/stage1/build.py index fec1162c..85675511 100755 --- a/targets/stage1/build.py +++ b/targets/stage1/build.py @@ -9,7 +9,6 @@ from portage.util import grabfile_package, stack_lists # this loads files from the profiles ... # wrap it here to take care of the different # ways portage handles stacked profiles -# last case is for portage-2.1_pre* def scan_profile(path):
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 0a0efebb7834f00cea0bb35d708a56ad635627a8 Author: Matt Turner gentoo org> AuthorDate: Tue Dec 15 03:51:53 2020 + Commit: Matt Turner gentoo org> CommitDate: Tue Dec 15 03:51:53 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=0a0efebb targets: Make ${buildpkgs} an array Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index dac52dfc..7e8d5b4e 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -3,7 +3,7 @@ source /tmp/chroot-functions.sh # We do this first, so we know our package list for --debug -buildpkgs="$(/tmp/build.py)" +buildpkgs=($(/tmp/build.py)) # Setup our environment [ -n "${clst_BINDIST}" ] && BINDIST="bindist" @@ -12,8 +12,7 @@ BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)" FEATURES="${FEATURES} nodoc noman noinfo" ## Sanity check profile -if [ -z "${buildpkgs}" ] -then +if [[ ${#buildpkgs[@]} -eq 0 ]]; then echo "Your profile seems to be broken." echo "Could not build a list of build packages." echo "Double check your ${clst_port_conf}/make.profile link and the 'packages' files." @@ -72,7 +71,7 @@ if [ -e ${clst_make_conf} ]; then done fi -run_merge "--oneshot ${buildpkgs}" +run_merge "--oneshot ${buildpkgs[@]}" # TODO: Drop this when locale-gen in stable glibc supports ROOT. #
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 37cabf5c536fe8eef16532f18790c1da566aae15 Author: Matt Turner gentoo org> AuthorDate: Tue Dec 15 03:29:56 2020 + Commit: Matt Turner gentoo org> CommitDate: Wed Dec 16 03:01:23 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=37cabf5c targets: Use interpreter with portage module for build.py Closes: https://bugs.gentoo.org/759685 Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index 83cd084d..6b9bfb3e 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -2,8 +2,13 @@ source /tmp/chroot-functions.sh -# We do this first, so we know our package list for --debug -buildpkgs=($(/tmp/build.py)) +for module_path in /usr/lib/*/site-packages/portage/__init__.py; do + # Find the python interpreter + interpreter=$(echo $module_path | cut -d/ -f4) + + buildpkgs=($($interpreter /tmp/build.py 2>/dev/null)) + [[ $? == 0 ]] && break +done ## Sanity check profile if [[ ${#buildpkgs[@]} -eq 0 ]]; then
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 5f62563f52a81b578703f140361a5fcec96e75e5 Author: Matt Turner gentoo org> AuthorDate: Tue Dec 15 03:52:40 2020 + Commit: Matt Turner gentoo org> CommitDate: Tue Dec 15 03:52:40 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5f62563f targets: Move ${buildpkgs} error checking closer Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index 7e8d5b4e..83cd084d 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -5,12 +5,6 @@ source /tmp/chroot-functions.sh # We do this first, so we know our package list for --debug buildpkgs=($(/tmp/build.py)) -# Setup our environment -[ -n "${clst_BINDIST}" ] && BINDIST="bindist" -BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)" - -FEATURES="${FEATURES} nodoc noman noinfo" - ## Sanity check profile if [[ ${#buildpkgs[@]} -eq 0 ]]; then echo "Your profile seems to be broken." @@ -19,6 +13,12 @@ if [[ ${#buildpkgs[@]} -eq 0 ]]; then exit 1 fi +# Setup our environment +[ -n "${clst_BINDIST}" ] && BINDIST="bindist" +BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)" + +FEATURES="${FEATURES} nodoc noman noinfo" + # We need to ensure the base stage3 has USE="bindist" # if BINDIST is set to avoid issues with openssl / openssh [ -e ${clst_make_conf} ] && echo "USE=\"${BINDIST} ${USE}\"" >> ${clst_make_conf}
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: bfb2731f7200e9a1f19b65d928586c209b1bf4a2 Author: Matt Turner gentoo org> AuthorDate: Fri May 15 03:36:19 2020 + Commit: Matt Turner gentoo org> CommitDate: Fri May 15 03:39:56 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bfb2731f targets: Test for locale-gen locale-gen is only provided by glibc and not by others. Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index ac9d68ea..b48fda65 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -82,7 +82,9 @@ run_merge "--oneshot ${clst_buildpkgs}" # locale-gen does not support the ROOT variable, and as such glibc simply does # not run locale-gen when ROOT is set. Since we've set LANG, we need to run # locale-gen explicitly. -locale-gen --destdir "${clst_root_path}"/ || die "locale-gen failed" +if [ -x "$(command -v locale-gen)" ]; then + locale-gen --destdir "${clst_root_path}"/ || die "locale-gen failed" +fi # Why are we removing these? Don't we need them for final make.conf? for useexpand in ${clst_HOSTUSEEXPAND}; do
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 220df6a5d255b308e7d912ba1a358ac891e2becb Author: Matt Turner gentoo org> AuthorDate: Fri Apr 10 17:10:40 2020 + Commit: Matt Turner gentoo org> CommitDate: Fri Apr 10 17:45:28 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=220df6a5 catalyst: Drop ancient portage support Signed-off-by: Matt Turner gentoo.org> targets/stage1/build.py | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/targets/stage1/build.py b/targets/stage1/build.py index 4373126b..069d8d32 100755 --- a/targets/stage1/build.py +++ b/targets/stage1/build.py @@ -3,19 +3,14 @@ import os import sys import portage +from portage.util import grabfile_package, stack_lists # this loads files from the profiles ... # wrap it here to take care of the different # ways portage handles stacked profiles # last case is for portage-2.1_pre* def scan_profile(path): - if "grab_stacked" in dir(portage): - return portage.grab_stacked(path, portage.settings.profiles, portage.grabfile, incremental_lines=1) - else: - if "grab_multiple" in dir(portage): - return portage.stack_lists(portage.grab_multiple(path, portage.settings.profiles, portage.grabfile), incremental=1) - else: - return portage.stack_lists([portage.grabfile_package(os.path.join(x, path)) for x in portage.settings.profiles], incremental=1) + return stack_lists([grabfile_package(os.path.join(x, path)) for x in portage.settings.profiles], incremental=1) # loaded the stacked packages / packages.build files pkgs = scan_profile("packages")
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 0b5a340f40fb6d273fdb6fa66f17b0af13df8fc2 Author: Matt Turner gentoo org> AuthorDate: Fri Apr 10 17:45:52 2020 + Commit: Matt Turner gentoo org> CommitDate: Fri Apr 10 21:03:53 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=0b5a340f catalyst: Fix import for portage.dep.dep_getkey Signed-off-by: Matt Turner gentoo.org> targets/stage1/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/targets/stage1/build.py b/targets/stage1/build.py index b95b4182..b01eb9cd 100755 --- a/targets/stage1/build.py +++ b/targets/stage1/build.py @@ -3,6 +3,7 @@ import os import sys import portage +from portage.dep import dep_getkey from portage.util import grabfile_package, stack_lists # this loads files from the profiles ... @@ -24,7 +25,7 @@ buildpkgs = scan_profile("packages.build") # and version numbers) for pkg in pkgs: try: - bidx = buildpkgs.index(portage.dep_getkey(pkg)) + bidx = buildpkgs.index(dep_getkey(pkg)) buildpkgs[bidx] = pkg if buildpkgs[bidx][0:1] == "*": buildpkgs[bidx] = buildpkgs[bidx][1:]
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 3e49cf88bc4e8fdf96e29af901fabacd6e973fe7 Author: Matt Turner gentoo org> AuthorDate: Tue Apr 7 22:53:38 2020 + Commit: Matt Turner gentoo org> CommitDate: Tue Apr 7 22:57:58 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3e49cf88 targets: Use ${clst_root_path} instead of hardcoding it Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index 0caf49ee..d409de39 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -49,7 +49,7 @@ fi # Clear USE [ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^USE=\"${BINDIST} ${USE}\"/d" ${clst_make_conf} -make_destpath /tmp/stage1root +make_destpath "${clst_root_path}" ## START BUILD # First, we drop in a known-good baselayout
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/, targets/stage3/, targets/support/, targets/stage2/
commit: 5fb710093c0d4643b981db7763f7f14d04e02d79 Author: Matt Turner gentoo org> AuthorDate: Fri Mar 27 23:34:19 2020 + Commit: Matt Turner gentoo org> CommitDate: Tue Apr 7 23:23:07 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5fb71009 targets: Reduce locales to C.UTF8 in stage builds By default, glibc generates around 500 locales with more added each year. With USE=-compile-locales, glibc generates the locale archive in pkg_postinst(). Since files generated in pkg_postinst() are not recorded in the vdb, this has the advantage of allowing users to freely change the set of enabled locales (by editing /etc/locale.gen and running locale-gen). Since it is so easy for the user to generate any locales they want with locale-gen (and they probably would have anyway to rid themselves of the 499 locales they don't want!), just disable all locales except for C.UTF8 and save stage builders a lot of time. The patch works by (1) Writing /etc/locale.gen with "C.UTF8 UTF-8" (2) Setting CONFIG_PROTECT so glibc doesn't overwrite /etc/locale.gen (3) Running etc-update to reset /etc/locale.gen In order to do this I modified scripts/bootstrap.sh in commit 0aa49828ae25 (scripts/bootstrap.sh: Allow CONFIG_PROTECT). Reducing the set of locales cuts the user time (as reported by time(1)) of the stage2 and stage3 builds as well as the file size of the resulting xz'd tarballs: stage 2 stage 3 size time size time before89M 22m42s 206M 45m5s after77M4m29s 195M 26m8s An alternative solution would be to set USE=compiled-locales for glibc, but that has the downside of being non-default and likely causing users to unnecessarily rebuild glibc. (We'll do this for the ISOs where we want all the locales) Note that this patch does not change the contents of /etc/locale.gen in the stage3 tarball. Closes: https://bugs.gentoo.org/686862 Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh| 1 + targets/stage2/chroot.sh| 6 ++ targets/stage3/chroot.sh| 7 +++ targets/support/chroot-functions.sh | 6 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index 60e32c60..6e20027a 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -57,6 +57,7 @@ make_destpath "${clst_root_path}" run_merge "--oneshot --nodeps sys-apps/baselayout" ${clst_sed} -i "/USE=\"${USE} -build\"/d" ${clst_make_conf} +echo "$locales" > /etc/locale.gen for etc in /etc "${clst_root_path}"/etc; do echo "LANG=C.UTF8" > ${etc}/env.d/02locale done diff --git a/targets/stage2/chroot.sh b/targets/stage2/chroot.sh index 5fac858f..bf98d328 100755 --- a/targets/stage2/chroot.sh +++ b/targets/stage2/chroot.sh @@ -4,6 +4,12 @@ source /tmp/chroot-functions.sh # Setup the environment export FEATURES="${clst_myfeatures} nodoc noman noinfo -news" +export CONFIG_PROTECT="-* /etc/locale.gen" + +echo "$locales" > /etc/locale.gen ## START BUILD ${clst_repo_basedir}/${clst_repo_name}/scripts/bootstrap.sh ${bootstrap_opts} || exit 1 + +# Replace modified /etc/locale.gen with default +etc-update --automode -5 diff --git a/targets/stage3/chroot.sh b/targets/stage3/chroot.sh index 4f8bb0ee..e6712015 100755 --- a/targets/stage3/chroot.sh +++ b/targets/stage3/chroot.sh @@ -5,4 +5,11 @@ source /tmp/chroot-functions.sh ## START BUILD setup_pkgmgr +export CONFIG_PROTECT="-* /etc/locale.gen" + +echo "$locales" > /etc/locale.gen + run_merge "-e --update --deep --with-bdeps=y @system" + +# Replace modified /etc/locale.gen with default +etc-update --automode -5 diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 147ca329..2c256f06 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -286,7 +286,7 @@ run_merge() { export CLEAN_DELAY=0 export EBEEP_IGNORE=0 export EPAUSE_IGNORE=0 - export CONFIG_PROTECT="-*" + [[ $CONFIG_PROTECT != "-*"* ]] && export CONFIG_PROTECT="-*" if [[ "${clst_VERBOSE}" == "true" ]] then @@ -433,5 +433,9 @@ Comment=This is a link to the local copy of the Gentoo Linux Handbook. Icon=text-editor" > /usr/share/applications/gentoo-handbook.desktop } +readonly locales=" +C.UTF8 UTF-8 +" + # We do this everywhere, so why not put it in this script run_default_funcs
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: f0e772bd3905d02d691d0e41b3a8e3bd3c10e2fe Author: Matt Turner gentoo org> AuthorDate: Fri Mar 27 23:28:11 2020 + Commit: Matt Turner gentoo org> CommitDate: Tue Apr 7 23:23:07 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f0e772bd targets: Set LANG=C.UTF8 Stable glibc now always provides a UTF-8 capable locale, which many packages require. Set this as the default LANG. Running locale-gen in stage1 should also solve bug #536938. Bug: https://bugs.gentoo.org/536938 Bug: https://bugs.gentoo.org/710762 Bug: https://bugs.gentoo.org/714906 Signed-off-by: Matt Turner gentoo.org> targets/stage1/chroot.sh | 12 1 file changed, 12 insertions(+) diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh index d409de39..60e32c60 100755 --- a/targets/stage1/chroot.sh +++ b/targets/stage1/chroot.sh @@ -57,6 +57,11 @@ make_destpath "${clst_root_path}" run_merge "--oneshot --nodeps sys-apps/baselayout" ${clst_sed} -i "/USE=\"${USE} -build\"/d" ${clst_make_conf} +for etc in /etc "${clst_root_path}"/etc; do + echo "LANG=C.UTF8" > ${etc}/env.d/02locale +done +update_env_settings + # Now, we install our packages if [ -e ${clst_make_conf} ]; then echo "CATALYST_USE=\"-* build ${BINDIST} ${clst_CATALYST_USE}\"" >> ${clst_make_conf} @@ -71,6 +76,13 @@ fi run_merge "--oneshot ${clst_buildpkgs}" +# TODO: Drop this when locale-gen in stable glibc supports ROOT. +# +# locale-gen does not support the ROOT variable, and as such glibc simply does +# not run locale-gen when ROOT is set. Since we've set LANG, we need to run +# locale-gen explicitly. +locale-gen --destdir "${clst_root_path}"/ || die "locale-gen failed" + # Why are we removing these? Don't we need them for final make.conf? for useexpand in ${clst_HOSTUSEEXPAND}; do x="clst_${useexpand}"
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/, targets/stage2/, targets/netboot2/, targets/netboot/, ...
commit: 4d77d571a7fbc96fc1c2fee2f8709eee9c73010d Author: Matt Turner gentoo org> AuthorDate: Sat Mar 28 06:41:56 2020 + Commit: Matt Turner gentoo org> CommitDate: Sat Mar 28 07:39:12 2020 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4d77d571 targets: Remove redundancy filenames Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 3 +-- targets/embedded/{embedded-chroot.sh => chroot.sh} | 0 targets/embedded/{embedded-controller.sh => controller.sh} | 4 ++-- targets/embedded/{embedded-fs-runscript.sh => fs-runscript.sh} | 0 .../{embedded-preclean-chroot.sh => preclean-chroot.sh}| 0 targets/grp/{grp-chroot.sh => chroot.sh} | 0 targets/grp/{grp-controller.sh => controller.sh} | 0 targets/grp/{grp-preclean-chroot.sh => preclean-chroot.sh} | 0 targets/livecd-stage1/{livecd-stage1-chroot.sh => chroot.sh} | 0 .../{livecd-stage1-controller.sh => controller.sh} | 2 +- .../{livecd-stage1-preclean-chroot.sh => preclean-chroot.sh} | 0 .../{livecd-stage2-controller.sh => controller.sh} | 0 targets/netboot/{netboot-chroot.sh => chroot.sh} | 0 targets/netboot/{netboot-combine.sh => combine.sh} | 0 targets/netboot/{netboot-controller.sh => controller.sh} | 10 +- targets/netboot/{netboot-image.sh => image.sh} | 0 targets/netboot2/{netboot2-controller.sh => controller.sh} | 4 ++-- targets/netboot2/{netboot2-copyfile.sh => copyfile.sh} | 0 targets/netboot2/{netboot2-pkg.sh => pkg.sh} | 0 targets/stage1/{stage1-chroot.sh => chroot.sh} | 0 targets/stage1/{stage1-controller.sh => controller.sh} | 4 ++-- .../stage1/{stage1-preclean-chroot.sh => preclean-chroot.sh} | 0 targets/stage2/{stage2-chroot.sh => chroot.sh} | 0 targets/stage2/{stage2-controller.sh => controller.sh} | 4 ++-- .../stage2/{stage2-preclean-chroot.sh => preclean-chroot.sh} | 0 targets/stage3/{stage3-chroot.sh => chroot.sh} | 0 targets/stage3/{stage3-controller.sh => controller.sh} | 4 ++-- .../stage3/{stage3-preclean-chroot.sh => preclean-chroot.sh} | 0 targets/stage4/{stage4-chroot.sh => chroot.sh} | 0 targets/stage4/{stage4-controller.sh => controller.sh} | 4 ++-- .../stage4/{stage4-preclean-chroot.sh => preclean-chroot.sh} | 0 targets/tinderbox/{tinderbox-chroot.sh => chroot.sh} | 0 targets/tinderbox/{tinderbox-controller.sh => controller.sh} | 0 .../{tinderbox-preclean-chroot.sh => preclean-chroot.sh} | 0 34 files changed, 19 insertions(+), 20 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 0a825700..939e03e2 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -522,8 +522,7 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_controller_file(self): self.settings["controller_file"] = normpath(self.settings["sharedir"] + - "/targets/" + self.settings["target"] + "/" + self.settings["target"] - + "-controller.sh") + "/targets/" + self.settings["target"] + "/" + "controller.sh") def set_iso_volume_id(self): if self.settings["spec_prefix"] + "/volid" in self.settings: diff --git a/targets/embedded/embedded-chroot.sh b/targets/embedded/chroot.sh similarity index 100% rename from targets/embedded/embedded-chroot.sh rename to targets/embedded/chroot.sh diff --git a/targets/embedded/embedded-controller.sh b/targets/embedded/controller.sh similarity index 93% rename from targets/embedded/embedded-controller.sh rename to targets/embedded/controller.sh index c0b62ea3..7501d694 100755 --- a/targets/embedded/embedded-controller.sh +++ b/targets/embedded/controller.sh @@ -11,7 +11,7 @@ case ${1} in shift export clst_packages="$*" exec_in_chroot \ - ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh + ${clst_shdir}/${clst_target}/chroot.sh ;; preclean) @@ -21,7 +21,7 @@ case ${1} in # export root_fs_path="${clst_chroot_path}/tmp/mergeroot" # install -d ${clst_image_path} -# ${clst_shdir}/embedded/embedded-fs-runscript.sh \ +# ${clst_shdir}/embedded/fs-runscript.sh \ # ${clst_embedded_fs_type} || exit 1 # imagesize=`du -sk ${clst_image_path}/root.img | cut -f1` # echo "Created ${clst_embedded_fs_type} image at \ diff --git a/targets/embedded/embedded-fs-runscript.sh b/targets/embedded/fs-runscript.sh similarity index 100% rename from targets/embedded/embedded-fs-runscript.sh rename to
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/, targets/support/, catalyst/
commit: f3d246e24b5b1da80b204a989957f155c1a2 Author: Yuta SATOH gmail com> AuthorDate: Fri Dec 29 01:35:36 2017 + Commit: Brian Dolbec gentoo org> CommitDate: Fri Dec 29 02:04:21 2017 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f3d246e2 detect and use a configured sed command for Gentoo/FreeBSD # 363577 Relocated the main.py code changes location: Brian Dolbec gentoo.org Bug url: https://bugs.gentoo.org/363577 catalyst/defaults.py| 1 + catalyst/main.py| 6 ++ targets/stage1/stage1-chroot.sh | 11 +-- targets/support/bootloader-setup.sh | 2 +- targets/support/chroot-functions.sh | 10 +- targets/support/create-iso.sh | 6 +++--- targets/support/kmerge.sh | 8 targets/support/livecdfs-update.sh | 36 ++-- 8 files changed, 43 insertions(+), 37 deletions(-) diff --git a/catalyst/defaults.py b/catalyst/defaults.py index ed5766d6..f2fe29df 100644 --- a/catalyst/defaults.py +++ b/catalyst/defaults.py @@ -62,6 +62,7 @@ confdefaults={ "PythonDir": "./catalyst", "repo_basedir": REPODIR[:], "repo_name": MAINREPO[:], + "sed": "sed", "sharedir": "/usr/share/catalyst", "shdir": "/usr/share/catalyst/targets/", "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", diff --git a/catalyst/main.py b/catalyst/main.py index 2d2faada..01c456ea 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -408,6 +408,12 @@ def _main(parser, opts): hash_map.hash_map[conf_values['hash_function']].cmd, conf_values['hash_function']) + # detect GNU sed + for sed in ('/usr/bin/gsed', '/bin/sed', '/usr/bin/sed'): + if os.path.exists(sed): + conf_values["sed"] = sed + break + addlargs={} if myspecfile: diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 1b0aa08b..0caf49ee 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -48,15 +48,14 @@ else fi # Clear USE -[ -e ${clst_make_conf} ] && sed -i -e "/^USE=\"${BINDIST} ${USE}\"/d" ${clst_make_conf} - +[ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^USE=\"${BINDIST} ${USE}\"/d" ${clst_make_conf} make_destpath /tmp/stage1root ## START BUILD # First, we drop in a known-good baselayout [ -e ${clst_make_conf} ] && echo "USE=\"${USE} -build\"" >> ${clst_make_conf} run_merge "--oneshot --nodeps sys-apps/baselayout" -sed -i "/USE=\"${USE} -build\"/d" ${clst_make_conf} +${clst_sed} -i "/USE=\"${USE} -build\"/d" ${clst_make_conf} # Now, we install our packages if [ -e ${clst_make_conf} ]; then @@ -75,10 +74,10 @@ run_merge "--oneshot ${clst_buildpkgs}" # Why are we removing these? Don't we need them for final make.conf? for useexpand in ${clst_HOSTUSEEXPAND}; do x="clst_${useexpand}" - sed -i "/${useexpand}=\"${!x}\"/d" \ + ${clst_sed} -i "/${useexpand}=\"${!x}\"/d" \ ${clst_make_conf} done # Clear USE -[ -e ${clst_make_conf} ] && sed -i -e "/^CATALYST_USE/d" ${clst_make_conf} -[ -e ${clst_make_conf} ] && sed -i -e "/^USE=\"/s/\${CATALYST_USE} ${USE} ${BOOTSTRAP_USE}//" ${clst_make_conf} +[ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^CATALYST_USE/d" ${clst_make_conf} +[ -e ${clst_make_conf} ] && ${clst_sed} -i -e "/^USE=\"/s/\${CATALYST_USE} ${USE} ${BOOTSTRAP_USE}//" ${clst_make_conf} diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh index d9e2620e..ffe7be2f 100755 --- a/targets/support/bootloader-setup.sh +++ b/targets/support/bootloader-setup.sh @@ -79,7 +79,7 @@ case ${clst_hostarch} in echo "message=/boot/boot.msg" >> ${icfg} # Here is where I fix up the boot.msg file. - sed -e 's/ARCH/PowerPC/' \ + ${clst_sed} -e 's/ARCH/PowerPC/' \ -e 's/HARDWARE/Apple and IBM hardware/' \ -i $kmsg diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index e44de61b..84d90fe9 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -101,7 +101,7 @@ setup_myfeatures(){ else clst_root_path=/ run_merge --oneshot --noreplace sys-devel/distcc || exit 1 fi - sed -i '/USE="${USE} -avahi -gtk -gnome"/d' ${clst_make_conf} + ${clst_sed} -i '/USE="${USE} -avahi -gtk -gnome"/d' ${clst_make_conf} mkdir -p /etc/distcc echo "${clst_distcc_hosts}" > /etc/distcc/hosts @@ -201,7 +201,7 @@ setup_pkgmgr(){ echo "Adding USE=\"\${USE} $1\" to make.conf for portage build" [ -e "${clst_make_conf}" ] && echo "USE=\"\${USE} $1\"" >> "${clst_make_conf}"
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 9b8a61e03e3062335a369cd34146cd26eb675c1b Author: Rick Farina (Zero_Chaos) gentoo org> AuthorDate: Wed Sep 14 16:00:18 2016 + Commit: Richard Farina gentoo org> CommitDate: Wed Sep 14 16:00:18 2016 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9b8a61e0 quotes to make shellcheck happy targets/stage1/stage1-controller.sh | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/targets/stage1/stage1-controller.sh b/targets/stage1/stage1-controller.sh index 0f44e97..3ad0ed5 100755 --- a/targets/stage1/stage1-controller.sh +++ b/targets/stage1/stage1-controller.sh @@ -1,29 +1,29 @@ #!/bin/bash -source ${clst_shdir}/support/functions.sh +source "${clst_shdir}/support/functions.sh" -case $1 in +case "$1" in enter) ;; run) - cp ${clst_shdir}/stage1/build.py ${clst_chroot_path}/tmp + cp "${clst_shdir}/stage1/build.py" "${clst_chroot_path}/tmp" # Setup "ROOT in chroot" dir - install -d ${clst_chroot_path}/${clst_root_path}/etc - install -d ${clst_chroot_path}/${clst_root_path}${clst_port_conf} + install -d "${clst_chroot_path}/${clst_root_path}/etc" + install -d "${clst_chroot_path}/${clst_root_path}${clst_port_conf}" # Setup make.conf and make.profile link in "ROOT in chroot": - copy_to_chroot ${clst_chroot_path}${clst_make_conf} ${clst_root_path}${clst_port_conf} + copy_to_chroot "${clst_chroot_path}${clst_make_conf}" "${clst_root_path}${clst_port_conf}" # Enter chroot, execute our build script exec_in_chroot \ - ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh \ + "${clst_shdir}/${clst_target}/${clst_target}-chroot.sh" \ || exit 1 ;; preclean) - exec_in_chroot ${clst_shdir}/${clst_target}/${clst_target}-preclean-chroot.sh || exit 1 + exec_in_chroot "${clst_shdir}/${clst_target}/${clst_target}-preclean-chroot.sh" || exit 1 ;; clean)
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: d6ee458ad47915230291708eaaaf38c059d4fd1c Author: Rick Farina (Zero_Chaos) gentoo org> AuthorDate: Wed Sep 14 18:04:40 2016 + Commit: Richard Farina gentoo org> CommitDate: Wed Sep 14 18:04:40 2016 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d6ee458a operate in /tmp/stage1root as appropriate during stage1 targets/stage1/stage1-controller.sh | 4 ++-- targets/stage1/stage1-preclean-chroot.sh | 16 +--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/targets/stage1/stage1-controller.sh b/targets/stage1/stage1-controller.sh index 3ad0ed5..6af1385 100755 --- a/targets/stage1/stage1-controller.sh +++ b/targets/stage1/stage1-controller.sh @@ -28,9 +28,9 @@ case "$1" in clean) # Clean out man, info and doc files - rm -rf usr/share/{man,doc,info}/* + rm -rf /tmp/stage1root/usr/share/{man,doc,info}/* # Zap all .pyc and .pyo files - find . -iname "*.py[co]" -exec rm -f {} \; + find /tmp/stage1root/ -iname "*.py[co]" -exec rm -f {} \; ;; *) diff --git a/targets/stage1/stage1-preclean-chroot.sh b/targets/stage1/stage1-preclean-chroot.sh index a80fc92..0ba4c00 100755 --- a/targets/stage1/stage1-preclean-chroot.sh +++ b/targets/stage1/stage1-preclean-chroot.sh @@ -1,25 +1,27 @@ #!/bin/bash export RUN_DEFAULT_FUNCS="no" +export ROOT=/tmp/stage1root source /tmp/chroot-functions.sh update_env_settings show_debug -# Now, some finishing touches to initialize gcc-config -unset ROOT - +# Right now these will parse the unpacked stage3 but change things +# inside of /tmp/stage1root due to ROOT env variable setup_gcc setup_binutils # Stage1 is not going to have anything in zoneinfo, so save our Factory timezone -if [ -d /usr/share/zoneinfo ] +if [ -d "${ROOT}/usr/share/zoneinfo" ] then - rm -f /etc/localtime - cp /usr/share/zoneinfo/Factory /etc/localtime + rm -f "${ROOT}/etc/localtime" + cp "${ROOT}/usr/share/zoneinfo/Factory" "${ROOT}/etc/localtime" else - echo UTC > /etc/TZ + echo UTC > "${ROOT}/etc/TZ" fi +# unset ROOT for safety (even though cleanup_stages doesn't use it) +unset ROOT cleanup_stages
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: b25875dc87683b6790d7ad1b5e067f1f9bbd1ae5 Author: Rick Farina (Zero_Chaos) gentoo org> AuthorDate: Tue Sep 8 02:59:00 2015 + Commit: Richard Farina gentoo org> CommitDate: Tue Sep 8 02:59:00 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b25875dc fix 6d795daf6d86779b17206f8a558bfcac44822a6b as caught by dol-sen targets/stage1/stage1-chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index f77bd9f..fbda84b 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -7,7 +7,7 @@ export clst_buildpkgs="$(/tmp/build.py)" # Setup our environment [ -n "${clst_BINDIST}" ] && BINDIST="bindist" -BOOTSTRAP_USE="${BOOTSTRAP_USE} ${BINDIST}" +BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE) ${BINDIST}" FEATURES="${clst_myfeatures} nodoc noman noinfo -news"
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 306d797509244bf3508def0aa6c1bbcdfb6e1257 Author: Rick Farina (Zero_Chaos) gentoo org> AuthorDate: Thu Sep 3 01:50:33 2015 + Commit: Richard Farina gentoo org> CommitDate: Thu Sep 3 01:50:33 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=306d7975 remove stray bindist use flag setting from stage1 chroot, this is handled by setup_pkgmgr early enough targets/stage1/stage1-chroot.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 028089e..91ab1fa 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -7,8 +7,6 @@ export clst_buildpkgs="$(/tmp/build.py)" # Setup our environment BOOTSTRAP_USE="$(portageq envvar BOOTSTRAP_USE)" -[ -n "${clst_BINDIST}" ] && BINDIST="bindist" -BOOTSTRAP_USE="${BOOTSTRAP_USE} ${BINDIST}" FEATURES="${clst_myfeatures} nodoc noman noinfo -news"
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 656e4c20b3520ed243817425b92c5175391ffca7 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) jmbsvicetto AT gentoo DOT org AuthorDate: Sun Aug 30 19:28:01 2015 + Commit: Jorge Manuel B. S. Vicetto jmbsvicetto AT gentoo DOT org CommitDate: Sun Aug 30 19:28:01 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=656e4c20 Add missing '' and replace '' in strings so we get interpolation. Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) jmbsvicetto AT gentoo.org targets/stage1/stage1-chroot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index ebd6551..2853f04 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -28,7 +28,7 @@ clst_root_path=/ setup_pkgmgr build if [ -n ${clst_update_seed} ]; then if [ ${clst_update_seed} == yes ]; then # Set USE flags build and bindist if clst_BINDIST is set - [ -e ${clst_make_conf} ] echo USE=\${USE} build ${BINDIST} ${clst_make_conf} + [ -e ${clst_make_conf} ] echo USE=\${USE} build ${BINDIST}\ ${clst_make_conf} echo Updating seed stage... if [ -n ${clst_update_seed_command} ]; then @@ -55,7 +55,7 @@ make_destpath /tmp/stage1root ## START BUILD # First, we drop in a known-good baselayout -[ -e ${clst_make_conf} ] echo 'USE=${USE} -build' ${clst_make_conf} +[ -e ${clst_make_conf} ] echo USE=\${USE} -build\ ${clst_make_conf} run_merge --oneshot --nodeps sys-apps/baselayout sed -i /USE=\${USE} -build\/d ${clst_make_conf}
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: 7fd5b929311713e393de00767c0a7a6cd5595f6d Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) jmbsvicetto AT gentoo DOT org AuthorDate: Sun Aug 30 03:10:53 2015 + Commit: Jorge Manuel B. S. Vicetto jmbsvicetto AT gentoo DOT org CommitDate: Sun Aug 30 03:14:11 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7fd5b929 We need to ensure bindist is set in USE when updating the seed (if we have OPTIONS=bindist). Fix some typos / broken syntax. Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) jmbsvicetto AT gentoo.org targets/stage1/stage1-chroot.sh | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 4afc8fe..0c7e85b 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -26,12 +26,19 @@ clst_root_path=/ setup_pkgmgr build # Update stage3 if [ -n ${clst_update_seed} ]; then if [ ${clst_update_seed} == yes ]; then + # We might need BOOTSTRAP_USE to avoid blocks related to bindist use flag + [ -e ${clst_make_conf} ] echo USE=\${USE} ${BOOTSTRAP_USE}\ ${clst_make_conf} + echo Updating seed stage... if [ -n ${clst_update_seed_command} ]; then clst_root_path=/ run_merge --buildpkg=n ${clst_update_seed_command} else clst_root_path=/ run_merge --update --deep --newuse --complete-graph --rebuild-if-new-ver gcc fi + + # Clean-up USE again + sed -i /USE=\${USE} ${BOOTSTRAP_USE}\/d ${clst_make_conf} + elif [ ${clst_update_seed} != no ]; then echo Invalid setting for update_seed: ${clst_update_seed} exit 1 @@ -47,22 +54,19 @@ make_destpath /tmp/stage1root ## START BUILD # First, we drop in a known-good baselayout -[ -e ${clst_make_conf} ] \ - echo 'USE=${USE} -build' ${clst_make_conf} +[ -e ${clst_make_conf} ] echo 'USE=${USE} -build' ${clst_make_conf} run_merge --oneshot --nodeps sys-apps/baselayout - -sed -i '/USE=${USE} -build/d' ${clst_make_conf} +sed -i /USE=\${USE} -build\/d ${clst_make_conf} # Now, we install our packages -if [ -e ${clst_make_conf} ] \ - echo USE=\-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\ \ +[ -e ${clst_make_conf} ] +echo USE=\-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\ ${clst_make_conf} +for useexpand in ${clst_HOSTUSEEXPAND}; do + x=clst_${useexpand} + echo ${useexpand}=\${!x}\ \ ${clst_make_conf} - for useexpand in ${clst_HOSTUSEEXPAND}; do - x=clst_${useexpand} - echo ${useexpand}=\${!x}\ \ -${clst_make_conf} - done -fi +done + run_merge --oneshot ${clst_buildpkgs} sed -i /USE=\-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\/d \ ${clst_make_conf}
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: d0e1598f3af1adb5d3a8959740cef4dce66f75da Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) jmbsvicetto AT gentoo DOT org AuthorDate: Sun Aug 30 03:51:02 2015 + Commit: Jorge Manuel B. S. Vicetto jmbsvicetto AT gentoo DOT org CommitDate: Sun Aug 30 03:51:02 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d0e1598f Switch back to the if block for setting make.conf. Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) jmbsvicetto AT gentoo.org targets/stage1/stage1-chroot.sh | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 0c7e85b..01ef8d1 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -59,13 +59,14 @@ run_merge --oneshot --nodeps sys-apps/baselayout sed -i /USE=\${USE} -build\/d ${clst_make_conf} # Now, we install our packages -[ -e ${clst_make_conf} ] -echo USE=\-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\ ${clst_make_conf} -for useexpand in ${clst_HOSTUSEEXPAND}; do - x=clst_${useexpand} - echo ${useexpand}=\${!x}\ \ -${clst_make_conf} -done +if [ -e ${clst_make_conf} ]; then + echo USE=\-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\ ${clst_make_conf} + for useexpand in ${clst_HOSTUSEEXPAND}; do + x=clst_${useexpand} + echo ${useexpand}=\${!x}\ \ +${clst_make_conf} + done +fi run_merge --oneshot ${clst_buildpkgs} sed -i /USE=\-* build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\/d \
[gentoo-commits] proj/catalyst:master commit in: targets/stage1/
commit: ceafc1abfdffb34e1dc0f5e1d9ec08c02f189786 Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) jmbsvicetto AT gentoo DOT org AuthorDate: Sun Aug 30 04:31:34 2015 + Commit: Jorge Manuel B. S. Vicetto jmbsvicetto AT gentoo DOT org CommitDate: Sun Aug 30 04:31:34 2015 + URL:https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ceafc1ab Don't use BOOTSTRAP_USE to update the seed but just build and bindist (if set). Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) jmbsvicetto AT gentoo.org targets/stage1/stage1-chroot.sh | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 01ef8d1..ebd6551 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -7,7 +7,8 @@ export clst_buildpkgs=$(/tmp/build.py) # Setup our environment BOOTSTRAP_USE=$(portageq envvar BOOTSTRAP_USE) -[ -n ${clst_BINDIST} ] BOOTSTRAP_USE=${BOOTSTRAP_USE} bindist +[ -n ${clst_BINDIST} ] BINDIST=bindist +BOOTSTRAP_USE=${BOOTSTRAP_USE} ${BINDIST} FEATURES=${clst_myfeatures} nodoc noman noinfo -news @@ -26,8 +27,8 @@ clst_root_path=/ setup_pkgmgr build # Update stage3 if [ -n ${clst_update_seed} ]; then if [ ${clst_update_seed} == yes ]; then - # We might need BOOTSTRAP_USE to avoid blocks related to bindist use flag - [ -e ${clst_make_conf} ] echo USE=\${USE} ${BOOTSTRAP_USE}\ ${clst_make_conf} + # Set USE flags build and bindist if clst_BINDIST is set + [ -e ${clst_make_conf} ] echo USE=\${USE} build ${BINDIST} ${clst_make_conf} echo Updating seed stage... if [ -n ${clst_update_seed_command} ]; then @@ -37,7 +38,7 @@ if [ -n ${clst_update_seed} ]; then fi # Clean-up USE again - sed -i /USE=\${USE} ${BOOTSTRAP_USE}\/d ${clst_make_conf} + sed -i /USE=\${USE} build ${BINDIST}\/d ${clst_make_conf} elif [ ${clst_update_seed} != no ]; then echo Invalid setting for update_seed: ${clst_update_seed}