#3073 PR merged
: Resolve libs for executable links in COPY_AS_IS¶
Labels: enhancement
, bug
, fixed / solved / done
pcahyna opened issue at 2023-11-10 21:37:¶
Pull Request Details:¶
-
Type: Bug Fix
-
Impact: Low
-
Reference to related issue (URL):
fixes #3064 -
How was this pull request tested?
yum erase rsync
andyum install chkconfig
followed byrear mkrescue
on RHEL 9 -
Description of the changes in this pull request:
Do not skip symbolic links when adding libraries required by executables in COPY_AS_IS. The symlink targets will be copied later by build/default/490_fix_broken_links.sh. We thus need library dependencies for symlinked executables just like for normal executables and build/default/490_fix_broken_links.sh does not perform library dependency scan, so we need to do it at the same place as for normal executables (in build/GNU/Linux/100_copy_as_is.sh). Otherwise it can happen that we add a (broken) symlink via COPY_AS_IS, the actual executable is then added by build/default/490_fix_broken_links.sh, but without its libraries, and "rear mkrescue" then fails because required libraries are missing. Happens for example with /usr/lib/systemd/systemd-sysv-install, which is a symlink to /bin/chkconfig and gets added to COPY_AS_IS in prep/GNU/Linux/280_include_systemd.sh.
Gets rid of one exception for symlinks, which looks good in any case (shorter and simpler code).
pcahyna commented at 2023-11-13 10:18:¶
Could you add a link to your even more explanatory pull request
that even provides a real-world example how it fails otherwise.
Do you mean to the source code comments?
jsmeix commented at 2023-11-13 10:37:¶
Yes, I meant adding the URL of this pull request
https://github.com/rear/rear/pull/3073
to the source code comment
pcahyna commented at 2023-11-13 14:41:¶
@jsmeix done in commit 4434da6
pcahyna commented at 2023-11-14 13:07:¶
one rpm-build in Copr seems to be in progress, but actually it has finished successfully. The outdated status is due to the Packit issue https://github.com/packit/packit-service/issues/2252
pcahyna commented at 2023-11-14 13:07:¶
I intend to merge this soon
[Export of Github issue for rear/rear.]