#3497 PR merged
: In 990_verify_rootfs.sh verify symlink target when a found library is only a symlink¶
Labels: enhancement
, fixed / solved / done
jsmeix opened issue at 2025-07-24 14:21:¶
-
Type: Enhancement
-
Impact: Normal
-
Reference to related issue (URL):
https://github.com/rear/rear/issues/3414 -
How was this pull request tested?
see below
https://github.com/rear/rear/pull/3497#issuecomment-3113692546 -
Description of the changes in this pull request:
In build/default/990_verify_rootfs.sh
when in the ReaR recovery system
a "library" was found which is not
an actual library but a symlink
then verify that its symlink target exist
within the ReaR recovery system
jsmeix commented at 2025-07-24 14:27:¶
How it behaves on my test VM:
Normally:
# usr/sbin/rear -D mkrescue
...
Testing that the ReaR recovery system in '/var/tmp/rear.odhzBGeUTU1AAqf/rootfs' contains a usable system
Testing each binary with 'ldd' for 'not found' libraries within the ReaR recovery system
usr/lib64/systemd/libsystemd-core-254.so requires libraries where 'ldd' shows 'not found'
usr/lib64/systemd/libsystemd-core-254.so requires libsystemd-shared-254.so which exists as usr/lib64/systemd/libsystemd-shared-254.so
With artificially for a test added
rm $ROOTFS_DIR/usr/lib64/libparted.so.2.0.1
at the beginning of build/default/990_verify_rootfs.sh
# usr/sbin/rear -D mkrescue
...
Testing that the ReaR recovery system in '/var/tmp/rear.hJaoF3YzrHoxKuK/rootfs' contains a usable system
Testing each binary with 'ldd' for 'not found' libraries within the ReaR recovery system
bin/parted requires libraries where 'ldd' shows 'not found' (fatal by default)
bin/parted requires libparted.so.2 which exists as dangling symlink usr/lib64/libparted.so.2
bin/partprobe requires libraries where 'ldd' shows 'not found' (fatal by default)
bin/partprobe requires libparted.so.2 which exists as dangling symlink usr/lib64/libparted.so.2
usr/lib64/systemd/libsystemd-core-254.so requires libraries where 'ldd' shows 'not found'
usr/lib64/systemd/libsystemd-core-254.so requires libsystemd-shared-254.so which exists as usr/lib64/systemd/libsystemd-shared-254.so
ReaR recovery system in '/var/tmp/rear.hJaoF3YzrHoxKuK/rootfs' needs additional libraries, check /root/rear.github.master/var/log/rear/rear-localhost.log for details
Build area kept for investigation in '/var/tmp/rear.hJaoF3YzrHoxKuK', remove it when not needed
Testing that the existing programs in the PROGS array can be found as executable command within the ReaR recovery system
Testing that each program in the REQUIRED_PROGS array can be found as executable command within the ReaR recovery system
ERROR: ReaR recovery system in '/var/tmp/rear.hJaoF3YzrHoxKuK/rootfs' not usable (required libraries are missing)
Additionally with
NON_FATAL_BINARIES_WITH_MISSING_LIBRARY='parted|partprobe'
in etc/rear/local.conf
# usr/sbin/rear -D mkrescue
...
Testing that the ReaR recovery system in '/var/tmp/rear.oxKybHxG0PHc016/rootfs' contains a usable system
Testing each binary with 'ldd' for 'not found' libraries within the ReaR recovery system
bin/parted requires libraries where 'ldd' shows 'not found' (specified as non-fatal)
bin/parted requires libparted.so.2 which exists as dangling symlink usr/lib64/libparted.so.2
bin/partprobe requires libraries where 'ldd' shows 'not found' (specified as non-fatal)
bin/partprobe requires libparted.so.2 which exists as dangling symlink usr/lib64/libparted.so.2
usr/lib64/systemd/libsystemd-core-254.so requires libraries where 'ldd' shows 'not found'
usr/lib64/systemd/libsystemd-core-254.so requires libsystemd-shared-254.so which exists as usr/lib64/systemd/libsystemd-shared-254.so
ReaR recovery system in '/var/tmp/rear.oxKybHxG0PHc016/rootfs' needs additional libraries, check /root/rear.github.master/var/log/rear/rear-localhost.log for details
jsmeix commented at 2025-07-25 11:56:¶
Follow-up to
https://github.com/rear/rear/pull/3497#issuecomment-3113692546
Additionally with artificially for a test added
pushd $ROOTFS_DIR
mv /usr/lib64/systemd/libsystemd-shared-254.so /usr/lib64/systemd/libsystemd-shared-254.1.so
ln -s /usr/lib64/systemd/libsystemd-shared-254.1.so /usr/lib64/systemd/libsystemd-shared-254.so
popd
at the beginning of build/default/990_verify_rootfs.sh
# usr/sbin/rear -D mkrescue
...
Testing each binary with 'ldd' for 'not found' libraries within the ReaR recovery system
bin/parted requires libraries where 'ldd' shows 'not found' (specified as non-fatal)
bin/parted requires libparted.so.2 which exists as dangling symlink usr/lib64/libparted.so.2
bin/partprobe requires libraries where 'ldd' shows 'not found' (specified as non-fatal)
bin/partprobe requires libparted.so.2 which exists as dangling symlink usr/lib64/libparted.so.2
usr/lib64/systemd/libsystemd-core-254.so requires libraries where 'ldd' shows 'not found'
usr/lib64/systemd/libsystemd-core-254.so requires libsystemd-shared-254.so which exists as symlink usr/lib64/systemd/libsystemd-shared-254.so with target usr/lib64/systemd/libsystemd-shared-254.1.so
ReaR recovery system in '/var/tmp/rear.MvcefwuJSmgZ1Wj/rootfs' needs additional libraries, check /root/rear.github.master/var/log/rear/rear-localhost.log for details
jsmeix commented at 2025-07-25 12:04:¶
@rear/contributors
I would like to merge it next Tuesday afternoon
unless there are severe objections.
[Export of Github issue for rear/rear.]