* Recent stat from coreutils could break Tramp
@ 2016-05-05 8:43 Michael Albinus
2016-05-05 17:51 ` John Wiegley
0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2016-05-05 8:43 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 630 bytes --]
Hi,
I've just installed the appended patch to the master branch as
6aad36ace9953b9672b13be68416d205532d5e59. The problem is, that the stat
program has changed its output format; it will break Tramp for some
special characters in file names. It's a pity that this has been shown
such late; it came to me after upgrading my development machine to
Ubuntu 16.04.
I've reported the problem to the coreutils maintainers as bug#23422, and
they promised to fix it. However, the current tramp-tests.el reports a
failed test.
The fix is very simple. Shall I backport (cherrypick) it also to the
emacs-25 branch?
Best regards, Michael.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1370 bytes --]
*** /usr/local/src/emacs/lisp/net/tramp-sh.el.~6e790b71efae6003b9fa701a8630ee69e0a94294~ 2016-05-05 10:40:11.455293200 +0200
--- /usr/local/src/emacs/lisp/net/tramp-sh.el 2016-05-05 10:19:50.567195614 +0200
***************
*** 5430,5442 ****
vec "stat" (tramp-get-remote-path vec)))
tmp)
;; Check whether stat(1) returns usable syntax. "%s" does not
! ;; work on older AIX systems.
(when result
(setq tmp
(tramp-send-command-and-read
vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
(unless (and (listp tmp) (stringp (car tmp))
! (string-match "^./.$" (car tmp))
(integerp (cadr tmp)))
(setq result nil)))
result)))
--- 5430,5444 ----
vec "stat" (tramp-get-remote-path vec)))
tmp)
;; Check whether stat(1) returns usable syntax. "%s" does not
! ;; work on older AIX systems. Recent GNU stat versions (8.24?)
! ;; use shell quoted format for "%N", we check the boundaries "`"
! ;; and "'", therefore. See Bug#23422 in coreutils.
(when result
(setq tmp
(tramp-send-command-and-read
vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
(unless (and (listp tmp) (stringp (car tmp))
! (string-match "^`/'$" (car tmp))
(integerp (cadr tmp)))
(setq result nil)))
result)))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Recent stat from coreutils could break Tramp
2016-05-05 8:43 Recent stat from coreutils could break Tramp Michael Albinus
@ 2016-05-05 17:51 ` John Wiegley
2016-05-06 6:20 ` Michael Albinus
0 siblings, 1 reply; 3+ messages in thread
From: John Wiegley @ 2016-05-05 17:51 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel
>>>>> Michael Albinus <michael.albinus@gmx.de> writes:
> The fix is very simple. Shall I backport (cherrypick) it also to the
> emacs-25 branch?
This looks good for emacs-25.
--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Recent stat from coreutils could break Tramp
2016-05-05 17:51 ` John Wiegley
@ 2016-05-06 6:20 ` Michael Albinus
0 siblings, 0 replies; 3+ messages in thread
From: Michael Albinus @ 2016-05-06 6:20 UTC (permalink / raw)
To: emacs-devel
John Wiegley <jwiegley@gmail.com> writes:
>>>>>> Michael Albinus <michael.albinus@gmx.de> writes:
>
>> The fix is very simple. Shall I backport (cherrypick) it also to the
>> emacs-25 branch?
>
> This looks good for emacs-25.
Done.
Best regards, Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-05-06 6:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-05 8:43 Recent stat from coreutils could break Tramp Michael Albinus
2016-05-05 17:51 ` John Wiegley
2016-05-06 6:20 ` Michael Albinus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.