From patchwork Fri Mar 28 09:43:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gabriel Santos X-Patchwork-Id: 40900 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BFEC127BBE2; Fri, 28 Mar 2025 09:58:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C5B1427BBE9 for ; Fri, 28 Mar 2025 09:58:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ty6Sz-00038s-6o; Fri, 28 Mar 2025 05:57:33 -0400 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 1ty6Hq-00011F-Ds for guix-patches@gnu.org; Fri, 28 Mar 2025 05:46:02 -0400 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 1ty6Hq-0002rT-4t for guix-patches@gnu.org; Fri, 28 Mar 2025 05:46:02 -0400 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=GZ/WMW7pFR4EX5cwIZUW5IROPBaE5IBr8hXjr4636y0=; b=t1xFzfcqLHOwfluq05wyAMLU7LSykb+Q+ZH2dWvgBmGjTg7IvPcd4Wr0Hi5vf7u7xIrmyuUTdzhmLYJYYkoM2ExfxcntFX1WolMF9n/+tE6NhQFhZXOE9BXGW91jnL8VVdnTvb69xuQEn79JNr5Kx4Mu6xW1Qyj9mZdy5nkIUl2hHIYFBEufH5hvMZoRh3bFcjQrl6DSUYcu+h3zEihVGq4NeeM3FpWv6CmCvVvP3XvzsChlOLGWibSsN1B0Uo9gJ/GZ3oxJhvIv5ds2S/PGEJ9qTlWP884PwYH2ke7BomTsvn9W5n2aq3rubSmutixZLtEb0UZQGripcFYAx+JxoQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ty6Hp-0000B7-OJ for guix-patches@gnu.org; Fri, 28 Mar 2025 05:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77225] [PATCH v2 1/2] gnu: emacs-next: Update to 31.0.50-0.467aba6. References: <20250324020649.7991-1-gabrielsantosdesouza@disroot.org> In-Reply-To: <20250324020649.7991-1-gabrielsantosdesouza@disroot.org> Resent-From: Gabriel Santos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 28 Mar 2025 09:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77225 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77225@debbugs.gnu.org Cc: Gabriel Santos , gabrielsantosdesouza@disroot.org Received: via spool by 77225-submit@debbugs.gnu.org id=B77225.1743155139633 (code B ref 77225); Fri, 28 Mar 2025 09:46:01 +0000 Received: (at 77225) by debbugs.gnu.org; 28 Mar 2025 09:45:39 +0000 Received: from localhost ([127.0.0.1]:52887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ty6HQ-00009x-C2 for submit@debbugs.gnu.org; Fri, 28 Mar 2025 05:45:38 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:45165) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ty6HL-00009d-RI for 77225@debbugs.gnu.org; Fri, 28 Mar 2025 05:45:34 -0400 Received: by mail-pl1-x643.google.com with SMTP id d9443c01a7336-22423adf751so37150495ad.2 for <77225@debbugs.gnu.org>; Fri, 28 Mar 2025 02:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743155125; x=1743759925; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GZ/WMW7pFR4EX5cwIZUW5IROPBaE5IBr8hXjr4636y0=; b=knHiC2JExgf+ECO1safM8U298ao3eV8CrPhwaaB+G7DS0SK076v3VBYD7V75KLN+Y1 2V0t6xcYeY806zkx7QK6VJUsSIE+RaGv0Enhe0ZnKf593isrWrFwJVKpmztxnAjSPyMI J1cKjf2ikpNoHv5OqFe9yCP7EsHLWVINMUN/W8b1ngUktaWcJeP4aGNif/LHdT5D65up bs+zzQo9piPPV9HlhA2NMuJ1bR36O+dJXS6WvSTDVPaIGAn9/OLp56EOxS9o0T6m5D8g /sC5GAI/TXeSLFKdQ66x8Dc2JHx1yTqUS/eHJqtjuYp9ll7oHtY047cmi06azvmwaqGR 5tJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743155125; x=1743759925; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GZ/WMW7pFR4EX5cwIZUW5IROPBaE5IBr8hXjr4636y0=; b=dFuimlwMeFs1q25VH05b41KU9zmPyoYm3BcZ0ockmLi3K99zOy1aVfnfS0oxQyA+rn L/zNkVJj90lO/pwc/hnZ7NBXnr3Ss96/XEcoYmDTxp1vL716vbCmOgIwj5NT0DJ7vz1C J+nViBscf5ZLlvPShmoHgnXmPwWFF9/d5YA8FrCapSlJR4ChI7cygPwWryk7dZvFRJpD KEv+jOvHjTHTERUWoN7m9zv8a+EBq9Xp8U9xkmIKtTRpxta5uaiIgh5qQiU74eVS0M7C wkuOfLRaoq3eJbOs6ls6qCrz0nGLnteDbkGeVeiHLbJargh42osZQiqcTI3osl8qgMiO 7/5w== X-Gm-Message-State: AOJu0YzvBgVDcrorr+W1Y2RMOaQeBrui44LBaQN2oWQcxkkmBkpW7Jxa UfJm7Hd9/qbb7JL3QK+w5dOXF43zU4tvmdb/lAE9e2JwsrPdaZHZKb6RahFxSTn21A== X-Gm-Gg: ASbGncuLCog1L7ftcy3eXF0Qfgi6pQzN8EbrW+ogNrw/PE+CUSXxZ9ml8Kjb7pxrNCK c0DWbKlg+c8YPxDJvNTO9hoBsyLzo6K1PT5RVRlsAnWblnN+wNV6gPkZjHO4P0oIStmy8GcT0l4 PfBoabuAwTV6tloXt+4qcymLYt4ryBgWhZ4zGkOBynh3lkHXlYAtg41ebcwBkMk/qUGBTvp6t+l wIW/2Oo99O+jycgdCsO83F5Zwo9Uotj/MqMcZ8N7cxhMORf1rshsgjDVM1sMWxHx/RA1sx2xqmR lAtZoSk1qkw6uWt85Hq9gmSnvYd6MvAVw+FpKkpzB0V3N9SG7ZgAZmdwKcAWNUif2Oh/pzHWf/1 Y5465OCtAdA== X-Google-Smtp-Source: AGHT+IEuNICH2FNra5GIyQmRb1+tW1YdkbafTm5GSKAmqRfy9WUFKVMzz5SO/FbQ9qjcUH4c5gTYbg== X-Received: by 2002:a17:902:c411:b0:224:26fd:82e5 with SMTP id d9443c01a7336-22804942735mr112096525ad.48.1743155124733; Fri, 28 Mar 2025 02:45:24 -0700 (PDT) Received: from localhost (177-70-164-151.infotec.psi.br. [177.70.164.151]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2291eedf9b4sm13814625ad.84.2025.03.28.02.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Mar 2025 02:45:24 -0700 (PDT) From: Gabriel Santos X-Google-Original-From: Gabriel Santos Date: Fri, 28 Mar 2025 06:43:06 -0300 Message-ID: <20250328094435.8671-2-gabrielsantosdesouza@disroot.org> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Fri, 28 Mar 2025 05:57:25 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Gabriel Santos * gnu/packages/emacs.scm (emacs-next-minimal): Update to 31.0.50-0.467aba6. * gnu/packages/patches/emacs-next-disable-jit-compilation.patch: New patch. * gnu/packages/patches/emacs-disable-jit-compilation.patch: Fix typo. * gnu/packages/patches/emacs-next-native-comp-fix-filenames.patch: Regenerate. Change-Id: I529eb49208c319692c19bb1057a069cb856e1426 --- gnu/packages/emacs.scm | 7 ++- .../emacs-disable-jit-compilation.patch | 2 +- .../emacs-next-disable-jit-compilation.patch | 19 +++++++ ...emacs-next-native-comp-fix-filenames.patch | 56 +++++++++---------- 4 files changed, 52 insertions(+), 32 deletions(-) create mode 100644 gnu/packages/patches/emacs-next-disable-jit-compilation.patch diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index deebb7282d..7d15ddb732 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2022 Zhu Zihao ;;; Copyright © 2023 Declan Tsien ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2025 Gabriel Santos ;;; ;;; This file is part of GNU Guix. ;;; @@ -572,7 +573,7 @@ (define-public emacs-wide-int #~(cons "--with-wide-int" #$flags)))))) (define-public emacs-next-minimal - (let ((commit "60232a30e360c00fb303cb033d4aec15a9e41342") + (let ((commit "467aba67db407e930fc5de6d4a4ae0cd6fc106df") (revision "0")) (package (inherit emacs-minimal) @@ -586,9 +587,9 @@ (define-public emacs-next-minimal (commit commit))) (file-name (git-file-name name version)) (sha256 - (base32 "1n1i20j92a8sqv224yzvyzk804h9x0lgyp3jlny3b6g08ka91034")) + (base32 "05gnavcy1zv1ab4zglqyxfrqym4mq778rwnidqfmafwfk0rzmnn8")) (patches - (search-patches "emacs-disable-jit-compilation.patch" + (search-patches "emacs-next-disable-jit-compilation.patch" "emacs-next-exec-path.patch" "emacs-fix-scheme-indent-function.patch" "emacs-native-comp-driver-options.patch" diff --git a/gnu/packages/patches/emacs-disable-jit-compilation.patch b/gnu/packages/patches/emacs-disable-jit-compilation.patch index 8b1ac5a9df..f04b8a3cb7 100644 --- a/gnu/packages/patches/emacs-disable-jit-compilation.patch +++ b/gnu/packages/patches/emacs-disable-jit-compilation.patch @@ -11,7 +11,7 @@ Index: emacs-29.2/src/comp.c +natively-compiled one. This variable is enabled by default upstream, +but disabled in Guix to better make use of precompiled packages. +Notably, Guix removes the hashes that prevent inadvertent shadowing -+frm the file names of compiled libraries in order to facilitate grafts. ++from the file names of compiled libraries in order to facilitate grafts. +Enable at your own risk! */); + native_comp_jit_compilation = false; diff --git a/gnu/packages/patches/emacs-next-disable-jit-compilation.patch b/gnu/packages/patches/emacs-next-disable-jit-compilation.patch new file mode 100644 index 0000000000..04145dda17 --- /dev/null +++ b/gnu/packages/patches/emacs-next-disable-jit-compilation.patch @@ -0,0 +1,19 @@ +Index: emacs-29.2/src/comp.c +=================================================================== +--- emacs-29.2.orig/src/comp.c ++++ emacs-29.2/src/comp.c +@@ -5556,7 +5556,11 @@ syms_of_comp (void) + doc: /* If non-nil, compile loaded .elc files asynchronously. + + After compilation, each function definition is updated to use the +-natively compiled one. */); +- native_comp_jit_compilation = true; ++natively compiled one. This variable is enabled by default upstream, ++but disabled in Guix to better make use of precompiled packages. ++Notably, Guix removes the hashes that prevent inadvertent shadowing ++from the file names of compiled libraries in order to facilitate grafts. ++Enable at your own risk! */); ++ native_comp_jit_compilation = false; + + DEFSYM (Qnative_comp_speed, "native-comp-speed"); + DEFSYM (Qnative_comp_debug, "native-comp-debug"); \ No newline at end of file diff --git a/gnu/packages/patches/emacs-next-native-comp-fix-filenames.patch b/gnu/packages/patches/emacs-next-native-comp-fix-filenames.patch index 54670218ed..016cf4cc42 100644 --- a/gnu/packages/patches/emacs-next-native-comp-fix-filenames.patch +++ b/gnu/packages/patches/emacs-next-native-comp-fix-filenames.patch @@ -16,7 +16,7 @@ Index: emacs/src/comp.c =================================================================== --- emacs.orig/src/comp.c +++ emacs/src/comp.c -@@ -4279,26 +4279,17 @@ DEFUN ("comp-el-to-eln-rel-filename", Fc +@@ -4390,26 +4390,17 @@ DEFUN ("comp-el-to-eln-rel-filename", Fc Scomp_el_to_eln_rel_filename, 1, 1, 0, doc: /* Return the relative name of the .eln file for FILENAME. FILENAME must exist, and if it's a symlink, the target must exist. @@ -32,7 +32,7 @@ Index: emacs/src/comp.c (Lisp_Object filename) { CHECK_STRING (filename); - + - /* Resolve possible symlinks in FILENAME, so that path_hash below - always compares equal. (Bug#44701). */ - filename = Fexpand_file_name (filename, Qnil); @@ -44,15 +44,15 @@ Index: emacs/src/comp.c - xfree (file_normalized); - } + Lisp_Object rel_name = filename; - + + filename = Fexpand_file_name (filename, Qnil); if (NILP (Ffile_exists_p (filename))) xsignal1 (Qfile_missing, filename); - -@@ -4306,64 +4297,55 @@ one for the file name and another for it + +@@ -4417,64 +4408,55 @@ one for the file name and another for it filename = Fw32_long_file_name (filename); #endif - + - Lisp_Object content_hash = comp_hash_source_file (filename); - - if (suffix_p (filename, ".gz")) @@ -93,7 +93,7 @@ Index: emacs/src/comp.c - } + Lisp_Object tail = Vload_path; + Lisp_Object name_len = Flength (filename); - + - Lisp_Object lds_re_tail = loadsearch_re_list; - FOR_EACH_TAIL (lds_re_tail) + FOR_EACH_TAIL_SAFE (tail) @@ -155,9 +155,9 @@ Index: emacs/src/comp.c + return concat2(Fsubstring (filename, Qnil, make_fixnum (-3)), + build_string (NATIVE_ELISP_SUFFIX)); } - + DEFUN ("comp-el-to-eln-filename", Fcomp_el_to_eln_filename, -@@ -4377,13 +4359,7 @@ If BASE-DIR is non-nil, use it as the di +@@ -4488,13 +4470,7 @@ If BASE-DIR is non-nil, use it as the di non-absolute BASE-DIR is interpreted as relative to `invocation-directory'. If BASE-DIR is omitted or nil, look for the first writable directory in `native-comp-eln-load-path', and use as BASE-DIR its subdirectory @@ -172,7 +172,7 @@ Index: emacs/src/comp.c (Lisp_Object filename, Lisp_Object base_dir) { Lisp_Object source_filename = filename; -@@ -4431,10 +4407,11 @@ the latter is supposed to be used by the +@@ -4542,10 +4518,11 @@ the latter is supposed to be used by the Lisp_Object lisp_preloaded = Fgetenv_internal (build_string ("LISP_PRELOADED"), Qnil); base_dir = Fexpand_file_name (Vcomp_native_version_dir, base_dir); @@ -185,34 +185,34 @@ Index: emacs/src/comp.c + Fmapcar (intern_c_string ("file-name-sans-extension"), CALLNI (split-string, lisp_preloaded)))))) base_dir = Fexpand_file_name (build_string ("preloaded"), base_dir); - -@@ -5741,10 +5718,7 @@ The last directory of this list is assum + +@@ -5866,10 +5843,7 @@ The last directory of this list is assum the system *.eln files, which are the files produced when building Emacs. */); - + - /* Temporary value in use for bootstrap. We can't do better as - `invocation-directory' is still unset, will be fixed up during - dump reload. */ - Vnative_comp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil); + Vnative_comp_eln_load_path = Qnil; - + DEFVAR_LISP ("native-comp-enable-subr-trampolines", Vnative_comp_enable_subr_trampolines, Index: emacs/lisp/startup.el =================================================================== --- emacs.orig/lisp/startup.el +++ emacs/lisp/startup.el -@@ -520,9 +520,6 @@ DIRS are relative." +@@ -527,9 +527,6 @@ DIRS are relative." (defvar native-comp-jit-compilation) (defvar native-comp-enable-subr-trampolines) - + -(defvar startup--original-eln-load-path nil - "Original value of `native-comp-eln-load-path'.") - (defun startup-redirect-eln-cache (cache-directory) "Redirect the user's eln-cache directory to CACHE-DIRECTORY. CACHE-DIRECTORY must be a single directory, a string. -@@ -533,22 +530,10 @@ to `user-emacs-directory'. +@@ -540,22 +537,10 @@ to `user-emacs-directory'. For best results, call this function in your early-init file, so that the rest of initialization and package loading uses the updated value." @@ -222,7 +222,7 @@ Index: emacs/lisp/startup.el (push (expand-file-name (file-name-as-directory cache-directory) user-emacs-directory) native-comp-eln-load-path)) - + -(defun startup--update-eln-cache () - "Update the user eln-cache directory due to user customizations." - ;; Don't override user customizations! @@ -235,20 +235,20 @@ Index: emacs/lisp/startup.el (defun startup--rescale-elt-match-p (font-pattern font-object) "Test whether FONT-OBJECT matches an element of `face-font-rescale-alist'. FONT-OBJECT is a font-object that specifies a font to test. -@@ -771,9 +756,6 @@ It is the default value of the variable +@@ -778,9 +763,6 @@ It is the default value of the variable `top-level'." (unwind-protect (command-line) - + - (when (featurep 'native-compile) - (startup--update-eln-cache)) - ;; Do this again, in case .emacs defined more abbreviations. (if default-directory (setq default-directory (abbreviate-file-name default-directory))) -@@ -1385,12 +1367,6 @@ please check its value") +@@ -1392,12 +1374,6 @@ please check its value") startup-init-directory))) (setq early-init-file user-init-file) - + - ;; Amend `native-comp-eln-load-path', since the early-init file may - ;; have altered `user-emacs-directory' and/or changed the eln-cache - ;; directory. @@ -258,10 +258,10 @@ Index: emacs/lisp/startup.el ;; If any package directory exists, initialize the package system. (and user-init-file package-enable-at-startup -@@ -1525,12 +1501,6 @@ please check its value") +@@ -1532,12 +1508,6 @@ please check its value") startup-init-directory)) t) - + - ;; Amend `native-comp-eln-load-path' again, since the early-init - ;; file may have altered `user-emacs-directory' and/or changed the - ;; eln-cache directory. @@ -290,7 +290,7 @@ Index: emacs/lisp/loadup.el ;; Add subdirectories to the load-path for files that might get ;; autoloaded when bootstrapping or running Emacs normally. -@@ -522,27 +530,25 @@ This to have it working when installed o +@@ -538,27 +546,25 @@ This to have it working when installed o directory got moved. This is set to be a pair in the form of: \(rel-filename-from-install-bin . rel-filename-from-local-bin)." (when (and load--bin-dest-dir load--eln-dest-dir) @@ -330,7 +330,7 @@ Index: emacs/lisp/loadup.el ;; Relative filename from the built uninstalled binary. (file-relative-name file invocation-directory)))))) comp-loaded-comp-units-h))) -@@ -609,7 +615,9 @@ directory got moved. This is set to be +@@ -643,7 +649,9 @@ directory got moved. This is set to be (equal dump-mode "pdump")) ;; Don't enable this before bootstrap is completed, as the ;; compiler infrastructure may not be usable yet. @@ -345,11 +345,11 @@ Index: emacs/src/Makefile.in =================================================================== --- emacs.orig/src/Makefile.in +++ emacs/src/Makefile.in -@@ -567,6 +567,7 @@ shortlisp := $(filter-out ${shortlisp_fi +@@ -592,6 +592,7 @@ shortlisp := $(filter-out ${shortlisp_fi ## We don't really need to sort, but may as well use it to remove duplicates. shortlisp := loaddefs.el loadup.el $(sort ${shortlisp}) export LISP_PRELOADED = ${shortlisp} +export NATIVE_COMP_BOGUS_DIRS = lisp = $(addprefix ${lispsource}/,${shortlisp}) - ## Construct full set of libraries to be linked. + ## Construct full set of libraries to be linked. \ No newline at end of file