using strace I have found a behaviour of ldconfig (glibc), I can make no sense of
lstat("/usr/lib/libext2fs.so.2", {st_mode=S_IFLNK|0777, st_size=16, ...}) = 0
unlink("/usr/lib/libext2fs.so.2") = 0
symlink("libselinux.so.1", "/usr/lib/libext2fs.so.2") = 0
Is there any need to have the shared object library for ext2fs (libext2fs.so.2) to be a symbolic link to libselinux.so.1.
How does ldconfig know what to do? It does not seem logical to me that
this static binary /usr/bin/ldconfig would have such a behaviour hardcoded, right. However its configuration file /etc/ld.so.conf does not help me much to clear that mystery.
What makes all of this even more confusing/suspicious with my distros tools (Arch Linux) I cannot find any package the file belongs to.
$ pkgfile /usr/lib/libselinux.so.1
does not show any package, while $ pkgfile /usr/lib/libext2fs.so
outputs core/e2fsprogs
So my question is specifically:
- what the role of this libselinux.so.1 is here
- how ldconfig comes to decide to create that symlink (which btw. breaks
e2fsck)