From 778ed62f39fda80bb4119b64d9ab0c72a237db09 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 24 Mar 2022 16:44:19 +0100 Subject: [PATCH 1/4] virtual/rust: Move from portage-stable This file is modified by some automation, so move it out from portage-stable - there shouldn't be any modified stuff there. --- .../coreos-overlay/virtual/rust/metadata.xml | 12 ++++++++++++ .../virtual/rust/rust-1.59.0.ebuild | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/virtual/rust/metadata.xml create mode 100644 sdk_container/src/third_party/coreos-overlay/virtual/rust/rust-1.59.0.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/virtual/rust/metadata.xml b/sdk_container/src/third_party/coreos-overlay/virtual/rust/metadata.xml new file mode 100644 index 0000000000..f51288e196 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/virtual/rust/metadata.xml @@ -0,0 +1,12 @@ + + + + + rust@gentoo.org + Rust Project + + + Install rustfmt, Rust code formatter + + + diff --git a/sdk_container/src/third_party/coreos-overlay/virtual/rust/rust-1.59.0.ebuild b/sdk_container/src/third_party/coreos-overlay/virtual/rust/rust-1.59.0.ebuild new file mode 100644 index 0000000000..8de903f382 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/virtual/rust/rust-1.59.0.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build + +DESCRIPTION="Virtual for Rust language compiler" + +LICENSE="" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="rustfmt" + +BDEPEND="" +RDEPEND="|| ( + ~dev-lang/rust-${PV}[rustfmt?,${MULTILIB_USEDEP}] + ~dev-lang/rust-bin-${PV}[rustfmt?,${MULTILIB_USEDEP}] +)" From afe689a3e3ee794f131d050793420d0a9c88cc80 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 24 Mar 2022 16:56:44 +0100 Subject: [PATCH 2/4] .github: Update rust workflow to handle virtual/rust too --- .../.github/workflows/rust-apply-patch.sh | 2 ++ .../.github/workflows/rust-release-main.yml | 16 +++------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh index eb4881e323..c09ced47ac 100755 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-apply-patch.sh @@ -29,6 +29,8 @@ find profiles -name 'package.*' | xargs sed -i "s/\([><]*=\|~\)*virtual\/rust-\S EBUILD_FILENAME=$(get_ebuild_filename "dev-lang" "rust" "${VERSION_OLD}") git mv "${EBUILD_FILENAME}" "dev-lang/rust/rust-${VERSION_NEW}.ebuild" +EBUILD_FILENAME=$(get_ebuild_filename "virtual" "rust" "${VERSION_OLD}") +git mv "${EBUILD_FILENAME}" "virtual/rust/rust-${VERSION_NEW}.ebuild" popd >/dev/null || exit diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-release-main.yml b/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-release-main.yml index 074d0064d2..ba71db6f26 100644 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-release-main.yml +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/rust-release-main.yml @@ -40,18 +40,8 @@ jobs: branch: rust-${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}-main author: Flatcar Buildbot committer: Flatcar Buildbot - title: Upgrade dev-lang/rust in main from ${{ steps.apply-patch-main.outputs.VERSION_OLD }} to ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }} - commit-message: Upgrade dev-lang/rust in main from ${{ steps.apply-patch-main.outputs.VERSION_OLD }} to ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }} + title: Upgrade dev-lang/rust and virtual/rust in main from ${{ steps.apply-patch-main.outputs.VERSION_OLD }} to ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }} + commit-message: Upgrade dev-lang/rust and virtual rust in main from ${{ steps.apply-patch-main.outputs.VERSION_OLD }} to ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }} body: | - Upgrade dev-lang/rust in main from ${{ steps.apply-patch-main.outputs.VERSION_OLD }} to ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }} - - This PR should be merged together with a corresponding PR in portage-stable for `virtual/rust` ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }}. + Upgrade dev-lang/rust and virtual/rust in main from ${{ steps.apply-patch-main.outputs.VERSION_OLD }} to ${{ steps.fetch-latest-release.outputs.VERSION_MAIN }} labels: main - - name: Send repository dispatch to portage-stable - uses: peter-evans/repository-dispatch@v1.0.0 - if: steps.apply-patch-main.outputs.UPDATE_NEEDED == 1 - with: - token: ${{ secrets.FLATCAR_PORTAGE_STABLE_ACCESS_TOKEN }} - repository: flatcar-linux/portage-stable - event-type: rust-pull-request-main - client-payload: '{"coreos-overlay-pull-request-number": "${{ steps.create-pull-request.outputs.pull-request-number }}"}' From 482651582ded5845dfc341dbec25fd3138caee41 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 30 Mar 2022 18:07:06 +0200 Subject: [PATCH 3/4] .github: Checkout our base branch in SDK coreos-overlay too --- .../src/third_party/coreos-overlay/.github/workflows/common.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh index 5dc71e3438..45d534f16a 100644 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh @@ -44,6 +44,7 @@ function prepare_git_repo() { # setup overlay repo inside SDK too (be fork friendly) git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" remote add our_remote "${our_remote_url}" git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" fetch our_remote + git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" checkout -B "${BASE_BRANCH}" "our_remote/${BASE_BRANCH}" } # caller needs to set pass a parameter as a branch name to be created. From 17936f64ed0d8356e31b829677c1a9c727324d46 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 30 Mar 2022 18:44:00 +0200 Subject: [PATCH 4/4] .github: Fix base branch of the work branch We want to base the work branch (like rust-1.59-main) on top of the base branch from our remote, not from remote that came with SDK. This will make the work branch creation fork-friendly. --- .../src/third_party/coreos-overlay/.github/workflows/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh b/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh index 45d534f16a..c828700ef8 100644 --- a/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh +++ b/sdk_container/src/third_party/coreos-overlay/.github/workflows/common.sh @@ -61,7 +61,7 @@ function checkout_branches() { return 1 fi - git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" checkout -B "${TARGET_BRANCH}" "github/${BASE_BRANCH}" + git -C "${SDK_OUTER_SRCDIR}/third_party/coreos-overlay" checkout -B "${TARGET_BRANCH}" "our_remote/${BASE_BRANCH}" } function regenerate_manifest() {