[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 12095de 2/2: Some Tramp fixes
From: |
Michael Albinus |
Subject: |
master 12095de 2/2: Some Tramp fixes |
Date: |
Wed, 27 Jan 2021 10:31:00 -0500 (EST) |
branch: master
commit 12095de8b918b3c44c603bf88bc98f1842910f86
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
Some Tramp fixes
* doc/misc/tramp.texi (GVFS-based methods): Ban sftp RemoteCommand
option.
* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file)
(tramp-adb-handle-rename-file): Avoid calling jka-compr when
writing the target file.
* lisp/net/tramp-sh.el (tramp-sh-handle-file-ownership-preserved-p):
Skip GROUP test on *BSD machines.
* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory-one-file):
Skip for tamp-crypt.el.
(tramp--test-sh-no-ls--dired-p): Ignore errors.
---
doc/misc/tramp.texi | 3 +++
lisp/net/tramp-adb.el | 10 ++++++++--
lisp/net/tramp-sh.el | 6 ++++++
test/lisp/net/tramp-tests.el | 6 +++++-
4 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 5d89b06..efe8395 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -1286,6 +1286,9 @@ This method uses @command{sftp} in order to securely
access remote
hosts. @command{sftp} is a more secure option for connecting to hosts
that for security reasons refuse @command{ssh} connections.
+When there is a respective entry in your @command{ssh} configuration,
+do @emph{not} set the @option{RemoteCommand} option.
+
@end table
@defopt tramp-gvfs-methods
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 2c4ef2a..73dffe1 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -636,7 +636,10 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(copy-directory filename newname keep-date t)
(let ((t1 (tramp-tramp-file-p filename))
- (t2 (tramp-tramp-file-p newname)))
+ (t2 (tramp-tramp-file-p newname))
+ ;; We don't want the target file to be compressed, so we
+ ;; let-bind `jka-compr-inhibit' to t.
+ (jka-compr-inhibit t))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
(tramp-error
@@ -717,7 +720,10 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(delete-directory filename 'recursive))
(let ((t1 (tramp-tramp-file-p filename))
- (t2 (tramp-tramp-file-p newname)))
+ (t2 (tramp-tramp-file-p newname))
+ ;; We don't want the target file to be compressed, so we
+ ;; let-bind `jka-compr-inhibit' to t.
+ (jka-compr-inhibit t))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(unless (file-exists-p filename)
(tramp-error
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ed3d153..2274efd 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1708,6 +1708,12 @@ ID-FORMAT valid values are `string' and `integer'."
(= (tramp-compat-file-attribute-user-id attributes)
(tramp-get-remote-uid v 'integer))
(or (not group)
+ ;; On BSD-derived systems files always inherit the
+ ;; parent directory's group, so skip the group-gid
+ ;; test.
+ (string-match-p
+ "BSD\\|DragonFly\\|Darwin"
+ (tramp-get-connection-property v "uname" ""))
(= (tramp-compat-file-attribute-group-id attributes)
(tramp-get-remote-gid v 'integer)))))))))
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 7757c55..6467c7e 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3192,6 +3192,8 @@ This tests also `file-directory-p' and
`file-accessible-directory-p'."
(ert-deftest tramp-test17-insert-directory-one-file ()
"Check `insert-directory' inside directory listing."
(skip-unless (tramp--test-enabled))
+ ;; Relative file names in dired are not supported in tramp-crypt.el.
+ (skip-unless (not (tramp--test-crypt-p)))
(dolist (quoted (if (tramp--test-expensive-test) '(nil t) '(nil)))
(let* ((tmp-name1
@@ -5793,7 +5795,9 @@ Additionally, ls does not support \"--dired\"."
(and (tramp--test-sh-p)
(with-temp-buffer
;; We must refill the cache. `insert-directory' does it.
- (insert-directory tramp-test-temporary-file-directory "-al")
+ ;; This fails for tramp-crypt.el, so we ignore that.
+ (ignore-errors
+ (insert-directory tramp-test-temporary-file-directory "-al"))
(not (tramp-get-connection-property tramp-test-vec "ls--dired" nil)))))
(defun tramp--test-share-p ()