Re: XATTR option does NOT work for chattr attributes

[email protected] (Joerg Schilling) Tue, 09 Oct 2007 13:18:44 +0200
Newsgroups gmane.comp.archivers.star.user
Message-ID <470b6394.WFHVEC6Xy7n/FarT%[email protected]>
"Vincent Callanan" <[email protected]> wrote:

> so -xfflags should preserve immutable flag, right?
> but they don't on my installation. That's when I started trying -xattr ;-)

It definitely does ,-)

> > File flags are implemented since 2001.
> > Star should support to completely restore the file flags.
> > If you have a problem, send a tar archive with a single empty 
> > file that cannot 
> > be restored correctly.
>
> I have attached a star archive of a single empty file.
> Here's what I did to create it.
>
> # cd ~
> # mkdir src
> # cd src
> # touch test
> # chattr +i test
> # lsattr
> ----i------------ ./test
> # cd ..
> # mkdir dst
> # star -cp -xfflags -C ~/src . f=src.star
> # star -xp -xfflags -C ~/dst f=src.star
> # cd dst
> # lsattr
> ----------------- ./test

Note that this will not work as you did not use the right arhive format.

>
> So clearly, immutable flag is not preserved in backup/restore process on my
> Linux box.
> I also tried -Hexustar option (just in case it is not the default) but that
> did not make any difference.

Well, -Hexustar definitelz _does_ make the difference.

I did just vevirfy that your test case works on Linux.


> BTW, there is a note in man page about -xfflags on Linux being "buggy by
> design" (wonderful expression!!). Is that just historical or is it still the
> case?

The design bug is that you need to open all files and call an ioctl() on them
to read the file flags on Linux. This may cause that the tape will rewind from 
the open(2) call that was just to check the file flags.


Jörg

-- 
 EMail:[email protected] (home) Jörg Schilling D-13353 Berlin
       [email protected]                (uni)  
       [email protected]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily