Extend tmpdir to wrapper scripts.
This commit is contained in:
parent
d9e1d7ced7
commit
60a8731613
41
mc-tmpdir-cwd.patch
Normal file
41
mc-tmpdir-cwd.patch
Normal file
@ -0,0 +1,41 @@
|
||||
--- a/Extends-TMPDIR_DEFAULT-to-mc-wrapper-scripts.patch
|
||||
+++ a/Extends-TMPDIR_DEFAULT-to-mc-wrapper-scripts.patch
|
||||
@@ -0,0 +1,38 @@
|
||||
+From e73f27b85de32a3a1cec751f13a06252b1f29bff Mon Sep 17 00:00:00 2001
|
||||
+From: poma <poma@gmail.com>
|
||||
+Date: Sat, 18 Mar 2017 12:09:52 -0400
|
||||
+Subject: [PATCH] Extends TMPDIR_DEFAULT to mc-wrapper scripts,
|
||||
+ resolves exit to mc's current working directory.
|
||||
+
|
||||
+---
|
||||
+ contrib/mc-wrapper.csh.in | 2 +-
|
||||
+ contrib/mc-wrapper.sh.in | 2 +-
|
||||
+ 2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
+
|
||||
+diff --git a/contrib/mc-wrapper.csh.in b/contrib/mc-wrapper.csh.in
|
||||
+index fdf2e1f..ec23784 100644
|
||||
+--- a/contrib/mc-wrapper.csh.in
|
||||
++++ b/contrib/mc-wrapper.csh.in
|
||||
+@@ -3,7 +3,7 @@ set MC_USER="`id | sed 's/[^(]*(//;s/).*//'`"
|
||||
+ 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" $*
|
||||
+diff --git a/contrib/mc-wrapper.sh.in b/contrib/mc-wrapper.sh.in
|
||||
+index 773bbd1..26ab673 100644
|
||||
+--- a/contrib/mc-wrapper.sh.in
|
||||
++++ b/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
|
||||
+--
|
||||
+2.12.0
|
||||
+
|
7
mc.spec
7
mc.spec
@ -3,7 +3,7 @@
|
||||
Summary: User-friendly text console file manager and visual shell
|
||||
Name: mc
|
||||
Version: 4.8.19
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv3+
|
||||
URL: http://www.midnight-commander.org/
|
||||
@ -11,6 +11,7 @@ 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
|
||||
Patch1: mc-tmpdir-cwd.patch
|
||||
BuildRequires: aspell-devel
|
||||
BuildRequires: e2fsprogs-devel
|
||||
BuildRequires: glib2-devel
|
||||
@ -29,6 +30,7 @@ view tar and zip files, and to poke into RPMs for specific files.
|
||||
|
||||
%prep
|
||||
%autosetup -p0
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
@ -81,6 +83,9 @@ install contrib/mc.{sh,csh} %{buildroot}%{_sysconfdir}/profile.d
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Mon May 15 2017 Gwyn Ciesla <limburgher@gmail.com> - 1:4.8.19-4
|
||||
- Patch to fix tmpdir default, wrapper scripts.
|
||||
|
||||
* Fri May 05 2017 Gwyn Ciesla <limburgher@gmail.com> - 1:4.8.19-3
|
||||
- Fix conditional.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user