#2179 PR merged: Skip the ldd test for kernel modules (issue #2177)

Labels: enhancement, cleanup, fixed / solved / done

jsmeix opened issue at 2019-07-09 12:42:

By me with "rear -D mkrescue" on my openSUSE Leap 15.0 system.
Before I had in the log

++ for binary in $( find $ROOTFS_DIR -type f -executable -printf '/%P\n' )
++ grep -q 'not found'
+++ dirname /lib/modules/4.12.14-lp150.12.64-default/vdso/vdsox32.so
++ chroot /tmp/rear.DWijRMjkBl3QxbU/rootfs /bin/bash --login -c 'cd /lib/modules/4.12.14-lp150.12.64-default/vdso && ldd /lib/modules/4.12.14-lp150.12.64-default/vdso/vdsox32.so'
++ for binary in $( find $ROOTFS_DIR -type f -executable -printf '/%P\n' )
++ grep -q 'not found'
+++ dirname /lib/modules/4.12.14-lp150.12.64-default/vdso/vdso64.so
++ chroot /tmp/rear.DWijRMjkBl3QxbU/rootfs /bin/bash --login -c 'cd /lib/modules/4.12.14-lp150.12.64-default/vdso && ldd /lib/modules/4.12.14-lp150.12.64-default/vdso/vdso64.so'
ldd: exited with unknown exit code (139)
++ for binary in $( find $ROOTFS_DIR -type f -executable -printf '/%P\n' )
++ grep -q 'not found'
+++ dirname /lib/modules/4.12.14-lp150.12.64-default/vdso/vdso32.so
++ chroot /tmp/rear.DWijRMjkBl3QxbU/rootfs /bin/bash --login -c 'cd /lib/modules/4.12.14-lp150.12.64-default/vdso && ldd /lib/modules/4.12.14-lp150.12.64-default/vdso/vdso32.so'

which does no longer happen with the change in this pull request

++ for binary in $( find $ROOTFS_DIR -type f -executable -printf '/%P\n' )
++ grep -q /lib/modules/
++ continue
++ for binary in $( find $ROOTFS_DIR -type f -executable -printf '/%P\n' )
++ grep -q /lib/modules/
++ continue
++ for binary in $( find $ROOTFS_DIR -type f -executable -printf '/%P\n' )
++ grep -q /lib/modules/
++ continue
  • Brief description of the changes in this pull request:

Skip the ldd test for kernel modules because in general
running ldd on kernel modules does not make sense
and sometimes running ldd on kernel modules causes
needless errors because sometimes that segfaults
which results false alarm messages (139 - 128 = 11 = SIGSEGV)

ldd: exited with unknown exit code (139)

cf. https://github.com/rear/rear/issues/2177
which also shows that sometimes kernel modules
could be not only in the usual directory /lib/modules/
but also e.g. in /usr/lib/modules/
so we 'grep' for '/lib/modules/' anywhere in the full path
of the binary to detect when a binary is a kernel module.

jsmeix commented at 2019-07-10 08:13:

@rear/contributors
if there are no objections, I would like to merge it today afternoon.


[Export of Github issue for rear/rear.]