]> git.eshelyaron.com Git - emacs.git/commitdiff
Some Tramp fixes
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 27 Jan 2021 15:30:49 +0000 (16:30 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 27 Jan 2021 15:30:49 +0000 (16:30 +0100)
* 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
lisp/net/tramp-adb.el
lisp/net/tramp-sh.el
test/lisp/net/tramp-tests.el

index 5d89b065882f830da40f58289f9d9f141464e222..efe839574d2bdfa6ed4ca11d0c93fc1769bdd421 100644 (file)
@@ -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
index 2c4ef2acaef462771925f31a973976a712e8f943..73dffe1d64f447e6a5ca2e63724429ffa00ee4f0 100644 (file)
@@ -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
index ed3d15377c3ddc47643833e0c0960ff981da9edc..2274efdf8b5670ae7ca838d9bcad30d178ec4712 100644 (file)
@@ -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)))))))))
 
index 7757c55c16b259185fd1fc52767dc8a17dddbd7e..6467c7ee219aa93fb994ad459c97fa0e87295229 100644 (file)
@@ -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 ()