From 1db95a97f56a47aef5793b7348c5c04646de09ef Mon Sep 17 00:00:00 2001 From: Wangchong Zhou Date: Mon, 17 Jun 2024 14:09:36 +0800 Subject: [PATCH] chore(cd): build ubuntu jammy artifacts in docker (#13212) Github runner's "ubuntu-latest" will be bumped to ubuntu 24.04, thus build outside of docker results in artifacts targeting 24.04. (cherry picked from commit 8fdfb46b497e6237af0d95b9c75587d5aa17d368) --- .github/matrix-commitly.yml | 2 +- .github/matrix-full.yml | 2 ++ scripts/explain_manifest/main.py | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/matrix-commitly.yml b/.github/matrix-commitly.yml index 7685340597c3..5e52cbc80f73 100644 --- a/.github/matrix-commitly.yml +++ b/.github/matrix-commitly.yml @@ -1,7 +1,7 @@ # please see matrix-full.yml for meaning of each field build-packages: - label: ubuntu-22.04 - os: ubuntu-22.04 + image: ubuntu:22.04 package: deb check-manifest-suite: ubuntu-22.04-amd64 diff --git a/.github/matrix-full.yml b/.github/matrix-full.yml index b011607f4c89..376fcac72ef7 100644 --- a/.github/matrix-full.yml +++ b/.github/matrix-full.yml @@ -12,9 +12,11 @@ build-packages: package: deb check-manifest-suite: ubuntu-20.04-amd64 - label: ubuntu-22.04 + image: ubuntu:22.04 package: deb check-manifest-suite: ubuntu-22.04-amd64 - label: ubuntu-22.04-arm64 + image: ubuntu:22.04 package: deb bazel-args: --platforms=//:generic-crossbuild-aarch64 check-manifest-suite: ubuntu-22.04-arm64 diff --git a/scripts/explain_manifest/main.py b/scripts/explain_manifest/main.py index 1033057d3500..44f9dcc00fc1 100755 --- a/scripts/explain_manifest/main.py +++ b/scripts/explain_manifest/main.py @@ -84,9 +84,12 @@ def gather_files(path: str, image: str): code = os.system( "ar p %s data.tar.gz | tar -C %s -xz" % (path, t.name)) elif ext == ".rpm": - # GNU cpio and rpm2cpio is needed + # rpm2cpio is needed + # rpm2archive ships with rpm2cpio on debians code = os.system( - "rpm2cpio %s | cpio --no-preserve-owner --no-absolute-filenames -idm -D %s" % (path, t.name)) + """ + rpm2archive %s && tar -C %s -xf %s.tgz + """ % (path, t.name, path)) elif ext == ".gz": code = os.system("tar -C %s -xf %s" % (t.name, path))