Description of problem: OS X created zip files (for example http://www.greekfontsociety.gr/GFS_NEOHELLENIC_OT.zip) include Apple-specific metadata in an __MACOSX/ directory. Thus if such an archive is released by a project and then packaged %setup -q will leave a stray __MACOSX/ in the rpm build dir. This causes failures in automated rpm checker scripts Fedora people (most notably Dave Jones) use Please make the %setup macro filter-out these OSX-specific metadata files, as they're totally useless in an rpm context The gfs-neohellenic-fonts Fedora package is available as test point Version-Release number of selected component (if applicable): rpm-4.4.2.3-0.2.rc1.x86_64
See also bug #434856
Let's see the outcome of bug 434856 first. I'm not terribly keen on adding special handling for such a marginal case (which could easily be worked around by just re-zipping without the OSX stuff) into rpm: just adding -x __MACOSX/* to unzip parameters would cause needless complaining from unzip on vast majority of archives that don't have such data, and looking at contents of a zip and filtering some arbitrary path out if present seems far more trouble than it's worth...
Ookay... since the files are just regular files in unzip (as ingeniously created by OSX archiver program) there's nothing here to fix: like unzip, rpm has no business censoring the contents of archives. It's not like rpm is holding anybody hostage to using %setup, it's there just for convenience in the common case. When there are special needs, like the packager knows some contents of the archive are bogus, just do it manually: --- gfs-neohellenic-fonts.spec 17 Feb 2008 10:01:03 -0000 1.2 +++ gfs-neohellenic-fonts.spec 27 Feb 2008 11:18:48 -0000 @@ -45,7 +45,9 @@ %prep -%setup -q -n %{archivename} +unzip -q %{SOURCE0} -x __MACOSX/* +cd %{archivename} + for txt in *.txt ; do fold -s $txt > $txt.new sed -i 's/\r//' $txt.new