Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Previously, the file utility did not contain a "magic" pattern for detection of files compressed using the LZMA algorithm. As a consequence, the file utility was unable to detect these files. This update adds the missing "magic" pattern, and LZMA compressed files are now detected as expected.
DescriptionDennis Gregorovic
2011-10-21 16:53:39 UTC
# rpm -q xz
xz-4.999.9-0.3.beta.20091007git.el6.x86_64
# echo foo > bar
# xz -c bar > bar2
# file bar2
bar2: xz compressed data
# xz -c --format=lzma bar > bar2
# file bar2
bar2: data
When using native format, file is able to correctly determine the file type. When using lzma, it doesn't work.
This can be fixed by backporting this magic pattern from file-5.07:
0 lelong 0x8000005d LZMA compressed data,
>5 lequad =0xffffffffffffffff streamed
>5 lequad !0xffffffffffffffff non-streamed, size %lld
!:mime application/x-lzma
Comment 3Alexander Todorov
2011-11-02 13:37:10 UTC
# file /boot/initr*
/boot/initramfs-2.6.32-214.el6.x86_64.img: gzip compressed data, from Unix, last modified: Wed Nov 2 09:16:38 2011, max compression
/boot/initrd.img: data
initrd.img is the initrd ued by anaconda.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Cause: File did not contain magic pattern for LZMA detection.
Consequence: LZMA compresses files have not been detected.
Fix: Magic pattern for LZMA compression has been added.
Result: File now detects LZMA compressed files as expected.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Diffed Contents:
@@ -1,7 +1 @@
-Cause: File did not contain magic pattern for LZMA detection.
+Previously, the file utility did not contain a "magic" pattern for detection of files compressed using the LZMA algorithm. As a consequence, the file utility was unable to detect these files. This update adds the missing "magic" pattern, and LZMA compressed files are now detected as expected.-
-Consequence: LZMA compresses files have not been detected.
-
-Fix: Magic pattern for LZMA compression has been added.
-
-Result: File now detects LZMA compressed files as expected.
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.
http://rhn.redhat.com/errata/RHBA-2012-0391.html