Bug 1696798

Summary: ISO files identified differently on RHEL-7 and RHEL-8
Product: Red Hat Enterprise Linux 8 Reporter: Jan Stodola <jstodola>
Component: fileAssignee: Vincent Mihalkovič <vmihalko>
Status: CLOSED ERRATA QA Contact: Karel Volný <kvolny>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: kdudka, kvolny, odubaj
Target Milestone: rc   
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: file-5.33-14.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:57:38 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:

Description Jan Stodola 2019-04-05 16:45:32 UTC
Description of problem:
The file command in RHEL-7 and RHEL-8 prints different output for the same ISO files, compare:

# RHEL-8:
$ rpm -q file
file-5.33-8.el8.x86_64
$ file Fedora-Server-netinst-*
Fedora-Server-netinst-aarch64-29-1.2.iso: ISO 9660 CD-ROM filesystem data 'Fedora-S-dvd-aarch64-29' (bootable)
Fedora-Server-netinst-x86_64-29-1.2.iso:  DOS/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 196, 19960 sectors
$

# RHEL-7:
$ rpm -q file
file-5.11-35.el7.x86_64
$ file Fedora-Server-netinst-*
Fedora-Server-netinst-aarch64-29-1.2.iso: # ISO 9660 CD-ROM filesystem data 'Fedora-S-dvd-aarch64-29' (bootable)
Fedora-Server-netinst-x86_64-29-1.2.iso:  # ISO 9660 CD-ROM filesystem data 'Fedora-S-dvd-x86_64-29' (bootable)
$

Note the missing "# " in case of the aarch64 image and a completely different output for the x86_64 image.


Version-Release number of selected component (if applicable):
file-5.33-8.el8

How reproducible:
always

Steps to Reproduce:
1. wget https://download.fedoraproject.org/pub/fedora/linux/releases/29/Server/x86_64/iso/Fedora-Server-netinst-x86_64-29-1.2.iso
2. wget https://download.fedoraproject.org/pub/fedora/linux/releases/29/Server/aarch64/iso/Fedora-Server-netinst-aarch64-29-1.2.iso
3. file Fedora-Server-netinst-*

Actual results:
Fedora-Server-netinst-aarch64-29-1.2.iso: ISO 9660 CD-ROM filesystem data 'Fedora-S-dvd-aarch64-29' (bootable)
Fedora-Server-netinst-x86_64-29-1.2.iso:  DOS/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 196, 19960 sectors

Expected results (assuming that RHEL-7 is correct):
Fedora-Server-netinst-aarch64-29-1.2.iso: # ISO 9660 CD-ROM filesystem data 'Fedora-S-dvd-aarch64-29' (bootable)
Fedora-Server-netinst-x86_64-29-1.2.iso:  # ISO 9660 CD-ROM filesystem data 'Fedora-S-dvd-x86_64-29' (bootable)

Comment 1 Kamil Dudka 2019-04-08 11:11:36 UTC
This seems to be broken by the following upstream commit:

https://github.com/file/file/commit/FILE5_13-20-g3989f2e0

Comment 2 Vincent Mihalkovič 2020-05-07 08:59:54 UTC
Hi Jan, 

I look at this bug and find solution in which output looks like this:
../Fedora-Server-netinst-aarch64-29-1.2.iso: ISO 9660 CD-ROM filesystem data 'Fedora-S-dvd-aarch64-29' (bootable)
../Fedora-Server-netinst-x86_64-29-1.2.iso:  ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'Fedora-S-dvd-x86_64-29' (bootable)

Would this fit your needs?
If not, I would like to ask you, what are your motivations for removing string (DOS/MBR boot sector - this string was added there for reason) and adding "#" character back?

Comment 3 Jan Stodola 2020-05-07 13:34:20 UTC
Hi Vincent,
the solution you proposed is perfect, thanks!

Comment 4 Vincent Mihalkovič 2020-05-19 15:19:02 UTC
Bug fixed in following upstream commit: https://github.com/file/file/commit/18944cd4e7c60273917b8a14720b236430d5470b.

Comment 12 errata-xmlrpc 2020-11-04 01:57:38 UTC
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 (file bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2020:4531