summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbiao716.wang <biao716.wang@samsung.com>2021-11-10 18:54:53 +0900
committerbiao716.wang <biao716.wang@samsung.com>2021-11-10 18:54:57 +0900
commit571146f47c7f218738add34ebf8bb90bb99670b0 (patch)
tree840bfa139b1ffd8c8bd94a9384ad26ba28c7470c
parentbf5939e0d9ecf95ebda3e5c96464f9e8724bb8b1 (diff)
downloadbuild-571146f47c7f218738add34ebf8bb90bb99670b0.tar.gz
build-571146f47c7f218738add34ebf8bb90bb99670b0.tar.bz2
build-571146f47c7f218738add34ebf8bb90bb99670b0.zip
Merge related patch for zstd function
https://github.com/openSUSE/obs-build/commit/e920b8708e0fe52f08c5619f872d6f8358f68ad2 https://github.com/openSUSE/obs-build/commit/c87192215fab9474cb910638b54396a5d38c0fdd https://github.com/openSUSE/obs-build/commit/18a35a8096fffa1f41e29e540d7de47ecd999ec0 Change-Id: I5c7bd8bd378377504b43d4468f36d92430384284 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
-rw-r--r--Build/Deb.pm3
-rw-r--r--build-pkg-deb10
2 files changed, 10 insertions, 3 deletions
diff --git a/Build/Deb.pm b/Build/Deb.pm
index 3d72088..dc708a9 100644
--- a/Build/Deb.pm
+++ b/Build/Deb.pm
@@ -263,6 +263,8 @@ sub debq {
$decompressor = 'gunzip';
} elsif ($controlname eq 'control.tar.xz ' || $controlname eq 'control.tar.xz/ ') {
$decompressor = 'unxz';
+ } elsif ($controlname eq 'control.tar.zst ' || $controlname eq 'control.tar.zst/') {
+ $decompressor = 'unzstd';
} elsif ($controlname eq 'control.tar ' || $controlname eq 'control.tar/ ') {
$decompressor = 'cat';
} else {
@@ -398,6 +400,7 @@ sub queryhdrmd5 {
my $controlname = substr($data, 0, 16);
if ($controlname ne 'control.tar.gz ' && $controlname ne 'control.tar.gz/ ' &&
$controlname ne 'control.tar.xz ' && $controlname ne 'control.tar.xz/ ' &&
+ $controlname ne 'control.tar.zst ' && $controlname ne 'control.tar.zst/' &&
$controlname ne 'control.tar ' && $controlname ne 'control.tar/ ') {
warn("$bin: control.tar is not second ar entry\n");
close F;
diff --git a/build-pkg-deb b/build-pkg-deb
index bb937a9..832bb7a 100644
--- a/build-pkg-deb
+++ b/build-pkg-deb
@@ -130,20 +130,24 @@ pkg_preinstall_deb() {
ar x "$BUILD_ROOT/.init_b_cache/rpms/$PKG.deb"
mkdir -p .init_b_cache/scripts/control
if test -f "control.tar.gz" ; then
- $TAR -C .init_b_cache/scripts/control -z -f control.tar.gz
+ $TAR -C .init_b_cache/scripts/control -z -f control.tar.gz
elif test -f "control.tar.xz" ; then
- $TAR -C .init_b_cache/scripts/control -J -f control.tar.xz
+ $TAR -C .init_b_cache/scripts/control -J -f control.tar.xz
+ elif test -f "control.tar.zst" ; then
+ $TAR -C .init_b_cache/scripts/control -J -f control.tar.zst
fi
if test -f "data.tar.gz" ; then
$TAR -z -f data.tar.gz
elif test -f "data.tar.xz" ; then
$TAR -J -f data.tar.xz
+ elif test -f "data.tar.zst" ; then
+ $TAR -J -f data.tar.zst
fi
if test -e ".init_b_cache/scripts/$PKG.run" ; then
test -e .init_b_cache/scripts/control/preinst && mv .init_b_cache/scripts/control/preinst ".init_b_cache/scripts/$PKG.pre"
test -e .init_b_cache/scripts/control/postinst && mv .init_b_cache/scripts/control/postinst ".init_b_cache/scripts/$PKG.post"
fi
- rm -rf .init_b_cache/scripts/control control.tar.{g,x}z data.tar.{g,x}z
+ rm -rf .init_b_cache/scripts/control control.tar.{g,x}z data.tar.{g,x}z control.tar.zst data.tar.zst
}
pkg_runscripts_deb() {