Patch fix.
This commit is contained in:
parent
60a8731613
commit
b117b15c1b
20
Extends-TMPDIR_DEFAULT-to-mc-wrapper-scripts.patch
Normal file
20
Extends-TMPDIR_DEFAULT-to-mc-wrapper-scripts.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- contrib/mc-wrapper.csh.in~ 2017-02-24 14:25:57.000000000 -0600
|
||||
+++ contrib/mc-wrapper.csh.in 2017-05-17 07:39:06.830108548 -0500
|
||||
@@ -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" $*
|
||||
--- contrib/mc-wrapper.sh.in~ 2017-02-24 14:25:57.000000000 -0600
|
||||
+++ contrib/mc-wrapper.sh.in 2017-05-17 07:38:48.348215251 -0500
|
||||
@@ -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
|
@ -1,41 +0,0 @@
|
||||
--- 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
|
||||
+
|
8
mc.spec
8
mc.spec
@ -3,7 +3,7 @@
|
||||
Summary: User-friendly text console file manager and visual shell
|
||||
Name: mc
|
||||
Version: 4.8.19
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv3+
|
||||
URL: http://www.midnight-commander.org/
|
||||
@ -11,7 +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
|
||||
Patch1: Extends-TMPDIR_DEFAULT-to-mc-wrapper-scripts.patch
|
||||
BuildRequires: aspell-devel
|
||||
BuildRequires: e2fsprogs-devel
|
||||
BuildRequires: glib2-devel
|
||||
@ -30,7 +30,6 @@ view tar and zip files, and to poke into RPMs for specific files.
|
||||
|
||||
%prep
|
||||
%autosetup -p0
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
@ -83,6 +82,9 @@ install contrib/mc.{sh,csh} %{buildroot}%{_sysconfdir}/profile.d
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Wed May 17 2017 Gwyn Ciesla <limburgher@gmail.com> - 1:4.8.19-5
|
||||
- Apply correct patch.
|
||||
|
||||
* Mon May 15 2017 Gwyn Ciesla <limburgher@gmail.com> - 1:4.8.19-4
|
||||
- Patch to fix tmpdir default, wrapper scripts.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user