Re: Extracting base.txz files missing flags
- In reply to: Herbert J. Skuhra: "Re: Extracting base.txz files missing flags"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 12 Nov 2021 21:47:08 UTC
On Fri, Nov 12, 2021 at 09:04:47PM +0100, Herbert J. Skuhra wrote: > On Fri, 12 Nov 2021 20:22:38 +0100, "Herbert J. Skuhra" wrote: > > > > Hi! > > > > # uname -rms > > FreeBSD 12.2-RELEASE-p10 amd64 > > > > # cd tmp > > # fetch https://download.freebsd.org/ftp/releases/amd64/13.0-RELEASE/base.txz > > # tar -xzvf base.txz > > # find . -flags schg > > ./sbin/init > > ./var/empty > > ./usr/bin/opieinfo > > ./usr/bin/passwd > > ./usr/bin/su > > ./usr/bin/chpass > > ./usr/bin/opiepasswd > > ./usr/bin/login > > ./usr/bin/crontab > > ./usr/lib/librt.so.1 > > ./libexec/ld-elf.so.1 > > ./libexec/ld-elf32.so.1 > > ./lib/libc.so.7 > > ./lib/libcrypt.so.5 > > ./lib/libthr.so.3 > > > > On 13.0-STABLE (stable/13-n247985-ef1134110e80): > > > > # cd tmp > > # fetch https://download.freebsd.org/ftp/releases/amd64/13.0-RELEASE/base.txz > > # tar -xzvf base.txz > > # find . -flags schg > > ./var/empty > > > > On 14.0-CURRENT (main-n250458-c441592a0e15): > > > > # cd tmp > > # fetch https://download.freebsd.org/ftp/releases/amd64/13.0-RELEASE/base.txz > > # tar -xzvf base.txz > > # find . -flags schg > > # find . -flags schg,uarch > > ./var/empty > > > > PBKAC or bug? > > 12.3-RC1 (r371003): also affected > 13.0-RELEASE (releng/13.0-n244733-ea31abc261f): OK This seems to be a libarchive bug, somewhere in the extraction code. I can reproduce it trivially on UFS or ZFS and in a debugger I can see that SF_IMMUTABLE is present during extraction. There is some deferral logic to ensure that setting SF_IMMUTABLE is one of the last steps during extract, and the problem seems to be related to that mechanism.