Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Module make problems caused by Mac OS metadata files

by Thilosophy (Curate)
on Jun 18, 2005 at 01:16 UTC ( [id://467916]=perlquestion: print w/replies, xml ) Need Help??

Thilosophy has asked for the wisdom of the Perl Monks concerning the following question:

Monks on the Mac,

I have recently upgraded to Tiger and run into a problem with the metadata files that are created when making a tgz while bundling a CPAN module. What happens is that Tiger's version of tar is metadata-aware and tries to preserve reserve forks, spotlight attributes and the like by creating hidden files, named like ._Makefile.PL .

Apparently, the presence of these files breaks the module build process on other systems:

Unrecognized character \x05 at ._Makefile.PL line 1. make: *** [._Makefile] Error 255

I would like to know two things:

  • How can I make "make dist" tell the tar to discard this metadata?
  • Can the module build system be fixed to ignore ._Makefile.PL ?

Replies are listed 'Best First'.
Re: Module make problems caused by Mac OS metadata files
by davidrw (Prior) on Jun 18, 2005 at 01:44 UTC
    I'm not very familiar with bundling for distribution, but a google led me to find the section about MANIFEST.SKIP in ExtUtils::Manifest .. Any files matching regexes (1 per line) from that file will be skipped. is this used in what you're doing? If so, i think a file with something along the lines of ^\._ or ^\._Makefile.PL$ in it could help you out.
      I think my MANIFEST file is working. The only files that end up in the archive are the files specified in MANIFEST, plus their metadata. Interestingly, these metadata files do not really exist before making the archive, they are somehow created in the process:
      $ ls -la | grep Makefile.PL -rw-r--r-- 1 planz planz 577 Jun 15 18:53 Makefile.PL $ tar cf test.tar Makefile.PL $ tar tf test.tar ./._Makefile.PL Makefile.PL

      So, I think if I want to stop having these metadata files in the archive, I need to pass some Mac-specific flag to the tar program. But tar --help did not reveal anything useful (just the regular GNU tar description).

      My current work-around is to make the bundle on a Linux machine. Using a pre-Tiger OS X should also work, as the metadata-preservation seems to be a new feature.

        hmm.. no flag, eh? could it be as simple as just removing (note: i didn't test my --delete syntax) the files from the archive? was does this show as the list?
        tar cvf test.tar Makefile.PL tar --delete -vf test.tar ._Makefile.PL # any error?? tar tf test.tar # is it still there?
Re: Module make problems caused by Mac OS metadata files
by donarb (Beadle) on Jun 18, 2005 at 08:45 UTC
    Google for 'hfstar', this handles tarring of Mac HFS files. Not sure but since it's aware of resource data, it should allow you to ignore it.
Re: Module make problems caused by Mac OS metadata files
by Thilosophy (Curate) on Jul 20, 2005 at 00:00 UTC
    One way to fix this is to download and build from source the original GNU tar program and use that one instead of the one shipping with the OS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://467916]
Approved by davidrw
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-16 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found