From b97d6dcd4b122c94e20dc18c7dde184a43a7928a Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 13 Mar 2025 12:47:28 +0000 Subject: [PATCH 1/8] Restore emacs-terminal subpackage We can drop this again for Fedora 44. See the discussion at https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/PWONA43D2WRBVDMZV6WFP3I2ML4CXQYN/ for more background. --- emacs.spec | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/emacs.spec b/emacs.spec index ad9b9b6..1974bcb 100644 --- a/emacs.spec +++ b/emacs.spec @@ -26,6 +26,9 @@ Source102: https://keys.openpgp.org/vks/v1/by-fingerprint/12BB9B400EE3F77282 Source4: dotemacs.el Source5: site-start.el Source6: default.el +# Emacs Terminal Mode, #551949, #617355 +Source7: emacs-terminal.desktop +Source8: emacs-terminal.sh Source9: emacs-desktop.sh # Avoid trademark issues @@ -246,6 +249,20 @@ This package contains all the common files needed by emacs, emacs-gtk+x11, emacs-lucid, or emacs-nw. + +%package terminal +Summary: A desktop menu item for GNU Emacs terminal. +Requires: (emacs or emacs-gtk+x11 or emacs-lucid) +BuildArch: noarch + +%description terminal +Contains a desktop menu item running GNU Emacs terminal. Install +emacs-terminal if you need a terminal with Malayalam support. + +Please note that emacs-terminal is a temporary package and it will be +removed when another terminal becomes capable of handling Malayalam. + + %package devel Summary: Development header files for Emacs @@ -504,9 +521,16 @@ install -p -m 0644 emacs.pc %{buildroot}/%{pkgconfig} mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d install -p -m 0644 macros.emacs %{buildroot}%{_rpmconfigdir}/macros.d/ +# Installing emacs-terminal binary +install -p -m 755 %SOURCE8 %{buildroot}%{_bindir}/emacs-terminal + # After everything is installed, remove info dir rm -f %{buildroot}%{_infodir}/dir +# Install desktop files +desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ + %SOURCE7 + # Install a wrapper to avoid running the Wayland-only build on X11 install -p -m 0755 %SOURCE9 %{buildroot}%{_bindir}/emacs-desktop @@ -749,8 +773,13 @@ fi %attr(0644,root,root) %config %{site_lisp}/site-start.el %{pkgconfig}/emacs.pc +%files terminal +%{_bindir}/emacs-terminal +%{_datadir}/applications/emacs-terminal.desktop + %files devel %{_includedir}/emacs-module.h + %changelog %autochangelog From f14059519ac6d87c90c102d16c4889d208ad88d4 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 13 Mar 2025 12:50:15 +0000 Subject: [PATCH 2/8] Tidy up Recommends of emacs-common. --- emacs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index 1974bcb..3bd6b6c 100644 --- a/emacs.spec +++ b/emacs.spec @@ -224,7 +224,7 @@ Requires: /usr/bin/readlink Requires: %{name}-filesystem Requires: emacsclient Requires: libgccjit -Recommends: (emacs or emacs-gtk+x11 or emacs-lucid or emacs-nw) +Recommends: emacs(bin) Recommends: enchant2 Recommends: info Provides: %{name}-el = %{epoch}:%{version}-%{release} From 49350257642ec941ad3765adfdccfb3aec7e1670 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 16 Mar 2025 23:48:00 +0000 Subject: [PATCH 3/8] Lower alternatives priority of emacs-nw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It shouldn’t have the same priority as emacs-lucid. --- emacs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index 3bd6b6c..36cb2b5 100644 --- a/emacs.spec +++ b/emacs.spec @@ -684,7 +684,7 @@ if [ $1 = 0 ]; then fi %posttrans nw -/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nw 70 || : +/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nw 65 || : # The preun scriptlet of packages before 29.4-5 will remove this symlink # after it has been installed, so we may need to put it back: if [ $1 = 2 -a ! -h %{_bindir}/emacs-nw ]; then From 8bf6e1dbf0a122c711a36cf661651e3d6a9813c0 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 4 Apr 2025 15:56:38 +0100 Subject: [PATCH 4/8] For consistency, emacs RPM Provides: emacs-pgtk. --- emacs.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs.spec b/emacs.spec index 36cb2b5..a162733 100644 --- a/emacs.spec +++ b/emacs.spec @@ -129,6 +129,7 @@ Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} Requires: libpixbufloader-xpm.so%{?marker} Provides: emacs(bin) = %{epoch}:%{version}-%{release} +Provides: emacs-pgtk = %{epoch}:%{version}-%{release} Supplements: ((libwayland-server and emacs-common) unless emacs-nw) %define site_lisp %{_datadir}/emacs/site-lisp From 60275486b2a3679571d34bc1115b2003356d6d02 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 8 Apr 2025 14:23:58 +0100 Subject: [PATCH 5/8] Fix compilation errors due to insufficient compiler safety MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes bug #2350949 (‘package-install-from-buffer fails with "Can't read whole string"’). --- ...errors-due-to-insufficient-compiler-.patch | 36 +++++++++++++++++++ emacs.spec | 4 +++ 2 files changed, 40 insertions(+) create mode 100644 0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch diff --git a/0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch b/0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch new file mode 100644 index 0000000..bfdd8cf --- /dev/null +++ b/0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch @@ -0,0 +1,36 @@ +From 6cac92928a99a2cf33aeeeddf295cf981750391c Mon Sep 17 00:00:00 2001 +From: Pip Cet +Date: Mon, 17 Feb 2025 15:21:16 +0000 +Subject: [PATCH] Fix compilation errors due to insufficient compiler safety + (bug#63288) + +The default safety level is 1. Restoring the default safety level to +1 after it was temporarily 0 should reset byte-compile-delete-errors +to nil, its default level. Failing to do that resulted in +miscompilation of code in highly-parallel builds. + +* lisp/emacs-lisp/cl-macs.el (cl--do-proclaim): Change +'byte-compile-delete-errors' to become t only at 'safety' level 0, not +levels 1 or 2. + +(cherry picked from commit 53a5dada413662389a17c551a00d215e51f5049f) +--- + lisp/emacs-lisp/cl-macs.el | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el +index 8caf2f1eac0..2a0a9e5c6de 100644 +--- a/lisp/emacs-lisp/cl-macs.el ++++ b/lisp/emacs-lisp/cl-macs.el +@@ -2670,7 +2670,7 @@ cl--do-proclaim + (let ((speed (assq (nth 1 (assq 'speed (cdr spec))) + '((0 nil) (1 t) (2 t) (3 t)))) + (safety (assq (nth 1 (assq 'safety (cdr spec))) +- '((0 t) (1 t) (2 t) (3 nil))))) ++ '((0 t) (1 nil) (2 nil) (3 nil))))) + (if speed (setq cl--optimize-speed (car speed) + byte-optimize (nth 1 speed))) + (if safety (setq cl--optimize-safety (car safety) +-- +2.49.0 + diff --git a/emacs.spec b/emacs.spec index a162733..0102503 100644 --- a/emacs.spec +++ b/emacs.spec @@ -52,6 +52,10 @@ Patch: emacs-pgtk-on-x-error-message.patch # gets any new backends, this patch may need extending. Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch +# Ahead-of-time native compilation breaks some lisp without this patch. +# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76523 +Patch: 0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch + BuildRequires: alsa-lib-devel BuildRequires: atk-devel BuildRequires: autoconf From 657137513a53bb211ceacf253f3e80d9de31f766 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 16 Jun 2025 00:15:03 +0100 Subject: [PATCH 6/8] Restore compatibility with recent Tree-sitter parsers. --- ...-sitter-grammar-filename-format-bug-.patch | 55 +++++++++++++++++++ emacs.spec | 4 ++ 2 files changed, 59 insertions(+) create mode 100644 0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch diff --git a/0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch b/0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch new file mode 100644 index 0000000..495840b --- /dev/null +++ b/0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch @@ -0,0 +1,55 @@ +From 941158fc133f9722abbca8b89a0a346230b83998 Mon Sep 17 00:00:00 2001 +From: Yuan Fu +Date: Tue, 10 Jun 2025 22:55:58 -0700 +Subject: [PATCH] Support new tree-sitter grammar filename format (bug#78754) + +Previously Emacs only looks for filenames like +libtree-sitter-json.so.0.0. Now Emacs also look for filenames +like libtree-sitter-json.so.15.0. + +* src/treesit.c: +(treesit_load_language_push_for_each_suffix): Add versioned +candidate to candidate list too. +--- + src/treesit.c | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/src/treesit.c b/src/treesit.c +index 3a0e9674f65..45d1bc58b06 100644 +--- a/src/treesit.c ++++ b/src/treesit.c +@@ -603,14 +603,29 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name, + Lisp_Object candidate1 = concat2 (lib_base_name, XCAR (suffixes)); + #ifndef WINDOWSNT + /* On Posix hosts, support libraries named with ABI version +- numbers. In the foreseeable future we only need to support +- version 0.0. For more details, see ++ numbers. Originally tree-sitter grammars are always versioned ++ at 0.0, so we first try that. For more details, see + https://lists.gnu.org/archive/html/emacs-devel/2023-04/msg00386.html. */ + Lisp_Object candidate2 = concat2 (candidate1, Vtreesit_str_dot_0); + Lisp_Object candidate3 = concat2 (candidate2, Vtreesit_str_dot_0); + + *path_candidates = Fcons (candidate3, *path_candidates); + *path_candidates = Fcons (candidate2, *path_candidates); ++ ++ /* Since 2025, tree-sitter grammars use their supported ++ TREE_SITTER_LANGUAGE_VERSION as the major version. So we need ++ to try all the version supported by the tree-sitter library ++ too. (See bug#78754) */ ++ for (int version = TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION; ++ version <= TREE_SITTER_LANGUAGE_VERSION; ++ version++) ++ { ++ char ext[16]; // 16 should be enough until the end of universe. ++ snprintf ((char *) &ext, 16, ".%d.0", version); ++ Lisp_Object versioned_candidate = concat2 (candidate1, ++ build_string (ext)); ++ *path_candidates = Fcons (versioned_candidate, *path_candidates); ++ } + #endif + *path_candidates = Fcons (candidate1, *path_candidates); + } +-- +2.49.0 + diff --git a/emacs.spec b/emacs.spec index 0102503..24a6d6d 100644 --- a/emacs.spec +++ b/emacs.spec @@ -56,6 +56,10 @@ Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76523 Patch: 0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch +# Restores compatibility with recent Tree-sitter parsers. +# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78754 +Patch: 0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch + BuildRequires: alsa-lib-devel BuildRequires: atk-devel BuildRequires: autoconf From e6a65ae22b72f417b3de30db958007bc3c1a7502 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 16 Jun 2025 11:59:55 +0100 Subject: [PATCH 7/8] Package emacsclient should conflict with the last F40 emacs-common. --- emacs.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/emacs.spec b/emacs.spec index 24a6d6d..697cd4f 100644 --- a/emacs.spec +++ b/emacs.spec @@ -212,9 +212,7 @@ support, for running on a terminal only. %package -n emacsclient Summary: Remotely control GNU Emacs - -# This is a moving target whilst Fedora 40 is still receivng updates: -Conflicts: emacs-common < %{epoch}:%{version}-%{release} +Conflicts: emacs-common < 1:29.4-12 %description -n emacsclient %desc From dd8896f646b1f5bab5d38a9dd1436d6b7a873aca Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 15 Aug 2025 11:12:37 +0100 Subject: [PATCH 8/8] Update to version 30.2, fixing rhbz#2388544 --- .gitignore | 2 + ...errors-due-to-insufficient-compiler-.patch | 36 ------------ ...-sitter-grammar-filename-format-bug-.patch | 55 ------------------- emacs.spec | 10 +--- sources | 4 +- 5 files changed, 5 insertions(+), 102 deletions(-) delete mode 100644 0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch delete mode 100644 0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch diff --git a/.gitignore b/.gitignore index a859577..3aa373c 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,5 @@ /results_emacs/ /emacs-30.1.tar.xz /emacs-30.1.tar.xz.sig +/emacs-30.2.tar.xz +/emacs-30.2.tar.xz.sig diff --git a/0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch b/0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch deleted file mode 100644 index bfdd8cf..0000000 --- a/0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 6cac92928a99a2cf33aeeeddf295cf981750391c Mon Sep 17 00:00:00 2001 -From: Pip Cet -Date: Mon, 17 Feb 2025 15:21:16 +0000 -Subject: [PATCH] Fix compilation errors due to insufficient compiler safety - (bug#63288) - -The default safety level is 1. Restoring the default safety level to -1 after it was temporarily 0 should reset byte-compile-delete-errors -to nil, its default level. Failing to do that resulted in -miscompilation of code in highly-parallel builds. - -* lisp/emacs-lisp/cl-macs.el (cl--do-proclaim): Change -'byte-compile-delete-errors' to become t only at 'safety' level 0, not -levels 1 or 2. - -(cherry picked from commit 53a5dada413662389a17c551a00d215e51f5049f) ---- - lisp/emacs-lisp/cl-macs.el | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el -index 8caf2f1eac0..2a0a9e5c6de 100644 ---- a/lisp/emacs-lisp/cl-macs.el -+++ b/lisp/emacs-lisp/cl-macs.el -@@ -2670,7 +2670,7 @@ cl--do-proclaim - (let ((speed (assq (nth 1 (assq 'speed (cdr spec))) - '((0 nil) (1 t) (2 t) (3 t)))) - (safety (assq (nth 1 (assq 'safety (cdr spec))) -- '((0 t) (1 t) (2 t) (3 nil))))) -+ '((0 t) (1 nil) (2 nil) (3 nil))))) - (if speed (setq cl--optimize-speed (car speed) - byte-optimize (nth 1 speed))) - (if safety (setq cl--optimize-safety (car safety) --- -2.49.0 - diff --git a/0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch b/0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch deleted file mode 100644 index 495840b..0000000 --- a/0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 941158fc133f9722abbca8b89a0a346230b83998 Mon Sep 17 00:00:00 2001 -From: Yuan Fu -Date: Tue, 10 Jun 2025 22:55:58 -0700 -Subject: [PATCH] Support new tree-sitter grammar filename format (bug#78754) - -Previously Emacs only looks for filenames like -libtree-sitter-json.so.0.0. Now Emacs also look for filenames -like libtree-sitter-json.so.15.0. - -* src/treesit.c: -(treesit_load_language_push_for_each_suffix): Add versioned -candidate to candidate list too. ---- - src/treesit.c | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) - -diff --git a/src/treesit.c b/src/treesit.c -index 3a0e9674f65..45d1bc58b06 100644 ---- a/src/treesit.c -+++ b/src/treesit.c -@@ -603,14 +603,29 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name, - Lisp_Object candidate1 = concat2 (lib_base_name, XCAR (suffixes)); - #ifndef WINDOWSNT - /* On Posix hosts, support libraries named with ABI version -- numbers. In the foreseeable future we only need to support -- version 0.0. For more details, see -+ numbers. Originally tree-sitter grammars are always versioned -+ at 0.0, so we first try that. For more details, see - https://lists.gnu.org/archive/html/emacs-devel/2023-04/msg00386.html. */ - Lisp_Object candidate2 = concat2 (candidate1, Vtreesit_str_dot_0); - Lisp_Object candidate3 = concat2 (candidate2, Vtreesit_str_dot_0); - - *path_candidates = Fcons (candidate3, *path_candidates); - *path_candidates = Fcons (candidate2, *path_candidates); -+ -+ /* Since 2025, tree-sitter grammars use their supported -+ TREE_SITTER_LANGUAGE_VERSION as the major version. So we need -+ to try all the version supported by the tree-sitter library -+ too. (See bug#78754) */ -+ for (int version = TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION; -+ version <= TREE_SITTER_LANGUAGE_VERSION; -+ version++) -+ { -+ char ext[16]; // 16 should be enough until the end of universe. -+ snprintf ((char *) &ext, 16, ".%d.0", version); -+ Lisp_Object versioned_candidate = concat2 (candidate1, -+ build_string (ext)); -+ *path_candidates = Fcons (versioned_candidate, *path_candidates); -+ } - #endif - *path_candidates = Fcons (candidate1, *path_candidates); - } --- -2.49.0 - diff --git a/emacs.spec b/emacs.spec index 697cd4f..00d464b 100644 --- a/emacs.spec +++ b/emacs.spec @@ -8,7 +8,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 -Version: 30.1 +Version: 30.2 Release: %autorelease License: GPL-3.0-or-later AND CC0-1.0 URL: https://www.gnu.org/software/emacs/ @@ -52,14 +52,6 @@ Patch: emacs-pgtk-on-x-error-message.patch # gets any new backends, this patch may need extending. Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch -# Ahead-of-time native compilation breaks some lisp without this patch. -# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76523 -Patch: 0001-Fix-compilation-errors-due-to-insufficient-compiler-.patch - -# Restores compatibility with recent Tree-sitter parsers. -# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78754 -Patch: 0001-Support-new-tree-sitter-grammar-filename-format-bug-.patch - BuildRequires: alsa-lib-devel BuildRequires: atk-devel BuildRequires: autoconf diff --git a/sources b/sources index 11bd85d..37f14cc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (emacs-30.1.tar.xz) = 511a6a1d2a170a207913692e1349344b70a0b5202b8d1ae27dc7256e589c77ae9e35da16fc2a098bf9f1b8d0f60233f452ed8d6744b70b907f3484c42f2d7d7f -SHA512 (emacs-30.1.tar.xz.sig) = 59ef724ff765fb76b9b9cfb8bd3853e001e9e6cefa65e2c49822238c11d619f916284f5b118cefff1bcd6c70f4ebcc1e420754cc225002164b56ced3caa954bd +SHA512 (emacs-30.2.tar.xz) = 313432d11e95c74f8cd35c5b1da442e6223f5d40f9173c55883c0339ecbfb97a0bedf79177ef8902afd3e33c078a233777bed01f5caffa1e7524f17d58bfc9a2 +SHA512 (emacs-30.2.tar.xz.sig) = ab5b5d0624b37ac662cf9914e8807fc37ee273c107f1a19ca75a527b6b9a85ce35f9436d03d8a988876cce7e7bebcc6c4a1251b0ceb08785b56bf42743f246e1