14 Sep 2005 fxn   » (Master)

Lesson learned: OS X's tar(1) adds metadata to the tarball in extra files since Tiger

After I released version 0.44 of Acme::Pythonic all automatic tests from CPAN Testers reported FAILs, under Solaris, Linux, and Cygwin (thank you dudes!).

That was strange, all the tests passed in my machine, and since I use the standard utilities provided by ExtUtils::MakeMaker to manage the distribution I was puzzled. This hadn't happened in any of the previous versions of the module.

Fortunately there were logs, as this one, and all of them showed that the problem was not a test failure, I don't fully understand the traces, but there were some strange files that seemed to be the cause, as ._Makefile.PL (note the leading "._").

I downloaded the tarball in a Windows machine and, yes, there was a ._Makefile.PL and other misterious files like that one. What the heck? Where on earth do them come from?

I downloaded the same tarball from CPAN on my machine, tar xzf, no files with leading "._". Puzzled, resource fork was the only thing coming to my mind.

Allan Odgaard, the author of TextMate, helped in the users list: it turns out that since Tiger most command-line utilities (cp(1), mv(1), rsync(1), ...) have been extended to handle metadata. tar(1) is one of them, and is what make dist uses. Other archivers as zip(1) or pax(1) do it as well. They add those binary "._" duals and handle them accordingly when archives are extracted.

The man page of tar(1) does not document any flag to turn this off, so the easy workaround has been to compile GNU tar by hand. After that I released 0.45, which is PASSing as usual.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!