emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/tramp ad1b28dca7: Tramp ELPA version 2.5.2.3 released


From: ELPA Syncer
Subject: [elpa] externals/tramp ad1b28dca7: Tramp ELPA version 2.5.2.3 released
Date: Wed, 30 Mar 2022 04:57:57 -0400 (EDT)

branch: externals/tramp
commit ad1b28dca70c70cd4c317dcb606c92dfb436ccee
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Tramp ELPA version 2.5.2.3 released
---
 README              |  4 ++--
 test/tramp-tests.el | 17 +++++++++++++----
 texi/trampver.texi  |  2 +-
 tramp-archive.el    |  4 +++-
 tramp-sh.el         | 30 +++++++++++++++++++++---------
 tramp-smb.el        |  4 +++-
 tramp-sshfs.el      |  1 +
 tramp.el            | 27 ++++++++++++++++-----------
 trampver.el         |  6 +++---
 9 files changed, 63 insertions(+), 32 deletions(-)

diff --git a/README b/README
index 5ed2c3efa8..53816c8b85 100644
--- a/README
+++ b/README
@@ -22,11 +22,11 @@ installed with, you must recompile the package:
 
    * Remove all byte-compiled Tramp files
 
-          $ rm -f ~/.emacs.d/elpa/tramp-2.5.2.2/tramp*.elc
+          $ rm -f ~/.emacs.d/elpa/tramp-2.5.2.3/tramp*.elc
 
    * Start Emacs with Tramp's source files
 
-          $ emacs -L ~/.emacs.d/elpa/tramp-2.5.2.2 -l tramp
+          $ emacs -L ~/.emacs.d/elpa/tramp-2.5.2.3 -l tramp
 
      This should not give you the error.
 
diff --git a/test/tramp-tests.el b/test/tramp-tests.el
index 42d4b9c43f..8b999a6e34 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -4762,7 +4762,9 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
 
 (ert-deftest tramp-test30-make-process ()
   "Check `make-process'."
-  :tags '(:expensive-test :tramp-asynchronous-processes)
+  :tags (append '(:expensive-test :tramp-asynchronous-processes)
+               (and (getenv "EMACS_EMBA_CI")
+                     '(:unstable)))
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
   ;; `make-process' supports file name handlers since Emacs 27.
@@ -6992,7 +6994,9 @@ This is needed in timer functions as well as process 
filters and sentinels."
 Such requests could arrive from timers, process filters and
 process sentinels.  They shall not disturb each other."
   :tags (append '(:expensive-test :tramp-asynchronous-processes)
-               (and (getenv "EMACS_HYDRA_CI") '(:unstable)))
+               (and (or (getenv "EMACS_HYDRA_CI")
+                         (getenv "EMACS_EMBA_CI"))
+                     '(:unstable)))
   (skip-unless (tramp--test-enabled))
   (skip-unless (tramp--test-supports-processes-p))
   ;; Prior Emacs 27, `shell-file-name' was hard coded as "/bin/sh" for
@@ -7306,7 +7310,6 @@ process sentinels.  They shall not disturb each other."
   "Check that Tramp and its subpackages unload completely.
 Since it unloads Tramp, it shall be the last test to run."
   :tags '(:expensive-test)
-  (skip-unless noninteractive)
   ;; The autoloaded Tramp objects are different since Emacs 26.1.  We
   ;; cannot test older Emacsen, therefore.
   (skip-unless (tramp--test-emacs26-p))
@@ -7376,7 +7379,13 @@ Since it unloads Tramp, it shall be the last test to 
run."
             (and (string-match-p "^tramp" (symbol-name fun))
                  (ert-fail
                   (format "Function `%s' still contains Tramp advice" x))))
-          x)))))
+          x))))
+
+  ;; Reload.
+  (require 'tramp)
+  (require 'tramp-archive)
+  (should (featurep 'tramp))
+  (should (featurep 'tramp-archive)))
 
 (defun tramp-test-all (&optional interactive)
   "Run all tests for \\[tramp].
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 583c3a1df2..2c673cee8d 100644
--- a/texi/trampver.texi
+++ b/texi/trampver.texi
@@ -8,7 +8,7 @@
 @c In the Tramp GIT, the version numbers are auto-frobbed from
 @c tramp.el, and the bug report address is auto-frobbed from
 @c configure.ac.
-@set trampver 2.5.2.2
+@set trampver 2.5.2.3
 @set trampurl https://www.gnu.org/software/tramp/
 @set tramp-bug-report-address tramp-devel@@gnu.org
 @set emacsver 25.1
diff --git a/tramp-archive.el b/tramp-archive.el
index 77700dc9a0..22390ef45b 100644
--- a/tramp-archive.el
+++ b/tramp-archive.el
@@ -370,7 +370,9 @@ arguments to pass to the OPERATION."
 ;;;###autoload
 (progn (defun tramp-register-archive-file-name-handler ()
   "Add archive file name handler to `file-name-handler-alist'."
-  (when tramp-archive-enabled
+  (when (and tramp-archive-enabled
+             (not
+              (rassq #'tramp-archive-file-name-handler 
file-name-handler-alist)))
     (add-to-list 'file-name-handler-alist
                 (cons (tramp-archive-autoload-file-name-regexp)
                       #'tramp-archive-autoload-file-name-handler))
diff --git a/tramp-sh.el b/tramp-sh.el
index 33ff0dabfa..54fb539a56 100644
--- a/tramp-sh.el
+++ b/tramp-sh.el
@@ -2664,7 +2664,9 @@ The method used must be an out-of-band method."
          ;; Try to insert the amount of free space.
          (goto-char (point-min))
          ;; First find the line to put it on.
-         (when (re-search-forward "^\\([[:space:]]*total\\)" nil t)
+         (when (and (re-search-forward "^\\([[:space:]]*total\\)" nil t)
+                    ;; Emacs 29.1 or later.
+                    (not (fboundp 'dired--insert-disk-space)))
            (when-let ((available (get-free-disk-space ".")))
              ;; Replace "total" with "total used", to avoid confusion.
              (replace-match "\\1 used in directory")
@@ -2818,8 +2820,10 @@ implementation will be used."
                               (string-match-p "sh$" program)
                               (= (length args) 2)
                               (string-equal "-c" (car args))
-                              ;; Don't if there is a string.
-                              (not (string-match-p "'\\|\"" (cadr args)))))
+                              ;; Don't if there is a quoted string.
+                              (not (string-match-p "'\\|\"" (cadr args)))
+                              ;; Check, that /dev/tty is usable.
+                              (tramp-get-remote-dev-tty v)))
                 ;; When PROGRAM is nil, we just provide a tty.
                 (args (if (not heredoc) args
                         (let ((i 250))
@@ -4094,13 +4098,10 @@ file exists and nonzero exit status otherwise."
     ;; The algorithm is as follows: we try a list of several commands.
     ;; For each command, we first run `$cmd /' -- this should return
     ;; true, as the root directory always exists.  And then we run
-    ;; `$cmd /this\ file\ does\ not\ exist ', hoping that the file indeed
-    ;; does not exist.  This should return false.  We use the first
-    ;; command we find that seems to work.
+    ;; `$cmd /\ this\ file\ does\ not\ exist\ ', hoping that the file
+    ;; indeed does not exist.  This should return false.  We use the
+    ;; first command we find that seems to work.
     ;; The list of commands to try is as follows:
-    ;; `ls -d'            This works on most systems, but NetBSD 1.4
-    ;;                    has a bug: `ls' always returns zero exit
-    ;;                    status, even for files which don't exist.
     ;; `test -e'          Some Bourne shells have a `test' builtin
     ;;                    which does not know the `-e' option.
     ;; `/bin/test -e'     For those, the `test' binary on disk normally
@@ -4108,6 +4109,10 @@ file exists and nonzero exit status otherwise."
     ;;                    is sometimes `/bin/test' and sometimes it's
     ;;                    `/usr/bin/test'.
     ;; `/usr/bin/test -e' In case `/bin/test' does not exist.
+    ;; `ls -d'            This works on most systems, but NetBSD 1.4
+    ;;                    has a bug: `ls' always returns zero exit
+    ;;                    status, even for files which don't exist.
+
     (unless (or
             (ignore-errors
               (and (setq result (format "%s -e" (tramp-get-test-command vec)))
@@ -4840,6 +4845,7 @@ connection if a previous connection has died for some 
reason."
     ;; If Tramp opens the same connection within a short time frame,
     ;; there is a problem.  We shall signal this.
     (unless (or (process-live-p p)
+                (and (processp p) (not non-essential))
                (not (tramp-file-name-equal-p
                      vec (car tramp-current-connection)))
                (time-less-p
@@ -5816,6 +5822,12 @@ This command is returned only if 
`delete-by-moving-to-trash' is non-nil."
                   command))
        (delete-file tmpfile)))))
 
+(defun tramp-get-remote-dev-tty (vec)
+  "Check, whether remote /dev/tty is usable."
+  (with-tramp-connection-property vec "dev-tty"
+    (tramp-send-command-and-check
+     vec "echo </dev/tty")))
+
 ;; Some predefined connection properties.
 (defun tramp-get-inline-compress (vec prop size)
   "Return the compress command related to PROP.
diff --git a/tramp-smb.el b/tramp-smb.el
index 8e9af673e1..2aaa6e8ab3 100644
--- a/tramp-smb.el
+++ b/tramp-smb.el
@@ -1126,7 +1126,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
          ;; Insert size information.
          (when full-directory-p
            (insert
-            (if avail
+            (if (and avail
+                     ;; Emacs 29.1 or later.
+                     (not (fboundp 'dired--insert-disk-space)))
                 (format "total used in directory %s available %s\n" used avail)
               (format "total %s\n" used))))
 
diff --git a/tramp-sshfs.el b/tramp-sshfs.el
index 17a8be5c3e..b229f58924 100644
--- a/tramp-sshfs.el
+++ b/tramp-sshfs.el
@@ -51,6 +51,7 @@
  (add-to-list 'tramp-methods
              `(,tramp-sshfs-method
                (tramp-mount-args            (("-C") ("-p" "%p")
+                                             ("-o" "dir_cache=no")
                                              ("-o" "transform_symlinks")
                                              ("-o" "idmap=user,reconnect")))
                ;; These are for remote processes.
diff --git a/tramp.el b/tramp.el
index 1f64a9eb53..a24d83f876 100644
--- a/tramp.el
+++ b/tramp.el
@@ -185,7 +185,7 @@ See the variable `tramp-encoding-shell' for more 
information."
 
 ;; Since Emacs 26.1, `system-name' can return nil at build time if
 ;; Emacs is compiled with "--no-build-details".  We do expect it to be
-;; a string.  (Bug#44481)
+;; a string.  (Bug#44481, Bug#54294)
 (defconst tramp-system-name (or (system-name) "")
   "The system name Tramp is running locally.")
 
@@ -1409,8 +1409,11 @@ calling HANDLER.")
 ;; internal data structure.  Convenience functions for internal
 ;; data structure.
 
-;; The basic structure for remote file names.  We use a list :type,
-;; in order to be compatible with Emacs 25.
+;; The basic structure for remote file names.  We use a list :type, in
+;; order to be compatible with Emacs 25.  We must autoload it in
+;; tramp-loaddefs.el, because some functions, which need it, wouldn't
+;; work otherwise when unloading / reloading Tramp.  (Bug#50869)
+;;;###tramp-autoload
 (cl-defstruct (tramp-file-name (:type list) :named)
   method user domain host port localname hop)
 
@@ -2688,10 +2691,11 @@ Falls back to normal file name handler if no Tramp file 
name handler exists."
 ;;;###autoload
 (progn (defun tramp-register-autoload-file-name-handlers ()
   "Add Tramp file name handlers to `file-name-handler-alist' during autoload."
-  (add-to-list 'file-name-handler-alist
-              (cons tramp-autoload-file-name-regexp
-                    #'tramp-autoload-file-name-handler))
-  (put #'tramp-autoload-file-name-handler 'safe-magic t)))
+  (unless (rassq #'tramp-file-name-handler file-name-handler-alist)
+    (add-to-list 'file-name-handler-alist
+                (cons tramp-autoload-file-name-regexp
+                      #'tramp-autoload-file-name-handler))
+    (put #'tramp-autoload-file-name-handler 'safe-magic t))))
 
 (put #'tramp-register-autoload-file-name-handlers 'tramp-autoload t)
 ;;;###autoload (tramp-register-autoload-file-name-handlers)
@@ -3933,7 +3937,7 @@ Do not set it manually, it is used buffer-local in 
`tramp-get-lock-pid'.")
             (match (string-match tramp-lock-file-info-regexp info)))
     (or ; Locked by me.
         (and (string-equal (match-string 1 info) (user-login-name))
-            (string-equal (match-string 2 info) (system-name))
+            (string-equal (match-string 2 info) tramp-system-name)
             (string-equal (match-string 3 info) (tramp-get-lock-pid file)))
        ; User name.
        (match-string 1 info))))
@@ -3964,7 +3968,7 @@ Do not set it manually, it is used buffer-local in 
`tramp-get-lock-pid'.")
                 ;; USER@HOST.PID[:BOOT_TIME]
                 (info
                  (format
-                  "%s@%s.%s" (user-login-name) (system-name)
+                  "%s@%s.%s" (user-login-name) tramp-system-name
                   (tramp-get-lock-pid file))))
 
        ;; Protect against security hole.
@@ -4901,8 +4905,9 @@ performed successfully.  Any other value means an error."
          (tramp-message vec 6 "\n%s" (buffer-string)))
        (if (eq exit 'ok)
            (ignore-errors
-             (and (functionp tramp-password-save-function)
-                  (funcall tramp-password-save-function)))
+             (when (functionp tramp-password-save-function)
+               (funcall tramp-password-save-function)
+                (setq tramp-password-save-function nil)))
          ;; Not successful.
          (tramp-clear-passwd vec)
          (delete-process proc)
diff --git a/trampver.el b/trampver.el
index d68098bfc1..32193c659b 100644
--- a/trampver.el
+++ b/trampver.el
@@ -7,7 +7,7 @@
 ;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
 ;; Package: tramp
-;; Version: 2.5.2.2
+;; Version: 2.5.2.3
 ;; Package-Requires: ((emacs "25.1"))
 ;; Package-Type: multi
 ;; URL: https://www.gnu.org/software/tramp/
@@ -40,7 +40,7 @@
 ;; ./configure" to change them.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.5.2.2"
+(defconst tramp-version "2.5.2.3"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -76,7 +76,7 @@
 ;; Check for Emacs version.
 (let ((x   (if (not (string-lessp emacs-version "25.1"))
       "ok"
-    (format "Tramp 2.5.2.2 is not fit for %s"
+    (format "Tramp 2.5.2.3 is not fit for %s"
             (replace-regexp-in-string "\n" "" (emacs-version))))))
   (unless (string-equal "ok" x) (error "%s" x)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]