Skip to content

Commit

Permalink
add data.tar.xz support (ALT bug 30594)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitlav committed Aug 6, 2017
1 parent aa7a613 commit 6075900
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions alean-data-tar.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/alien/Alien/Package/Deb.pm b/alien/Alien/Package/Deb.pm
index bf09058..0141264 100644
--- a/alien/Alien/Package/Deb.pm
+++ b/alien/Alien/Package/Deb.pm
@@ -216,7 +216,7 @@ sub scan {
}
else {
@filelist=map { chomp; s:\./::; "/$_" }
- $this->runpipe(0, "ar -p '$file' data.tar.gz | gzip -dc | tar tf -");
+ $this->runpipe(0, "( ar -p '$file' data.tar.gz | gzip -dc || ar -p '$file' data.tar.xz | xzcat ) | tar tf -");
}
$this->filelist(\@filelist);

@@ -244,7 +244,7 @@ sub unpack {
or die "Unpacking of '$file' failed: $!";
}
else {
- $this->do("ar -p $file data.tar.gz | gzip -dc | (cd ".$this->unpacked_tree."; tar xpf -)")
+ $this->do("( ar -p $file data.tar.gz | gzip -dc || ar -p '$file' data.tar.xz | xzcat ) | (cd ".$this->unpacked_tree."; tar xpf -)")
or die "Unpacking of '$file' failed: $!";
}

2 changes: 2 additions & 0 deletions alien.spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ BuildArch: noarch
# Source-url: http://ftp.debian.org/debian/pool/main/a/alien/%{name}_%version.tar.bz2
Source: %name-%version.tar
Patch: %name-Makefile.PL.patch
Patch1: %name-data-tar.patch

# Automatically added by buildreq on Mon Feb 13 2006
BuildRequires: perl-devel perl-podlators
Expand All @@ -29,6 +30,7 @@ This is a tool only suitable for binary packages.
%prep
%setup
%patch -p2
%patch1 -p2

%build
%perl_vendor_build INSTALLMAN1DIR=%_man1dir INSTALLMAN3DIR=%_man3dir
Expand Down

0 comments on commit 6075900

Please sign in to comment.