GNU bug report logs - #37475
27.0.50 bootstrap fails

Previous Next

Package: emacs;

Reported by: Andreas Schwab <schwab <at> linux-m68k.org>

Date: Sat, 21 Sep 2019 09:08:01 UTC

Severity: normal

Found in version 27.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37475 in the body.
You can then email your comments to 37475 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37475; Package emacs. (Sat, 21 Sep 2019 09:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Schwab <schwab <at> linux-m68k.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 21 Sep 2019 09:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50 bootstrap fails
Date: Sat, 21 Sep 2019 11:07:30 +0200
EMACSLOADPATH= '../src/emacs' -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'  -f batch-byte-compile gnus/deuglify.el
EMACSLOADPATH= '../src/emacs' -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'  -f batch-byte-compile gnus/gmm-utils.el
EMACSLOADPATH= '../src/emacs' -batch --no-site-file --no-site-lisp --eval '(setq load-prefer-newer t)'  -f batch-byte-compile gnus/gnus-agent.el
Eager macro-expansion failure: (file-error "Testing file" "Permission denied" "/etc/news/organization")

In toplevel form:
gnus/deuglify.el:221:1:Error: Testing file: Permission denied, /etc/news/organization
make[3]: *** [gnus/deuglify.elc] Error 1
make[3]: *** Waiting for unfinished jobs....
Eager macro-expansion failure: (file-error "Testing file" "Permission denied" "/etc/news/organization")

In toplevel form:
gnus/gnus-agent.el:26:1:Error: Testing file: Permission denied, /etc/news/organization
make[3]: *** [gnus/gnus-agent.elc] Error 1
make[3]: Leaving directory `/home/abuild/rpmbuild/BUILD/emacs-27.0.50/lisp'
make[2]: *** [compile-main] Error 2
make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/emacs-27.0.50/lisp'
make[1]: *** [lisp] Error 2
make[1]: Leaving directory `/home/abuild/rpmbuild/BUILD/emacs-27.0.50'
make: *** [bootstrap] Error 2

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37475; Package emacs. (Sat, 21 Sep 2019 09:34:01 GMT) Full text and rfc822 format available.

Message #8 received at 37475 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 37475 <at> debbugs.gnu.org
Subject: Re: bug#37475: 27.0.50 bootstrap fails
Date: Sat, 21 Sep 2019 12:33:32 +0300
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Date: Sat, 21 Sep 2019 11:07:30 +0200
> 
> Eager macro-expansion failure: (file-error "Testing file" "Permission denied" "/etc/news/organization")
> 
> In toplevel form:
> gnus/deuglify.el:221:1:Error: Testing file: Permission denied, /etc/news/organization
> make[3]: *** [gnus/deuglify.elc] Error 1

This comes from this part of message.el:

  (defcustom message-user-organization-file
    (let (orgfile)
      (dolist (f (list "/etc/organization"
		       "/etc/news/organization"
		       "/usr/lib/news/organization"))
	(when (file-readable-p f)
	  (setq orgfile f)))
      orgfile)
    "Local news organization file."

file-readable-p is documented to "Return t if file FILENAME exists and
you can read it."  So I think Ffile_readable_p should not signal an
error if the file does not exist, it should return nil instead.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37475; Package emacs. (Sat, 21 Sep 2019 09:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 37475 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: schwab <at> linux-m68k.org
Cc: 37475 <at> debbugs.gnu.org
Subject: Re: bug#37475: 27.0.50 bootstrap fails
Date: Sat, 21 Sep 2019 12:37:39 +0300
> Date: Sat, 21 Sep 2019 12:33:32 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 37475 <at> debbugs.gnu.org
> 
>   (defcustom message-user-organization-file
>     (let (orgfile)
>       (dolist (f (list "/etc/organization"
> 		       "/etc/news/organization"
> 		       "/usr/lib/news/organization"))
> 	(when (file-readable-p f)
> 	  (setq orgfile f)))
>       orgfile)
>     "Local news organization file."
> 
> file-readable-p is documented to "Return t if file FILENAME exists and
> you can read it."  So I think Ffile_readable_p should not signal an
> error if the file does not exist, it should return nil instead.

Hmm... I see that it does already.

Andreas, can you tell whether this file exists on your system, and
what was the errno value inside Ffile_readable_p?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37475; Package emacs. (Sat, 21 Sep 2019 09:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 37475 <at> debbugs.gnu.org (full text, mbox):

From: Sven Joachim <svenjoac <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: schwab <at> linux-m68k.org, 37475 <at> debbugs.gnu.org
Subject: Re: bug#37475: 27.0.50 bootstrap fails
Date: Sat, 21 Sep 2019 11:57:59 +0200
On 2019-09-21 12:37 +0300, Eli Zaretskii wrote:

>> Date: Sat, 21 Sep 2019 12:33:32 +0300
>> From: Eli Zaretskii <eliz <at> gnu.org>
>> Cc: 37475 <at> debbugs.gnu.org
>>
>>   (defcustom message-user-organization-file
>>     (let (orgfile)
>>       (dolist (f (list "/etc/organization"
>> 		       "/etc/news/organization"
>> 		       "/usr/lib/news/organization"))
>> 	(when (file-readable-p f)
>> 	  (setq orgfile f)))
>>       orgfile)
>>     "Local news organization file."
>>
>> file-readable-p is documented to "Return t if file FILENAME exists and
>> you can read it."  So I think Ffile_readable_p should not signal an
>> error if the file does not exist, it should return nil instead.
>
> Hmm... I see that it does already.
>
> Andreas, can you tell whether this file exists on your system, and
> what was the errno value inside Ffile_readable_p?

It's EACCES aka Permission denied, given in the original bug report.  To
reproduce it:

,----
| $ sudo mkdir -p /etc/news
| $ sudo chmod 700 /etc/news
| $ rm -f lisp/gnus/deuglify.el
| $ make
`----

That's due to commit 9dc306b1db08 ("Improve reporting of I/O, access
errors") which seems over-zealous here: if there are insufficient
permissions to access the parent directory, file-readable-p ought to
return nil, I think.

Cheers,
       Sven




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37475; Package emacs. (Sat, 21 Sep 2019 11:57:02 GMT) Full text and rfc822 format available.

Message #17 received at 37475 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Sven Joachim <svenjoac <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37475 <at> debbugs.gnu.org
Subject: Re: bug#37475: 27.0.50 bootstrap fails
Date: Sat, 21 Sep 2019 13:56:42 +0200
On Sep 21 2019, Sven Joachim <svenjoac <at> gmx.de> wrote:

> That's due to commit 9dc306b1db08 ("Improve reporting of I/O, access
> errors") which seems over-zealous here: if there are insufficient
> permissions to access the parent directory, file-readable-p ought to
> return nil, I think.

An inaccessible directory is empty for all intents and purposes, so
signaling an error is bogus.

This also breaks find-file.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sat, 21 Sep 2019 19:01:02 GMT) Full text and rfc822 format available.

Notification sent to Andreas Schwab <schwab <at> linux-m68k.org>:
bug acknowledged by developer. (Sat, 21 Sep 2019 19:01:02 GMT) Full text and rfc822 format available.

Message #22 received at 37475-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Sven Joachim <svenjoac <at> gmx.de>,
 37475-done <at> debbugs.gnu.org
Subject: bug#37475: 27.0.50 bootstrap fails
Date: Sat, 21 Sep 2019 12:00:04 -0700
[Message part 1 (text/plain, inline)]
> An inaccessible directory is empty for all intents and purposes

Not always; for example, (directory-files-and-attributes "/etc/news") signals an 
error if /etc/news is inaccessible, and returns nil if /etc/news is empty and 
accessible. However, your use case is yet another example of why the new checks 
are turning out to be too picky, so I reverted most of them (i.e., the ones 
having to do with file-readable-p and similar predicates) by installing the 
attached patch, which fixes the bug on my platform.

Thanks for reporting the problem.
[0001-Revert-too-picky-file-access-tests.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 20 Oct 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 189 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.