From 17284d35fe321fd78e4ceff0ce7448120e9e3a0a Mon Sep 17 00:00:00 2001 From: Niklaus Schen <8458369+Water-Melon@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:28:50 +0800 Subject: [PATCH] fix(ci): replace "cpio" rpm extraction (#13233) cherry-pick from kong/kong-ee#9042 KAG-4775 (cherry picked from commit 8e86dbaa1fdfd9ba62d9cf8f2cfcc5994614188f) --- scripts/explain_manifest/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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))