rear/rear-resolve-libraries-for-symlinks-in-COPY_AS_IS-RHEL-15108.patch
Lukáš Zaoral 0ff3a79b8a
Sync with patches in CentOS Stream 9
- Resolve libs for executable links in COPY_AS_IS, PR 3073
- Skip invalid disk drives when saving layout PR 3047
- Do not delete NetBackup logs in case of errors and save
  /usr/openv/netbackup/logs to the restored system after a successful recovery
- Add /usr/openv/var to COPY_AS_IS_NBU, fixes an issue seen
  with NetBackup 10.2.0.1
- Support saving and restoring hybrid BIOS/UEFI bootloader, PRs 3145 3136
2024-02-11 17:57:57 +01:00

31 lines
1.8 KiB
Diff

commit 9f859c13f5ba285cd1d5983c9b595975c21888d3
Merge: 01f503ed 4434da63
Author: pcahyna <pcahyna@users.noreply.github.com>
Date: Tue Nov 14 14:33:56 2023 +0100
Merge pull request #3073 from pcahyna/resolve-libraries-for-symlinks-in-COPY_AS_IS
Resolve libs for executable links in COPY_AS_IS
diff --git a/usr/share/rear/build/GNU/Linux/100_copy_as_is.sh b/usr/share/rear/build/GNU/Linux/100_copy_as_is.sh
index 2169efaa..2e991145 100644
--- a/usr/share/rear/build/GNU/Linux/100_copy_as_is.sh
+++ b/usr/share/rear/build/GNU/Linux/100_copy_as_is.sh
@@ -135,10 +135,13 @@ local copy_as_is_file=""
# cf. https://github.com/rear/rear/pull/2378
# It is crucial to append to /dev/$DISPENSABLE_OUTPUT_DEV (cf. 'Print' in lib/_input-output-functions.sh):
while read -r copy_as_is_file ; do
- # Skip non-regular files like directories, device files, and 'tar' error messages (e.g. in case of non-existent files, see above):
+ # Skip non-regular files like directories, device files, and 'tar' error messages (e.g. in case of non-existent files, see above)
+ # but do not skip symbolic links. Their 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.
+ # See GitHub PR https://github.com/rear/rear/pull/3073
+ # and issue https://github.com/rear/rear/issues/3064 for details.
test -f "$copy_as_is_file" || continue
- # Skip symbolic links (only care about symbolic link targets):
- test -L "$copy_as_is_file" && continue
# Remember actual regular files that are executable:
test -x "$copy_as_is_file" && copy_as_is_executables+=( "$copy_as_is_file" )
done < <( sort -u $copy_as_is_filelist_file ) 2>>/dev/$DISPENSABLE_OUTPUT_DEV