bin/85439: bsdtar doesn't restore file flags (cpio also doesn't)

Harald Schmalzbauer harry at schmalzbauer.de
Mon Aug 29 15:00:23 GMT 2005


>Number:         85439
>Category:       bin
>Synopsis:       bsdtar doesn't restore file flags (cpio also doesn't)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 29 15:00:22 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Harald Schmalzbauer
>Release:        FreeBSD 6.0-BETA2 i386
>Organization:
>Environment:
System: FreeBSD cale.flintsbach.schmalzbauer.de 6.0-BETA2 FreeBSD 6.0-BETA2 #0: Thu Aug 18 05:29:38 CEST 2005 root@:/usr/obj/usr/src/sys/CALE i386


	
>Description:
	Short description says it all, I'm llosing file flags when restoring
	tar archive.
>How-To-Repeat:
#!/bin/tcsh
mtree -U -p /mnt/ -f /etc/mtree/BIND.chroot.dist
set testflags = 'arch opaque nodump sappnd schg sunlnk uappnd uchg uunlnk'
foreach flag ( $testflags )
echo "This file should have flag $flag set" > /mnt/etc/testfile.$flag
chflags $flag /mnt/etc/testfile.$flag
end
tar -C /mnt -cvf /mnt/.flagstest.tar etc
foreach flag ( $testflags )
# Don't care about the nonodump error
chflags no$flag /mnt/etc/testfile.$flag
end
rm -R /mnt/*
tar -C /mnt -xvpf /mnt/.flagstest.tar

Now you can see all files are there, also mtime is correctly restored, but
no flags.

>Fix:

	


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list