Subject: RE: tar becomes (too ?) picky.
To: NetBSD Current <current-users@netbsd.org>
From: Conrad T. Pino <Conrad@Pino.com>
List: current-users
Date: 02/03/2004 00:57:37
I want to be in the NetBSD camp and I'm porting a CVS backup script
from Solaris 8 i386 to NetBSD 1.6ZG (GENERIC.MP) and "tar" is giving
me grief:

tar: Unable to append, archive header flaw
tar: Cannot append to an archive that may have flaws.

This issue was posted back in May 2003 and I didn't see a response:

http://mail-index.netbsd.org/current-users/2003/05/05/0006.html

Points where Martin and I have concerns and the extra I can add:

1. Solaris "tar" will append to empty file i.e. "touch" works.
I'm working around this with:

	if [[ -f file.tar ]]
	then
		tar rf file.tar file
	else
		tar cf file.tar file
	fi

2. After several files the "tar rf ..." command fails.

3. A "tar tf" operation shows "header flaw" occurs BEFORE the
end of archive:

	[snip]
	pino/CVSROOT/writers
	pino/CVSROOT/writers,v
	tar: Invalid header, starting valid header search.
	pino/operations/apache/servers/finch/usr/pkg/etc/httpd/httpd.conf,v
	pino/operations/apache/servers/finch/usr/pkg/etc/httpd/magic,v
	pino/operations/apache/servers/finch/usr/pkg/etc/httpd/mime.types,v
	pino/operations/apache/servers/finch/usr/pkg/etc/httpd/ssl.conf,v

which seems odd to me.

Questions for the NetBSD experienced:

Am I doing *something* wrong or is this a bug in NetBSD tar implementation?

Does NetBSD have a better incremental archiving tool than tar?

Is there a better list to get a NetBSD tar issue resolved?

TIA,

Conrad Pino