Skip to content

Commit

Permalink
fix(ci): replace "cpio" rpm extraction (#13233)
Browse files Browse the repository at this point in the history
cherry-pick from Kong/kong-ee#9042

KAG-4775

(cherry picked from commit 8e86dba)
  • Loading branch information
Water-Melon authored and bungle committed Jun 21, 2024
1 parent 1e9efa4 commit 23055b3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/explain_manifest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 23055b3

Please sign in to comment.