Subject: bin/18959: Unconsistent error handling between ustar/pax and legacy gnutar
To: None <gnats-bugs@gnats.netbsd.org>
From: Xavier HUMBERT <humbert@injep.fr>
List: netbsd-bugs
Date: 11/07/2002 10:11:48
>Number:         18959
>Category:       bin
>Synopsis:       ustar/pax reports an error, when gnutar dopes not
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 07 01:12:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Xavier HUMBERT
>Release:        NetBSD 1.6K
>Organization:
INJEP
>Environment:
System: NetBSD aragorn.injep.fr 1.6K NetBSD 1.6K (XAVIER) #6: Sat Nov 2 07:08:32 CET 2002 root@aragorn.injep.fr:/usr/src/sys/arch/i386/compile/XAVIER i386
Architecture: i386
Machine: i386
Userland build with same source and the same day as kernel
>Description:
It is fairly common to use tar to archive a living filesystem (a rough way to make a backup)
Unfortunately, when gnu tar consider sockets or accessed files as "bening" errors, ustar/pax
does not and exits with an error 1. This breaks backup scripts.
>How-To-Repeat:
Install gtar from pkgsrc and try :

[xavier@aragorn /]$ sudo tar -cf /usr/tmp/var.tar ./var/ ; echo $?
tar: Ustar cannot archive a socket ./var/spool/postfix/private/rewrite
tar: Ustar cannot archive a socket ./var/spool/postfix/private/bounce
tar: Ustar cannot archive a socket ./var/spool/postfix/private/defer
tar: Ustar cannot archive a socket ./var/spool/postfix/private/smtp
tar: Ustar cannot archive a socket ./var/spool/postfix/private/error
tar: Ustar cannot archive a socket ./var/spool/postfix/private/local
tar: Ustar cannot archive a socket ./var/spool/postfix/private/virtual
tar: Ustar cannot archive a socket ./var/spool/postfix/private/lmtp
tar: Ustar cannot archive a socket ./var/spool/postfix/private/cyrus
tar: Ustar cannot archive a socket ./var/spool/postfix/private/uucp
tar: Ustar cannot archive a socket ./var/spool/postfix/private/ifmail
tar: Ustar cannot archive a socket ./var/spool/postfix/private/bsmtp
tar: Ustar cannot archive a socket ./var/spool/postfix/private/smtpint
tar: Ustar cannot archive a socket ./var/spool/postfix/public/cleanup
tar: Ustar cannot archive a socket ./var/spool/postfix/public/flush
tar: Ustar cannot archive a socket ./var/spool/postfix/public/showq
tar: Ustar cannot archive a socket ./var/chroot/named/var/run/log
tar: Ustar cannot archive a socket ./var/chroot/named/var/run/ndc
tar: Ustar cannot archive a socket ./var/chroot/ntpd/var/run/log
tar: File ./var/log/full-log was modified during copy to archive
tar: Ustar cannot archive a socket ./var/run/log
1
[xavier@aragorn /]$ sudo gtar -cf /usr/tmp/var.tar ./var/ ; echo $?
0

>Fix:
Give us back legacy tar, please.
>Release-Note:
>Audit-Trail:
>Unformatted: