GNU bug report logs - #21547
elisp-comp should call emacs with --no-site-file flag

Previous Next

Package: automake;

Reported by: Jauhien Piatlicki <jauhien <at> gentoo.org>

Date: Thu, 24 Sep 2015 00:58:01 UTC

Severity: normal

Tags: confirmed, patch

Done: Mike Frysinger <vapier <at> gentoo.org>

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 21547 in the body.
You can then email your comments to 21547 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-automake <at> gnu.org:
bug#21547; Package automake. (Thu, 24 Sep 2015 00:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jauhien Piatlicki <jauhien <at> gentoo.org>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Thu, 24 Sep 2015 00:58:02 GMT) Full text and rfc822 format available.

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

From: Jauhien Piatlicki <jauhien <at> gentoo.org>
To: bug-automake <at> gnu.org
Subject: elisp-comp should call emacs with --no-site-file flag
Date: Thu, 24 Sep 2015 00:21:50 +0200
[Message part 1 (text/plain, inline)]
Hi,

compilation of mmm-mode (http://mmm-mode.sourceforge.net/) hangs on my
machine because emacs is called without --no-site-file flag.

See also https://bugs.gentoo.org/show_bug.cgi?id=561306.

Regards,
Jauhien Piatlicki

[signature.asc (application/pgp-signature, attachment)]

Added tag(s) patch and confirmed. Request was from Mike Frysinger <vapier <at> gentoo.org> to control <at> debbugs.gnu.org. (Tue, 08 Feb 2022 05:44:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#21547; Package automake. (Tue, 08 Feb 2022 05:45:02 GMT) Full text and rfc822 format available.

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

From: Mike Frysinger <vapier <at> gentoo.org>
To: 21547 <at> debbugs.gnu.org
Subject: [PATCH] elisp: run emacs with --no-site-file
Date: Tue,  8 Feb 2022 00:43:54 -0500
Fixes automake bug https://bugs.gnu.org/21547.

If users have interactive site file logic, the lispdir probing can
hang, as can the compilation of elisp files.  Use --no-site-file to
disable loading any of that possible user logic.

* NEWS: Note emacs --no-site-file change.
* doc/automake.texi: Run emacs with --no-site-file.
* lib/am/lisp.am: Likewise.
* m4/lispdir.m4: Likewise.
---
 NEWS              | 5 +++++
 doc/automake.texi | 2 +-
 lib/am/lisp.am    | 2 +-
 m4/lispdir.m4     | 2 +-
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 29c4d8a96588..40384264c4ab 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,11 @@ please see NEWS-2.0 and start following the advice there now.
 
 New in 1.17:
 
+* Bugs fixed
+
+  - When compiling emacs lisp files, emacs is run with --no-site-file to
+    disable user config files that might hang or access the terminal.
+
 * New features added
 
   - RANLIB may be overridden on a per-target basis.
diff --git a/doc/automake.texi b/doc/automake.texi
index 4a2c17fa9044..b6a38dc27ce5 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -13349,7 +13349,7 @@ instance, here is how @code{AM_PATH_LISPDIR} (@pxref{Emacs Lisp})
 computes @samp{$(lispdir)}:
 
 @example
-$EMACS -batch -Q -eval '(while load-path
+$EMACS -batch -Q --no-site-file -eval '(while load-path
   (princ (concat (car load-path) "\n"))
   (setq load-path (cdr load-path)))' >conftest.out
 lispdir=`sed -n
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 45c58a6da938..746f01679f72 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -38,7 +38,7 @@ endif %?INSTALL%
 	  esac; \
 ## Emacs byte-compilation won't create this automatically, sadly.
 	  test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
-	  $(EMACS) --batch \
+	  $(EMACS) --batch --no-site-file \
 	    $(AM_ELCFLAGS) $(ELCFLAGS) \
 	    $$am__subdir_includes -L $(builddir) -L $(srcdir) \
 	    --eval '$(am__emacs_byte_compile_setup)' \
diff --git a/m4/lispdir.m4 b/m4/lispdir.m4
index 525e3ee6da38..6f9b89d2ca1a 100644
--- a/m4/lispdir.m4
+++ b/m4/lispdir.m4
@@ -34,7 +34,7 @@ AC_DEFUN([AM_PATH_LISPDIR],
   #  which is non-obvious for non-emacs users.
   # Redirecting /dev/null should help a bit; pity we can't detect "broken"
   #  emacsen earlier and avoid running this altogether.
-  AC_RUN_LOG([$EMACS -batch -Q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
+  AC_RUN_LOG([$EMACS -batch -Q --no-site-file -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
 	am_cv_lispdir=`sed -n \
        -e 's,/$,,' \
        -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \
-- 
2.34.1





Information forwarded to bug-automake <at> gnu.org:
bug#21547; Package automake. (Tue, 08 Feb 2022 22:52:02 GMT) Full text and rfc822 format available.

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

From: Karl Berry <karl <at> freefriends.org>
To: vapier <at> gentoo.org
Cc: 21547 <at> debbugs.gnu.org
Subject: Re: bug#21547: [PATCH] elisp: run emacs with --no-site-file
Date: Tue, 8 Feb 2022 15:51:02 -0700
    +  - When compiling emacs lisp files, emacs is run with --no-site-file to
    +    disable user config files that might hang or access the terminal.

I'm surprised it hasn't come up before. Good!




bug closed, send any further explanations to 21547 <at> debbugs.gnu.org and Jauhien Piatlicki <jauhien <at> gentoo.org> Request was from Mike Frysinger <vapier <at> gentoo.org> to control <at> debbugs.gnu.org. (Wed, 09 Feb 2022 04:22:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 09 Mar 2022 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 42 days ago.

Previous Next


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