File report iso image application/octet-stream

Bug #458677 reported by achab
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
file (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Lucid by TJ

Bug Description

Binary package hint: file

In Kubuntu 9.04 the 'file' command returns application/x-iso9660-image for an iso 9660 image.
In Kubuntu 9.10 the 'file' command returns application/octet/stream for the same iso 9660 image.

file version 5.03-1

To check;
Create an iso image with
$ genisoimage -o myiso.iso ~/somefolder

Check mime type with
file --mime myiso.iso

It seems to affect the package "uck" as it checks the mime type of the file.
To check try to create a custom image of karmic with uck.
It appears a message that the files seems not to be an iso 9660 file.

ProblemType: Bug
Architecture: i386
Date: Fri Oct 23 01:03:14 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/kdeinit4
LiveMediaBuild: Kubuntu 9.10 "Karmic Koala" - Release Candidate i386 (20091020.2)
Package: kdelibs-bin 4:4.3.2-0ubuntu7
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: kde4libs
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
achab (gzmorell) wrote :
Revision history for this message
Victor Engmark (victor-engmark) wrote :

Second this - I used the following command to check for ISO files, and it doesn't work anymore:
if [ `expr "$(file -b "$iso_file")" : ".*UDF filesystem data.*"` -eq 0 ]

Current result:
ISO 9660 CD-ROM filesystem data 'CDROM '

TJ (tj)
Changed in file (Ubuntu):
status: New → In Progress
importance: Undecided → Low
assignee: nobody → TJ (intuitivenipple)
Revision history for this message
TJ (tj) wrote :

The attached patch can be applied to the installed "/usr/share/file/magic" database and then recompiled to correct the recognition of ISO images as application/x-iso9660-image. The patch also contains a fix for bug #533553 "Bad tabs in ssh magic causes bad string and compilation warning".

An updated package will be available in my PPA shortly and I'll add a debdiff here for the package.

Revision history for this message
TJ (tj) wrote :

To apply the patch in comment #3 do:

wget http://launchpadlibrarian.net/40378845/magic.patch
sudo patch -p1 /usr/share/file/magic magic.patch
cd /usr/share/file
sudo file -C
cd ~

Testing:
file -bi xubuntu-10.04-desktop-i386.iso
application/x-iso9660-image; charset=binary

Revision history for this message
Mark Rose (markrose) wrote :

Thanks, TJ!

tags: added: patch
Revision history for this message
TJ (tj) wrote :
Revision history for this message
TJ (tj) wrote :

file (5.03-5ubuntu1) lucid; urgency=low

  * Fix recognition of mime-type application/x-iso9660-image (LP: 458677)
    - add debian/patches/300-magic-fix-iso9660-image.patch
  * Fix bad tabs for OpenSSH DSA/RSA public keys (LP: 533553)
    - fix debian/patches/208-magic-add-ssh.patch

 -- TJ <email address hidden> Sat, 6 Mar 2010 23:30:00 +0000

Revision history for this message
Nigel Babu (nigelbabu) wrote :

Unsubsribing reviewers and subscribing sponsors

Changed in file (Ubuntu):
status: In Progress → Triaged
TJ (tj)
Changed in file (Ubuntu):
assignee: TJ (intuitivenipple) → nobody
TJ (tj)
Changed in file (Ubuntu):
importance: Low → Medium
milestone: none → ubuntu-10.04-beta-2
Revision history for this message
Benjamin Drung (bdrung) wrote :

Thanks for the debdiff. I uploaded it. One small thing: You forgot to update the Maintainer field (attached the updated patch).

Please forward your changes. Then we can sync the package again.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Forgot the diff. Here it is.

Revision history for this message
Benjamin Drung (bdrung) wrote :

You forgot the # before the bug numbers. Therefore closing this bug manually.

file (5.03-5ubuntu1) lucid; urgency=low

  * Fix recognition of mime-type application/x-iso9660-image (LP: #458677)
    - add debian/patches/300-magic-fix-iso9660-image.patch
  * Fix bad tabs for OpenSSH DSA/RSA public keys (LP: #533553)
    - fix debian/patches/208-magic-add-ssh.patch
 -- TJ <email address hidden> Sat, 6 Mar 2010 23:30:00 +0000

Changed in file (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Barry Warsaw (barry) wrote :

This has apparently been fixed in wheezy (file 5.08) so I'm going to drop the Ubuntu-only delta in Precise.

@chemistry[~:1002]% file --mime myiso.iso
myiso.iso: application/x-iso9660-image; charset=binary
@chemistry[~:1004]% file --version
file-5.08
magic file from /etc/magic:/usr/share/misc/magic

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.