Hi all. Not something serious I hope, just curious.
# pacman -Qkk
warning: libutempter: /usr/lib/utempter/utempter (Permissions mismatch)
...
# ls -l /usr/lib/utempter/utempter
-rwxr-sr-x 1 root utmp 14168 2022-06-15 03:15:15 /usr/lib/utempter/utempter
libutempter-1.2.1-3-x86_64.pkg.tar.zst/.MTREE:
...
/set type=file uid=0 gid=0 mode=644
...
./usr/lib/utempter/utempter time=1655252115.0 mode=2711 size=14168 md5digest=... sha256digest=...
...
So according to .MTREE this file should: (1) belong to root:root instead of root:utmp; (2) have permissions rwx--s--x instead of rwx-r-sr-x.
I didn't find any post-install hooks in package `libutempter 1.2.1-3` itself. I also tried to delete this file and run `pacman -S --asdep libutempter`, which changed nothing.
So I wonder how does it happen that ownership and permissions of this file change?
Its in the PKGBUILD file.
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
echo 'z /usr/lib/utempter/utempter 2755 root utmp' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}
More specifically pacman does this with the tmpfiles hook.
libutempter.conf
z /usr/lib/utempter/utempter 2755 root utmp
excerpt from the "tmpfiles" man page
I don't see this file in /var/cache/pacman/pkg/libutempter-1.2.1-3-x86_64.pkg.tar.zst. :( Where is it?
Ok, found it in archive in /usr/lib/tmpfiles.d/libutempter.conf. My yesterday's eyes. :/ Thank you. :)