[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Fixing the GNU tar requirement.

From: Ben Reser <ben_at_reser.org>
Date: 2004-03-09 01:47:22 CET

Subversion current ships a tarball created by GNU tar. However there
are problems with this. In particular GNU tar does not follow the
POSIX.1 standard when dealing with filenames longer than 100 characters.
This means our tarballs can't be extracted (without getting GNU tar) on
platforms such as Solaris that have their own POSIX compatable tar
command.

Currently subversion has several of these:
$ find subversion-1.0.0 | perl -ne 'if (length($_) > 100) { print $_; }'
subversion-1.0.0/subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/PromptUserPassword2.java
subversion-1.0.0/subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/PromptUserPassword3.java
subversion-1.0.0/subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/SVNClientSynchronized.java
subversion-1.0.0/subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/SVNClientInterface.java
subversion-1.0.0/subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/ClientException.java
subversion-1.0.0/subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/PromptUserPassword.java
subversion-1.0.0/subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/BlameCallback.java
subversion-1.0.0/tools/cvs2svn/test-data/default-branches-cvsrepos/proj/deleted-on-vendor-branch.txt,v

You can read the details of the problems with GNU tar and the POSIX
standard at:
http://www.gnu.org/software/tar/manual/html_chapter/tar_8.html#SEC108
and
http://gd.tuwien.ac.at/utils/archivers/star/README.otherbugs

As you can see above the places where we have filenames longer than 100
chars in our tarball are in the javahl bindings and cvs2svn's test
suite.

Obviously, the cvs2svn problem is going away. So we don't need to worry
about it. But the javahl bindings will continue to be a problem.

The GNU tar suggests using the --old-archive option. But this does not
solve our problem. As GNU tar always uses an incompatable extension
when filenames are longer than 100 chars.

So here are the possible solutions:

* Move the bindings out of the subversion dir. And into the top level
directory. This would be similar to the tools directory. Our longest
filename is currently 108 chars long. Making that change would save us
11 characters keep us under the 100 char limit. However, this would
require build system changes, documentation changes, and would not solve
the problem if the javahl bindings end up with a filename that's only 3
characters longer than the existing ones.

* Stop using GNU tar for creating the tar archives and start using GNU
cpio. GNU cpio supports creating tar formats in the ustar format (i.e.
POSIX.1 format). This gives a maximum filename of 255 characters.
Which is more than twice as long as what we are using. Does not require
changes to anything other than dist.sh. The following command can
replace our usage of tar and produce a POSIX.1 compatable tar file:
find subversion-1.0.0 -print | cpio -H ustar -o > subversion-1.0.0.tar

I recommend using GNU cpio. I've tested the output with Solaris and GNU
tar and it works perfectly. If everyone is okay with this I'll post a
patch to effect this change.

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 9 01:47:36 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.