Bug 1056672
Summary: | tar uses wrong magic number for xz archives | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Bryn M. Reeves <bmr> |
Component: | tar | Assignee: | Pavel Raiskup <praiskup> |
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.5 | CC: | dkutalek, jpopelka, ovasik, psklenar |
Target Milestone: | rc | Keywords: | EasyFix |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | tar-1.23-12.el6 | Doc Type: | Bug Fix |
Doc Text: |
Previously, tar did not automatically detect archives compressed by the xz program if the user did not specify the "-J" or "--xz" option on the command line. As a consequence, if the processed archive had the ".xz" extension, tar extracted or listed the contents of the archive but printed an error message and eventually exited with a non-zero exit status. If the archive did not have this extension, tar failed. With this update, the automatic recognition mechanism has been improved. As a result, tar no longer prints an error message in this scenario, and it extracts or lists the contents of such archives correctly regardless of the extension.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2015-07-22 06:13:30 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1070830, 1159820 |
Description
Bryn M. Reeves
2014-01-22 17:01:28 UTC
Turns out this was already fixed upstream in a couple of commits in 2010: commit 80a6ef7d94ce144db0249384e55846baa404f4dd Author: Sergey Poznyakoff <gray.ua> Date: Mon Jun 28 00:04:49 2010 +0300 Minor fix. * src/buffer.c (magic): Split the character constant to help cc recognize character boundaries (7 is a valid hex character). diff --git a/src/buffer.c b/src/buffer.c index 5b7cbc7..444f612 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -225,7 +225,7 @@ static struct zip_magic const magic[] = { { ct_lzip, 4, "LZIP", LZIP_PROGRAM, "--lzip" }, { ct_lzma, 6, "\xFFLZMA", LZMA_PROGRAM, "--lzma" }, { ct_lzop, 4, "\211LZO", LZOP_PROGRAM, "--lzop" }, - { ct_xz, 6, "\xFD7zXZ", XZ_PROGRAM, "-J" }, + { ct_xz, 6, "\xFD" "7zXZ", XZ_PROGRAM, "-J" }, }; commit 9b31db388e6af753ec2e1c84db53a5d47e94ec15 Author: Sergey Poznyakoff <gray.ua> Date: Sun Jun 27 23:42:08 2010 +0300 Minor fix. * src/buffer.c (magic): Fix xz magic. diff --git a/src/buffer.c b/src/buffer.c index 239d3f1..5b7cbc7 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -225,7 +225,7 @@ static struct zip_magic const magic[] = { { ct_lzip, 4, "LZIP", LZIP_PROGRAM, "--lzip" }, { ct_lzma, 6, "\xFFLZMA", LZMA_PROGRAM, "--lzma" }, { ct_lzop, 4, "\211LZO", LZOP_PROGRAM, "--lzop" }, - { ct_xz, 6, "\0xFD7zXZ", XZ_PROGRAM, "-J" }, + { ct_xz, 6, "\xFD7zXZ", XZ_PROGRAM, "-J" }, }; Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1285.html |