From ac8402c1aaf076ca25fa4990363abf55fc053f90 Mon Sep 17 00:00:00 2001 From: David Michael Date: Thu, 4 Jan 2018 14:16:40 -0500 Subject: [PATCH 1/2] update_chroot: Allow upgrading binutils and GCC Normally toolchains packages are prevented from upgrading. This drops that restriction and explicitly removes old versions so that conflicting tool profiles are not accidentally used. This reverts commit 20975049b3b5398ee478ba940e785bae50773d6d. --- build_library/toolchain_util.sh | 4 +++- update_chroot | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build_library/toolchain_util.sh b/build_library/toolchain_util.sh index aa44447171..d926251fda 100644 --- a/build_library/toolchain_util.sh +++ b/build_library/toolchain_util.sh @@ -194,7 +194,9 @@ get_cross_pkgs() { # Get portage arguments restricting toolchains to binary packages only. get_binonly_args() { local pkgs=( "${TOOLCHAIN_PKGS[@]}" $(get_cross_pkgs "$@") ) - echo "${pkgs[@]/#/--useoldpkg-atoms=}" "${pkgs[@]/#/--rebuild-exclude=}" + # XXX: Revert this after stable > 1632. + local tmppkgs=( ${pkgs[*]##*/binutils} ) ; tmppkgs=( ${tmppkgs[*]##*/gcc} ) + echo "${tmppkgs[@]/#/--useoldpkg-atoms=}" "${pkgs[@]/#/--rebuild-exclude=}" } ### Toolchain building utilities ### diff --git a/update_chroot b/update_chroot index 85b703d3bd..bd1d429017 100755 --- a/update_chroot +++ b/update_chroot @@ -241,6 +241,9 @@ sudo -E ${EMERGE_CMD} "${EMERGE_FLAGS[@]}" \ coreos-devel/sdk-depends world info "Removing obsolete packages" +# XXX: Remove these next two lines after stable > 1632. +cats=( '<=sys-devel' "${BOARD_CHOSTS[@]/#/<=cross-}" ) +sudo -E emerge --quiet --unmerge "${cats[@]/%//binutils-2.29.0}" "${cats[@]/%//gcc-6.3.0}" 2>/dev/null || : sudo -E ${EMERGE_CMD} --quiet --depclean @unavailable if portageq list_preserved_libs / >/dev/null; then From 73dc0c971c6a0efbbaeb410b8e1163a149d27472 Mon Sep 17 00:00:00 2001 From: David Michael Date: Thu, 4 Jan 2018 17:41:13 -0500 Subject: [PATCH 2/2] build_library: Drop the binutils GLSA from the whitelist --- build_library/test_image_content.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build_library/test_image_content.sh b/build_library/test_image_content.sh index 269d940553..ae3ef0a7d9 100644 --- a/build_library/test_image_content.sh +++ b/build_library/test_image_content.sh @@ -4,7 +4,6 @@ GLSA_WHITELIST=( 201412-09 # incompatible CA certificate version numbers - 201709-02 # updating binutils breaks amd64 Linux uncompression 201710-23 # we handle Go differently; drop when 1.9 builds everything )