diff --git a/rear-luks-key-bz2228779.patch b/rear-luks-key-bz2228779.patch new file mode 100644 index 0000000..56559d9 --- /dev/null +++ b/rear-luks-key-bz2228779.patch @@ -0,0 +1,25 @@ +commit 2aa7b47354bdf5863071c8b479d29c99aad05ecb +Author: Johannes Meixner +Date: Fri Jul 24 13:02:45 2020 +0200 + + Update 240_reassign_luks_keyfiles.sh + + Use ReaR specific TMP_DIR (not TMPDIR or hardcoded /tmp) + +diff --git a/usr/share/rear/finalize/GNU/Linux/240_reassign_luks_keyfiles.sh b/usr/share/rear/finalize/GNU/Linux/240_reassign_luks_keyfiles.sh +index d989c3fb..358f3950 100644 +--- a/usr/share/rear/finalize/GNU/Linux/240_reassign_luks_keyfiles.sh ++++ b/usr/share/rear/finalize/GNU/Linux/240_reassign_luks_keyfiles.sh +@@ -24,9 +24,9 @@ awk ' + while read target_name source_device original_keyfile; do + Log "Re-assigning keyfile $original_keyfile to LUKS device $target_name ($source_device)" + +- # The scheme for generating a temporary keyfile path must be the same here and in the 'layout/prepare' stage. +- temp_keyfile="${TMPDIR:-/tmp}/LUKS-keyfile-$target_name" +- [ -f "$temp_keyfile" ] || BugError "temporary keyfile $temp_keyfile not found" ++ # The scheme for generating a temporary keyfile path must be the same here and in the 'layout/prepare' stage: ++ temp_keyfile="$TMP_DIR/LUKS-keyfile-$target_name" ++ test -f "$temp_keyfile" || BugError "temporary LUKS keyfile $temp_keyfile not found" + + target_keyfile="$TARGET_FS_ROOT/$original_keyfile" + diff --git a/rear.spec b/rear.spec index ec84188..2b221b6 100644 --- a/rear.spec +++ b/rear.spec @@ -47,6 +47,7 @@ Patch56: s390-no-clobber-disks.patch Patch57: rear-bz2188593-nbu-systemd.patch Patch58: rear-device-shrinking-bz2223895.patch Patch59: rear-usb-uefi-part-size-bz2228402.patch +Patch60: rear-luks-key-bz2228779.patch # rear contains only bash scripts plus documentation so that on first glance it could be "BuildArch: noarch" # but actually it is not "noarch" because it only works on those architectures that are explicitly supported.