import CS rear-2.6-25.el9
This commit is contained in:
parent
6320df7887
commit
b577b6ebc5
1537
SOURCES/rear-fix-ipv6.patch
Normal file
1537
SOURCES/rear-fix-ipv6.patch
Normal file
File diff suppressed because it is too large
Load Diff
74
SOURCES/rear-fix-libsystemd-ldd-warning.patch
Normal file
74
SOURCES/rear-fix-libsystemd-ldd-warning.patch
Normal file
@ -0,0 +1,74 @@
|
||||
diff --git a/usr/share/rear/build/default/990_verify_rootfs.sh b/usr/share/rear/build/default/990_verify_rootfs.sh
|
||||
index 76a4f1f4b..1b76d8019 100644
|
||||
--- a/usr/share/rear/build/default/990_verify_rootfs.sh
|
||||
+++ b/usr/share/rear/build/default/990_verify_rootfs.sh
|
||||
@@ -69,6 +69,11 @@ fi
|
||||
Log "Testing each binary (except links) with ldd and look for 'not found' libraries within the recovery system"
|
||||
local binary=""
|
||||
local broken_binaries=""
|
||||
+local not_found_output=""
|
||||
+local not_found_library=""
|
||||
+local junk=""
|
||||
+local actually_found_library=""
|
||||
+local actually_missing_libraries="no"
|
||||
# Third-party backup tools may use LD_LIBRARY_PATH to find their libraries
|
||||
# so that for testing such third-party backup tools we must also use
|
||||
# their special LD_LIBRARY_PATH here:
|
||||
@@ -151,7 +156,6 @@ test $old_LD_LIBRARY_PATH && export LD_LIBRARY_PATH=$old_LD_LIBRARY_PATH || unse
|
||||
# Report binaries with 'not found' shared object dependencies:
|
||||
local fatal_missing_library=""
|
||||
if contains_visible_char "$broken_binaries" ; then
|
||||
- LogPrintError "There are binaries or libraries in the ReaR recovery system that need additional libraries"
|
||||
local ldd_output=""
|
||||
for binary in $broken_binaries ; do
|
||||
# Only for programs (i.e. files in a .../bin/... or .../sbin/... directory) treat a missing library as fatal
|
||||
@@ -161,26 +165,43 @@ if contains_visible_char "$broken_binaries" ; then
|
||||
if test "$NON_FATAL_BINARIES_WITH_MISSING_LIBRARY" ; then
|
||||
# A program with missing library is treated as fatal when it does not match the pattern:
|
||||
if grep -E -q "$NON_FATAL_BINARIES_WITH_MISSING_LIBRARY" <<<"$binary" ; then
|
||||
- LogPrintError "$binary requires additional libraries (specified as non-fatal)"
|
||||
+ LogPrint "$binary requires libraries where 'ldd' shows 'not found' (specified as non-fatal)"
|
||||
else
|
||||
- LogPrintError "$binary requires additional libraries (fatal error)"
|
||||
+ LogPrint "$binary requires libraries where 'ldd' shows 'not found' (fatal error)"
|
||||
fatal_missing_library="yes"
|
||||
fi
|
||||
else
|
||||
- LogPrintError "$binary requires additional libraries (fatal error)"
|
||||
+ LogPrint "$binary requires libraries where 'ldd' shows 'not found' (fatal by default)"
|
||||
fatal_missing_library="yes"
|
||||
fi
|
||||
else
|
||||
- LogPrintError "$binary requires additional libraries"
|
||||
+ LogPrint "$binary requires libraries where 'ldd' shows 'not found'"
|
||||
fi
|
||||
# Run the same ldd call as above but now keep its whole output:
|
||||
ldd_output="$( chroot $ROOTFS_DIR /bin/ldd $binary )"
|
||||
# Have the whole ldd output only in the log:
|
||||
Log "$ldd_output"
|
||||
+ # For each 'not found' shared object (i.e. a shared object that was 'not found' by 'ldd')
|
||||
+ # check whether or not the shared object may exist nevertheless in the ReaR recovery system
|
||||
+ # and if yes, we may sufficiently safely assume things are OK in the ReaR recovery system
|
||||
+ # so we do not report it as missing to the user (for debugging we have all in the log)
|
||||
+ # cf. https://github.com/rear/rear/issues/3021#issuecomment-2165453757
|
||||
+ not_found_output="$( grep 'not found' <<<"$ldd_output" )"
|
||||
+ # not_found_output is a string of multiple lines (separated by \n) that look e.g. like
|
||||
+ # libsystemd-shared-255.4-1.fc40.so => not found
|
||||
+ # /path/to/library => not found
|
||||
+ while read not_found_library junk ; do
|
||||
+ # We prefer a simple 'grep -q' pipe over dealing with find -name versus -path options:
|
||||
+ if actually_found_library="$( find $ROOTFS_DIR -xdev | grep "$not_found_library" )" ; then
|
||||
+ LogPrint "$binary requires $not_found_library which was not found by 'ldd' but exists as $actually_found_library"
|
||||
+ else
|
||||
+ actually_missing_libraries="yes"
|
||||
# Show only the missing libraries to the user to not flood his screen with tons of other ldd output lines:
|
||||
- PrintError "$( grep 'not found' <<<"$ldd_output" )"
|
||||
+ LogPrintError "$binary requires $not_found_library which could not be found in the ReaR recovery system"
|
||||
+ fi
|
||||
+ done <<<"$not_found_output"
|
||||
done
|
||||
- LogPrintError "ReaR recovery system in '$ROOTFS_DIR' needs additional libraries, check $RUNTIME_LOGFILE for details"
|
||||
+ is_true $actually_missing_libraries && LogPrintError "ReaR recovery system in '$ROOTFS_DIR' needs additional libraries, check $RUNTIME_LOGFILE for details"
|
||||
is_true "$fatal_missing_library" && keep_build_dir
|
||||
fi
|
||||
|
84
SOURCES/rear-no-fat-16.patch
Normal file
84
SOURCES/rear-no-fat-16.patch
Normal file
@ -0,0 +1,84 @@
|
||||
diff --git a/usr/share/rear/format/USB/default/300_format_usb_disk.sh b/usr/share/rear/format/USB/default/300_format_usb_disk.sh
|
||||
index 0e0a2e080..fa6496b23 100644
|
||||
--- a/usr/share/rear/format/USB/default/300_format_usb_disk.sh
|
||||
+++ b/usr/share/rear/format/USB/default/300_format_usb_disk.sh
|
||||
@@ -94,7 +94,13 @@ sleep 5
|
||||
|
||||
if is_true "$EFI" ; then
|
||||
LogPrint "Creating vfat filesystem on EFI system partition on '${RAW_USB_DEVICE}1'"
|
||||
- if ! mkfs.vfat $v -F 16 -n REAR-EFI ${RAW_USB_DEVICE}1 >&2 ; then
|
||||
+ # Make a FAT filesystem on the EFI system partition
|
||||
+ # cf. https://github.com/rear/rear/issues/2575
|
||||
+ # and output/ISO/Linux-i386/700_create_efibootimg.sh
|
||||
+ # and output/RAWDISK/Linux-i386/280_create_bootable_disk_image.sh
|
||||
+ # Let mkfs.vfat automatically select the FAT type based on the size.
|
||||
+ # I.e. do not use a '-F 16' or '-F 32' option and hope for the best:
|
||||
+ if ! mkfs.vfat $v -n REAR-EFI ${RAW_USB_DEVICE}1 >&2 ; then
|
||||
Error "Failed to create vfat filesystem on '${RAW_USB_DEVICE}1'"
|
||||
fi
|
||||
# create link for EFI partition in /dev/disk/by-label
|
||||
diff --git a/usr/share/rear/output/ISO/Linux-i386/700_create_efibootimg.sh b/usr/share/rear/output/ISO/Linux-i386/700_create_efibootimg.sh
|
||||
index 0eb5350f8..39bbebad8 100644
|
||||
--- a/usr/share/rear/output/ISO/Linux-i386/700_create_efibootimg.sh
|
||||
+++ b/usr/share/rear/output/ISO/Linux-i386/700_create_efibootimg.sh
|
||||
@@ -13,13 +13,33 @@ StopIfError "Failed to determine disk usage of EFI virtual image content directo
|
||||
|
||||
# prepare EFI virtual image aligned to 32MiB blocks:
|
||||
dd if=/dev/zero of=$TMP_DIR/efiboot.img count=$efi_img_sz bs=32M
|
||||
-mkfs.vfat $v -F 16 $TMP_DIR/efiboot.img >&2
|
||||
-mkdir -p $v $TMP_DIR/efi_virt >&2
|
||||
-mount $v -o loop -t vfat -o fat=16 $TMP_DIR/efiboot.img $TMP_DIR/efi_virt >&2
|
||||
|
||||
-# copy files from staging directory
|
||||
+# Make a FAT filesystem on the efiboot.img file and loop mount it
|
||||
+# cf. https://github.com/rear/rear/issues/2575
|
||||
+# See output/RAWDISK/Linux-i386/280_create_bootable_disk_image.sh
|
||||
+# Having a small EFI System Partition (ESP) might introduce problems:
|
||||
+# - The UEFI spec seems to require a FAT32 EFI System Partition (ESP).
|
||||
+# - syslinux/Legacy BIOS fails to install on small FAT32 partitions with "syslinux: zero FAT sectors (FAT12/16)".
|
||||
+# - Some firmwares fail to boot from small FAT32 partitions.
|
||||
+# - Some firmwares fail to boot from FAT16 partitions.
|
||||
+# See:
|
||||
+# - http://www.rodsbooks.com/efi-bootloaders/principles.html
|
||||
+# - http://lists.openembedded.org/pipermail/openembedded-core/2012-January/055999.html
|
||||
+# Let mkfs.vfat automatically select the FAT type based on the size.
|
||||
+# See what "man mkfs.vfat" reads for the '-F' option:
|
||||
+# "If nothing is specified, mkfs.fat will automatically select
|
||||
+# between 12, 16 and 32 bit, whatever fits better for the filesystem size"
|
||||
+# I.e. do not use a '-F 16' or '-F 32' option and hope for the best:
|
||||
+mkfs.vfat $v $TMP_DIR/efiboot.img
|
||||
+mkdir -p $v $TMP_DIR/efi_virt
|
||||
+# Do not specify '-o fat=16' or '-o fat=32' when loop mounting the efiboot.img FAT file
|
||||
+# but rely on the automatic FAT type detection (see what "man 8 mount" reads for 'fat=...'):
|
||||
+mount $v -o loop -t vfat $TMP_DIR/efiboot.img $TMP_DIR/efi_virt || Error "Failed to loop mount efiboot.img"
|
||||
+
|
||||
+# Copy files from staging directory into efiboot.img
|
||||
cp $v -r $TMP_DIR/mnt/. $TMP_DIR/efi_virt
|
||||
|
||||
-umount $v $TMP_DIR/efiboot.img >&2
|
||||
-mv $v -f $TMP_DIR/efiboot.img $TMP_DIR/isofs/boot/efiboot.img >&2
|
||||
-StopIfError "Could not move efiboot.img file"
|
||||
+umount $v $TMP_DIR/efiboot.img
|
||||
+
|
||||
+# Move efiboot.img into ISO directory:
|
||||
+mv $v -f $TMP_DIR/efiboot.img $TMP_DIR/isofs/boot/efiboot.img || Error "Failed to move efiboot.img to isofs/boot/efiboot.img"
|
||||
diff --git a/usr/share/rear/output/ISO/Linux-ia64/200_mount_bootimg.sh b/usr/share/rear/output/ISO/Linux-ia64/200_mount_bootimg.sh
|
||||
index b5f603ec5..716d7d383 100644
|
||||
--- a/usr/share/rear/output/ISO/Linux-ia64/200_mount_bootimg.sh
|
||||
+++ b/usr/share/rear/output/ISO/Linux-ia64/200_mount_bootimg.sh
|
||||
@@ -1,6 +1,11 @@
|
||||
# 200_mount_bootimg.sh
|
||||
dd if=/dev/zero of=$TMP_DIR/boot.img count=64000 bs=1024
|
||||
-# make sure we select FAT16 instead of FAT12 as size >30MB
|
||||
-mkfs.vfat $v -F 16 $TMP_DIR/boot.img >&2
|
||||
-mkdir -p $v $TMP_DIR/mnt >&2
|
||||
-mount $v -o loop -t vfat -o fat=16 $TMP_DIR/boot.img $TMP_DIR/mnt >&2
|
||||
+# Make a FAT filesystem on the boot.img file and loop mount it
|
||||
+# cf. https://github.com/rear/rear/issues/2575
|
||||
+# and output/ISO/Linux-i386/700_create_efibootimg.sh
|
||||
+# and output/RAWDISK/Linux-i386/280_create_bootable_disk_image.sh
|
||||
+# Let mkfs.vfat automatically select the FAT type based on the size.
|
||||
+# I.e. do not use a '-F 16' or '-F 32' option and hope for the best:
|
||||
+mkfs.vfat $v $TMP_DIR/boot.img
|
||||
+mkdir -p $v $TMP_DIR/mnt
|
||||
+mount $v -o loop -t vfat $TMP_DIR/boot.img $TMP_DIR/mnt || Error "Failed to loop mount boot.img"
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name: rear
|
||||
Version: 2.6
|
||||
Release: 24%{?dist}
|
||||
Release: 25%{?dist}
|
||||
Summary: Relax-and-Recover is a Linux disaster recovery and system migration tool
|
||||
URL: http://relax-and-recover.org/
|
||||
License: GPLv3
|
||||
@ -70,6 +70,19 @@ Patch114: rear-resolve-libraries-for-symlinks-in-COPY_AS_IS-RHEL-15108.patch
|
||||
# https://github.com/rear/rear/commit/808b15a677191aac62faadd1bc71885484091316
|
||||
Patch115: rear-skip-invalid-drives-RHEL-22863.patch
|
||||
|
||||
# Fix useless warning that libsystemd-core requires additional libraries
|
||||
# and ReaR recovery system needs additional libraries
|
||||
# https://github.com/rear/rear/pull/3250
|
||||
Patch116: rear-fix-libsystemd-ldd-warning.patch
|
||||
|
||||
# Fix IPv6 addresses in nfs:// and sshfs:// BACKUP/OUTPUT_URL
|
||||
# https://github.com/rear/rear/pull/3242
|
||||
Patch117: rear-fix-ipv6.patch
|
||||
|
||||
# Remove obsolete FAT16 options to avoid kernel warning
|
||||
# https://github.com/rear/rear/pull/2576
|
||||
Patch118: rear-no-fat-16.patch
|
||||
|
||||
######################
|
||||
# downstream patches #
|
||||
######################
|
||||
@ -204,6 +217,12 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_docdir}/%{name}/
|
||||
|
||||
#-- CHANGELOG -----------------------------------------------------------------#
|
||||
%changelog
|
||||
* Sat Jul 20 2024 Pavel Cahyna <pcahyna@redhat.com> - 2.6-25
|
||||
- Backport PR 3250 to fix useless warning that libsystemd-core requires
|
||||
additional libraries and ReaR recovery system needs additional libraries
|
||||
- Backport PR 3242 to fix IPv6 address in nfs:// and sshfs:// BACKUP/OUTPUT_URL
|
||||
- Backport PR 2576 to remove obsolete FAT16 options to avoid kernel warning
|
||||
|
||||
* Sat Feb 24 2024 Pavel Cahyna <pcahyna@redhat.com> - 2.6-24
|
||||
- Support "export TMPDIR" in user configuration again, print a warning
|
||||
when this is used - revert commit f464eae2, adapt PR 3163, add commit
|
||||
|
Loading…
Reference in New Issue
Block a user