emacs-devel
[Top][All Lists]
Advanced

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

Re: master fails to build on FreeBSD when ACL support is on


From: Eli Zaretskii
Subject: Re: master fails to build on FreeBSD when ACL support is on
Date: Fri, 19 Jan 2018 16:45:58 +0200

> From: Joseph Mingrone <address@hidden>
> Cc: address@hidden, Paul Eggert <address@hidden>, address@hidden
> Date: Thu, 18 Jan 2018 19:40:44 -0400
> 
> The same error occurs with bf9b972 from December 2, but only when ACL is
> on.  By moving back one commit to ac144dc, the build succeeds regardless
> of the status of ACL.
> 
> With commit bf9b972 the value of tempfile looks something like this.
> /tmp/autoload.elca4aVmU
> 
> With that commit reverted, the value of tempfile looks something like this.
> /wrkdirs/usr/ports/editors/emacs-devel/work-full/emacs-694ee38/lisp/emacs-lisp/autoload.elcFmWzli
> 
> Inside the builder jail, the /tmp permissions are drwxrwxrwt.
> 
> Using the latest commit, but with the change in bf9b972 reverted, the
> build succeeds.

Thanks.  Does the patch below solve the problem?

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index acba9e2..a0ab14f 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1933,7 +1933,17 @@ byte-compile-file
                       ;; parallel bootstrap), it does not risk getting a
                       ;; half-finished file.  (Bug#4196)
                       (tempfile
-                        (make-temp-file (file-name-nondirectory target-file)))
+                        ;; If target-file is relative and includes
+                        ;; leading directories, make-temp-file will
+                        ;; assume those leading directories exist
+                        ;; under temporary-file-directory, which might
+                        ;; not be true.  So strip leading directories
+                        ;; from relative file names before calling
+                        ;; make-temp-file.
+                        (if (file-name-absolute-p target-file)
+                            (make-temp-file target-file)
+                          (make-temp-file
+                           (file-name-nondirectory target-file))))
                       (default-modes (default-file-modes))
                       (temp-modes (logand default-modes #o600))
                       (desired-modes (logand default-modes #o666))



reply via email to

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