From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#37445: 27.0.50; Permission denied after make install Date: Wed, 18 Sep 2019 23:57:23 -0700 Organization: UCLA Computer Science Department Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------3A50D7EA71346FFEB0B5ACF8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="268410"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cc: 37445-done@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 19 08:58:19 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iAqOQ-0017iY-Co for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Sep 2019 08:58:18 +0200 Original-Received: from localhost ([::1]:38494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAqOP-0006Nh-6Y for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Sep 2019 02:58:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49743) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAqOG-0006Cl-3J for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2019 02:58:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAqOD-00062u-LF for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2019 02:58:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46259) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iAqOA-00060i-LW for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2019 02:58:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iAqOA-0000e2-Ii for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2019 02:58:02 -0400 Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2019 06:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 37445 X-GNU-PR-Package: emacs Mail-Followup-To: 37445@debbugs.gnu.org, eggert@cs.ucla.edu, tino.calancha@gmail.com Original-Received: via spool by 37445-done@debbugs.gnu.org id=D37445.15688762572432 (code D ref 37445); Thu, 19 Sep 2019 06:58:02 +0000 Original-Received: (at 37445-done) by debbugs.gnu.org; 19 Sep 2019 06:57:37 +0000 Original-Received: from localhost ([127.0.0.1]:55080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAqNl-0000d9-AM for submit@debbugs.gnu.org; Thu, 19 Sep 2019 02:57:37 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAqNi-0000cs-H3 for 37445-done@debbugs.gnu.org; Thu, 19 Sep 2019 02:57:36 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 71D181605DA; Wed, 18 Sep 2019 23:57:28 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id iUvDzz85_IN7; Wed, 18 Sep 2019 23:57:27 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7DC031605DC; Wed, 18 Sep 2019 23:57:27 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ngFMlhNmY1Mu; Wed, 18 Sep 2019 23:57:27 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 5059F1605DA; Wed, 18 Sep 2019 23:57:27 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166700 Archived-At: This is a multi-part message in MIME format. --------------3A50D7EA71346FFEB0B5ACF8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit I installed the attached patch, which should fix the bug even when PICKY_EACCES is nonzero. Boldly closing the bug report. --------------3A50D7EA71346FFEB0B5ACF8 Content-Type: text/x-patch; name="0001-Omit-some-overenthusiastic-file-truename-calls.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Omit-some-overenthusiastic-file-truename-calls.patch" >From dff4f9c759f5cf19047719716ea5ee8ffdc3006e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 18 Sep 2019 23:53:46 -0700 Subject: [PATCH] Omit some overenthusiastic file-truename calls Problem reported by Tino Calancha (Bug#37445). * src/emacs.c (init_cmdargs): Call file-truename only if needed, i.e., if invocation-directory ends in "/i386/" on WINDOWSNT. * src/lread.c (readevalloop): If the sourcename is not absolute, make it absolute. There is no need to convert non-absolute files into truenames, since absolute files are not converted into truenames. (init_lread): Do not convert source-directory into a truename at startup. There is no need to do so in a dumped Emacs since an absolute file name suffices. The source directory might not even exist any more, or might have been replaced by an interloper who takes advantage of the truename calculation. (syms_of_lread): Remove Qfile_truename; no longer needed. --- src/emacs.c | 14 +++++++++----- src/lread.c | 11 +++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index eb732810db..8a8d8b558e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -479,9 +479,6 @@ init_cmdargs (int argc, char **argv, int skip_args, char const *original_pwd) if (!NILP (Vinvocation_directory)) { - if (NILP (Vpurify_flag) && !NILP (Ffboundp (Qfile_truename))) - Vinvocation_directory = call1 (Qfile_truename, Vinvocation_directory); - dir = Vinvocation_directory; #ifdef WINDOWSNT /* If we are running from the build directory, set DIR to the @@ -490,8 +487,15 @@ init_cmdargs (int argc, char **argv, int skip_args, char const *original_pwd) if (SBYTES (dir) > sizeof ("/i386/") - 1 && 0 == strcmp (SSDATA (dir) + SBYTES (dir) - sizeof ("/i386/") + 1, "/i386/")) - dir = Fexpand_file_name (build_string ("../.."), dir); -#else /* !WINDOWSNT */ + { + if (NILP (Vpurify_flag)) + { + Lisp_Object file_truename = intern ("file-truename"); + if (!NILP (Ffboundp (file_truename))) + dir = call1 (file_truename, dir); + } + dir = Fexpand_file_name (build_string ("../.."), dir); + } #endif name = Fexpand_file_name (Vinvocation_name, dir); while (1) diff --git a/src/lread.c b/src/lread.c index 99e0ce30ba..4f3446b09d 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1999,11 +1999,10 @@ readevalloop (Lisp_Object readcharfun, (NILP (lex_bound) || EQ (lex_bound, Qunbound) ? Qnil : list1 (Qt))); - /* Try to ensure sourcename is a truename, except whilst preloading. */ + /* Ensure sourcename is absolute, except whilst preloading. */ if (!will_dump_p () - && !NILP (sourcename) && !NILP (Ffile_name_absolute_p (sourcename)) - && !NILP (Ffboundp (Qfile_truename))) - sourcename = call1 (Qfile_truename, sourcename) ; + && !NILP (sourcename) && !NILP (Ffile_name_absolute_p (sourcename))) + sourcename = Fexpand_file_name (sourcename, Qnil); LOADHIST_ATTACH (sourcename); @@ -4678,9 +4677,6 @@ load_path_default (void) void init_lread (void) { - if (NILP (Vpurify_flag) && !NILP (Ffboundp (Qfile_truename))) - Vsource_directory = call1 (Qfile_truename, Vsource_directory); - /* First, set Vload_path. */ /* Ignore EMACSLOADPATH when dumping. */ @@ -5100,7 +5096,6 @@ this variable will become obsolete. */); DEFSYM (Qload, "load"); DEFSYM (Qload_file_name, "load-file-name"); DEFSYM (Qeval_buffer_list, "eval-buffer-list"); - DEFSYM (Qfile_truename, "file-truename"); DEFSYM (Qdir_ok, "dir-ok"); DEFSYM (Qdo_after_load_evaluation, "do-after-load-evaluation"); -- 2.17.1 --------------3A50D7EA71346FFEB0B5ACF8--