import rear-2.6-7.el8
This commit is contained in:
parent
8fd147e786
commit
ab33f22fc3
36
SOURCES/pxe-rsync-output.patch
Normal file
36
SOURCES/pxe-rsync-output.patch
Normal file
@ -0,0 +1,36 @@
|
||||
diff --git a/usr/share/rear/output/PXE/default/820_copy_to_net.sh b/usr/share/rear/output/PXE/default/820_copy_to_net.sh
|
||||
new file mode 100644
|
||||
index 00000000..dba1e526
|
||||
--- /dev/null
|
||||
+++ b/usr/share/rear/output/PXE/default/820_copy_to_net.sh
|
||||
@@ -0,0 +1,30 @@
|
||||
+
|
||||
+# 820_copy_to_net.sh
|
||||
+
|
||||
+# Check if we have a target location OUTPUT_URL
|
||||
+test "$OUTPUT_URL" || return 0
|
||||
+
|
||||
+local scheme=$( url_scheme $OUTPUT_URL )
|
||||
+local result_file=""
|
||||
+local path=""
|
||||
+
|
||||
+case "$scheme" in
|
||||
+ (nfs|cifs|usb|tape|file|davfs)
|
||||
+ # The ISO has already been transferred by NETFS.
|
||||
+ return 0
|
||||
+ ;;
|
||||
+ (fish|ftp|ftps|hftp|http|https|sftp)
|
||||
+ # output/default/950_copy_result_files.sh will transfer them
|
||||
+ return 0
|
||||
+ ;;
|
||||
+ (rsync)
|
||||
+ LogPrint "Transferring PXE files to $OUTPUT_URL"
|
||||
+ for result_file in "${RESULT_FILES[@]}" ; do
|
||||
+ LogPrint "Transferring file: $result_file"
|
||||
+ rsync -a $v "$result_file" "$OUTPUT_URL" || Error "Problem transferring '$result_file' to $OUTPUT_URL"
|
||||
+ done
|
||||
+ ;;
|
||||
+ (*) Error "Invalid scheme '$scheme' in '$OUTPUT_URL'."
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
171
SOURCES/rear-bz2083272.patch
Normal file
171
SOURCES/rear-bz2083272.patch
Normal file
@ -0,0 +1,171 @@
|
||||
commit 3d1bcf1b50ca8201a3805bc7cab6ca69c14951a1
|
||||
Author: pcahyna <pcahyna@users.noreply.github.com>
|
||||
Date: Thu May 5 12:11:55 2022 +0200
|
||||
|
||||
Merge pull request #2795 from pcahyna/recover-check-sums
|
||||
|
||||
Verify file hashes at the end of recover after file restore from backup
|
||||
|
||||
diff --git a/usr/share/rear/conf/default.conf b/usr/share/rear/conf/default.conf
|
||||
index f231bf3d..881a0af0 100644
|
||||
--- a/usr/share/rear/conf/default.conf
|
||||
+++ b/usr/share/rear/conf/default.conf
|
||||
@@ -313,8 +313,30 @@ CDROM_SIZE=20
|
||||
# which exits with non-zero exit code when the disk layout or those files changed
|
||||
# (cf. https://github.com/rear/rear/issues/1134) but the checklayout workflow
|
||||
# does not automatically recreate the rescue/recovery system.
|
||||
+# Files matching FILES_TO_PATCH_PATTERNS are added to this list automatically.
|
||||
CHECK_CONFIG_FILES=( '/etc/drbd/' '/etc/drbd.conf' '/etc/lvm/lvm.conf' '/etc/multipath.conf' '/etc/rear/' '/etc/udev/udev.conf' )
|
||||
|
||||
+# FILES_TO_PATCH_PATTERNS is a space-separated list of shell glob patterns.
|
||||
+# Files that match are eligible for a final migration of UUIDs and other
|
||||
+# identifiers after recovery (if the layout recreation process has led
|
||||
+# to a change of an UUID or a device name and a corresponding change needs
|
||||
+# to be performed on restored configuration files ).
|
||||
+# See finalize/GNU/Linux/280_migrate_uuid_tags.sh
|
||||
+# The [] around the first letter make sure that shopt -s nullglob removes this file from the list if it does not exist
|
||||
+
|
||||
+FILES_TO_PATCH_PATTERNS="[b]oot/{grub.conf,menu.lst,device.map} [e]tc/grub.* \
|
||||
+ [b]oot/grub/{grub.conf,grub.cfg,menu.lst,device.map} \
|
||||
+ [b]oot/grub2/{grub.conf,grub.cfg,menu.lst,device.map} \
|
||||
+ [e]tc/sysconfig/grub [e]tc/sysconfig/bootloader \
|
||||
+ [e]tc/lilo.conf [e]tc/elilo.conf \
|
||||
+ [e]tc/yaboot.conf \
|
||||
+ [e]tc/mtab [e]tc/fstab \
|
||||
+ [e]tc/mtools.conf \
|
||||
+ [e]tc/smartd.conf [e]tc/sysconfig/smartmontools \
|
||||
+ [e]tc/sysconfig/rawdevices \
|
||||
+ [e]tc/security/pam_mount.conf.xml \
|
||||
+ [b]oot/efi/*/*/grub.cfg"
|
||||
+
|
||||
##
|
||||
# Relax-and-Recover recovery system update during "rear recover"
|
||||
#
|
||||
diff --git a/usr/share/rear/finalize/GNU/Linux/250_migrate_disk_devices_layout.sh b/usr/share/rear/finalize/GNU/Linux/250_migrate_disk_devices_layout.sh
|
||||
index 1a91a0e3..e869e5e9 100644
|
||||
--- a/usr/share/rear/finalize/GNU/Linux/250_migrate_disk_devices_layout.sh
|
||||
+++ b/usr/share/rear/finalize/GNU/Linux/250_migrate_disk_devices_layout.sh
|
||||
@@ -29,19 +29,9 @@ LogPrint "The original restored files get saved in $save_original_file_dir (in $
|
||||
|
||||
local symlink_target=""
|
||||
local restored_file=""
|
||||
-# the funny [] around the first letter make sure that shopt -s nullglob removes this file from the list if it does not exist
|
||||
-# the files without a [] are mandatory, like fstab FIXME: but below there is [e]tc/fstab not etc/fstab - why?
|
||||
-
|
||||
-for restored_file in [b]oot/{grub.conf,menu.lst,device.map} [e]tc/grub.* [b]oot/grub/{grub.conf,menu.lst,device.map} \
|
||||
- [b]oot/grub2/{grub.conf,grub.cfg,menu.lst,device.map} \
|
||||
- [e]tc/sysconfig/grub [e]tc/sysconfig/bootloader \
|
||||
- [e]tc/lilo.conf \
|
||||
- [e]tc/yaboot.conf \
|
||||
- [e]tc/mtab [e]tc/fstab \
|
||||
- [e]tc/mtools.conf \
|
||||
- [e]tc/smartd.conf [e]tc/sysconfig/smartmontools \
|
||||
- [e]tc/sysconfig/rawdevices \
|
||||
- [e]tc/security/pam_mount.conf.xml [b]oot/efi/*/*/grub.cfg
|
||||
+# The variable expansion is deliberately not quoted in order to perform
|
||||
+# pathname expansion on the variable value.
|
||||
+for restored_file in $FILES_TO_PATCH_PATTERNS
|
||||
do
|
||||
# Silently skip directories and file not found:
|
||||
test -f "$restored_file" || continue
|
||||
diff --git a/usr/share/rear/finalize/GNU/Linux/280_migrate_uuid_tags.sh b/usr/share/rear/finalize/GNU/Linux/280_migrate_uuid_tags.sh
|
||||
index 074689a1..d994ce8e 100644
|
||||
--- a/usr/share/rear/finalize/GNU/Linux/280_migrate_uuid_tags.sh
|
||||
+++ b/usr/share/rear/finalize/GNU/Linux/280_migrate_uuid_tags.sh
|
||||
@@ -23,18 +23,9 @@ LogPrint "Migrating filesystem UUIDs in certain restored files in $TARGET_FS_ROO
|
||||
|
||||
local symlink_target=""
|
||||
local restored_file=""
|
||||
-# the funny [] around the first letter make sure that shopt -s nullglob removes this file from the list if it does not exist
|
||||
-# the files without a [] are mandatory, like fstab FIXME: but below there is [e]tc/fstab not etc/fstab - why?
|
||||
-for restored_file in [b]oot/{grub.conf,menu.lst,device.map} [e]tc/grub.* \
|
||||
- [b]oot/grub/{grub.conf,grub.cfg,menu.lst,device.map} \
|
||||
- [b]oot/grub2/{grub.conf,grub.cfg,menu.lst,device.map} \
|
||||
- [e]tc/sysconfig/grub [e]tc/sysconfig/bootloader \
|
||||
- [e]tc/lilo.conf [e]tc/elilo.conf \
|
||||
- [e]tc/mtab [e]tc/fstab \
|
||||
- [e]tc/mtools.conf \
|
||||
- [e]tc/smartd.conf [e]tc/sysconfig/smartmontools \
|
||||
- [e]tc/sysconfig/rawdevices \
|
||||
- [e]tc/security/pam_mount.conf.xml [b]oot/efi/*/*/grub.cfg
|
||||
+# The variable expansion is deliberately not quoted in order to perform
|
||||
+# pathname expansion on the variable value.
|
||||
+for restored_file in $FILES_TO_PATCH_PATTERNS
|
||||
do
|
||||
# Silently skip directories and file not found:
|
||||
test -f "$restored_file" || continue
|
||||
diff --git a/usr/share/rear/finalize/default/060_compare_files.sh b/usr/share/rear/finalize/default/060_compare_files.sh
|
||||
new file mode 100644
|
||||
index 00000000..6947fda9
|
||||
--- /dev/null
|
||||
+++ b/usr/share/rear/finalize/default/060_compare_files.sh
|
||||
@@ -0,0 +1,6 @@
|
||||
+if [ -e $VAR_DIR/layout/config/files.md5sum ] ; then
|
||||
+ if ! chroot $TARGET_FS_ROOT md5sum -c --quiet < $VAR_DIR/layout/config/files.md5sum 1>> >( tee -a "$RUNTIME_LOGFILE" 1>&7 ) 2>> >( tee -a "$RUNTIME_LOGFILE" 1>&8 ) ; then
|
||||
+ LogPrintError "Error: Restored files do not match the recreated system in $TARGET_FS_ROOT"
|
||||
+ return 1
|
||||
+ fi
|
||||
+fi
|
||||
diff --git a/usr/share/rear/layout/save/default/490_check_files_to_patch.sh b/usr/share/rear/layout/save/default/490_check_files_to_patch.sh
|
||||
new file mode 100644
|
||||
index 00000000..ee717063
|
||||
--- /dev/null
|
||||
+++ b/usr/share/rear/layout/save/default/490_check_files_to_patch.sh
|
||||
@@ -0,0 +1,43 @@
|
||||
+# FILES_TO_PATCH_PATTERNS is a space-separated list of shell glob patterns.
|
||||
+# Files that match are eligible for a final migration of UUIDs and other
|
||||
+# identifiers after recovery (if the layout recreation process has led
|
||||
+# to a change of an UUID or a device name and a corresponding change needs
|
||||
+# to be performed on restored configuration files ).
|
||||
+# See finalize/GNU/Linux/280_migrate_uuid_tags.sh
|
||||
+# We should add all such files to CHECK_CONFIG_FILES - if they change,
|
||||
+# we risk inconsistencies between the restored files and recreated layout,
|
||||
+# or failures of UUID migration.
|
||||
+
|
||||
+local file final_file symlink_target
|
||||
+
|
||||
+# The patterns are relative to /, change directory there
|
||||
+# so that the shell finds the files during pathname expansion
|
||||
+pushd / >/dev/null
|
||||
+# The variable expansion is deliberately not quoted in order to perform
|
||||
+# pathname expansion on the variable value.
|
||||
+for file in $FILES_TO_PATCH_PATTERNS ; do
|
||||
+ final_file="/$file"
|
||||
+ IsInArray "$final_file" "${CHECK_CONFIG_FILES[@]}" && continue
|
||||
+ # Symlink handling (partially from 280_migrate_uuid_tags.sh):
|
||||
+ # avoid dead symlinks, and symlinks to files on dynamic filesystems
|
||||
+ # ( /proc etc.) - they are expected to change and validating
|
||||
+ # their checksums has no sense
|
||||
+ if test -L "$final_file" ; then
|
||||
+ if symlink_target="$( readlink -e "$final_file" )" ; then
|
||||
+ # If the symlink target contains /proc/ /sys/ /dev/ or /run/ we skip it because then
|
||||
+ # the symlink target is considered to not be a restored file that needs to be patched
|
||||
+ # and thus we don't need to generate and check its hash, either
|
||||
+ # cf. https://github.com/rear/rear/pull/2047#issuecomment-464846777
|
||||
+ if echo $symlink_target | egrep -q '/proc/|/sys/|/dev/|/run/' ; then
|
||||
+ Log "Skip adding symlink $final_file target $symlink_target on /proc/ /sys/ /dev/ or /run/ to CHECK_CONFIG_FILES"
|
||||
+ continue
|
||||
+ fi
|
||||
+ Debug "Adding symlink $final_file with target $symlink_target to CHECK_CONFIG_FILES"
|
||||
+ else
|
||||
+ LogPrint "Skip adding dead symlink $final_file to CHECK_CONFIG_FILES"
|
||||
+ continue
|
||||
+ fi
|
||||
+ fi
|
||||
+ CHECK_CONFIG_FILES+=( "$final_file" )
|
||||
+done
|
||||
+popd >/dev/null
|
||||
diff --git a/usr/share/rear/layout/save/default/600_snapshot_files.sh b/usr/share/rear/layout/save/default/600_snapshot_files.sh
|
||||
index 0ebf197c..3ac6b07e 100644
|
||||
--- a/usr/share/rear/layout/save/default/600_snapshot_files.sh
|
||||
+++ b/usr/share/rear/layout/save/default/600_snapshot_files.sh
|
||||
@@ -3,7 +3,8 @@ if [ "$WORKFLOW" = "checklayout" ] ; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
-config_files=()
|
||||
+local obj
|
||||
+local config_files=()
|
||||
for obj in "${CHECK_CONFIG_FILES[@]}" ; do
|
||||
if [ -d "$obj" ] ; then
|
||||
config_files+=( $( find "$obj" -type f ) )
|
21
SOURCES/rear-bz2104005.patch
Normal file
21
SOURCES/rear-bz2104005.patch
Normal file
@ -0,0 +1,21 @@
|
||||
commit 40ec3bf072a51229e81bfbfa7cedb8a7c7902dbd
|
||||
Author: Johannes Meixner <jsmeix@suse.com>
|
||||
Date: Fri Jun 24 15:11:27 2022 +0200
|
||||
|
||||
Merge pull request #2827 from rear/jsmeix-fail-safe-yes-pipe-lvcreate
|
||||
|
||||
and commit b3fd58fc871e00bd713a0cb081de54d746ffffb3 from pull request #2839
|
||||
|
||||
diff --git a/usr/share/rear/layout/prepare/GNU/Linux/110_include_lvm_code.sh b/usr/share/rear/layout/prepare/GNU/Linux/110_include_lvm_code.sh
|
||||
index 1be17ba8..d34ab335 100644
|
||||
--- a/usr/share/rear/layout/prepare/GNU/Linux/110_include_lvm_code.sh
|
||||
+++ b/usr/share/rear/layout/prepare/GNU/Linux/110_include_lvm_code.sh
|
||||
@@ -263,7 +263,7 @@ $ifline
|
||||
|
||||
LogPrint "Creating LVM volume '$vg/$lvname'; Warning: some properties may not be preserved..."
|
||||
$warnraidline
|
||||
- lvm lvcreate $lvopts $vg <<<y
|
||||
+ lvm lvcreate -y $lvopts $vg
|
||||
|
||||
fi
|
||||
EOF
|
37
SOURCES/rear-bz2111049.patch
Normal file
37
SOURCES/rear-bz2111049.patch
Normal file
@ -0,0 +1,37 @@
|
||||
commit 1447530f502305ed08149d9b2a56a51fb91af875
|
||||
Author: Johannes Meixner <jsmeix@suse.com>
|
||||
Date: Wed May 25 13:51:14 2022 +0200
|
||||
|
||||
Merge pull request #2808 from rear/jsmeix-exclude-watchdog
|
||||
|
||||
Exclude dev/watchdog* from the ReaR recovery system:
|
||||
In default.conf add dev/watchdog* to COPY_AS_IS_EXCLUDE
|
||||
because watchdog functionality is not wanted in the recovery system
|
||||
because we do not want any automated reboot functionality
|
||||
while disaster recovery happens via "rear recover",
|
||||
see https://github.com/rear/rear/pull/2808
|
||||
Furthermore having a copy of dev/watchdog*
|
||||
during "rear mkrescue" in ReaR's build area
|
||||
may even trigger a system crash that is caused by a
|
||||
buggy TrendMicro ds_am module touching dev/watchdog
|
||||
in ReaR's build area (/var/tmp/rear.XXX/rootfs),
|
||||
see https://github.com/rear/rear/issues/2798
|
||||
|
||||
diff --git a/usr/share/rear/conf/default.conf b/usr/share/rear/conf/default.conf
|
||||
index 881a0af0..cb14da8b 100644
|
||||
--- a/usr/share/rear/conf/default.conf
|
||||
+++ b/usr/share/rear/conf/default.conf
|
||||
@@ -1414,7 +1414,12 @@ COPY_AS_IS=( $SHARE_DIR $VAR_DIR )
|
||||
# We let them being recreated by device mapper in the recovery system during the recovery process.
|
||||
# Copying them into the recovery system would let "rear recover" avoid the migration process.
|
||||
# See https://github.com/rear/rear/pull/1393 for details.
|
||||
-COPY_AS_IS_EXCLUDE=( $VAR_DIR/output/\* dev/.udev dev/shm dev/shm/\* dev/oracleasm dev/mapper )
|
||||
+# /dev/watchdog /dev/watchdog\* functionality is not wanted in the ReaR rescue/recovery system
|
||||
+# because we do not want any automated reboot while disaster recovery happens via "rear recover".
|
||||
+# Furthermore having dev/watchdog* during "rear mkrescue" may even trigger a system "crash" that is
|
||||
+# caused by TrendMicro ds_am module touching dev/watchdog in ReaR's build area (/var/tmp/rear.XXX/rootfs).
|
||||
+# See https://github.com/rear/rear/issues/2798
|
||||
+COPY_AS_IS_EXCLUDE=( $VAR_DIR/output/\* dev/.udev dev/shm dev/shm/\* dev/oracleasm dev/mapper dev/watchdog\* )
|
||||
# Array of user names that are trusted owners of files where RequiredSharedObjects calls ldd (cf. COPY_AS_IS)
|
||||
# and where a ldd test is run inside the recovery system that tests all binaries for 'not found' libraries.
|
||||
# The default is 'root' plus those standard system users that have a 'bin' or 'sbin' or 'root' home directory
|
105
SOURCES/rear-bz2111059.patch
Normal file
105
SOURCES/rear-bz2111059.patch
Normal file
@ -0,0 +1,105 @@
|
||||
commit 552dd6bfb20fdb3dc712b5243656d147392c27c3
|
||||
Author: Johannes Meixner <jsmeix@suse.com>
|
||||
Date: Thu Jun 2 15:25:52 2022 +0200
|
||||
|
||||
Merge pull request #2811 from rear/jsmeix-RECOVERY_COMMANDS
|
||||
|
||||
Add PRE_RECOVERY_COMMANDS and POST_RECOVERY_COMMANDS
|
||||
as alternative to PRE_RECOVERY_SCRIPT and POST_RECOVERY_SCRIPT
|
||||
see the description in default.conf how to use them and how they work.
|
||||
See https://github.com/rear/rear/pull/2811 and see also
|
||||
https://github.com/rear/rear/pull/2735 therein in particular
|
||||
https://github.com/rear/rear/pull/2735#issuecomment-1134686196
|
||||
Additionally use LogPrint to show the user the executed commands,
|
||||
see https://github.com/rear/rear/pull/2789
|
||||
|
||||
diff --git a/usr/share/rear/conf/default.conf b/usr/share/rear/conf/default.conf
|
||||
index cb14da8b..b14525da 100644
|
||||
--- a/usr/share/rear/conf/default.conf
|
||||
+++ b/usr/share/rear/conf/default.conf
|
||||
@@ -3117,14 +3117,37 @@ ELILO_BIN=
|
||||
################ ---- custom scripts
|
||||
#
|
||||
# NOTE: The scripts can be defined as an array to better handly spaces in parameters.
|
||||
-# The scripts are called like this: eval "${PRE_RECOVERY_SCRIPT[@]}"
|
||||
+# The scripts are called like this:
|
||||
+# eval "${PRE_RECOVERY_SCRIPT[@]}"
|
||||
+#
|
||||
+# Alternatively, commands can be executed by using the corresponding
|
||||
+# PRE_RECOVERY_COMMANDS and POST_RECOVERY_COMMANDS array variables
|
||||
+# which evaluate like this:
|
||||
+# for command in "${PRE_RECOVERY_COMMANDS[@]}" ; do
|
||||
+# eval "$command"
|
||||
+# done
|
||||
+#
|
||||
+# Using PRE_RECOVERY_COMMANDS and POST_RECOVERY_COMMANDS
|
||||
+# is simpler when multiple commands should be executed.
|
||||
+# For example,
|
||||
+# PRE_RECOVERY_SCRIPT=( 'echo Hello' ';' 'sleep 3' )
|
||||
+# can be rewritten as
|
||||
+# PRE_RECOVERY_COMMANDS=( 'echo Hello' 'sleep 3' )
|
||||
+# or
|
||||
+# PRE_RECOVERY_COMMANDS=( 'echo Hello' )
|
||||
+# PRE_RECOVERY_COMMANDS+=( 'sleep 3' )
|
||||
+
|
||||
+# Those get called at the very beginning of "rear recover".
|
||||
+# The PRE_RECOVERY_COMMANDS are called directly before the PRE_RECOVERY_SCRIPT.
|
||||
+# Nothing was recreated and you have only the plain ReaR rescue/recovery system:
|
||||
+PRE_RECOVERY_COMMANDS=()
|
||||
+PRE_RECOVERY_SCRIPT=
|
||||
|
||||
-# Call this after Relax-and-Recover did everything in the recover workflow.
|
||||
-# Use $TARGET_FS_ROOT (by default '/mnt/local') to refer to the recovered system.
|
||||
+# Those get called at the very end of "rear recover".
|
||||
+# The POST_RECOVERY_COMMANDS are called directly after the POST_RECOVERY_SCRIPT.
|
||||
+# Use $TARGET_FS_ROOT (by default '/mnt/local') to access the recreated target system.
|
||||
POST_RECOVERY_SCRIPT=
|
||||
-
|
||||
-# Call this before Relax-and-Recover starts to do anything in the recover workflow. You have the rescue system but nothing else
|
||||
-PRE_RECOVERY_SCRIPT=
|
||||
+POST_RECOVERY_COMMANDS=()
|
||||
|
||||
# PRE/POST Backup scripts will provide the ability to run certain tasks before and after a ReaR backup.
|
||||
# for example:
|
||||
diff --git a/usr/share/rear/setup/default/010_pre_recovery_script.sh b/usr/share/rear/setup/default/010_pre_recovery_script.sh
|
||||
index 005107cc..8b4e4a36 100644
|
||||
--- a/usr/share/rear/setup/default/010_pre_recovery_script.sh
|
||||
+++ b/usr/share/rear/setup/default/010_pre_recovery_script.sh
|
||||
@@ -1,4 +1,14 @@
|
||||
+
|
||||
+# The PRE_RECOVERY_COMMANDS are called directly before the PRE_RECOVERY_SCRIPT
|
||||
+# so PRE_RECOVERY_COMMANDS can also be used to prepare things for the PRE_RECOVERY_SCRIPT:
|
||||
+
|
||||
+local command
|
||||
+for command in "${PRE_RECOVERY_COMMANDS[@]}" ; do
|
||||
+ LogPrint "Running PRE_RECOVERY_COMMANDS '$command'"
|
||||
+ eval "$command"
|
||||
+done
|
||||
+
|
||||
if test "$PRE_RECOVERY_SCRIPT" ; then
|
||||
- Log "Running PRE_RECOVERY_SCRIPT '${PRE_RECOVERY_SCRIPT[@]}'"
|
||||
- eval "${PRE_RECOVERY_SCRIPT[@]}"
|
||||
+ LogPrint "Running PRE_RECOVERY_SCRIPT '${PRE_RECOVERY_SCRIPT[@]}'"
|
||||
+ eval "${PRE_RECOVERY_SCRIPT[@]}"
|
||||
fi
|
||||
diff --git a/usr/share/rear/wrapup/default/500_post_recovery_script.sh b/usr/share/rear/wrapup/default/500_post_recovery_script.sh
|
||||
index 77751800..866c9368 100644
|
||||
--- a/usr/share/rear/wrapup/default/500_post_recovery_script.sh
|
||||
+++ b/usr/share/rear/wrapup/default/500_post_recovery_script.sh
|
||||
@@ -1,4 +1,14 @@
|
||||
+
|
||||
+# The POST_RECOVERY_COMMANDS are called directly after the POST_RECOVERY_SCRIPT
|
||||
+# so POST_RECOVERY_COMMANDS can also be used to clean up things after the POST_RECOVERY_SCRIPT:
|
||||
+
|
||||
if test "$POST_RECOVERY_SCRIPT" ; then
|
||||
- Log "Running POST_RECOVERY_SCRIPT '${POST_RECOVERY_SCRIPT[@]}'"
|
||||
- eval "${POST_RECOVERY_SCRIPT[@]}"
|
||||
+ LogPrint "Running POST_RECOVERY_SCRIPT '${POST_RECOVERY_SCRIPT[@]}'"
|
||||
+ eval "${POST_RECOVERY_SCRIPT[@]}"
|
||||
fi
|
||||
+
|
||||
+local command
|
||||
+for command in "${POST_RECOVERY_COMMANDS[@]}" ; do
|
||||
+ LogPrint "Running POST_RECOVERY_COMMANDS '$command'"
|
||||
+ eval "$command"
|
||||
+done
|
39
SOURCES/rear-bz2119501.patch
Normal file
39
SOURCES/rear-bz2119501.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/usr/share/rear/build/default/490_fix_broken_links.sh b/usr/share/rear/build/default/490_fix_broken_links.sh
|
||||
index 5bace664..cf960be8 100644
|
||||
--- a/usr/share/rear/build/default/490_fix_broken_links.sh
|
||||
+++ b/usr/share/rear/build/default/490_fix_broken_links.sh
|
||||
@@ -7,6 +7,23 @@
|
||||
# see https://github.com/rear/rear/issues/1638
|
||||
# and https://github.com/rear/rear/pull/1734
|
||||
|
||||
+# Some broken symlinks are expected. The 'build' and 'source' symlinks in kernel modules point to kernel sources
|
||||
+# and are broken untol one installs the kernel-debug-devel or kernel-devel packages (on Fedora) and even then
|
||||
+# the targets are jot included in the rescue system by default.
|
||||
+# Do not warn about those, it is just noise.
|
||||
+local irrelevant_symlinks=( '*/lib/modules/*/build' '*/lib/modules/*/source' )
|
||||
+function symlink_is_irrelevant () {
|
||||
+ for i in "${irrelevant_symlinks[@]}"; do
|
||||
+ # do not quote $i, it is a glob pattern, matching will be performed by [[ ... == ... ]]
|
||||
+ # quoting inside [[ ]] prevents pattern matching
|
||||
+ if [[ "$1" == $i ]]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ done
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+
|
||||
# FIXME: The following code fails if symlinks or their targets contain characters from IFS (e.g. blanks),
|
||||
# cf. the same kind of comments in build/default/990_verify_rootfs.sh
|
||||
# and layout/prepare/GNU/Linux/130_include_mount_subvolumes_code.sh
|
||||
@@ -38,6 +55,10 @@ pushd $ROOTFS_DIR
|
||||
local broken_symlink=''
|
||||
local link_target=''
|
||||
for broken_symlink in $broken_symlinks ; do
|
||||
+ if symlink_is_irrelevant "$broken_symlink" ; then
|
||||
+ DebugPrint "Ignoring irrelevant broken symlink $broken_symlink"
|
||||
+ continue
|
||||
+ fi
|
||||
# For each broken symlink absolute path inside ROOTFS_DIR
|
||||
# we call "readlink -e" in the original system to get its link target there.
|
||||
# If in the original system there was a chain of symbolic links like
|
18
SOURCES/rear-bz2120736.patch
Normal file
18
SOURCES/rear-bz2120736.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/usr/share/rear/conf/default.conf b/usr/share/rear/conf/default.conf
|
||||
index b14525da..23a83b71 100644
|
||||
--- a/usr/share/rear/conf/default.conf
|
||||
+++ b/usr/share/rear/conf/default.conf
|
||||
@@ -1841,10 +1841,10 @@ OBDR_BLOCKSIZE=2048
|
||||
# BACKUP=NBU stuff (Symantec/Veritas NetBackup)
|
||||
##
|
||||
#
|
||||
-COPY_AS_IS_NBU=( /usr/openv/bin/vnetd /usr/openv/bin/vopied /usr/openv/lib /usr/openv/netbackup /usr/openv/var/auth/[mn]*.txt /opt/VRTSpbx /etc/vx/VxICS /etc/vx/vrtslog.conf )
|
||||
-COPY_AS_IS_EXCLUDE_NBU=( /usr/openv/netbackup/logs "/usr/openv/netbackup/bin/bpjava*" /usr/openv/netbackup/bin/xbp /usr/openv/netbackup/bin/private /usr/openv/lib/java /usr/openv/lib/shared/vddk /usr/openv/netbackup/baremetal )
|
||||
+COPY_AS_IS_NBU=( /usr/openv/bin/vnetd /usr/openv/bin/vopied /usr/openv/lib /usr/openv/netbackup /usr/openv/var/auth/[mn]*.txt /usr/openv/var/vxss /usr/openv/var/webtruststore /usr/openv/resources/nbpxyhelper /opt/VRTSpbx /etc/vx/VxICS /etc/vx/vrtslog.conf /var/log/VRTSpbx )
|
||||
+COPY_AS_IS_EXCLUDE_NBU=( "/usr/openv/netbackup/logs/*" "/usr/openv/netbackup/bin/bpjava*" /usr/openv/netbackup/bin/xbp /usr/openv/netbackup/bin/private /usr/openv/lib/java "/usr/openv/lib/*-plugins" /usr/openv/lib/shared/vddk /usr/openv/netbackup/baremetal "/var/log/VRTSpbx/*" )
|
||||
# See https://github.com/rear/rear/issues/2105 why /usr/openv/netbackup/sec/at/lib/ is needed:
|
||||
-NBU_LD_LIBRARY_PATH="/usr/openv/lib:/usr/openv/netbackup/sec/at/lib/"
|
||||
+NBU_LD_LIBRARY_PATH="/usr/openv/lib:/usr/openv/netbackup/sec/at/lib/:/usr/openv/lib/boost"
|
||||
PROGS_NBU=( )
|
||||
|
||||
##
|
@ -3,7 +3,7 @@
|
||||
Summary: Relax-and-Recover is a Linux disaster recovery and system migration tool
|
||||
Name: rear
|
||||
Version: 2.6
|
||||
Release: 4%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: GPLv3
|
||||
Group: Applications/File
|
||||
URL: http://relax-and-recover.org/
|
||||
@ -23,6 +23,13 @@ Patch38: rear-bz2049091.patch
|
||||
Patch39: rear-pr2675.patch
|
||||
Patch40: rear-bz2048454.patch
|
||||
Patch41: rear-bz2035939.patch
|
||||
Patch42: rear-bz2083272.patch
|
||||
Patch43: rear-bz2111049.patch
|
||||
Patch44: rear-bz2104005.patch
|
||||
Patch48: rear-bz2111059.patch
|
||||
Patch49: pxe-rsync-output.patch
|
||||
Patch50: rear-bz2119501.patch
|
||||
Patch51: rear-bz2120736.patch
|
||||
|
||||
### Dependencies on all distributions
|
||||
BuildRequires: asciidoc
|
||||
@ -56,7 +63,11 @@ Requires: dhcp-client
|
||||
#Requires: cfg2html
|
||||
|
||||
%ifarch x86_64 i686
|
||||
Requires: syslinux
|
||||
Requires: syslinux
|
||||
%endif
|
||||
%ifarch x86_64 i686 aarch64
|
||||
# We need mkfs.vfat for recreating EFI System Partition
|
||||
Recommends: dosfstools
|
||||
%endif
|
||||
%ifarch ppc ppc64
|
||||
Requires: yaboot
|
||||
@ -130,6 +141,13 @@ fi
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
%patch41 -p1
|
||||
%patch42 -p1
|
||||
%patch43 -p1
|
||||
%patch44 -p1
|
||||
%patch48 -p1
|
||||
%patch49 -p1
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
|
||||
echo "30 1 * * * root test -f /var/lib/rear/layout/disklayout.conf && /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue" >rear.cron
|
||||
|
||||
@ -163,6 +181,24 @@ TZ=UTC %{__make} -C doc
|
||||
%{_sbindir}/rear
|
||||
|
||||
%changelog
|
||||
* Wed Aug 24 2022 Pavel Cahyna <pcahyna@redhat.com> - 2.6-7
|
||||
- Avoid stderr message about irrelevant broken links
|
||||
- Changes for NetBackup (NBU) 9.x support
|
||||
|
||||
* Tue Aug 9 2022 Pavel Cahyna <pcahyna@redhat.com> - 2.6-6
|
||||
- Restore usr/share/rear/output/PXE/default/820_copy_to_net.sh
|
||||
removed in 2.4-19 with rsync refactor.
|
||||
It is still needed to use a rsync OUTPUT_URL when OUTPUT=PXE and BACKUP=RSYNC
|
||||
|
||||
* Mon Aug 8 2022 Pavel Cahyna <pcahyna@redhat.com> - 2.6-5
|
||||
- Apply PR2795 to detect changes in system files between backup
|
||||
and rescue image
|
||||
- Apply PR2808 to exclude dev/watchdog* from recovery system
|
||||
- Backport upstream PRs 2827 and 2839 to pass -y to lvcreate instead of one "y"
|
||||
on stdin
|
||||
- Apply PR2811 to add the PRE/POST_RECOVERY_COMMANDS directives
|
||||
- Recommend dosfstools on x86 and aarch64, needed for EFI System Partition
|
||||
|
||||
* Sun Feb 27 2022 Pavel Cahyna <pcahyna@redhat.com> - 2.6-4
|
||||
- Apply PR2675 to fix leftover temp dir bug (introduced in backported PR2625)
|
||||
- Apply PR2603 to ignore unused PV devices
|
||||
|
Loading…
Reference in New Issue
Block a user