From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id KL6TOnHdZWdVLgAA62LTzQ:P1 (envelope-from ) for ; Fri, 20 Dec 2024 21:11:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id KL6TOnHdZWdVLgAA62LTzQ (envelope-from ) for ; Fri, 20 Dec 2024 22:11:14 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=HB6BHc1S; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=HSZFMjX8; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734729073; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=8INrGxoBUT/msBmDbZQzNVmUBccPDnv9EUSxR/Zz1u8=; b=dp6zTtYoNKEkexqP8NGjNsxZVniLCAQCwvCwEf+f0FW10LrqMM8kvoZEs8P7JmLUTwejPi JK7pHXqEi3vxhjbZYr4A4Jwp2uQ7PuzOh9bUswzWLgX2KOTeRWXIP7JctpDnW4ILvrAqKf MlF8cb1BoP6+34Zj5geKlyEi+0y69HWkuKjYPRh6mJMpfJtXo2z9rW6xLMW/HMygYBDtNg 80foBXEgZuSZht65eUzIOxfWGR+MlTv0wkjb2X1tMjxwS+mOMNuFZNtZJFTtWnCEklQvKc YXwydFXB28misvyYO2rAI8NkDldkF0W4lYQtJP9xi2N105AMO8USoBx2wvMtng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=HB6BHc1S; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=HSZFMjX8; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734729073; a=rsa-sha256; cv=none; b=nV6pTUCqLrqDWq7RaIprZipYhXbZOWC2X0Na985vX7A6eIFfATNPJvLPgaBrq0Grmqp8KF opA1+VauKrATAkjhmWXvqN2eh6RDuY2hOVhH73ijPH1WHE6LuFtZ90+bQCsTI5SDqhUrev paE5zFvtTavkQmTFVrgI2nkHHlWMvxR/q6xvQpnymdpXuzSeRfT7qNQddwPReEnNkIGhFn 1wTx1tXc89APsiYoStdTE3tjojvFn04cQKyOmKMzWKakq9JY0ABJhWfleX2mu7YEVEMSAa E3uCLX5RaZ97VZU7uCe7bpZ6yTgwHbuCODfbRMwhtN1hV8VVDRk4CNLT1C5/ZA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A253350568 for ; Fri, 20 Dec 2024 22:11:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOjcP-0004vT-Py; Fri, 20 Dec 2024 15:29:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tOjcN-0004up-T3 for bug-guix@gnu.org; Fri, 20 Dec 2024 15:29:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOjcN-00085Z-Jz for bug-guix@gnu.org; Fri, 20 Dec 2024 15:29:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=8INrGxoBUT/msBmDbZQzNVmUBccPDnv9EUSxR/Zz1u8=; b=HB6BHc1SUKvPjtH2QzZAgx9RH5aFtQwVtiqGN2ht8rzPO4yxkgWVP14CwAU0xke+HeXsw56TeU1uw3k3e6W8TQf2WsdJtOjHzmHkdHUBDYoGcRdafZbhbz0UGh3wvvItWVniOu7sxYW2F8+/1gPQ2YfTVe5VH0uh4NzROA0ldpMCxcaGCl/Ghy3jQr24ebDv0Tq1BfxNtgQ0OjFP0EJKFp9Z0G3+D4tkkCB2Z6tqHIO06r8RCzKUBPoTitNRmGqTXZFOxzz8KxSUIyYLC+YOArc27v0xd/9+fotY+IF83sMcka98Ha/DGMLaO8NHq34lCIkt3EgVO7e26SSQK0Xy2g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tOjcM-0004YU-3g; Fri, 20 Dec 2024 15:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#67292: [PATCH v2 1/2] gnu: emacs: Pin natively compiled packages. References: <5b74251c-e6ab-bb39-7892-3a792ed6854d@telenet.be> In-Reply-To: <5b74251c-e6ab-bb39-7892-3a792ed6854d@telenet.be> Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, bug-guix@gnu.org, "Suhail Singh" Resent-Date: Fri, 20 Dec 2024 20:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67292 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 67292@debbugs.gnu.org Cc: Mekeor Melire , Maxime Devos , Suhail Singh , Simon Tournier , andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com X-Debbugs-Original-Xcc: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com Received: via spool by 67292-submit@debbugs.gnu.org id=B67292.173472653017472 (code B ref 67292); Fri, 20 Dec 2024 20:29:02 +0000 Received: (at 67292) by debbugs.gnu.org; 20 Dec 2024 20:28:50 +0000 Received: from localhost ([127.0.0.1]:44185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOjc9-0004Xk-O5 for submit@debbugs.gnu.org; Fri, 20 Dec 2024 15:28:50 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tOjc7-0004Xa-Fl for 67292@debbugs.gnu.org; Fri, 20 Dec 2024 15:28:48 -0500 Received: by mail-wm1-f66.google.com with SMTP id 5b1f17b1804b1-432d86a3085so16133915e9.2 for <67292@debbugs.gnu.org>; Fri, 20 Dec 2024 12:28:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734726467; x=1735331267; darn=debbugs.gnu.org; h=cc:to:content-transfer-encoding:mime-version:subject:date:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=8INrGxoBUT/msBmDbZQzNVmUBccPDnv9EUSxR/Zz1u8=; b=HSZFMjX8iEKygh6mfsjq3FRrNxoHAqcRUVtkdhxm7ZeJiQfnYrv6Xm1BskIeGHQHgx 1FjrvapeqdhU6pg/lm+GnbtAWBw0jQnx4Fs4e5L4D91dHSWpM4emaN4yFUHqmIg4/e4o cAhraxw7SjV4oeVnTzySg55qAyPf6n6sYG75km4HDQ4TmFLvY6s9CNXK9nfS93Gmmdan k3QKYBEE5IASkwhxfm/Jv6wN1GOVmv8AvzpcgTocHuLRGmdt5ngkNxra2FXwNnGO/sOs Dqgzg3fS64rb/mQa2gANrOaRwuLmWfnr8kqVqaJZPDtaH9lAK3XtiKU6kWUHZnYMwMDO wjcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734726467; x=1735331267; h=cc:to:content-transfer-encoding:mime-version:subject:date:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8INrGxoBUT/msBmDbZQzNVmUBccPDnv9EUSxR/Zz1u8=; b=lg0RdZ/vzsBlttesfo3Cp6W2mdjOBetlDBsAYtG60YPlphKPJXGOeYgDy3Wnc0T28z UuP+cw0XaDGvKbTyQvf6BHfCNmN4AViHQQgZZyeM3eH4jC74l/eFEbzf7e9c0NY4Zw8c SqtXTLds96MohGqlqBLW+6G2vGRUkEApfQsrKIhw9WW6pTtQxLc4iLIpCy0aESJ4dw+D 9GqbRDDgfcQeRALOTnijVTVSFOfdT+M5E0jr7jyIhTQ2Ewx+18YaM2VcmkdaJgGJx+Wv Ub+2q/HuPTIx8HOIIMFzlwqaI0hp+j5C0a/veGtWGeQ0ypd6JHXlhIkC9Akhm5Rf+I2u tYYg== X-Gm-Message-State: AOJu0YzPGUe75q8fTLBy4OG9u0wYdes8KRlxDlUc9wIGPMB822hKhbKL VobK6m5VEIN+loZkemWF6Tlj3n0VF/dwClLhPVdohuJtqoL5192xNOTw6PZC X-Gm-Gg: ASbGncvFo/03eY2JX0MQ49ormhPbOn69dGYhMYcc9PEL6+l/Ez2Hjj80ofSCMmYsva9 3mqIHWrFUk0FSSuv2N7JLc3nnALMCkTw32Mj4REbLyBCzrqX4wZiELHoG5brDqsC5REWHJE6x2/ J1j5+8XO1c7TypOHJ7kXG6tqlwgzuqq5fflr5T8CFJa3NSCiRnUuKs9vpH1+9lXet50O7SNLE+p EmNcQheA8ya4su8ENTokPhSFKE1oiuzz/Hs7t+3WBWEvdjtkzSNyFBDPKlkdPwOuJRbu14cbCCv TzaOpk/tHSWyNou50R0IXljeZAlGMsc/ X-Google-Smtp-Source: AGHT+IEW4Ub3dfV9SwE5GEgdUcsgtlGnmV4mq/mvA54YJgD8WV7DyFBEiT4s9aym12kAIhE+QbBPtg== X-Received: by 2002:a05:600c:3c98:b0:431:6083:cd38 with SMTP id 5b1f17b1804b1-4366854889amr36855425e9.6.1734726466534; Fri, 20 Dec 2024 12:27:46 -0800 (PST) Received: from lumine.fritz.box (85-127-114-32.dsl.dynamic.surfer.at. [85.127.114.32]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4366a093cbfsm27285025e9.22.2024.12.20.12.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 12:27:46 -0800 (PST) Message-ID: <01f9481f9ab86a21bc85e82a6f2a7e3457d2709e.1734726526.git.liliana.prikler@gmail.com> From: Liliana Marie Prikler Date: Sun, 8 Dec 2024 18:30:54 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: A253350568 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 0.89 X-Spam-Score: 0.89 X-TUID: Bw8GMEP5Qv/k * gnu/packages/patches/emacs-native-comp-pin-packages.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/emacs.scm (emacs)[source]: Use it here. [#:phases]: Remove ‘disable-native-compilation’. Fixes: Emacs native-comp collisions --- gnu/local.mk | 1 + gnu/packages/emacs.scm | 11 +----- .../emacs-native-comp-pin-packages.patch | 39 +++++++++++++++++++ 3 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 gnu/packages/patches/emacs-native-comp-pin-packages.patch diff --git a/gnu/local.mk b/gnu/local.mk index a02745d59c..652a6c1748 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1195,6 +1195,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-lispy-fix-thread-last-test.patch \ %D%/packages/patches/emacs-native-comp-driver-options.patch \ %D%/packages/patches/emacs-native-comp-fix-filenames.patch \ + %D%/packages/patches/emacs-native-comp-pin-packages.patch \ %D%/packages/patches/emacs-next-exec-path.patch \ %D%/packages/patches/emacs-next-native-comp-driver-options.patch \ %D%/packages/patches/emacs-pasp-mode-quote-file-names.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 8140f61882..b0690fc4fb 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -117,6 +117,7 @@ (define-public emacs-minimal "emacs-fix-scheme-indent-function.patch" "emacs-native-comp-driver-options.patch" "emacs-native-comp-fix-filenames.patch" + "emacs-native-comp-pin-packages.patch" "emacs-pgtk-super-key-fix.patch")) (modules '((guix build utils))) (snippet @@ -233,16 +234,6 @@ (define-public emacs-minimal (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process) (format #f "(or ~a (tramp-compat-process-running-p ~s))" all (string-append "." process "-real")))))) - (add-after 'unpack 'disable-native-compilation - (lambda _ - ;; Temporary workaround to prevent the behaviour discussed in - ;; . - ;; Please remove once the native-compilation for Emacs packages - ;; is fully supported. - (substitute* "lisp/transient.el" - ((";; End:") - ";; no-native-compile: t -;; End:")))) (add-before 'configure 'fix-/bin/pwd (lambda _ ;; Use `pwd', not `/bin/pwd'. diff --git a/gnu/packages/patches/emacs-native-comp-pin-packages.patch b/gnu/packages/patches/emacs-native-comp-pin-packages.patch new file mode 100644 index 0000000000..dc328f03a8 --- /dev/null +++ b/gnu/packages/patches/emacs-native-comp-pin-packages.patch @@ -0,0 +1,39 @@ +Index: emacs-29.4/src/lread.c +=================================================================== +--- emacs-29.4.orig/src/lread.c ++++ emacs-29.4/src/lread.c +@@ -1668,9 +1668,34 @@ directories, make sure the PREDICATE fun + + #ifdef HAVE_NATIVE_COMP + static bool ++permit_swap_for_eln (Lisp_Object src_name, Lisp_Object eln_name) ++{ ++ char *src = SSDATA (src_name), *eln = SSDATA (eln_name); ++ size_t eln_ln = strlen (eln); ++ ++ while (*src && *eln && *src == *eln) ++ { ++ ++src; ++eln; --eln_ln; ++ } ++ ++ /* After stripping common prefixes, the first directory should be ++ * "lib/" (inside the Guix store) or "native-lisp" (inside Emacs build). ++ * Alternatively, if eln contains "eln-cache", it's likely the user's ++ * cache, which we will also permit. */ ++ ++ return ++ (eln_ln > 4 && !strncmp (eln, "lib/", 4)) || ++ (eln_ln > 12 && !strncmp (eln, "native-lisp/", 12)) || ++ strstr (eln, "eln-cache") != NULL; ++} ++ ++static bool + maybe_swap_for_eln1 (Lisp_Object src_name, Lisp_Object eln_name, + Lisp_Object *filename, int *fd, struct timespec mtime) + { ++ if (!permit_swap_for_eln (src_name, eln_name)) ++ return false; ++ + struct stat eln_st; + int eln_fd = emacs_open (SSDATA (ENCODE_FILE (eln_name)), O_RDONLY, 0); + base-commit: 17d86ac9df841deca4f2f5e173f50bd2461fe680 -- 2.46.0