Bug 434856

Summary: Please add a flag to filter OSX stuff
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: unzipAssignee: Ivana Varekova <varekova>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
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:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 235705, 434850    

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

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.