From 9dec83eaa9b78da54ec64606d30814646c1a0fbd Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 3 Mar 2022 16:10:13 +0100 Subject: [PATCH 1/7] profiles: Drop app-misc/jq from accept_keywords The updated package is stable for both amd64 and arm64. --- .../coreos-overlay/profiles/coreos/arm64/package.accept_keywords | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/arm64/package.accept_keywords b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/arm64/package.accept_keywords index 4e079806b8..cc2ffe0733 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/arm64/package.accept_keywords +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/arm64/package.accept_keywords @@ -5,7 +5,6 @@ =app-emulation/open-vmdk-1.0 * =app-crypt/rhash-1.4.2 ~arm64 -=app-misc/jq-1.6-r3 ~arm64 =dev-embedded/u-boot-tools-2021.04_rc2 ~arm64 # needed by arm64-native SDK From 5eccaeb306335db7921fa6f9e9b90750a9630728 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 3 Mar 2022 16:14:46 +0100 Subject: [PATCH 2/7] profiles: Update accept_keywords for dev-lang/nasm It is available for arm64 now, but still as unstable. --- .../profiles/coreos/arm64/package.accept_keywords | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/arm64/package.accept_keywords b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/arm64/package.accept_keywords index cc2ffe0733..0e4dbbdce2 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/arm64/package.accept_keywords +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/arm64/package.accept_keywords @@ -8,7 +8,7 @@ =dev-embedded/u-boot-tools-2021.04_rc2 ~arm64 # needed by arm64-native SDK -=dev-lang/nasm-2.14.02 * +=dev-lang/nasm-2.15.05 ~arm64 =dev-lang/yasm-1.3.0-r1 ~arm64 From ab735a5df4c22b40b8b9e60c2089f2786e470b8d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 11 Mar 2022 09:59:54 +0100 Subject: [PATCH 3/7] coreos-base/afterburn: Bump EAPI to 8 EAPI 6 is too old for cargo eclass that gets inherited through coreos-cargo. --- ....0-r4.ebuild => afterburn-4.0.0-r5.ebuild} | 0 .../afterburn/afterburn-9999.ebuild | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/{afterburn-4.0.0-r4.ebuild => afterburn-4.0.0-r5.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-4.0.0-r4.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-4.0.0-r5.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-4.0.0-r4.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-4.0.0-r5.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild index 5d6ffc1521..592ada8b12 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild @@ -1,7 +1,7 @@ # Copyright (c) 2017 CoreOS, Inc.. All rights reserved. # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 CROS_WORKON_PROJECT="flatcar-linux/afterburn" CROS_WORKON_LOCALNAME="afterburn" @@ -14,14 +14,6 @@ else KEYWORDS="amd64 arm64" fi -inherit coreos-cargo cros-workon systemd - -DESCRIPTION="A tool for collecting instance metadata from various providers" -HOMEPAGE="https://github.com/flatcar-linux/afterburn" -LICENSE="Apache-2.0" -SLOT="0" -RDEPEND="!coreos-base/coreos-metadata" - # sed -n 's/^"checksum \([^ ]*\) \([^ ]*\) .*/\1-\2/p' Cargo.lock CRATES=" adler32-1.0.3 @@ -234,8 +226,17 @@ ws2_32-sys-0.2.1 xml-rs-0.3.6 " +inherit coreos-cargo cros-workon systemd + +DESCRIPTION="A tool for collecting instance metadata from various providers" +HOMEPAGE="https://github.com/flatcar-linux/afterburn" SRC_URI="$(cargo_crate_uris ${CRATES})" +LICENSE="Apache-2.0" +SLOT="0" + +RDEPEND="!coreos-base/coreos-metadata" + src_unpack() { cros-workon_src_unpack "$@" coreos-cargo_src_unpack "$@" From f302e69455f9f91fab4c70e2d650b1be634495e6 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 15 Mar 2022 16:41:51 +0100 Subject: [PATCH 4/7] coreos-base/update-ssh-keys: Bump EAPI to 8 EAPI 6 is too old for cargo eclass that gets inherited through coreos-cargo. --- ...ebuild => update-ssh-keys-0.3.0-r6.ebuild} | 0 .../update-ssh-keys-9999.ebuild | 24 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/update-ssh-keys/{update-ssh-keys-0.3.0-r5.ebuild => update-ssh-keys-0.3.0-r6.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/update-ssh-keys/update-ssh-keys-0.3.0-r5.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/update-ssh-keys/update-ssh-keys-0.3.0-r6.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/update-ssh-keys/update-ssh-keys-0.3.0-r5.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/update-ssh-keys/update-ssh-keys-0.3.0-r6.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/update-ssh-keys/update-ssh-keys-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/update-ssh-keys/update-ssh-keys-9999.ebuild index 22ffc010a1..935164ef8d 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/update-ssh-keys/update-ssh-keys-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/update-ssh-keys/update-ssh-keys-9999.ebuild @@ -1,7 +1,7 @@ # Copyright (c) 2017 CoreOS, Inc.. All rights reserved. # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 CROS_WORKON_PROJECT="flatcar-linux/update-ssh-keys" CROS_WORKON_LOCALNAME="update-ssh-keys" @@ -14,17 +14,6 @@ else KEYWORDS="amd64 arm64" fi -inherit coreos-cargo cros-workon - -DESCRIPTION="Utility for managing OpenSSH authorized public keys" -HOMEPAGE="https://github.com/flatcar-linux/update-ssh-keys" -LICENSE="Apache-2.0" -SLOT="0" - -# make sure we have a new enough coreos-init that we won't conflict with the -# old bash script -RDEPEND="! Date: Tue, 22 Mar 2022 10:13:04 +0100 Subject: [PATCH 5/7] eclass/coreos-cargo: Ensure the modified config is valid TOML We were appending the [build] section, and the updated cargo eclass already added that to the config, so we ended up with having two [build] sections in the config file. Try to amend the section instead of appending it to the file. While at it, do the same with the target.${RUST_TARGET} section too to be a bit more futureproof. --- .../coreos-overlay/eclass/coreos-cargo.eclass | 39 ++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass index dfad60d56a..e48b5383fb 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass @@ -76,15 +76,36 @@ coreos-cargo_src_unpack() { # Compile for the built-in target, using the SDK cross-tools. export RUST_TARGET=$(rust_builtin_target "${CHOST}") - cat <<- EOF >> "${ECARGO_HOME}/config" - - [build] - target = "${RUST_TARGET}" - - [target.${RUST_TARGET}] - ar = "${TARGET_AR}" - linker = "${TARGET_CC}" - EOF + local -a config_lines + local build_amended=0 + local target_rust_target_amended=0 + local REPLY + readonly b_header='[build]' + readonly t_header="[target.${RUST_TARGET}]" + readonly target_line="target = \"${RUST_TARGET}\"" + readonly ar_line="ar = \"${TARGET_AR}\"" + readonly linker_line="linker = \"${TARGET_CC}\"" + while read -r; do + config_lines+=("${REPLY}") + case "${REPLY}" in + "${b_header}") + config_lines+=("${target_line}") + build_amended=1 + ;; + "${t_header}") + config_lines+=("${ar_line}") + config_lines+=("${linker_line}") + target_rust_target_amended=1 + ;; + esac + done <"${ECARGO_HOME}/config" + if [[ "${build_amended}" -eq 0 ]]; then + config_lines+=('' "${b_header}" "${target_line}") + fi + if [[ "" -eq 0 ]]; then + config_lines+=('' "${t_header}" "${ar_line}" "${linker_line}") + fi + printf '%s\n' "${config_lines[@]}" >"${ECARGO_HOME}/config" } fi From 7acca26ab6c94fa52d49d24111d9aa4792869ebc Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 22 Mar 2022 10:22:06 +0100 Subject: [PATCH 6/7] coreos-base/afterburn: Add dependency on dev-libs/openssl The package depends on it through the openssl crate. Without openssl, the package would fail to build because of missing header files. --- .../coreos-base/afterburn/afterburn-9999.ebuild | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild index 592ada8b12..dd639e80ae 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/afterburn/afterburn-9999.ebuild @@ -235,7 +235,12 @@ SRC_URI="$(cargo_crate_uris ${CRATES})" LICENSE="Apache-2.0" SLOT="0" -RDEPEND="!coreos-base/coreos-metadata" +DEPEND="dev-libs/openssl:0=" + +RDEPEND=" + ${DEPEND} + !coreos-base/coreos-metadata +" src_unpack() { cros-workon_src_unpack "$@" From 4a64240099c454c93189616d2dc151dec6155702 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 23 Mar 2022 13:48:52 +0100 Subject: [PATCH 7/7] fixup! eclass/coreos-cargo: Ensure the modified config is valid TOML --- .../src/third_party/coreos-overlay/eclass/coreos-cargo.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass index e48b5383fb..c7076edefb 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass @@ -102,7 +102,7 @@ coreos-cargo_src_unpack() { if [[ "${build_amended}" -eq 0 ]]; then config_lines+=('' "${b_header}" "${target_line}") fi - if [[ "" -eq 0 ]]; then + if [[ "${target_rust_target_amended}" -eq 0 ]]; then config_lines+=('' "${t_header}" "${ar_line}" "${linker_line}") fi printf '%s\n' "${config_lines[@]}" >"${ECARGO_HOME}/config"