From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master fails to build on FreeBSD when ACL support is on Date: Fri, 19 Jan 2018 16:45:58 +0200 Message-ID: <83o9lpuct5.fsf@gnu.org> References: <86o9lua0yx.fsf@phe.ftfl.ca> <834lnly8ht.fsf@gnu.org> <86vafy20sj.fsf@phe.ftfl.ca> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1516373117 20881 195.159.176.226 (19 Jan 2018 14:45:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 Jan 2018 14:45:17 +0000 (UTC) Cc: eggert@cs.ucla.edu, ashish@FreeBSD.org, emacs-devel@gnu.org To: Joseph Mingrone Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 19 15:45:12 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 1ecXua-00047l-5v for ged-emacs-devel@m.gmane.org; Fri, 19 Jan 2018 15:44:56 +0100 Original-Received: from localhost ([::1]:53429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecXwX-0002cM-7e for ged-emacs-devel@m.gmane.org; Fri, 19 Jan 2018 09:46:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecXwL-0002ai-5B for emacs-devel@gnu.org; Fri, 19 Jan 2018 09:46:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecXwK-0004CA-5y for emacs-devel@gnu.org; Fri, 19 Jan 2018 09:46:45 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecXwB-00048J-G2; Fri, 19 Jan 2018 09:46:35 -0500 Original-Received: from [176.228.60.248] (port=2236 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ecXw9-000538-Gk; Fri, 19 Jan 2018 09:46:35 -0500 In-reply-to: <86vafy20sj.fsf@phe.ftfl.ca> (message from Joseph Mingrone on Thu, 18 Jan 2018 19:40:44 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:222086 Archived-At: > From: Joseph Mingrone > Cc: emacs-devel@gnu.org, Paul Eggert , ashish@FreeBSD.org > 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))