From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#44481: 28.0.50; Byte compilation doesn't work with --no-build-details Date: Sat, 07 Nov 2020 17:30:55 +0100 Message-ID: <87wnyxceo0.fsf@gmx.de> References: <87d00qe6bt.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2835"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Glenn Morris , 44481@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 07 17:32:56 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbR96-0000co-Gv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 17:32:56 +0100 Original-Received: from localhost ([::1]:49156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbR94-0003KX-RQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 11:32:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbR8G-0003Jn-A0 for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 11:32:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbR8E-0005Js-3T for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 11:32:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kbR8E-00026n-0i for bug-gnu-emacs@gnu.org; Sat, 07 Nov 2020 11:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2020 16:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44481 X-GNU-PR-Package: emacs Original-Received: via spool by 44481-submit@debbugs.gnu.org id=B44481.16047666718039 (code B ref 44481); Sat, 07 Nov 2020 16:32:01 +0000 Original-Received: (at 44481) by debbugs.gnu.org; 7 Nov 2020 16:31:11 +0000 Original-Received: from localhost ([127.0.0.1]:59163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbR7N-00025Z-49 for submit@debbugs.gnu.org; Sat, 07 Nov 2020 11:31:11 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:40955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbR7H-000250-Uq for 44481@debbugs.gnu.org; Sat, 07 Nov 2020 11:31:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604766657; bh=j1A1amxDAzL3tCzEzp2WMpm8i803agpWrMYKtjQpR2g=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=UErUYb6b3YQp62JHFhfAzoZpKuLjn74NuOIvF6DkTV8fnUwhSNwrBGWxfsVmMAMqi doytgI2xkVwV70dqPb2y4oMiMGb/49FKQAE4ZCgyzPua44UVcmYBL33i4Uu1v36/iB DPhVq3KsgUProdXvxcmwUB+q2vmrYCMGZ9jXheGE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([212.86.38.212]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MJE6F-1kusZu0UzD-00KhUv; Sat, 07 Nov 2020 17:30:57 +0100 In-Reply-To: <87d00qe6bt.fsf@gmx.de> (Michael Albinus's message of "Fri, 06 Nov 2020 18:35:50 +0100") X-Provags-ID: V03:K1:sbf1N0rJYMyh5RKSXz/ZkCCPQsoqyHuR18odMjzgLsSujJwpQkK LSdt7VoaqN1WXEcOm6zkpTzVgOLCNZNJ+iZJcz2b32Ucp071ZynEn01k+wm0kNsueZslEqQ eBOAHn02GKoCTyB56FWQkuw8JZmSrKcRE4TprXut9VenNigFgTybC6CJ0rQwDshCSVexFei kwwbED6z2qzhsTDXU3HeQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:Cq8ocgvz/Ms=:Bbsfxo15DJm3u9hoN314uk NV1FuI8vmLoPlTmJaZBjiZjRYY0PIC0ShmiwXLHIEApr/0g3TL9tdwl/lrkO6WAcNv4lzxJ1J GWU2GL92Y1OWxq/ZXUbFVVIYKZqibhoM9WY8xpF7lj+KBQM6Rb1kW+Oom4f9SaWkxxfI54AnI rT64zb62K/vVKI0JGQj+x8kDJyBhWq1z/otnq9eXaBci0U1tsLTxwwqrswkykSRUdHBFeia31 8JBH+oeoEZToPrURcxuc2RoZu0rxBWjZj31ccDEVHd5ntCjZzUzzmDSZRF8s6ysKVTm5xvwYp h+O7Of2U988GsTzIDZEJCagpvlCgD9NT9mDBdecI1Vz+FIg8gq4+cXW52vwt8iXOUtYHgDKNd tu06rFMI6UFctFCU9/rPnUwDtKkzgFdJPryiXegHDx9W0nhq0k/+2i6nOcGC6N1x0Ipumw757 OB8T1Rwaa2pPAoVY/6sUuT8I5MzSGIOEIzvloRnMqs13sAsp1k3PU7WaImRGnzEOYMsSojnUa 8wsATmcUqmYG4MqHx0yTMPgoNJ2FvLZFxEkKLd0Pl+ErK0TiURqoHUEHVf+yBFnE16YTUflSY ntfDWXo/ggysCVrL30Eujo59vMnBuCR+neUWmu9UDmFH75Gqhz1XOQtBAqL+pdRQ4TelZsaF1 1tovVY66I67NL7yQ0gk7rQ7S8wtlm64crwwvQPW4gn92/vueGmcZtzTsKdOP7tIiBQ0hO9RD/ I2xfDVinRQJGm1MUACBFR4xLiDbfxRRbyNJjdnXdthRINcFayPIRnthPTHAYsJ97WxDI0k5B X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192847 Archived-At: --=-=-= Content-Type: text/plain Michael Albinus writes: > Glenn Morris writes: > >> See also https://debbugs.gnu.org/34448 . >> >> I would guess Tramp isn't the only thing expecting system-name to be a string. > > Perhaps system-name returns better "localhost" but nil? Or at least the > empty string, at build time with --no-build-details? Since Tramp must also work for older Emacs versions, it needs an own fix anyway. Philipp, does the appended patch work for you? Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 51e15af2ef..b79fb54573 100644 =2D-- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4927,7 +4927,7 @@ tramp-maybe-open-connection (setenv "PS1" tramp-initial-end-of-output) (unless (stringp tramp-encoding-shell) (tramp-error vec 'file-error "`tramp-encoding-shell' not = set")) - (let* ((current-host (system-name)) + (let* ((current-host tramp-system-name) (target-alist (tramp-compute-multi-hops vec)) ;; We will apply `tramp-ssh-controlmaster-options' ;; only for the first hop. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 55f652fa9a..2e32481198 100644 =2D-- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -175,6 +175,12 @@ tramp-encoding-command-interactive :version "24.1" :type '(choice (const nil) string)) +;; 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) +(defconst tramp-system-name (or (system-name) "") + "The system name Tramp is running locally.") + (defvar tramp-methods nil "Alist of methods for remote files. This is a list of entries of the form (NAME PARAM1 PARAM2 ...). @@ -416,7 +422,7 @@ tramp-default-user-alist (choice :tag " Host regexp" regexp sexp) (choice :tag " User name" string (const nil))))) -(defcustom tramp-default-host (system-name) +(defcustom tramp-default-host tramp-system-name "Default host to use for transferring files. Useful for su and sudo methods mostly." :type 'string) @@ -471,8 +477,8 @@ tramp-save-ad-hoc-proxies (defcustom tramp-restricted-shell-hosts-alist (when (memq system-type '(windows-nt)) (list (format "\\`\\(%s\\|%s\\)\\'" - (regexp-quote (downcase (system-name))) - (regexp-quote (upcase (system-name)))))) + (regexp-quote (downcase tramp-system-name)) + (regexp-quote (upcase tramp-system-name))))) "List of hosts, which run a restricted shell. This is a list of regular expressions, which denote hosts running a restricted shell like \"rbash\". Those hosts can be used as @@ -485,7 +491,7 @@ tramp-local-host-regexp (concat "\\`" (regexp-opt - (list "localhost" "localhost6" (system-name) "127.0.0.1" "::1") t) + (list "localhost" "localhost6" tramp-system-name "127.0.0.1" "::1") t= ) "\\'") "Host names which are regarded as local host. If the local host runs a chrooted environment, set this to nil." --=-=-=--