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