Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support xz compressed tarballs #18236

Closed
rwst opened this issue Apr 17, 2015 · 17 comments
Closed

support xz compressed tarballs #18236

rwst opened this issue Apr 17, 2015 · 17 comments

Comments

@rwst
Copy link

rwst commented Apr 17, 2015

When trying to feed Sage a new pynac...tar.xz I get:

Setting up build directory for pynac-0.3.5
tar: Archive is compressed. Use -J option
tar: Error is not recoverable: exiting now
Error: failed to extract /home/ralf/sage/upstream/pynac-0.3.5.tar.xz

The difference in compression is significant:

gcc-7.2.0.tar.gz   107 MB
gcc-7.2.0-tar.xz    59.4 MB

Example tarball: ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-7.2.0/gcc-7.2.0.tar.xz

Note: if you actually want to use .xz tarballs, you must add | xz as dependency of your package!

Component: build

Author: Jeroen Demeyer

Branch/Commit: 13d60a1

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/18236

@rwst rwst added this to the sage-6.7 milestone Apr 17, 2015
@kiwifb
Copy link
Member

kiwifb commented Apr 17, 2015

comment:1

-J is the right option for .xz I am not sure what is happening internally but -a smartly identify the compression and applies the right filter if available. The big problem is that you need a GNU tar recent enough to support xz and that xz is present. I am not sure that BSD tar shipped with OS X supports it at all, or even if xz/lzma is present. I can check though.

@kiwifb
Copy link
Member

kiwifb commented Apr 17, 2015

comment:2

Just to be different OS X (and my understanding is that it may be a 10.10+ only feature) own tar does support .xz but doesn't need any options for recognising compression. -J and -a don't work but tar -xvf will just unpack your .tar.xz file.

@mkoeppe
Copy link
Member

mkoeppe commented Jul 26, 2016

Dependencies: #21063

@jhpalmieri
Copy link
Member

comment:4

Another approach would be to use the xz command to uncompress and then Sage's already existing tarball extractor in build/sage_bootstrap/uncompress/tar_file.py. Since Sage has an xz package, if we build that early on, then any subsequent package could be in the form of a tar.xz tarball.

@rwst

This comment has been minimized.

@rwst
Copy link
Author

rwst commented Oct 7, 2017

comment:5

Better example.

@rwst rwst modified the milestones: sage-6.7, sage-8.2 Oct 7, 2017
@jdemeyer
Copy link

Author: Jeroen Demeyer

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

@jdemeyer
Copy link

New commits:

13d60a1Support xz compressed tarballs

@jdemeyer
Copy link

Commit: 13d60a1

@jdemeyer
Copy link

Changed dependencies from #21063 to none

@jdemeyer

This comment has been minimized.

@dimpase
Copy link
Member

dimpase commented Oct 10, 2017

Reviewer: Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Oct 10, 2017

comment:11

Looks good to me.

@jhpalmieri
Copy link
Member

comment:12

I suppose in a perfect world, the SageTarXZFile.can_read method would check not only whether it was an xz file, but also whether it was a compressed tar file. I don't know how to check this except to actually decompress it and then see if you have a valid tar file, which is much slower than xz -l ....

@vbraun
Copy link
Member

vbraun commented Oct 16, 2017

Changed branch from u/jdemeyer/support_xz_compressed_tarballs to 13d60a1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants