Blame SOURCES/rear-tmpdir.patch

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