Bug 434856 - Please add a flag to filter OSX stuff
Please add a flag to filter OSX stuff
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: unzip (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Ivana Varekova
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F9Target 434850
  Show dependency treegraph
 
Reported: 2008-02-25 15:58 EST by Nicolas Mailhot
Modified: 2008-02-27 03:22 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-27 03:22:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Nicolas Mailhot 2008-02-25 15:58:39 EST
OS X created zip files
(for example http://www.greekfontsociety.gr/GFS_NEOHELLENIC_OT.zip) include
Apple-specific metadata in an __MACOSX/ directory. This causes problems for
scripts that do not expect this top-level directory under Linux.

Unfortunately, filtering out unconditionally this directory with -x is not
working nicely either as unzip will complain if you ask it to filter out a
non-existing file.

Thus simple scripts that invoked plain unzip now need to test if this directory
is present in an archive, and if yes use -x and if no do normal unzip.

This is getting very user-unfriendly.

Please add a flag to unzip that enables stripping of all OSX specific metadata
no other OS uses when unzipping a file (and is a nooop if this metadata is not
present, ie unzipo succeeds in all cases)

See also
http://www.info-zip.org/board/board.pl?m-1203972942/

and bug #434850
Comment 1 Panu Matilainen 2008-02-26 02:59:59 EST
I think it'd be better if unzip *defaulted* to not extracting the Apple-metadata
when running on non-OSX system where the data is totally useless for 99.99%
users. For the 0.01% that care, add a new flag to request extracting the
OSX-metadata instead.
Comment 2 Ivana Varekova 2008-02-27 03:22:54 EST
The archive you use as an example contains files in GFS_NEOHELLENIC_OT and in
__MACOSX directory so both of them are unpacked by unzip command.
There is no difference between these files for unzip (the only difference is the
directory name). unzip command should not do any automatic censorship in the
archive files and this seems for me to be too specialize case to have a separate
option for it. 
Situation should be fixed on the zip side which create this archive and which
attach unwanted __MACOSX zip files here. 
Option -x should be used with file name not with directory name so there should
be used option -x __MACOSX/* to eliminate __MACOSX directory.

Note You need to log in before you can comment on or make changes to this bug.