Blame SOURCES/rear-tmpdir.patch

b9f7b3
diff --git a/usr/share/rear/conf/default.conf b/usr/share/rear/conf/default.conf
b9f7b3
index 9ada92c3..3bdb5497 100644
b9f7b3
--- a/usr/share/rear/conf/default.conf
b9f7b3
+++ b/usr/share/rear/conf/default.conf
b9f7b3
@@ -57,10 +57,16 @@
b9f7b3
 #
b9f7b3
 # where /prefix/for/rear/working/directory must already exist.
b9f7b3
 # This is useful for example when there is not sufficient free space
b9f7b3
-# in /tmp or $TMPDIR for the ISO image or even the backup archive.
b9f7b3
-# TMPDIR cannot be set to a default value here, otherwise /usr/sbin/rear
b9f7b3
+# in /var/tmp or $TMPDIR for the ISO image or even the backup archive.
b9f7b3
+# TMPDIR cannot be set to a default value here unconditionally but only
b9f7b3
+# if it is not set before calling the program, otherwise /usr/sbin/rear
b9f7b3
 # would not work in compliance with the Linux/Unix standards regarding TMPDIR
b9f7b3
 # see https://github.com/rear/rear/issues/968
b9f7b3
+# The default is /var/tmp instead of the more usual /tmp (the system default),
b9f7b3
+# because /tmp is not intended for such large amounts of data that ReaR usually
b9f7b3
+# produces when creating the image (see file-hierarchy(7)). In particular,
b9f7b3
+# /tmp can be a tmpfs, and thus restricted by the available RAM/swap.
b9f7b3
+export TMPDIR="${TMPDIR-/var/tmp}"
b9f7b3
 
b9f7b3
 ##
b9f7b3
 # ROOT_HOME_DIR
b9f7b3
diff --git a/usr/share/rear/rescue/GNU/Linux/600_unset_TMPDIR_in_rescue_conf.sh b/usr/share/rear/rescue/GNU/Linux/600_unset_TMPDIR_in_rescue_conf.sh
b9f7b3
deleted file mode 100644
b9f7b3
index 84d0cabb..00000000
b9f7b3
--- a/usr/share/rear/rescue/GNU/Linux/600_unset_TMPDIR_in_rescue_conf.sh
b9f7b3
+++ /dev/null
b9f7b3
@@ -1,8 +0,0 @@
b9f7b3
-cat - <<EOF >> "$ROOTFS_DIR/etc/rear/rescue.conf"
b9f7b3
-# TMPDIR variable may be defined in local.conf file as prefix dir for mktemp command
b9f7b3
-# e.g. by defining TMPDIR=/var we would get our BUILD_DIR=/var/tmp/rear.XXXXXXXXXXXX
b9f7b3
-# However, in rescue we want our BUILD_DIR=/tmp/rear.XXXXXXX as we are not sure that
b9f7b3
-# the user defined TMPDIR would exist in our rescue image
b9f7b3
-# by 'unset TMPDIR' we achieve above goal (as rescue.conf is read after local.conf)!
b9f7b3
-unset TMPDIR
b9f7b3
-EOF