- merge Extends-TMPDIR_DEFAULT-to-mc-wrapper-scripts patch into tmpdir

This commit is contained in:
Tomasz Kłoczko 2018-06-07 15:49:30 +01:00
parent 61ac9c8f11
commit 52007fae00
2 changed files with 25 additions and 8 deletions

View File

@ -1,6 +1,6 @@
--- lib/global.h~ 2016-09-22 20:24:12.000000000 +0200 --- mc-4.8.21/lib/global.h~
+++ lib/global.h 2016-12-09 11:34:47.376367101 +0100 +++ mc-4.8.21/lib/global.h
@@ -125,7 +125,7 @@ @@ -131,7 +131,7 @@
#define PATH_SEP_STR "/" #define PATH_SEP_STR "/"
#define IS_PATH_SEP(c) ((c) == PATH_SEP) #define IS_PATH_SEP(c) ((c) == PATH_SEP)
#define PATH_ENV_SEP ':' #define PATH_ENV_SEP ':'
@ -8,4 +8,24 @@
+#define TMPDIR_DEFAULT "/var/tmp" +#define TMPDIR_DEFAULT "/var/tmp"
#define SCRIPT_SUFFIX "" #define SCRIPT_SUFFIX ""
#define get_default_editor() "vi" #define get_default_editor() "vi"
#define OS_SORT_CASE_SENSITIVE_DEFAULT 1 #define OS_SORT_CASE_SENSITIVE_DEFAULT TRUE
--- mc-4.8.22/contrib/mc-wrapper.csh.in~
+++ mc-4.8.22/contrib/mc-wrapper.csh.in
@@ -3,7 +3,7 @@
if ($?TMPDIR) then
setenv MC_PWD_FILE $TMPDIR/mc-$MC_USER/mc.pwd.$$
else
- setenv MC_PWD_FILE /tmp/mc-$MC_USER/mc.pwd.$$
+ setenv MC_PWD_FILE /var/tmp/mc-$MC_USER/mc.pwd.$$
endif
@bindir@/mc -P "$MC_PWD_FILE" $*
--- mc-4.8.22/contrib/mc-wrapper.sh.in~
+++ mc-4.8.22/contrib/mc-wrapper.sh.in
@@ -1,5 +1,5 @@
MC_USER=`id | sed 's/[^(]*(//;s/).*//'`
-MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"
+MC_PWD_FILE="${TMPDIR-/var/tmp}/mc-$MC_USER/mc.pwd.$$"
@bindir@/mc -P "$MC_PWD_FILE" "$@"
if test -r "$MC_PWD_FILE"; then

View File

@ -8,10 +8,7 @@ Epoch: 1
License: GPLv3+ License: GPLv3+
URL: http://www.midnight-commander.org/ URL: http://www.midnight-commander.org/
Source0: http://www.midnight-commander.org/downloads/mc-%{version}.tar.xz Source0: http://www.midnight-commander.org/downloads/mc-%{version}.tar.xz
# Downstream-only patch to make mc use /var/tmp for large temporary
# files. See also: https://bugzilla.redhat.com/show_bug.cgi?id=895444
Patch0: %{name}-tmpdir.patch Patch0: %{name}-tmpdir.patch
Patch1: Extends-TMPDIR_DEFAULT-to-mc-wrapper-scripts.patch
BuildRequires: aspell-devel BuildRequires: aspell-devel
BuildRequires: e2fsprogs-devel BuildRequires: e2fsprogs-devel
BuildRequires: glib2-devel BuildRequires: glib2-devel
@ -29,7 +26,7 @@ mouse support. Midnight Commander's best features are its ability to FTP,
view tar and zip files, and to poke into RPMs for specific files. view tar and zip files, and to poke into RPMs for specific files.
%prep %prep
%autosetup -p0 %autosetup -p1
%build %build
%configure \ %configure \