[darcs-devel] [issue1456] darcs dist calls gnu tar which makes less portable archives by default
Duncan Coutts
bugs at darcs.net
Thu Apr 30 19:28:17 UTC 2009
New submission from Duncan Coutts <duncan.coutts at worc.ox.ac.uk>:
darcs dist calls the system tar command. On linux systems this is
usually gnu tar. By default gnu tar uses the gnu tar format. This is not
standard, though most archive programs can read it.
This aspect isn't a major problem. The problem is that by default gnu
tar will also use a bunch of other format extensions if it encounters
long file names etc. In these cases other archive programs cannot
necessarily read the resulting archive.
darcs dist is often used for software distribution. In this case the
most important thing is that everyone can read the thing. For the use
case of darcs dist to do a backup or something, then portability is less
important and preserving things like permissions and long file names is
important.
For the distribution use case darcs could instruct gnu tar to use a
standard tar format eg --format=ustar or --format=posix.
We have had at least one problem due to this issue with hackage. A user
uploaded a tarball that could be read by gnu tar but not by
cabal-install (even though cabal-install can read most gnu tar
archives). The problem has been fixed in a later release which uses
updated tar reading code, but it does not deal with the potential
problem of long file names.
Furthermore, in future the hackage server will reject tarballs that are
not fully portable (probably including gnu format archives). It'll
require proper posix compliant archives as these guarantee the highest
level of portability. At that time, packages created by darcs dist will
not be suitable (cabal sdist generates posix compliant tar archives).
The only problem I can see is that darcs does not necessarily know that
it is talking to gnu tar. Other system's tar programs to not accept the
--format flag. One option is to use the Haskell tar package (as
cabal-install does), or to just assume that linux implies gnu tar.
Duncan
----------
messages: 7780
nosy: dmitry.kurochkin, duncan.coutts, kowey, simon, thorkilnaur
status: unread
title: darcs dist calls gnu tar which makes less portable archives by default
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1456>
__________________________________
More information about the darcs-devel
mailing list