From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master fails to build on FreeBSD when ACL support is on Date: Fri, 19 Jan 2018 11:38:56 -0500 Message-ID: References: <86o9lua0yx.fsf@phe.ftfl.ca> <834lnly8ht.fsf@gnu.org> <86vafy20sj.fsf@phe.ftfl.ca> <83o9lpuct5.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1516380868 6268 195.159.176.226 (19 Jan 2018 16:54:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 Jan 2018 16:54:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 19 17:54:24 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecZvm-00013A-GP for ged-emacs-devel@m.gmane.org; Fri, 19 Jan 2018 17:54:18 +0100 Original-Received: from localhost ([::1]:59168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecZxm-0008DK-GV for ged-emacs-devel@m.gmane.org; Fri, 19 Jan 2018 11:56:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecZha-0001av-IV for emacs-devel@gnu.org; Fri, 19 Jan 2018 11:39:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecZhW-0000k0-IQ for emacs-devel@gnu.org; Fri, 19 Jan 2018 11:39:38 -0500 Original-Received: from [195.159.176.226] (port=54375 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecZhW-0000iW-C6 for emacs-devel@gnu.org; Fri, 19 Jan 2018 11:39:34 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ecZfH-0003R8-Mk for emacs-devel@gnu.org; Fri, 19 Jan 2018 17:37:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:MvYEjBHMECEuLvp81NoDJyruNXg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222089 Archived-At: > - (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)))) Hmm.. the comment here doesn't explain the (file-name-absolute-p target-file) test, and the commit message * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't create the temporary file under temporary-file-directory if the file being compiled is specified by an absolute file name. This avoids problems with ACL copying from temporary-file-directory on FreeBSD. For the details, see http://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00513.html. doesn't really explain why an absolute file name should be treated differently. IIUC the core of the problem has to do with different ACLs in /tmp and the final destination of the .elc file, but it seems like this problem should apply regardless of whether that final destination is specified as a relative or an absolute file name, right? So maybe rather than (file-name-absolute-p target-file) we should check something related to ACLs, or (eq system-type 'feebsd-foo)? Or maybe we should just never use /tmp and just go with (make-temp-file (expand-file-name target-file)) ? Stefan