Hi, While rebuilding a bunch of packages, I noticed: .... # /usr/pkgsrc/editors/TeXmacs # make clean ===> Cleaning for TeXmacs-1.99.5nb11 rm: /usr/pkgsrc/editors/TeXmacs/work/TeXmacs-1.99.5-src/misc/autotroll/autotroll.m4: Operation not permitted rm: /usr/pkgsrc/editors/TeXmacs/work/TeXmacs-1.99.5-src/misc/autotroll: Directory not empty rm: /usr/pkgsrc/editors/TeXmacs/work/TeXmacs-1.99.5-src/misc: Directory not empty rm: /usr/pkgsrc/editors/TeXmacs/work/TeXmacs-1.99.5-src: Directory not empty rm: /usr/pkgsrc/editors/TeXmacs/work: Directory not empty *** Error code 1 ---------
Just in case, I refetched the present TeXmacs disctribution, it was identical to what I've had previously. It turns out, if I tar xzvpf /usr/pkgsrc/distfiles/TeXmacs-1.99.5-src.tar.gz cd TeXmacs-1.99.5-src/misc/autotroll Here there is a file, called autotroll.m4, its contents appear fine. Any attempt to modify the inode of this file fails, no matter the user - and yes, I am trying to do this as root: .... # unlink autotroll.m4 unlink: Operation not permitted ktruss shows only EPERM at that moment. ..... The archive is restored as owned by UID 501; just in case I created a user with this one, it did not help, so now I have some 4-5 copies of this file in various places of the file system (the containing directory can be written into). I tested the same on another copy of the same 8.99.51 system, it behaved identically. However, on another 8.99.50 system, I was able to unlink the same file without a problem. This was under uname -a NetBSD nbuild.lorien.lan 8.99.50 NetBSD 8.99.50 (XEN3_DOMU) #48: Sat Jul 13 10:05:20 BST 2019 sysbuild@ymir:/home/sysbuild/amd64/obj/home/sysbuild/src/sys/arch/amd64/compile/XEN3_DOMU amd64 so a DOMu system. I tried with a few older systems, e.g. 8.99.37, I couldn't unlink the file. So here's the mistery, for me, at least. What is wrong with the inode of this file, and what is there in GENERIC, but not in XEN3_DOMU kernel, which doesn't allow it to be modified? How should i remove this file? So far I've shepherded all the autotroll directories in one place to be out of the way. but I can't remove them. Further test - on NetBSD 8.1 using /usr/bin/tar I get: (a1.tar.bz2 was created using /usr/bin/tar on 8.99.51, keeping the extended headers apparently). ... # /usr/bin/tar xjvpf a1.tar.bz2 root@n8 autotroll1 tar: File extended headers posix ustar archive. Extracting as plain files. Following files might be in the wrong directory or have wrong attributes. autotroll1/PaxHeader/autotroll.m4 autotroll1/autotroll.m4 tar: ustar vol 1, 3 files, 20992 bytes read, 0 bytes written in 1 secs (20992 bytes/sec) .... Now I can unlink autotroll1/autotroll.m4, the extended header contains ... # cat autotroll1/PaxHeader/autotroll.m4 22 SCHILY.fflags=uchg If I use bsdtar under 8.1, I again get the undeletable file - I guess this one understands extended headers and restores them. GNU tar reports the extended header and does not restore it by default - the file can be unlinked: ... # gtar xjvpf a1.tar.bz2 autotroll1/ gtar: Ignoring unknown extended header keyword 'SCHILY.fflags' autotroll1/autotroll.m4 gtar: autotroll1: time stamp 2019-07-30 11:17:46 is 1935.436904375 s in the future root@n8 [10:45:30] [/home/xci] -> # unlink autotroll1/autotroll.m4 root@n8 [10:45:40] [/home/xci] -> # cat autotroll1/PaxHeader/autotroll.m4 22 SCHILY.fflags=uchg .... Apologies for the mess, I was trying things while writing this; it also doesn't seem to be related to -current, to the best of my understanding, but most likely to a wrong upstream TeXmacs distribution file. I haven't dealt so far with extended headers and am apparently somewhat confused where the problem lies. Chavdar Ivanov -- ----
