From 12239bab400349c2c68bd1934bbd650160c452cb Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 10 Jul 2024 18:02:39 +0100 Subject: [PATCH 01/65] Prefer `make install` to our own approximations. --- emacs.spec | 135 +++++++++++++++++++++++++++-------------------------- 1 file changed, 70 insertions(+), 65 deletions(-) diff --git a/emacs.spec b/emacs.spec index 43f49e3..6a25efd 100644 --- a/emacs.spec +++ b/emacs.spec @@ -311,7 +311,8 @@ export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}" mkdir build-lucid && cd build-lucid ln -s ../configure . -%configure --with-cairo \ +%configure --program-suffix=-lucid \ + --with-cairo \ --with-dbus \ --with-gif \ --with-gpm=no \ @@ -332,7 +333,6 @@ ln -s ../configure . --with-xpm %{setarch} %make_build bootstrap %{setarch} %make_build -rm src/emacs-%{version}.* cd .. %endif @@ -340,7 +340,8 @@ cd .. # Build binary without X support mkdir build-nw && cd build-nw ln -s ../configure . -%configure --with-json \ +%configure --program-suffix=-nw \ + --with-json \ --with-modules \ --with-native-compilation=aot \ --with-sqlite3 \ @@ -351,7 +352,6 @@ ln -s ../configure . --with-x=no %{setarch} %make_build bootstrap %{setarch} %make_build -rm src/emacs-%{version}.* cd .. %endif @@ -360,7 +360,8 @@ cd .. mkdir build-gtk+x11 && cd build-gtk+x11 ln -s ../configure . -%configure --with-cairo \ +%configure --program-suffix=-gtk+x11 \ + --with-cairo \ --with-dbus \ --with-gif \ --with-gpm=no \ @@ -380,7 +381,6 @@ ln -s ../configure . --with-xpm %{setarch} %make_build bootstrap %{setarch} %make_build -rm src/emacs-%{version}.* cd .. %endif @@ -407,7 +407,6 @@ ln -s ../configure . --with-xpm %{setarch} %make_build bootstrap %{setarch} %make_build -rm src/emacs-%{version}.* cd .. # Create pkgconfig file @@ -432,40 +431,53 @@ EOF %install +%if %{with nw} +cd build-nw +%{__make} install-arch-dep install-eln DESTDIR=%{?buildroot} INSTALL="%{__install} -p" +cd .. +%endif + +%if %{with lucid} +cd build-lucid +%{__make} install-arch-dep install-eln DESTDIR=%{?buildroot} INSTALL="%{__install} -p" +cd .. +%endif + +%if %{with gtkx11} +cd build-gtk+x11 +%{__make} install-arch-dep install-eln DESTDIR=%{?buildroot} INSTALL="%{__install} -p" +cd .. +%endif + cd build-pgtk %make_install cd .. -# Let alternatives manage the symlink -rm %{buildroot}%{_bindir}/emacs -touch %{buildroot}%{_bindir}/emacs - # Do not compress the files which implement compression itself (#484830) gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-compr.el.gz gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-cmpr-hook.el.gz -# Install the emacs binary with pure GTK toolkit +# Remove duplicate files with suffixed names +%if %{with nw} || %{with lucid} || %{with gtkx11} +find %{buildroot} \ + -type f \ + ! -name emacs-%{version}-gtk+x11 ! -name emacs-gtk+x11 \ + ! -name emacs-%{version}-lucid ! -name emacs-lucid \ + ! -name emacs-%{version}-nw ! -name emacs-nw \ + -regextype posix-extended \ + -regex '.*-(gtk\+x11|lucid|nw)((-mail)?\.[^/]+)?$' \ + -print \ + -delete +%endif + +# Rename the emacs binary to indicate it's a "pure GTK" build mv %{buildroot}%{_bindir}/emacs-%{version} %{buildroot}%{_bindir}/emacs-%{version}-pgtk ln -s emacs-%{version}-pgtk %{buildroot}%{_bindir}/emacs-pgtk -%if %{with gtkx11} -# Install the emacs binary using mixed GTK and X11 -install -p -m 0755 build-gtk+x11/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-gtk+x11 -ln -s emacs-%{version}-gtk+x11 %{buildroot}%{_bindir}/emacs-gtk+x11 -%endif - -%if %{with lucid} -# Install the emacs with Lucid toolkit -install -p -m 0755 build-lucid/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-lucid -ln -s emacs-%{version}-lucid %{buildroot}%{_bindir}/emacs-lucid -%endif - +# Compatibility with earlier Fedora packages %if %{with nw} -# Install the emacs without graphical display -install -p -m 0755 build-nw/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-nw ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-%{version}-nox ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-nox -ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-nw %endif # Make sure movemail isn't setgid @@ -553,60 +565,51 @@ grep -vhE '%{site_lisp}(|/(default\.el|site-start\.d|site-start\.el))$' {common, # Remove old icon rm %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document23.svg -# Install the pdmp with fingerprints -pgtk_pdmp="emacs-$(./build-pgtk/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp" -install -p -m 0644 build-pgtk/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${pgtk_pdmp} - # Install native compiled Lisp of all builds -pgtk_comp_native_ver=$(ls -1 build-pgtk/native-lisp) -cp -ar build-pgtk/native-lisp/${pgtk_comp_native_ver} %{buildroot}%{native_lisp} (TOPDIR=${PWD} cd %{buildroot} - find .%{native_lisp}/${pgtk_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/pgtk-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/pgtk-dirs "%%%%dir %%p\n" \) + find ".%{native_lisp}/$(ls -1 build-pgtk/native-lisp)" \ + \( -type f -name '*eln' -fprintf "$TOPDIR/pgtk-filelist" "%%%%attr(755,-,-) %%p\n" \) \ + -o \( -type d -fprintf "$TOPDIR/pgtk-dirlist" "%%%%dir %%p\n" \) ) -echo %{emacs_libexecdir}/${pgtk_pdmp} >> pgtk-eln-filelist +echo "%{emacs_libexecdir}/emacs-$(./build-pgtk/src/emacs --fingerprint).pdmp" \ + >> pgtk-filelist %if %{with gtkx11} -gtkx11_pdmp="emacs-$(./build-gtk+x11/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp" -install -p -m 0644 build-gtk+x11/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${gtkx11_pdmp} - -gtkx11_comp_native_ver=$(ls -1 build-gtk+x11/native-lisp) -cp -ar build-gtk+x11/native-lisp/${gtkx11_comp_native_ver} %{buildroot}%{native_lisp} (TOPDIR=${PWD} cd %{buildroot} - find .%{native_lisp}/${gtkx11_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/gtk+x11-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/gtk+x11-dirs "%%%%dir %%p\n" \) + find ".%{native_lisp}/$(ls -1 build-gtk+x11/native-lisp)" \ + \( -type f -name '*eln' -fprintf "$TOPDIR/gtk+x11-filelist" "%%%%attr(755,-,-) %%p\n" \) \ + -o \( -type d -fprintf "$TOPDIR/gtk+x11-dirlist" "%%%%dir %%p\n" \) ) -echo %{emacs_libexecdir}/${gtkx11_pdmp} >> gtk+x11-eln-filelist +echo "%{emacs_libexecdir}/emacs-$(./build-gtk+x11/src/emacs --fingerprint).pdmp" \ + >> gtk+x11-filelist %endif %if %{with lucid} -lucid_pdmp="emacs-$(./build-lucid/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp" -install -p -m 0644 build-lucid/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${lucid_pdmp} - -lucid_comp_native_ver=$(ls -1 build-lucid/native-lisp) -cp -ar build-lucid/native-lisp/${lucid_comp_native_ver} %{buildroot}%{native_lisp} (TOPDIR=${PWD} cd %{buildroot} - find .%{native_lisp}/${lucid_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/lucid-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/lucid-dirs "%%%%dir %%p\n" \) + find ".%{native_lisp}/$(ls -1 build-lucid/native-lisp)" \ + \( -type f -name '*eln' -fprintf "$TOPDIR/lucid-filelist" "%%%%attr(755,-,-) %%p\n" \) \ + -o \( -type d -fprintf "$TOPDIR/lucid-dirlist" "%%%%dir %%p\n" \) ) -echo %{emacs_libexecdir}/${lucid_pdmp} >> lucid-eln-filelist +echo "%{emacs_libexecdir}/emacs-$(./build-lucid/src/emacs --fingerprint).pdmp" \ + >> lucid-filelist %endif %if %{with nw} -nw_pdmp="emacs-$(./build-nw/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp" -install -p -m 0644 build-nw/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${nw_pdmp} - -nw_comp_native_ver=$(ls -1 build-nw/native-lisp) -cp -ar build-nw/native-lisp/${nw_comp_native_ver} %{buildroot}%{native_lisp} (TOPDIR=${PWD} cd %{buildroot} - find .%{native_lisp}/${nw_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/nw-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/nw-dirs "%%%%dir %%p\n" \) + find ".%{native_lisp}/$(ls -1 build-nw/native-lisp)" \ + \( -type f -name '*eln' -fprintf "$TOPDIR/nw-filelist" "%%%%attr(755,-,-) %%p\n" \) \ + -o \( -type d -fprintf "$TOPDIR/nw-dirlist" "%%%%dir %%p\n" \) ) -echo %{emacs_libexecdir}/${nw_pdmp} >> nw-eln-filelist +echo "%{emacs_libexecdir}/emacs-$(./build-nw/src/emacs --fingerprint).pdmp" \ + >> nw-filelist %endif # remove leading . from filelists -sed -i -e "s|\.%{native_lisp}|%{native_lisp}|" *-eln-filelist *-dirs +sed -i -e "s|\.%{native_lisp}|%{native_lisp}|" *-filelist *-dirlist # remove exec permissions from eln files to prevent the debuginfo extractor from # trying to extract debuginfo from them @@ -616,6 +619,8 @@ find %{buildroot}%{_libdir}/ -name '*eln' -type f | xargs chmod -x # see: https://bugzilla.redhat.com/show_bug.cgi?id=2157979#c11 find %{buildroot}%{_libdir}/ -name '*eln' -type f | xargs touch +export QA_SKIP_BUILD_ROOT=0 + %check # A number of tests that don't work on GNU EMBA are also unstable when @@ -711,29 +716,29 @@ fi --slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || : -%files -f pgtk-eln-filelist -f pgtk-dirs -%attr(0755,-,-) %ghost %{_bindir}/emacs +%files -f pgtk-filelist -f pgtk-dirlist +%ghost %{_bindir}/emacs %{_bindir}/emacs-%{version}-pgtk %{_bindir}/emacs-pgtk %{_datadir}/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml %if %{with gtkx11} -%files gtk+x11 -f gtk+x11-eln-filelist -f gtk+x11-dirs -%attr(0755,-,-) %ghost %{_bindir}/emacs +%files gtk+x11 -f gtk+x11-filelist -f gtk+x11-dirlist +%ghost %{_bindir}/emacs %{_bindir}/emacs-%{version}-gtk+x11 %{_bindir}/emacs-gtk+x11 %endif %if %{with lucid} -%files lucid -f lucid-eln-filelist -f lucid-dirs -%attr(0755,-,-) %ghost %{_bindir}/emacs +%files lucid -f lucid-filelist -f lucid-dirlist +%ghost %{_bindir}/emacs %{_bindir}/emacs-%{version}-lucid %{_bindir}/emacs-lucid %endif %if %{with nw} -%files nw -f nw-eln-filelist -f nw-dirs -%attr(0755,-,-) %ghost %{_bindir}/emacs +%files nw -f nw-filelist -f nw-dirlist +%ghost %{_bindir}/emacs %{_bindir}/emacs-%{version}-nox %{_bindir}/emacs-%{version}-nw %{_bindir}/emacs-nox From 751093527054bcd7ffca9da09310112c4de3cd77 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 28 Oct 2024 14:47:17 +0000 Subject: [PATCH 02/65] Isolate builds from each other Fixes dumping failures on Emacs 30. --- emacs.spec | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/emacs.spec b/emacs.spec index 6a25efd..1673ed3 100644 --- a/emacs.spec +++ b/emacs.spec @@ -283,7 +283,9 @@ cat '%{SOURCE2}' '%{SOURCE3}' > keyring %{gpgverify} --keyring=keyring --signature='%{SOURCE1}' --data='%{SOURCE0}' rm keyring -%autosetup -p1 +%autosetup -N -c +cd %{name}-%{version} +%autopatch -p1 # Avoid trademark issues rm lisp/play/pong.el lisp/play/pong.elc \ @@ -302,15 +304,26 @@ ln -s ../../%{name}/%{version}/etc/COPYING doc ln -s ../../%{name}/%{version}/etc/NEWS doc +cd .. +%if %{with lucid} +cp -a %{name}-%{version} build-lucid +%endif +%if %{with nw} +cp -a %{name}-%{version} build-nw +%endif +%if %{with gtkx11} +cp -a %{name}-%{version} build-gtk+x11 +%endif +mv %{name}-%{version} build-pgtk + + %build export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}" %set_build_flags %if %{with lucid} # Build Lucid binary -mkdir build-lucid && cd build-lucid -ln -s ../configure . - +cd build-lucid %configure --program-suffix=-lucid \ --with-cairo \ --with-dbus \ @@ -338,8 +351,7 @@ cd .. %if %{with nw} # Build binary without X support -mkdir build-nw && cd build-nw -ln -s ../configure . +cd build-nw %configure --program-suffix=-nw \ --with-json \ --with-modules \ @@ -357,9 +369,7 @@ cd .. %if %{with gtkx11} # Build GTK/X11 binary -mkdir build-gtk+x11 && cd build-gtk+x11 -ln -s ../configure . - +cd build-gtk+x11 %configure --program-suffix=-gtk+x11 \ --with-cairo \ --with-dbus \ @@ -385,9 +395,7 @@ cd .. %endif # Build pure GTK binary -mkdir build-pgtk && cd build-pgtk -ln -s ../configure . - +cd build-pgtk %configure --with-cairo \ --with-dbus \ --with-gif \ @@ -746,15 +754,15 @@ fi %endif %files -n emacsclient -%license etc/COPYING +%license build-pgtk/etc/COPYING %{_bindir}/emacsclient %{_mandir}/man1/emacsclient.1* %files common -f common-filelist -f info-filelist %config(noreplace) %{_sysconfdir}/skel/.emacs %{_rpmconfigdir}/macros.d/macros.emacs -%license etc/COPYING -%doc doc/NEWS BUGS README +%license build-pgtk/etc/COPYING +%doc build-pgtk/doc/NEWS build-pgtk/BUGS build-pgtk/README %{_bindir}/ebrowse %{_bindir}/emacs-desktop %{_bindir}/etags.emacs From 3ba3bada539df33166bb88f92a20749cd2bfba44 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 31 Oct 2024 00:12:32 +0000 Subject: [PATCH 03/65] Drop emacs-terminal subpackage It was supposed to be temporary, as the then-only terminal emulator that supported the Malayalam language. These days, Konsole can be used instead (https://smc.org.in/en/articles/malayalam-linux-console/). --- emacs.spec | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/emacs.spec b/emacs.spec index 1673ed3..4fd79cd 100644 --- a/emacs.spec +++ b/emacs.spec @@ -19,9 +19,6 @@ Source3: https://keys.openpgp.org/vks/v1/by-fingerprint/CEA1DE21AB108493CC 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 @@ -257,20 +254,6 @@ 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 = %{epoch}:%{version}-%{release} -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 @@ -521,16 +504,9 @@ 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 @@ -795,10 +771,6 @@ 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 From f201351dff6718d7cdb610992e6644082accbdfb Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 31 Oct 2024 14:59:17 +0000 Subject: [PATCH 04/65] Fix typo in emacs-gtk+x11 Requires. --- emacs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index 4fd79cd..8b12729 100644 --- a/emacs.spec +++ b/emacs.spec @@ -155,7 +155,7 @@ GTK toolkit. %if %{with gtkx11} %package gtk+x11 Summary: GNU Emacs text editor with GTK toolkit X support -Requires: libgccjit +Requires: google-noto-sans-mono-vf-fonts Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} From 2094f8176e4b566f5ed2dbbc9ad7775f5bb41b1c Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 3 Jan 2025 14:01:21 +0000 Subject: [PATCH 05/65] Require XPM pixbuf loader for GTK builds (#2335309) --- emacs.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/emacs.spec b/emacs.spec index 8b12729..22ec3cc 100644 --- a/emacs.spec +++ b/emacs.spec @@ -124,12 +124,17 @@ BuildRequires: pkgconfig(systemd) BuildRequires: util-linux %endif +%if "%{_lib}" == "lib64" +%global marker ()(64bit) +%endif + # Emacs doesn't run without a font, rhbz#732422 Requires: google-noto-sans-mono-vf-fonts Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} +Requires: libpixbufloader-xpm.so%{?marker} Provides: emacs(bin) = %{epoch}:%{version}-%{release} Supplements: ((libwayland-server and emacs-common) unless emacs-nw) @@ -159,6 +164,7 @@ Requires: google-noto-sans-mono-vf-fonts Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} +Requires: libpixbufloader-xpm.so%{?marker} Provides: emacs(bin) = %{epoch}:%{version}-%{release} Supplements: ((xorg-x11-server-Xorg and emacs-common) unless emacs-nw) From bc8ee9cedf64f3ea836d6623efc4c72b3f2ca5e0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 15 Jan 2025 12:05:46 +0800 Subject: [PATCH 06/65] rebuild rawhide against tree-sitter-0.24 From c8f0e7e4469f779e3cd61b40c0b20baba779002c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 16:49:01 +0000 Subject: [PATCH 07/65] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 253c482c86fe71257cb34c54d94e5a0758326e83 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 17 Jan 2025 12:42:03 +0000 Subject: [PATCH 08/65] Debug configure failures. --- emacs.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/emacs.spec b/emacs.spec index 22ec3cc..1478858 100644 --- a/emacs.spec +++ b/emacs.spec @@ -332,7 +332,8 @@ cd build-lucid --with-x-toolkit=lucid \ --with-xft \ --with-xinput2 \ - --with-xpm + --with-xpm \ + || ( cat config.log && false ) %{setarch} %make_build bootstrap %{setarch} %make_build cd .. @@ -350,7 +351,8 @@ cd build-nw %if %{without gpm} --with-gpm=no \ %endif - --with-x=no + --with-x=no \ + || ( cat config.log && false ) %{setarch} %make_build bootstrap %{setarch} %make_build cd .. @@ -377,7 +379,8 @@ cd build-gtk+x11 --with-webp \ --with-x-toolkit=gtk3 \ --with-xinput2 \ - --with-xpm + --with-xpm \ + || ( cat config.log && false ) %{setarch} %make_build bootstrap %{setarch} %make_build cd .. @@ -401,7 +404,8 @@ cd build-pgtk --with-tiff \ --with-tree-sitter \ --with-webp \ - --with-xpm + --with-xpm \ + || ( cat config.log && false ) %{setarch} %make_build bootstrap %{setarch} %make_build cd .. From a64c461ff74eceb29475f0401fd97796a0fe5463 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 3 Feb 2025 12:20:53 +0000 Subject: [PATCH 09/65] Rebuild against tree-sitter-0.25.1-3.fc42 From 563755ba2172a8515280f831ce2664419af05e23 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 3 Feb 2025 12:23:18 +0000 Subject: [PATCH 10/65] Rebuild against tree-sitter-0.25.1-5.fc42 From efc6d1cc8f4378f13f8872716922e5c0071090de Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 19 Feb 2025 14:41:28 +0000 Subject: [PATCH 11/65] Rebuild against tree-sitter-0.25.2-3.fc43 From 782c788973dd092e274c71466d8a04347692f996 Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Thu, 20 Feb 2025 12:06:37 -0500 Subject: [PATCH 12/65] rebuild for tree-sitter --- emacs.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index 1478858..4beea30 100644 --- a/emacs.spec +++ b/emacs.spec @@ -784,6 +784,5 @@ fi %files devel %{_includedir}/emacs-module.h - %changelog %autochangelog From bfeb333323acb75940489ea186b9c35455d75ef5 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 23 Oct 2023 22:57:09 +0530 Subject: [PATCH 13/65] Update to version 30.0.91. --- .gitignore | 2 + 0001-Apply-display-kluge-for-PGTK-too.patch | 50 ------------------- 0001-Fix-failing-help-fns-test.patch | 30 ----------- 0001-Fix-flymake-tests-with-GCC-14.patch | 28 ----------- ...nt-failure-of-dired-test-bug27243-02.patch | 30 ----------- ...unfinished-edit-01-when-temp-dirname.patch | 29 ----------- ...-subcommand-reset-in-pipeline-is-uns.patch | 25 ---------- 12BB9B400EE3F77282864D18272B5C54E015416A | 31 ++++++++++++ emacs-pgtk-on-x-error-message.patch | 12 ++--- emacs-system-crypto-policies.patch | 3 +- emacs.spec | 30 ++++------- 11 files changed, 52 insertions(+), 218 deletions(-) delete mode 100644 0001-Apply-display-kluge-for-PGTK-too.patch delete mode 100644 0001-Fix-failing-help-fns-test.patch delete mode 100644 0001-Fix-flymake-tests-with-GCC-14.patch delete mode 100644 0001-Fix-intermittent-failure-of-dired-test-bug27243-02.patch delete mode 100644 0001-Fix-wdired-test-unfinished-edit-01-when-temp-dirname.patch delete mode 100644 0002-Test-eshell-test-subcommand-reset-in-pipeline-is-uns.patch create mode 100644 12BB9B400EE3F77282864D18272B5C54E015416A diff --git a/.gitignore b/.gitignore index 71d5258..5a24e8f 100644 --- a/.gitignore +++ b/.gitignore @@ -40,5 +40,7 @@ /emacs-29.3.tar.xz.sig /emacs-29.4.tar.xz /emacs-29.4.tar.xz.sig +/emacs-30.0.91.tar.xz +/emacs-30.0.91.tar.xz.sig /php-mode.el /results_emacs/ diff --git a/0001-Apply-display-kluge-for-PGTK-too.patch b/0001-Apply-display-kluge-for-PGTK-too.patch deleted file mode 100644 index 13c9cb3..0000000 --- a/0001-Apply-display-kluge-for-PGTK-too.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 2f348ffee3777a8e2b02814d8cc50d282d98d366 Mon Sep 17 00:00:00 2001 -From: Peter Oliver -Date: Sun, 14 Jul 2024 21:50:33 +0100 -Subject: [PATCH 1/2] Apply --display kluge for PGTK too - -* src/emacs.c (main): The --display option needs the same handling -with the PGTK backend as it does with the X11 backends. (Bug#72118) ---- - src/emacs.c | 4 ++-- - src/lisp.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/emacs.c b/src/emacs.c -index 712826d57b7..ec284b16f8d 100644 ---- a/src/emacs.c -+++ b/src/emacs.c -@@ -181,7 +181,7 @@ #define MAIN_PROGRAM - data on the first attempt to change it inside asynchronous code. */ - bool running_asynch_code; - --#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) -+#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) || defined (HAVE_NS) - /* If true, -d was specified, meaning we're using some window system. */ - bool display_arg; - #endif -@@ -2014,7 +2014,7 @@ main (int argc, char **argv) - { - int count_before = skip_args; - --#ifdef HAVE_X_WINDOWS -+#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) - char *displayname = 0; - - /* Skip any number of -d options, but only use the last one. */ -diff --git a/src/lisp.h b/src/lisp.h -index 5fa48cec2f0..05daceb5dff 100644 ---- a/src/lisp.h -+++ b/src/lisp.h -@@ -4889,7 +4889,7 @@ fast_c_string_match_ignore_case (Lisp_Object regexp, - extern char **initial_argv; - extern int initial_argc; - extern char const *emacs_wd; --#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS) -+#if defined (HAVE_X_WINDOWS) || defined (HAVE_PGTK) || defined (HAVE_NS) - extern bool display_arg; - #endif - extern Lisp_Object decode_env_path (const char *, const char *, bool); --- -2.45.2 - diff --git a/0001-Fix-failing-help-fns-test.patch b/0001-Fix-failing-help-fns-test.patch deleted file mode 100644 index c24d7f5..0000000 --- a/0001-Fix-failing-help-fns-test.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 75ca15f2a3146b17fde5e2a50ad9102c6108ba7f Mon Sep 17 00:00:00 2001 -From: Stefan Kangas -Date: Sun, 23 Jun 2024 20:54:22 +0200 -Subject: [PATCH] Fix failing help-fns-test - -* test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): -Fix failing test. ---- - test/lisp/help-fns-tests.el | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el -index c3e8ca49723..fabf1959658 100644 ---- a/test/lisp/help-fns-tests.el -+++ b/test/lisp/help-fns-tests.el -@@ -63,9 +63,8 @@ help-fns-test-lisp-macro - (should (string-match regexp result)))) - - (ert-deftest help-fns-test-lisp-defun () -- (let ((regexp (if (featurep 'native-compile) -- "a native-compiled Lisp function in .+subr\\.el" -- "a byte-compiled Lisp function in .+subr\\.el")) -+ (let ((regexp (rx "a " (or "byte-compiled" "native-compiled") -+ " Lisp function in " nonl "subr.el" nonl)) - (result (help-fns-tests--describe-function 'last))) - (should (string-match regexp result)))) - --- -2.45.2 - diff --git a/0001-Fix-flymake-tests-with-GCC-14.patch b/0001-Fix-flymake-tests-with-GCC-14.patch deleted file mode 100644 index 484561d..0000000 --- a/0001-Fix-flymake-tests-with-GCC-14.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a769f171e7ebb8e30f198f4328d46f47fe7958fb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ulrich=20M=C3=BCller?= -Date: Mon, 24 Jun 2024 15:20:26 +0200 -Subject: [PATCH] ; Fix flymake tests with GCC 14. - -* test/lisp/progmodes/flymake-tests.el (included-c-header-files): -Fix test failure with GCC 14. (Bug#71749) ---- - test/lisp/progmodes/flymake-tests.el | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el -index 21dbb0711d2..93bc9028031 100644 ---- a/test/lisp/progmodes/flymake-tests.el -+++ b/test/lisp/progmodes/flymake-tests.el -@@ -174,7 +174,8 @@ included-c-header-files - (flymake-tests--with-flymake - ("some-problems.h") - (flymake-goto-next-error) -- (should (eq 'flymake-warning (face-at-point))) -+ ;; implicit-int was promoted from warning to error in GCC 14 -+ (should (memq (face-at-point) '(flymake-warning flymake-error))) - (flymake-goto-next-error) - (should (eq 'flymake-error (face-at-point))) - (should-error (flymake-goto-next-error nil nil t))) --- -2.45.2 - diff --git a/0001-Fix-intermittent-failure-of-dired-test-bug27243-02.patch b/0001-Fix-intermittent-failure-of-dired-test-bug27243-02.patch deleted file mode 100644 index f3e821f..0000000 --- a/0001-Fix-intermittent-failure-of-dired-test-bug27243-02.patch +++ /dev/null @@ -1,30 +0,0 @@ -From c86645dde30fbd54ae0f187e4428a09ad75e0ba8 Mon Sep 17 00:00:00 2001 -From: Peter Oliver -Date: Mon, 15 Jul 2024 12:03:47 +0100 -Subject: [PATCH] Fix intermittent failure of dired-test-bug27243-02 - -* test/lisp/dired-tests.el (dired-test-bug27243-02): Exclude free disk -space from dired listing in this test, in case it changes while it's -running and confuses the result. ---- - test/lisp/dired-tests.el | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el -index 2589281e5e1..ea47043dfc5 100644 ---- a/test/lisp/dired-tests.el -+++ b/test/lisp/dired-tests.el -@@ -189,7 +189,9 @@ dired-test-bug27243-01 - (ert-deftest dired-test-bug27243-02 () - "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#28 ." - (ert-with-temp-directory test-dir -- (let ((dired-auto-revert-buffer t) buffers) -+ (let ((dired-auto-revert-buffer t) -+ (dired-free-space nil) -+ buffers) - ;; On MS-Windows, get rid of 8+3 short names in test-dir, if the - ;; corresponding long file names exist, otherwise such names trip - ;; string comparisons below. --- -2.45.2 - diff --git a/0001-Fix-wdired-test-unfinished-edit-01-when-temp-dirname.patch b/0001-Fix-wdired-test-unfinished-edit-01-when-temp-dirname.patch deleted file mode 100644 index 370d314..0000000 --- a/0001-Fix-wdired-test-unfinished-edit-01-when-temp-dirname.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 90734f5a3ba9998886e0b03382878a2fb514d015 Mon Sep 17 00:00:00 2001 -From: Peter Oliver -Date: Fri, 12 Jul 2024 10:52:23 +0100 -Subject: [PATCH] Fix wdired-test-unfinished-edit-01 when temp dirname contains - "foo" - -* test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01): Don't -modify the random directory name if, by chance, it happens to contain -the substring "foo". ---- - test/lisp/wdired-tests.el | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/lisp/wdired-tests.el b/test/lisp/wdired-tests.el -index f7bff743058..f6d2194e998 100644 ---- a/test/lisp/wdired-tests.el -+++ b/test/lisp/wdired-tests.el -@@ -114,7 +114,7 @@ wdired-test-unfinished-edit-01 - (setq test-dir (file-truename test-dir)) - (let* ((test-file (concat (file-name-as-directory test-dir) "foo.c")) - (replace "bar") -- (new-file (string-replace "foo" replace test-file))) -+ (new-file (string-replace "/foo" (concat "/" replace) test-file))) - (write-region "" nil test-file nil 'silent) - (let ((buf (find-file-noselect test-dir))) - (unwind-protect --- -2.45.2 - diff --git a/0002-Test-eshell-test-subcommand-reset-in-pipeline-is-uns.patch b/0002-Test-eshell-test-subcommand-reset-in-pipeline-is-uns.patch deleted file mode 100644 index 94b83bf..0000000 --- a/0002-Test-eshell-test-subcommand-reset-in-pipeline-is-uns.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8ae158173d1d748d55e2605c04d33a95739e055c Mon Sep 17 00:00:00 2001 -From: Peter Oliver -Date: Mon, 15 Jul 2024 16:17:38 +0100 -Subject: [PATCH 2/3] Test eshell-test/subcommand-reset-in-pipeline is unstable - -Could be related to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65602 ---- - test/lisp/eshell/eshell-tests.el | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el -index 3812a4117ac..8c13d4af237 100644 ---- a/test/lisp/eshell/eshell-tests.el -+++ b/test/lisp/eshell/eshell-tests.el -@@ -79,6 +79,7 @@ eshell-test/pipe-subcommand-with-pipe - - (ert-deftest eshell-test/subcommand-reset-in-pipeline () - "Check that subcommands reset `eshell-in-pipeline-p'." -+ :tags (if (getenv "RPM_BUILD_ROOT") '(:unstable)) - (skip-unless (executable-find "cat")) - (dolist (template '("echo {%s} | *cat" - "echo ${%s} | *cat" --- -2.45.2 - diff --git a/12BB9B400EE3F77282864D18272B5C54E015416A b/12BB9B400EE3F77282864D18272B5C54E015416A new file mode 100644 index 0000000..47fb297 --- /dev/null +++ b/12BB9B400EE3F77282864D18272B5C54E015416A @@ -0,0 +1,31 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Comment: 12BB 9B40 0EE3 F772 8286 4D18 272B 5C54 E015 416A +Comment: Andrea Corallo + +xsFNBGa/sd8BEAC7hQAGte6YvxDaiTutpSkVrb+zJBGcEW/AroE/dduBn8mfxa/Y +i71C2GV/y03aibdaO+cXPULAkkuJVDnFk57hn3w9zo98LzqDSEgNFcAUSSSQdyj7 +Wn3J26doRpFQKnv3dbx1yZRZccbLgt/AH6hzhvNjFbYZ53LYE9rKzUYLTNHDhUI4 +QTda2PvgWoySXcjBKhyIgg9zZLSc2w4ZwhO9WDVai58xNsl+YyU2HqVPpJZSCX0j +liIooHOEL2D601ByrWmePRGFR0tD6V9xj5jWuusErb78r57NOPsRCRKCKcg/v/kl +fA5+byvanw27PDa8zoheXgF41uDf96keOQPBve3TE1Oy4x+G55zuP9KNQ5aSCG49 +x0Cc7BET23JmiWUnz1GUbM7vka5ell+smmq+kTDtK47L+4N954a6CR0esPLJMLF6 +Ub2y8SY2XPn1Bv8lsN77f0L5yyhnK72H+mf4fS/qjJlN0F+DWx49Z8it9rbG8Atc +X6Vqzv5qaDPbCpAqdqs2qrv3nAdvYOlwxmVh6Hxq1EOFT2v49dmn3viVBNnuT7yW +tyvpTDyvfLKOnfH+OLLuqPUFZnxt8mU8ieNEnvIYojSOFyddJAh2uOI3sqjLHrDg +PRAYFv9jp7K7pk+S054mdF31qD+TTxjWQtNI8Sxh/Q71Vtz7JyqYWd/JCQARAQAB +zSFBbmRyZWEgQ29yYWxsbyA8YWNvcmFsbG9AZ251Lm9yZz7CwZQEEwEKAD4WIQQS +u5tADuP3coKGTRgnK1xU4BVBagUCZr+x3wIbAwUJA8JnAAULCQgHAgYVCgkICwIE +FgIDAQIeAQIXgAAKCRAnK1xU4BVBaj/0D/4ogwPjg6Cwyi8pmRYx9gOjQNIRtjOb +2aHFYQs9luFy20Wlt/7QtelDH+NLCAb5PKvhDI3Sw+SIoheAndhbzqW7GEW5J9G7 +10PPkCUCjbicJOKsUkMv03wS6IrelUYzgjbmGYRo2vYcSb+BHXQR4MuxDSL/2vPD +LHYKwij9K+FozgJVfjq5n97l/wsGsc/orRiST23ykiXyCZweulGLhXnoCghHrnB1 +B+xBaCv3P1GW/BZZgXGPQ+1XMOsFlP951vfjirlHnJMvMDkMkNhT6Qh282jTokWN +TVQqKUv5tpdNkId+QmUhzC+DcfoOsegB3wWa6VQ/w1cG9mkoPUTT8Y8fo4FXnWwV +U4472JuZdQYFDAKEnTsW1TRNgBb5xLNNCUmDUVDndgn1WtZIZx18QBtJ1CHhycaN +C68McWuvvENhEM8clUXIHundgeDce4gcQC23Un7NT0PbNTwvGPfBSaoVax5ZVHuZ +Tr2pTHqAqqi4YLnrE5R06OIWQzVOVs5NZplDPZGXZOxryXa3ssLxjL2VYbo4AAUZ +h3fyVOzNHlGLT3Egj4XHDuDFcswUimD5SmrqQQwg94CgXExDisqH9Uo8L7Zxf/AG +UpIsxpDv219GOdTffbzl01W6oaP4obiTwMFUaQ7ljdCfq19KYdo576touTU+/48q +7AjjL28Eznhz0Q== +=goOm +-----END PGP PUBLIC KEY BLOCK----- diff --git a/emacs-pgtk-on-x-error-message.patch b/emacs-pgtk-on-x-error-message.patch index cfc7c3d..b49abee 100644 --- a/emacs-pgtk-on-x-error-message.patch +++ b/emacs-pgtk-on-x-error-message.patch @@ -12,12 +12,12 @@ index c00e13550bd..ce51bff5947 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -6680,7 +6680,8 @@ pgtk_display_x_warning (GdkDisplay *display) - " System. That configuration is unsupported and" - " will lead to sporadic crashes during transfer of" - " large selection data. It will also lead to" -- " various problems with keyboard input."); -+ " various problems with keyboard input." -+ "\nInstall emacs-gtk+x11 or emacs-lucid package."); + " System. That configuration is unsupported and\n" + " will lead to sporadic crashes during transfer of\n" + " large selection data. It will also lead to\n" +- " various problems with keyboard input.\n"); ++ " various problems with keyboard input.\n" ++ "\nInstall emacs-gtk+x11 or emacs-lucid package.\n"); gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); gtk_container_add (GTK_CONTAINER (content_area), label); gtk_widget_show (label); diff --git a/emacs-system-crypto-policies.patch b/emacs-system-crypto-policies.patch index 2f2435c..f9321ce 100644 --- a/emacs-system-crypto-policies.patch +++ b/emacs-system-crypto-policies.patch @@ -1,11 +1,12 @@ --- a/src/gnutls.c 2016-01-24 10:29:58.000000000 +0100 +++ b/src/gnutls.c 2016-02-02 09:32:28.477274274 +0100 -@@ -1557,7 +1557,7 @@ +@@ -1557,8 +1557,8 @@ gnutls_certificate_credentials_t x509_cred = NULL; gnutls_anon_client_credentials_t anon_cred = NULL; Lisp_Object global_init; - char const *priority_string_ptr = "NORMAL"; /* default priority string. */ + char const *priority_string_ptr = "@SYSTEM"; /* default priority string. */ char *c_hostname; + const char *c_pass; /* Placeholders for the property list elements. */ diff --git a/emacs.spec b/emacs.spec index 4beea30..4ad89b9 100644 --- a/emacs.spec +++ b/emacs.spec @@ -8,14 +8,21 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 -Version: 29.4 +Version: 30.0.91 Release: %autorelease License: GPL-3.0-or-later AND CC0-1.0 URL: https://www.gnu.org/software/emacs/ +%if %{lua: print(select(3, string.find(rpm.expand('%version'), '%d+%.%d+%.(%d+)')))} >= 90 +Source0: https://alpha.gnu.org/gnu/emacs/pretest/emacs-%{version}.tar.xz +Source1: https://alpha.gnu.org/gnu/emacs/pretest/emacs-%{version}.tar.xz.sig +%else Source0: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz Source1: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz.sig -Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/17E90D521672C04631B1183EE78DAE0F3115E06B -Source3: https://keys.openpgp.org/vks/v1/by-fingerprint/CEA1DE21AB108493CC9C65742E82323B8F4353EE +%endif +Source100: https://keys.openpgp.org/vks/v1/by-fingerprint/17E90D521672C04631B1183EE78DAE0F3115E06B +Source101: https://keys.openpgp.org/vks/v1/by-fingerprint/CEA1DE21AB108493CC9C65742E82323B8F4353EE +Source102: https://keys.openpgp.org/vks/v1/by-fingerprint/12BB9B400EE3F77282864D18272B5C54E015416A + Source4: dotemacs.el Source5: site-start.el Source6: default.el @@ -37,25 +44,15 @@ Patch: emacs-libdir-vs-systemd.patch Patch: emacs-desktop.patch Patch: emacs-pgtk-on-x-error-message.patch -# Skip failing tests (patches taken from Emacs Git) -Patch: 0001-Fix-failing-help-fns-test.patch -Patch: 0001-Fix-flymake-tests-with-GCC-14.patch - -# Fix intermittently failing test (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72073) -Patch: 0001-Fix-wdired-test-unfinished-edit-01-when-temp-dirname.patch - # Fix intermittently failing test (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72120) -Patch: 0001-Fix-intermittent-failure-of-dired-test-bug27243-02.patch Patch: 0004-Try-harder-to-stabalise-dired-test-bug27243-02.patch # Skip intermittently failing tests -Patch: 0002-Test-eshell-test-subcommand-reset-in-pipeline-is-uns.patch Patch: 0003-Mark-multiple-mml-sec-tests-as-unstable-when-built-i.patch # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2276822 # (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63555). If GDK ever # gets any new backends, this patch may need extending. -Patch: 0001-Apply-display-kluge-for-PGTK-too.patch Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch BuildRequires: alsa-lib-devel @@ -76,7 +73,6 @@ BuildRequires: gnutls-devel BuildRequires: gtk3-devel BuildRequires: gzip BuildRequires: harfbuzz-devel -BuildRequires: jansson-devel BuildRequires: libacl-devel BuildRequires: libappstream-glib BuildRequires: libgccjit-devel @@ -268,7 +264,7 @@ Development header files for Emacs. %prep -cat '%{SOURCE2}' '%{SOURCE3}' > keyring +cat '%{SOURCE100}' '%{SOURCE101}' '%{SOURCE102}' > keyring %{gpgverify} --keyring=keyring --signature='%{SOURCE1}' --data='%{SOURCE0}' rm keyring @@ -320,7 +316,6 @@ cd build-lucid --with-gpm=no \ --with-harfbuzz \ --with-jpeg \ - --with-json \ --with-modules \ --with-native-compilation=aot \ --with-png \ @@ -343,7 +338,6 @@ cd .. # Build binary without X support cd build-nw %configure --program-suffix=-nw \ - --with-json \ --with-modules \ --with-native-compilation=aot \ --with-sqlite3 \ @@ -368,7 +362,6 @@ cd build-gtk+x11 --with-gpm=no \ --with-harfbuzz \ --with-jpeg \ - --with-json \ --with-modules \ --with-native-compilation=aot \ --with-png \ @@ -394,7 +387,6 @@ cd build-pgtk --with-gpm=no \ --with-harfbuzz \ --with-jpeg \ - --with-json \ --with-modules \ --with-native-compilation=aot \ --with-pgtk \ From fe4cba13665a15e2005bbca8f6724609b3877dc7 Mon Sep 17 00:00:00 2001 From: Bhavin Gandhi Date: Sat, 28 Sep 2024 10:50:56 +0530 Subject: [PATCH 14/65] Fix for failing uniquify-tests https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73205 Signed-off-by: Bhavin Gandhi --- ...ify-tests-in-non-version-controlled-.patch | 27 +++++++++++++++++++ emacs.spec | 4 +++ 2 files changed, 31 insertions(+) create mode 100644 0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch diff --git a/0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch b/0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch new file mode 100644 index 0000000..0a83f6b --- /dev/null +++ b/0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch @@ -0,0 +1,27 @@ +From ca3932121a893df3c4b08dbe11f2c002da4a421f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= +Date: Fri, 13 Sep 2024 12:13:53 +0200 +Subject: [PATCH] Don't fail uniquify-tests in non-version-controlled source + trees + +* test/lisp/uniquify-tests.el (uniquify-project-transform): +Skip test if there is no project (bug#73205). +--- + test/lisp/uniquify-tests.el | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/lisp/uniquify-tests.el b/test/lisp/uniquify-tests.el +index 4124ce056d3..9b33c9d7d47 100644 +--- a/test/lisp/uniquify-tests.el ++++ b/test/lisp/uniquify-tests.el +@@ -129,6 +129,7 @@ uniquify-trailing-separator-p is ignored" + (require 'project) + (ert-deftest uniquify-project-transform () + "`project-uniquify-dirname-transform' works" ++ (skip-unless (project-current nil source-directory)) + (let ((uniquify-dirname-transform #'project-uniquify-dirname-transform) + (project-vc-name "foo1/bar") + bufs) +-- +2.45.1 + diff --git a/emacs.spec b/emacs.spec index 4ad89b9..2f2cc4b 100644 --- a/emacs.spec +++ b/emacs.spec @@ -55,6 +55,10 @@ Patch: 0003-Mark-multiple-mml-sec-tests-as-unstable-when-built-i.patch # gets any new backends, this patch may need extending. Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch +# Patch for a failing test (from Emacs Git): +# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73205 +Patch: 0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch + BuildRequires: alsa-lib-devel BuildRequires: atk-devel BuildRequires: autoconf From da4bd493ac08de46dd2546f4227216eb66c3a397 Mon Sep 17 00:00:00 2001 From: Bhavin Gandhi Date: Sat, 28 Sep 2024 20:53:20 +0530 Subject: [PATCH 15/65] Elisp info has new image and a text file Signed-off-by: Bhavin Gandhi --- emacs.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emacs.spec b/emacs.spec index 2f2cc4b..329fae8 100644 --- a/emacs.spec +++ b/emacs.spec @@ -547,6 +547,8 @@ for info_f in %info_files; do done # info.gz is a rename of info.info.gz and thus needs special handling echo "%{_infodir}/info*" >> info-filelist +# elisp.info.gz has additional files +echo "%{_infodir}/elisp_type_hierarchy*" >> info-filelist # Put the lists together after filtering ./usr to /usr sed -i -e "s|\.%{_prefix}|%{_prefix}|" *-files From 6867865075b608e1d6c1d0140f66f995d5ed0128 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 28 Oct 2024 00:22:30 +0000 Subject: [PATCH 16/65] Update to version 30.0.92. --- ...ify-tests-in-non-version-controlled-.patch | 27 ------------------- emacs.spec | 6 +---- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch diff --git a/0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch b/0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch deleted file mode 100644 index 0a83f6b..0000000 --- a/0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch +++ /dev/null @@ -1,27 +0,0 @@ -From ca3932121a893df3c4b08dbe11f2c002da4a421f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= -Date: Fri, 13 Sep 2024 12:13:53 +0200 -Subject: [PATCH] Don't fail uniquify-tests in non-version-controlled source - trees - -* test/lisp/uniquify-tests.el (uniquify-project-transform): -Skip test if there is no project (bug#73205). ---- - test/lisp/uniquify-tests.el | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/test/lisp/uniquify-tests.el b/test/lisp/uniquify-tests.el -index 4124ce056d3..9b33c9d7d47 100644 ---- a/test/lisp/uniquify-tests.el -+++ b/test/lisp/uniquify-tests.el -@@ -129,6 +129,7 @@ uniquify-trailing-separator-p is ignored" - (require 'project) - (ert-deftest uniquify-project-transform () - "`project-uniquify-dirname-transform' works" -+ (skip-unless (project-current nil source-directory)) - (let ((uniquify-dirname-transform #'project-uniquify-dirname-transform) - (project-vc-name "foo1/bar") - bufs) --- -2.45.1 - diff --git a/emacs.spec b/emacs.spec index 329fae8..15d5932 100644 --- a/emacs.spec +++ b/emacs.spec @@ -8,7 +8,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 -Version: 30.0.91 +Version: 30.0.92 Release: %autorelease License: GPL-3.0-or-later AND CC0-1.0 URL: https://www.gnu.org/software/emacs/ @@ -55,10 +55,6 @@ Patch: 0003-Mark-multiple-mml-sec-tests-as-unstable-when-built-i.patch # gets any new backends, this patch may need extending. Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch -# Patch for a failing test (from Emacs Git): -# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73205 -Patch: 0001-Don-t-fail-uniquify-tests-in-non-version-controlled-.patch - BuildRequires: alsa-lib-devel BuildRequires: atk-devel BuildRequires: autoconf From 98b6dedc7253a80193e50ac262d3006f08380590 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 20 Dec 2024 11:17:44 +0000 Subject: [PATCH 17/65] Update to version 30.0.93. --- emacs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index 15d5932..dccd04a 100644 --- a/emacs.spec +++ b/emacs.spec @@ -8,7 +8,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 -Version: 30.0.92 +Version: 30.0.93 Release: %autorelease License: GPL-3.0-or-later AND CC0-1.0 URL: https://www.gnu.org/software/emacs/ From c3e999a02e9ad792b41632f32681d91a23015aa7 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 24 Feb 2025 20:56:15 +0000 Subject: [PATCH 18/65] Disable GC mark trace buffer for about 5% better GC performance. --- emacs.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/emacs.spec b/emacs.spec index dccd04a..08aba83 100644 --- a/emacs.spec +++ b/emacs.spec @@ -309,7 +309,9 @@ export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}" %if %{with lucid} # Build Lucid binary cd build-lucid -%configure --program-suffix=-lucid \ +%configure \ + --disable-gc-mark-trace \ + --program-suffix=-lucid \ --with-cairo \ --with-dbus \ --with-gif \ @@ -337,7 +339,9 @@ cd .. %if %{with nw} # Build binary without X support cd build-nw -%configure --program-suffix=-nw \ +%configure \ + --disable-gc-mark-trace \ + --program-suffix=-nw \ --with-modules \ --with-native-compilation=aot \ --with-sqlite3 \ @@ -355,7 +359,9 @@ cd .. %if %{with gtkx11} # Build GTK/X11 binary cd build-gtk+x11 -%configure --program-suffix=-gtk+x11 \ +%configure \ + --disable-gc-mark-trace \ + --program-suffix=-gtk+x11 \ --with-cairo \ --with-dbus \ --with-gif \ @@ -381,7 +387,9 @@ cd .. # Build pure GTK binary cd build-pgtk -%configure --with-cairo \ +%configure \ + --disable-gc-mark-trace \ + --with-cairo \ --with-dbus \ --with-gif \ --with-gpm=no \ From af2a940d2302e9eb2b4baa7d7ac4e95c5eb0093c Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 24 Feb 2025 20:57:55 +0000 Subject: [PATCH 19/65] Update to version 30.1. Fixes #2347206, CVE-2024-53920, CVE-2025-1244. --- .gitignore | 2 ++ emacs.spec | 4 ++-- sources | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5a24e8f..a859577 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ /emacs-30.0.91.tar.xz.sig /php-mode.el /results_emacs/ +/emacs-30.1.tar.xz +/emacs-30.1.tar.xz.sig diff --git a/emacs.spec b/emacs.spec index 08aba83..b9e173c 100644 --- a/emacs.spec +++ b/emacs.spec @@ -8,11 +8,11 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 -Version: 30.0.93 +Version: 30.1 Release: %autorelease License: GPL-3.0-or-later AND CC0-1.0 URL: https://www.gnu.org/software/emacs/ -%if %{lua: print(select(3, string.find(rpm.expand('%version'), '%d+%.%d+%.(%d+)')))} >= 90 +%if %{lua: print(select(3, string.find(rpm.expand('%version'), '%d+%.(%d+)')))} == 0 Source0: https://alpha.gnu.org/gnu/emacs/pretest/emacs-%{version}.tar.xz Source1: https://alpha.gnu.org/gnu/emacs/pretest/emacs-%{version}.tar.xz.sig %else diff --git a/sources b/sources index e7ca0a5..11bd85d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (emacs-29.4.tar.xz) = 66b38081cb01d2c46ff7beefb45986cc225b4c922c30712ad0d456c6cae5507176ed99418c8f26948c5375c8afde4e4b2507d23ed997dbb5392d12150a121d80 -SHA512 (emacs-29.4.tar.xz.sig) = 6c20269c260fb7f6d8b9b4582be25179a5adaaa1b9d94e68d55890f7b0b211dfd396c7005694b0154471ab3769f12e5067b8f4ec21720755d9087d89a8c722f6 +SHA512 (emacs-30.1.tar.xz) = 511a6a1d2a170a207913692e1349344b70a0b5202b8d1ae27dc7256e589c77ae9e35da16fc2a098bf9f1b8d0f60233f452ed8d6744b70b907f3484c42f2d7d7f +SHA512 (emacs-30.1.tar.xz.sig) = 59ef724ff765fb76b9b9cfb8bd3853e001e9e6cefa65e2c49822238c11d619f916284f5b118cefff1bcd6c70f4ebcc1e420754cc225002164b56ced3caa954bd From 49d824fe187d8987b79643383bd6d2489f2c8f76 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 25 Feb 2025 16:05:41 +0000 Subject: [PATCH 20/65] Rebuild against tree-sitter-0.25.2-5.fc42 From 729b38fa3fa3c34b7b63f055f35b4602ca415c75 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 25 Feb 2025 17:25:54 +0000 Subject: [PATCH 21/65] Abandon checks There are currently too many intermittent failures to make them useful. --- ...l-sec-tests-as-unstable-when-built-i.patch | 84 ------------------- ...-to-stabalise-dired-test-bug27243-02.patch | 38 --------- emacs.spec | 32 ------- 3 files changed, 154 deletions(-) delete mode 100644 0003-Mark-multiple-mml-sec-tests-as-unstable-when-built-i.patch delete mode 100644 0004-Try-harder-to-stabalise-dired-test-bug27243-02.patch diff --git a/0003-Mark-multiple-mml-sec-tests-as-unstable-when-built-i.patch b/0003-Mark-multiple-mml-sec-tests-as-unstable-when-built-i.patch deleted file mode 100644 index 68c21c8..0000000 --- a/0003-Mark-multiple-mml-sec-tests-as-unstable-when-built-i.patch +++ /dev/null @@ -1,84 +0,0 @@ -From bf512d1bad98bcd1dc87da93fd2e7f415be14501 Mon Sep 17 00:00:00 2001 -From: Peter Oliver -Date: Mon, 15 Jul 2024 16:19:10 +0100 -Subject: [PATCH 3/4] Mark multiple mml-sec tests as unstable when built in an - RPM - -* test/lisp/gnus/mml-sec-tests.el: Mark unstable tests which have been -seen to intermittently fail at -https://koji.fedoraproject.org/koji/packageinfo?packageID=560 ---- - test/lisp/gnus/mml-sec-tests.el | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/test/lisp/gnus/mml-sec-tests.el b/test/lisp/gnus/mml-sec-tests.el -index 7abd1bd65a3..2bd52bf3ee0 100644 ---- a/test/lisp/gnus/mml-sec-tests.el -+++ b/test/lisp/gnus/mml-sec-tests.el -@@ -210,6 +210,7 @@ mml-secure-test-key-fixture - - (ert-deftest mml-secure-key-checks () - "Test mml-secure-check-user-id and mml-secure-check-sub-key on sample keys." -+ :tags (if (getenv "RPM_BUILD_ROOT") '(:unstable)) - (skip-unless (test-conf)) - (mml-secure-test-fixture - (lambda () -@@ -278,6 +279,7 @@ mml-secure-key-checks - - (ert-deftest mml-secure-find-usable-keys-1 () - "Make sure that expired and disabled keys and revoked UIDs are not used." -+ :tags (if (getenv "RPM_BUILD_ROOT") '(:unstable)) - (skip-unless (test-conf)) - (mml-secure-test-fixture - (lambda () -@@ -317,6 +319,7 @@ mml-secure-find-usable-keys-1 - - (ert-deftest mml-secure-find-usable-keys-2 () - "Test different ways to search for keys." -+ :tags (if (getenv "RPM_BUILD_ROOT") '(:unstable)) - (skip-unless (test-conf)) - (mml-secure-test-fixture - (lambda () -@@ -369,6 +372,7 @@ mml-secure-find-usable-keys-2 - - (ert-deftest mml-secure-select-preferred-keys-1 () - "If only one key exists for an e-mail address, it is the preferred one." -+ :tags (if (getenv "RPM_BUILD_ROOT") '(:unstable)) - (skip-unless (test-conf)) - (mml-secure-test-fixture - (lambda () -@@ -380,6 +384,7 @@ mml-secure-select-preferred-keys-1 - - (ert-deftest mml-secure-select-preferred-keys-2 () - "If multiple keys exists for an e-mail address, customization is necessary." -+ :tags (if (getenv "RPM_BUILD_ROOT") '(:unstable)) - (skip-unless (test-conf)) - (mml-secure-test-fixture - (lambda () -@@ -407,6 +412,7 @@ mml-secure-select-preferred-keys-2 - - (ert-deftest mml-secure-select-preferred-keys-3 () - "Expired customized keys are removed if multiple keys are available." -+ :tags (if (getenv "RPM_BUILD_ROOT") '(:unstable)) - (skip-unless (test-conf)) - (mml-secure-test-fixture - (lambda () -@@ -581,6 +587,7 @@ mml-secure-test-en-decrypt-with-passphrase - (ert-deftest mml-secure-en-decrypt-1 () - "Encrypt message; then decrypt and test for expected result. - In this test, the single matching key is chosen automatically." -+ :tags (if (getenv "RPM_BUILD_ROOT") '(:unstable)) - (skip-unless (test-conf)) - (dolist (method (enc-standards) nil) - ;; no-exp@example.org with single encryption key -@@ -625,6 +632,7 @@ mml-secure-en-decrypt-3 - (ert-deftest mml-secure-en-decrypt-4 () - "Encrypt message; then decrypt and test for expected result. - In this test, encrypt-to-self variables are set to lists." -+ :tags (if (getenv "RPM_BUILD_ROOT") '(:unstable)) - (skip-unless (test-conf)) - ;; Send from sub@example.org, which has two keys; encrypt to both. - (let ((mml-secure-openpgp-encrypt-to-self --- -2.47.0 - diff --git a/0004-Try-harder-to-stabalise-dired-test-bug27243-02.patch b/0004-Try-harder-to-stabalise-dired-test-bug27243-02.patch deleted file mode 100644 index d7aa8fe..0000000 --- a/0004-Try-harder-to-stabalise-dired-test-bug27243-02.patch +++ /dev/null @@ -1,38 +0,0 @@ -From e0f0549ac6766ab565dbd581098b96792a807727 Mon Sep 17 00:00:00 2001 -From: Peter Oliver -Date: Wed, 17 Jul 2024 00:06:02 +0100 -Subject: [PATCH 4/4] Try harder to stabalise dired-test-bug27243-02 - -* test/lisp/dired-tests.el (dired-test-bug27243-02): Don't rely on the -expected point, since columns will move if the size of the parent directory -changes order of magnitude. ---- - test/lisp/dired-tests.el | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el -index ea47043dfc5..6078e99e13c 100644 ---- a/test/lisp/dired-tests.el -+++ b/test/lisp/dired-tests.el -@@ -190,7 +190,6 @@ dired-test-bug27243-02 - "Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#28 ." - (ert-with-temp-directory test-dir - (let ((dired-auto-revert-buffer t) -- (dired-free-space nil) - buffers) - ;; On MS-Windows, get rid of 8+3 short names in test-dir, if the - ;; corresponding long file names exist, otherwise such names trip -@@ -216,7 +215,9 @@ dired-test-bug27243-02 - ;; Sanity check: point should now be back on the subdirectory. - (should (eq (point) pt1)) - (push (dired test-dir) buffers) -- (should (eq (point) pt1))) -+ (should (equal (dired-file-name-at-point) -+ (concat (file-name-as-directory test-dir) -+ (file-name-as-directory "test-subdir"))))) - (dolist (buf buffers) - (when (buffer-live-p buf) (kill-buffer buf))))))) - --- -2.45.2 - diff --git a/emacs.spec b/emacs.spec index b9e173c..ed0c049 100644 --- a/emacs.spec +++ b/emacs.spec @@ -44,12 +44,6 @@ Patch: emacs-libdir-vs-systemd.patch Patch: emacs-desktop.patch Patch: emacs-pgtk-on-x-error-message.patch -# Fix intermittently failing test (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72120) -Patch: 0004-Try-harder-to-stabalise-dired-test-bug27243-02.patch - -# Skip intermittently failing tests -Patch: 0003-Mark-multiple-mml-sec-tests-as-unstable-when-built-i.patch - # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2276822 # (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63555). If GDK ever # gets any new backends, this patch may need extending. @@ -619,32 +613,6 @@ export QA_SKIP_BUILD_ROOT=0 %check -# A number of tests that don't work on GNU EMBA are also unstable when -# run in Koji. -export EMACS_EMBA_CI=1 - -cd build-pgtk -%make_build check -cd .. - -%if %{with gtkx11} -cd build-gtk+x11 -%make_build check -cd .. -%endif - -%if %{with lucid} -cd build-lucid -%make_build check -cd .. -%endif - -%if %{with nw} -cd build-nw -%make_build check -cd .. -%endif - appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop From 3acf65e7aa5f9b54b3d25428e114029744f606a7 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 27 Feb 2025 01:26:42 +0000 Subject: [PATCH 22/65] Avoid duplicating native lisp across subpackages. --- emacs.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/emacs.spec b/emacs.spec index ed0c049..4327ea7 100644 --- a/emacs.spec +++ b/emacs.spec @@ -558,7 +558,7 @@ rm %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document23.svg # Install native compiled Lisp of all builds (TOPDIR=${PWD} cd %{buildroot} - find ".%{native_lisp}/$(ls -1 build-pgtk/native-lisp)" \ + find ".%{native_lisp}/$(ls $TOPDIR/build-pgtk/native-lisp)" \ \( -type f -name '*eln' -fprintf "$TOPDIR/pgtk-filelist" "%%%%attr(755,-,-) %%p\n" \) \ -o \( -type d -fprintf "$TOPDIR/pgtk-dirlist" "%%%%dir %%p\n" \) ) @@ -568,7 +568,7 @@ echo "%{emacs_libexecdir}/emacs-$(./build-pgtk/src/emacs --fingerprint).pdmp" \ %if %{with gtkx11} (TOPDIR=${PWD} cd %{buildroot} - find ".%{native_lisp}/$(ls -1 build-gtk+x11/native-lisp)" \ + find ".%{native_lisp}/$(ls $TOPDIR/build-gtk+x11/native-lisp)" \ \( -type f -name '*eln' -fprintf "$TOPDIR/gtk+x11-filelist" "%%%%attr(755,-,-) %%p\n" \) \ -o \( -type d -fprintf "$TOPDIR/gtk+x11-dirlist" "%%%%dir %%p\n" \) ) @@ -579,7 +579,7 @@ echo "%{emacs_libexecdir}/emacs-$(./build-gtk+x11/src/emacs --fingerprint).pdmp" %if %{with lucid} (TOPDIR=${PWD} cd %{buildroot} - find ".%{native_lisp}/$(ls -1 build-lucid/native-lisp)" \ + find ".%{native_lisp}/$(ls $TOPDIR/build-lucid/native-lisp)" \ \( -type f -name '*eln' -fprintf "$TOPDIR/lucid-filelist" "%%%%attr(755,-,-) %%p\n" \) \ -o \( -type d -fprintf "$TOPDIR/lucid-dirlist" "%%%%dir %%p\n" \) ) @@ -590,7 +590,7 @@ echo "%{emacs_libexecdir}/emacs-$(./build-lucid/src/emacs --fingerprint).pdmp" \ %if %{with nw} (TOPDIR=${PWD} cd %{buildroot} - find ".%{native_lisp}/$(ls -1 build-nw/native-lisp)" \ + find ".%{native_lisp}/$(ls $TOPDIR/build-nw/native-lisp)" \ \( -type f -name '*eln' -fprintf "$TOPDIR/nw-filelist" "%%%%attr(755,-,-) %%p\n" \) \ -o \( -type d -fprintf "$TOPDIR/nw-dirlist" "%%%%dir %%p\n" \) ) From 72a21b107c6e6a9be3ece8042fac31055a5e8f63 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 27 Feb 2025 12:11:54 +0000 Subject: [PATCH 23/65] Stricter matching of native-compiled lisp files. --- emacs.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emacs.spec b/emacs.spec index 4327ea7..fb6c091 100644 --- a/emacs.spec +++ b/emacs.spec @@ -603,11 +603,13 @@ sed -i -e "s|\.%{native_lisp}|%{native_lisp}|" *-filelist *-dirlist # remove exec permissions from eln files to prevent the debuginfo extractor from # trying to extract debuginfo from them -find %{buildroot}%{_libdir}/ -name '*eln' -type f | xargs chmod -x +find %{buildroot}%{native_lisp}/ -name '*.eln' -type f -print0 \ + | xargs -0 chmod -x # ensure native files are newer than byte-code files # see: https://bugzilla.redhat.com/show_bug.cgi?id=2157979#c11 -find %{buildroot}%{_libdir}/ -name '*eln' -type f | xargs touch +find %{buildroot}%{native_lisp}/ -name '*.eln' -type f -print0 \ + | xargs -0 touch export QA_SKIP_BUILD_ROOT=0 From 28029c5fc33b4e7f3ce5dbed0a7ddb2e589458a5 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 6 Mar 2025 12:36:05 +0000 Subject: [PATCH 24/65] Drop recommendation of gcc-c++ for newer Tree-sitter versions Tree-sitter 0.24 dropped support for parsers written in C++. --- emacs.spec | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/emacs.spec b/emacs.spec index fb6c091..ad9b9b6 100644 --- a/emacs.spec +++ b/emacs.spec @@ -232,15 +232,11 @@ Provides: emacs-transient = 0.3.7 # version as of the release of emacs 28.1 is obsoleted Obsoletes: emacs-transient < 0.3.0-4 -# https://github.com/tree-sitter/tree-sitter/issues/3296 -Requires: libtree-sitter >= 0.22.5 - -# Ideally, we'd package all tree-sitter parsers as RPMs, but, in the -# meantime, we need the following packages for -# treesit-install-language-grammar to be able to build the parsers for -# us at runtime: -Recommends: ((gcc and gcc-c++) or clang) +# We need the following packages for treesit-install-language-grammar to +# be able to build additional parsers for us at runtime: Recommends: /usr/bin/git +Recommends: gcc +Recommends: (gcc-c++ if libtree-sitter < 0.24.0) Recommends: libtree-sitter-java From 69f6ed99ccb4603a0fad8e2e3acbce2ad29a9bed Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 6 Mar 2025 14:11:40 +0000 Subject: [PATCH 25/65] Automatically generate Recommends for Tree-sitter parsers. --- emacs.spec | 22 ++++++++++++++++++---- emacs_lisp.attr | 5 +++++ emacs_lisp.rec | 30 ++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 emacs_lisp.attr create mode 100755 emacs_lisp.rec diff --git a/emacs.spec b/emacs.spec index ad9b9b6..5b965dd 100644 --- a/emacs.spec +++ b/emacs.spec @@ -28,6 +28,9 @@ Source5: site-start.el Source6: default.el Source9: emacs-desktop.sh +Source10: emacs_lisp.attr +Source11: emacs_lisp.rec + # Avoid trademark issues Patch: 0001-Pong-and-Tetris-are-excluded.patch @@ -238,7 +241,10 @@ Recommends: /usr/bin/git Recommends: gcc Recommends: (gcc-c++ if libtree-sitter < 0.24.0) -Recommends: libtree-sitter-java +%global _local_file_attrs emacs_lisp +%{load:%SOURCE10} +%global __emacs_lisp_recommends \ + %{_builddir}/%{name}-%{version}/build-pgtk/src/emacs -x %SOURCE11 %description common %desc @@ -500,9 +506,14 @@ install -p -m 0644 %SOURCE4 %{buildroot}%{_sysconfdir}/skel/.emacs mkdir -p %{buildroot}/%{pkgconfig} install -p -m 0644 emacs.pc %{buildroot}/%{pkgconfig} -# Install rpm macro definition file -mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d -install -p -m 0644 macros.emacs %{buildroot}%{_rpmconfigdir}/macros.d/ +# Install rpm macros +mkdir -p \ + %{buildroot}%{_fileattrsdir} \ + %{buildroot}%{_rpmconfigdir} \ + %{buildroot}%{_rpmmacrodir} +install -p -m 0644 %SOURCE10 %{buildroot}%{_fileattrsdir} +install -p -m 0755 %SOURCE11 %{buildroot}%{_rpmconfigdir} +install -p -m 0644 macros.emacs %{buildroot}%{_rpmmacrodir} # After everything is installed, remove info dir rm -f %{buildroot}%{_infodir}/dir @@ -714,6 +725,8 @@ fi %files common -f common-filelist -f info-filelist %config(noreplace) %{_sysconfdir}/skel/.emacs +%{_fileattrsdir}/emacs_lisp.attr +%{_rpmconfigdir}/emacs_lisp.rec %{_rpmconfigdir}/macros.d/macros.emacs %license build-pgtk/etc/COPYING %doc build-pgtk/doc/NEWS build-pgtk/BUGS build-pgtk/README @@ -749,6 +762,7 @@ fi %attr(0644,root,root) %config %{site_lisp}/site-start.el %{pkgconfig}/emacs.pc + %files devel %{_includedir}/emacs-module.h diff --git a/emacs_lisp.attr b/emacs_lisp.attr new file mode 100644 index 0000000..bf13cd7 --- /dev/null +++ b/emacs_lisp.attr @@ -0,0 +1,5 @@ +# -*- rpm-spec -*- + +%__emacs_lisp_recommends %{_rpmconfigdir}/emacs_lisp.rec +%__emacs_lisp_path %{_datadir}/emacs/.+\.el(\.gz)?$ +%__emacs_lisp_protocol multifile diff --git a/emacs_lisp.rec b/emacs_lisp.rec new file mode 100755 index 0000000..cddbbf9 --- /dev/null +++ b/emacs_lisp.rec @@ -0,0 +1,30 @@ +#!/usr/bin/emacs -x + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Inspect Emacs Lisp files for usage of Tree-sitter parsers, and +;; generate RPM Recommends for those. + +;;; Code: + +(setq jka-compr-verbose nil) + +(condition-case nil + (while (setq filename (read-from-minibuffer "")) + (when (string-match-p "\\.el\\(\\.gz\\)?$" filename) + (with-temp-buffer + (insert-file-contents filename) + (setq parsers ()) + (while + (search-forward-regexp "(treesit-\\(parser-create\\|ready-p\\) '" + nil t) + (add-to-list 'parsers (thing-at-point 'symbol t))) + (when parsers + (princ (concat ";" filename "\n")) + (dolist (parser parsers) + (princ (concat "tree-sitter(" parser ")" "\n"))))))) + (end-of-file nil)) + +;;; emacs_lisp.rec ends here From 340027a976b5b8e41fb7edef58b0fb00ed0a9862 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 13 Mar 2025 00:49:05 +0000 Subject: [PATCH 26/65] Correct provided emacs-transient version. --- emacs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index 5b965dd..cc2c8cb 100644 --- a/emacs.spec +++ b/emacs.spec @@ -230,7 +230,7 @@ Recommends: info Provides: %{name}-el = %{epoch}:%{version}-%{release} Obsoletes: emacs-el < 1:24.3-29 # transient.el is provided by emacs in lisp/transient.el -Provides: emacs-transient = 0.3.7 +Provides: emacs-transient = 0.7.2.2 # the existing emacs-transient package is obsoleted by emacs 28+, last package # version as of the release of emacs 28.1 is obsoleted Obsoletes: emacs-transient < 0.3.0-4 From 8ad003b0a8ab8eacf25f505583604494f71bf5ea Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 13 Mar 2025 12:47:28 +0000 Subject: [PATCH 27/65] 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 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/emacs.spec b/emacs.spec index cc2c8cb..5f8fc64 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 Source10: emacs_lisp.attr @@ -252,6 +255,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 @@ -515,9 +532,16 @@ install -p -m 0644 %SOURCE10 %{buildroot}%{_fileattrsdir} install -p -m 0755 %SOURCE11 %{buildroot}%{_rpmconfigdir} install -p -m 0644 macros.emacs %{buildroot}%{_rpmmacrodir} +# 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 @@ -762,9 +786,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 b8ab76acc8aef0be458f73eac3c9e17d935204b7 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 13 Mar 2025 12:50:15 +0000 Subject: [PATCH 28/65] 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 5f8fc64..50f5a8c 100644 --- a/emacs.spec +++ b/emacs.spec @@ -227,7 +227,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 45a313a33c6f54a6ce212844f11532a37446e0df Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 16 Mar 2025 23:48:00 +0000 Subject: [PATCH 29/65] 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 50f5a8c..44b83f3 100644 --- a/emacs.spec +++ b/emacs.spec @@ -695,7 +695,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 cf0b4080a8d42208902f760508d1943f1ed4ffbf Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 16 Mar 2025 23:58:53 +0000 Subject: [PATCH 30/65] Offer emacs-desktop as the highest priority alternative for emacs Fixes #2326662. --- emacs-desktop.patch | 26 -------------------------- emacs-desktop.sh | 39 +++++++++++++++++++++++++++++++-------- emacs.spec | 11 +++++++++-- 3 files changed, 40 insertions(+), 36 deletions(-) delete mode 100644 emacs-desktop.patch diff --git a/emacs-desktop.patch b/emacs-desktop.patch deleted file mode 100644 index 2453407..0000000 --- a/emacs-desktop.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 90e902854c53c6ab5ef8711af27f42fbc77d9ffe Mon Sep 17 00:00:00 2001 -From: Peter Oliver -Date: Mon, 10 Apr 2023 20:55:54 +0100 -Subject: [PATCH] Use a wrapper to avoid the pure GTK build on X11, where it is - unsupported. - ---- - etc/emacs.desktop | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/etc/emacs.desktop b/etc/emacs.desktop -index 0d7cac14da5..eabc78bb884 100644 ---- a/etc/emacs.desktop -+++ b/etc/emacs.desktop -@@ -3,7 +3,7 @@ Name=Emacs - GenericName=Text Editor - Comment=Edit text - MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; --Exec=emacs %F -+Exec=emacs-desktop %F - Icon=emacs - Type=Application - Terminal=false --- -2.39.2 - diff --git a/emacs-desktop.sh b/emacs-desktop.sh index 30648ae..a69e309 100755 --- a/emacs-desktop.sh +++ b/emacs-desktop.sh @@ -1,16 +1,39 @@ #!/bin/sh # The pure GTK build of emacs is not supported on X11, so try to avoid -# using if there is an alternative. +# using it there if there is another alternative. + +preferred="$(readlink -f /usr/bin/emacs)" if [ "$XDG_SESSION_TYPE" = 'x11' ]; then - case "$(readlink -f /usr/bin/emacs)" in - */emacs-*.*-pgtk) - if type emacs-gtk+x11 >/dev/null; then - exec emacs-gtk+x11 "$@" - elif type emacs-lucid >/dev/null; then - exec emacs-lucid "$@" - fi + case "$preferred" in + *-pgtk) + for variant in gtk+x11 lucid; do + if type "emacs-$variant" >/dev/null; then + exec "emacs-$variant" "$@" + fi + done + ;; + */emacs-desktop) + # If this wrapper script is itself the preferred alternative, + # select something suitable from the options available. + for variant in gtk+x11 lucid pgtk nw; do + if type "emacs-$variant" >/dev/null; then + exec "emacs-$variant" "$@" + fi + done + exit 2 + ;; + esac +else + case "$preferred" in + */emacs-desktop) + for variant in pgtk gtk+x11 lucid nw; do + if type "emacs-$variant" >/dev/null; then + exec "emacs-$variant" "$@" + fi + done + exit 2 ;; esac fi diff --git a/emacs.spec b/emacs.spec index 44b83f3..016426d 100644 --- a/emacs.spec +++ b/emacs.spec @@ -46,8 +46,8 @@ Patch: emacs-system-crypto-policies.patch # => remove it if we stop using this patch Patch: emacs-libdir-vs-systemd.patch -# Avoid using the pure GTK build on X11 where it is unsupported: -Patch: emacs-desktop.patch +# Hint what to do to avoid using the pure GTK build on X11, where it is +# unsupported: Patch: emacs-pgtk-on-x-error-message.patch # Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2276822 @@ -705,10 +705,16 @@ fi %preun common if [ $1 = 0 ]; then + /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-desktop || : /usr/sbin/alternatives --remove emacs.etags %{_bindir}/etags.emacs || : fi %posttrans common +/usr/sbin/alternatives --install %{_bindir}/emacs \ + emacs \ + %{_bindir}/emacs-desktop \ + 85 \ + || : /usr/sbin/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ --slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || : @@ -754,6 +760,7 @@ fi %{_rpmconfigdir}/macros.d/macros.emacs %license build-pgtk/etc/COPYING %doc build-pgtk/doc/NEWS build-pgtk/BUGS build-pgtk/README +%ghost %{_bindir}/emacs %{_bindir}/ebrowse %{_bindir}/emacs-desktop %{_bindir}/etags.emacs From 1e64061e6c812956f30844f685744ee9de5d740f Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 18 Mar 2025 13:02:33 +0000 Subject: [PATCH 31/65] Ensure desktop icon is found `WM_NAME` is set from the zeroth argument to `exec`. Lie about this so that it matches the value expected from the `emacs.desktop` file. This requires Bash, so use bashisms. --- ...cify-StartupWMClass-in-emacs.desktop.patch | 31 +++++++++++++++++++ emacs-desktop.sh | 10 +++--- emacs.spec | 5 +++ 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 0001-Don-t-specify-StartupWMClass-in-emacs.desktop.patch diff --git a/0001-Don-t-specify-StartupWMClass-in-emacs.desktop.patch b/0001-Don-t-specify-StartupWMClass-in-emacs.desktop.patch new file mode 100644 index 0000000..09f2ed7 --- /dev/null +++ b/0001-Don-t-specify-StartupWMClass-in-emacs.desktop.patch @@ -0,0 +1,31 @@ +From 164e45695f9784469ff2f66cafcd6bc927c246be Mon Sep 17 00:00:00 2001 +From: Peter Oliver +Date: Tue, 18 Mar 2025 13:16:15 +0000 +Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20specify=20StartupWMClass=20in?= + =?UTF-8?q?=20emacs.desktop?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +See the explanation at +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49505#67. In summary, the +value we were providing doesn’t work on Wayland, and the default should +be fine. + +* etc/emacs.desktop: Don’t specify StartupWMClass +--- + etc/emacs.desktop | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/etc/emacs.desktop b/etc/emacs.desktop +index 0d7cac14da5..16ad3c7eb48 100644 +--- a/etc/emacs.desktop ++++ b/etc/emacs.desktop +@@ -9,4 +9,3 @@ Type=Application + Terminal=false + Categories=Development;TextEditor; + StartupNotify=true +-StartupWMClass=Emacs +-- +2.48.1 + diff --git a/emacs-desktop.sh b/emacs-desktop.sh index a69e309..2f60d9d 100755 --- a/emacs-desktop.sh +++ b/emacs-desktop.sh @@ -1,16 +1,16 @@ -#!/bin/sh +#!/usr/bin/bash # The pure GTK build of emacs is not supported on X11, so try to avoid # using it there if there is another alternative. preferred="$(readlink -f /usr/bin/emacs)" -if [ "$XDG_SESSION_TYPE" = 'x11' ]; then +if [[ $XDG_SESSION_TYPE == 'x11' ]]; then case "$preferred" in *-pgtk) for variant in gtk+x11 lucid; do if type "emacs-$variant" >/dev/null; then - exec "emacs-$variant" "$@" + exec -a emacs "emacs-$variant" "$@" fi done ;; @@ -19,7 +19,7 @@ if [ "$XDG_SESSION_TYPE" = 'x11' ]; then # select something suitable from the options available. for variant in gtk+x11 lucid pgtk nw; do if type "emacs-$variant" >/dev/null; then - exec "emacs-$variant" "$@" + exec -a emacs "emacs-$variant" "$@" fi done exit 2 @@ -30,7 +30,7 @@ else */emacs-desktop) for variant in pgtk gtk+x11 lucid nw; do if type "emacs-$variant" >/dev/null; then - exec "emacs-$variant" "$@" + exec -a emacs "emacs-$variant" "$@" fi done exit 2 diff --git a/emacs.spec b/emacs.spec index 016426d..69327ab 100644 --- a/emacs.spec +++ b/emacs.spec @@ -55,6 +55,11 @@ 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 +# Don't override StartupWMClass. The overriding value doesn't work on +# Wayland, and the default should be fine. +# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49505#67 +Patch: 0001-Don-t-specify-StartupWMClass-in-emacs.desktop.patch + BuildRequires: alsa-lib-devel BuildRequires: atk-devel BuildRequires: autoconf From cb65b0edeb248106d8c6252ce195fa73c3045b19 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 18 Mar 2025 22:27:52 +0000 Subject: [PATCH 32/65] Move emacs-desktop wrapper into emacs package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s only required with the `emacs-pgtk` binary. --- emacs.spec | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/emacs.spec b/emacs.spec index 69327ab..1128206 100644 --- a/emacs.spec +++ b/emacs.spec @@ -657,10 +657,12 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %preun if [ $1 = 0 ]; then + /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-desktop || : /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-pgtk || : fi %posttrans +/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-desktop 85 || : /usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-pgtk 80 || : %if %{with lucid} @@ -710,22 +712,17 @@ fi %preun common if [ $1 = 0 ]; then - /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-desktop || : /usr/sbin/alternatives --remove emacs.etags %{_bindir}/etags.emacs || : fi %posttrans common -/usr/sbin/alternatives --install %{_bindir}/emacs \ - emacs \ - %{_bindir}/emacs-desktop \ - 85 \ - || : /usr/sbin/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ --slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || : %files -f pgtk-filelist -f pgtk-dirlist %ghost %{_bindir}/emacs +%{_bindir}/emacs-desktop %{_bindir}/emacs-%{version}-pgtk %{_bindir}/emacs-pgtk %{_datadir}/glib-2.0/schemas/org.gnu.emacs.defaults.gschema.xml @@ -765,9 +762,7 @@ fi %{_rpmconfigdir}/macros.d/macros.emacs %license build-pgtk/etc/COPYING %doc build-pgtk/doc/NEWS build-pgtk/BUGS build-pgtk/README -%ghost %{_bindir}/emacs %{_bindir}/ebrowse -%{_bindir}/emacs-desktop %{_bindir}/etags.emacs %{_bindir}/gctags %{_datadir}/applications/emacs.desktop From c2d5a811c7177edefe3a9ad8896ad83d8afbb3b5 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 18 Mar 2025 22:39:42 +0000 Subject: [PATCH 33/65] Rename emacs subpackage to emacs-pgtk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hopefully, this causes users to be less disappointed when they discover that X11 isn’t supported with the “default” build. --- emacs.spec | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/emacs.spec b/emacs.spec index 1128206..4b7e53d 100644 --- a/emacs.spec +++ b/emacs.spec @@ -129,16 +129,6 @@ BuildRequires: util-linux %global marker ()(64bit) %endif -# Emacs doesn't run without a font, rhbz#732422 -Requires: google-noto-sans-mono-vf-fonts - -Requires(preun): /usr/sbin/alternatives -Requires(posttrans): /usr/sbin/alternatives -Requires: emacs-common = %{epoch}:%{version}-%{release} -Requires: libpixbufloader-xpm.so%{?marker} -Provides: emacs(bin) = %{epoch}:%{version}-%{release} -Supplements: ((libwayland-server and emacs-common) unless emacs-nw) - %define site_lisp %{_datadir}/emacs/site-lisp %define site_start_d %{site_lisp}/site-start.d %define pkgconfig %{_datadir}/pkgconfig @@ -151,16 +141,34 @@ editor. It contains special code editing features, a scripting language the editor. } - %description %desc -This package provides an emacs binary with support for Wayland, using the + + +%package pgtk +Summary: GNU Emacs text editor with GTK toolkit for Wayland + +# Emacs doesn't run without a font, rhbz#732422 +Requires: google-noto-sans-mono-vf-fonts + +Requires(preun): /usr/sbin/alternatives +Requires(posttrans): /usr/sbin/alternatives +Requires: emacs-common = %{epoch}:%{version}-%{release} +Requires: libpixbufloader-xpm.so%{?marker} +Obsoletes: emacs < %{epoch}:30.1-15 +Provides: emacs = %{epoch}:%{version}-%{release} +Provides: emacs(bin) = %{epoch}:%{version}-%{release} +Supplements: ((libwayland-server and emacs-common) unless emacs-nw) + +%description pgtk +%desc +This package provides an emacs-pgtk binary with support for Wayland, using the GTK toolkit. %if %{with gtkx11} %package gtk+x11 -Summary: GNU Emacs text editor with GTK toolkit X support +Summary: GNU Emacs text editor with GTK toolkit for X11 Requires: google-noto-sans-mono-vf-fonts Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives @@ -178,7 +186,7 @@ Window System, using the GTK toolkit. %if %{with lucid} %package lucid -Summary: GNU Emacs text editor with Lucid toolkit X support +Summary: GNU Emacs text editor with Lucid toolkit for X11 Requires: google-noto-sans-mono-vf-fonts Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives @@ -655,13 +663,13 @@ appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xm desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop -%preun +%preun pgtk if [ $1 = 0 ]; then /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-desktop || : /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-pgtk || : fi -%posttrans +%posttrans pgtk /usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-desktop 85 || : /usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-pgtk 80 || : @@ -720,7 +728,7 @@ fi --slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || : -%files -f pgtk-filelist -f pgtk-dirlist +%files pgtk -f pgtk-filelist -f pgtk-dirlist %ghost %{_bindir}/emacs %{_bindir}/emacs-desktop %{_bindir}/emacs-%{version}-pgtk From 8222fbcb4d66f4611416941827e87ccaae70fee4 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 25 Mar 2025 12:11:07 +0000 Subject: [PATCH 34/65] Drop emacs-terminal subpackage again It now has unversioned requires in all stable Fedora releases, so dropping it will no-longer block upgrades from those releases. --- emacs.spec | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/emacs.spec b/emacs.spec index 4b7e53d..a2f971d 100644 --- a/emacs.spec +++ b/emacs.spec @@ -26,9 +26,6 @@ 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 Source10: emacs_lisp.attr @@ -268,20 +265,6 @@ 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 @@ -545,16 +528,9 @@ install -p -m 0644 %SOURCE10 %{buildroot}%{_fileattrsdir} install -p -m 0755 %SOURCE11 %{buildroot}%{_rpmconfigdir} install -p -m 0644 macros.emacs %{buildroot}%{_rpmmacrodir} -# 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 @@ -801,13 +777,9 @@ 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 507e1bae41b4e38aa60363a9221f0d490c80f977 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 19 Mar 2025 17:34:44 +0000 Subject: [PATCH 35/65] Now there is no emacs subpackage, all emacs(bin) providers can provide it. --- emacs.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emacs.spec b/emacs.spec index a2f971d..f9d61ab 100644 --- a/emacs.spec +++ b/emacs.spec @@ -171,6 +171,7 @@ Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} Requires: libpixbufloader-xpm.so%{?marker} +Provides: emacs = %{epoch}:%{version}-%{release} Provides: emacs(bin) = %{epoch}:%{version}-%{release} Supplements: ((xorg-x11-server-Xorg and emacs-common) unless emacs-nw) @@ -188,6 +189,7 @@ Requires: google-noto-sans-mono-vf-fonts Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} +Provides: emacs = %{epoch}:%{version}-%{release} Provides: emacs(bin) = %{epoch}:%{version}-%{release} %description lucid @@ -203,6 +205,7 @@ Summary: GNU Emacs text editor with no window system support Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} +Provides: emacs = %{epoch}:%{version}-%{release} Provides: emacs(bin) = %{epoch}:%{version}-%{release} Provides: emacs-nox = %{epoch}:%{version}-%{release} Obsoletes: emacs-nox < 1:30 From e7d0043cec87ffd4eec68cd4e0bf19d9141b38dd Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 19 Mar 2025 01:37:32 +0000 Subject: [PATCH 36/65] Suggest an Emacs build based on Fedora edition. --- emacs.spec | 54 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/emacs.spec b/emacs.spec index f9d61ab..a655ad4 100644 --- a/emacs.spec +++ b/emacs.spec @@ -138,6 +138,43 @@ editor. It contains special code editing features, a scripting language the editor. } +Provides: emacs(bin) = %{epoch}:%{version}-%{release} +Requires: (emacs-pgtk = %{epoch}:%{version}-%{release} or emacs-gtk+x11 = %{epoch}:%{version}-%{release} or emacs-lucid = %{epoch}:%{version}-%{release} or emacs-nw = %{epoch}:%{version}-%{release}) + +Suggests: (emacs-nw if fedora-release-cloud) +Suggests: (emacs-nw if fedora-release-container) +Suggests: (emacs-nw if fedora-release-coreos) +Suggests: (emacs-gtk+x11 if fedora-release-i3) +Suggests: (emacs-nw if fedora-release-iot) +Suggests: (emacs-gtk+x11 if fedora-release-matecompiz) +Suggests: (emacs-pgtk if fedora-release-miraclewm) +Suggests: (emacs-pgtk if fedora-release-miraclewm-atomic) +Suggests: (emacs-pgtk if fedora-release-mobility) +Suggests: (emacs-nw if fedora-release-server) +Suggests: (emacs-pgtk if fedora-release-silverblue) +Suggests: (emacs-pgtk if fedora-release-sway) +Suggests: (emacs-pgtk if fedora-release-sway-atomic) +Suggests: (emacs-nw if fedora-release-toolbx) +Suggests: (emacs-pgtk if fedora-release-workstation) +Suggests: (emacs-gtk+x11 if fedora-release-xfce) + +## If you know the best variant for these editions, please fill +## them in. +# Suggests: (emacs- if fedora-release-budgie) +# Suggests: (emacs- if fedora-release-budgie-atomic) +# Suggests: (emacs- if fedora-release-cinnamon) +# Suggests: (emacs- if fedora-release-compneuro) +# Suggests: (emacs- if fedora-release-cosmic) +# Suggests: (emacs- if fedora-release-cosmic-atomic) +# Suggests: (emacs- if fedora-release-designsuite) +# Suggests: (emacs- if fedora-release-kde) +# Suggests: (emacs- if fedora-release-kde-mobile) +# Suggests: (emacs- if fedora-release-kinoite) +# Suggests: (emacs- if fedora-release-kinoite-mobile) +# Suggests: (emacs- if fedora-release-lxqt) +# Suggests: (emacs- if fedora-release-soas) +# Suggests: (emacs- if fedora-release-wsl) + %description %desc @@ -152,10 +189,7 @@ Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} Requires: libpixbufloader-xpm.so%{?marker} -Obsoletes: emacs < %{epoch}:30.1-15 -Provides: emacs = %{epoch}:%{version}-%{release} -Provides: emacs(bin) = %{epoch}:%{version}-%{release} -Supplements: ((libwayland-server and emacs-common) unless emacs-nw) +Supplements: ((libwayland-server and emacs) unless emacs-nw) %description pgtk %desc @@ -171,9 +205,7 @@ Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} Requires: libpixbufloader-xpm.so%{?marker} -Provides: emacs = %{epoch}:%{version}-%{release} -Provides: emacs(bin) = %{epoch}:%{version}-%{release} -Supplements: ((xorg-x11-server-Xorg and emacs-common) unless emacs-nw) +Supplements: ((xorg-x11-server-Xorg and emacs) unless emacs-nw) %description gtk+x11 %desc @@ -189,8 +221,6 @@ Requires: google-noto-sans-mono-vf-fonts Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} -Provides: emacs = %{epoch}:%{version}-%{release} -Provides: emacs(bin) = %{epoch}:%{version}-%{release} %description lucid %desc @@ -205,8 +235,6 @@ Summary: GNU Emacs text editor with no window system support Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} -Provides: emacs = %{epoch}:%{version}-%{release} -Provides: emacs(bin) = %{epoch}:%{version}-%{release} Provides: emacs-nox = %{epoch}:%{version}-%{release} Obsoletes: emacs-nox < 1:30 @@ -240,7 +268,7 @@ Requires: /usr/bin/readlink Requires: %{name}-filesystem Requires: emacsclient Requires: libgccjit -Recommends: emacs(bin) +Recommends: emacs = %{epoch}:%{version}-%{release} Recommends: enchant2 Recommends: info Provides: %{name}-el = %{epoch}:%{version}-%{release} @@ -707,6 +735,8 @@ fi --slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || : +%files + %files pgtk -f pgtk-filelist -f pgtk-dirlist %ghost %{_bindir}/emacs %{_bindir}/emacs-desktop From c65031ee31dbe44c66af2e17511bffb2fa6038ee Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 8 Apr 2025 14:23:58 +0100 Subject: [PATCH 37/65] 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 a655ad4..80ce0f3 100644 --- a/emacs.spec +++ b/emacs.spec @@ -57,6 +57,10 @@ Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49505#67 Patch: 0001-Don-t-specify-StartupWMClass-in-emacs.desktop.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 7b67394177313d608555d8317056764e351bc999 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 14 Apr 2025 12:25:22 +0100 Subject: [PATCH 38/65] Rebuild against tree-sitter-0.25.3-1.fc43 From 2a41db911d3f42822fa45c8c5dea2b1447378bae Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Thu, 24 Apr 2025 11:22:39 +0100 Subject: [PATCH 39/65] Emacs 31 compatibility for Tree-sitter Recommends generation. --- emacs_lisp.rec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emacs_lisp.rec b/emacs_lisp.rec index cddbbf9..5da43fb 100755 --- a/emacs_lisp.rec +++ b/emacs_lisp.rec @@ -13,12 +13,16 @@ (condition-case nil (while (setq filename (read-from-minibuffer "")) - (when (string-match-p "\\.el\\(\\.gz\\)?$" filename) + (when (string-match-p (rx ".el" (optional ".gz") line-end) + filename) (with-temp-buffer (insert-file-contents filename) (setq parsers ()) (while - (search-forward-regexp "(treesit-\\(parser-create\\|ready-p\\) '" + (search-forward-regexp (rx "(" (or "treesit-ensure-installed" + "treesit-parser-create" + "treesit-ready-p") + " '") nil t) (add-to-list 'parsers (thing-at-point 'symbol t))) (when parsers From 25a203f1231a5ea3309923bb425f4d9de5cd56b4 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 12 May 2025 14:03:34 +0100 Subject: [PATCH 40/65] Rebuild against tree-sitter-0.25.4-3.fc43 From a8733e9b93fd121a1d663607162477b041c33c75 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 28 May 2025 13:01:17 +0100 Subject: [PATCH 41/65] Rebuild against tree-sitter-0.25.5-1.fc43 From bedcb624132880b60dc1cf1fd2dfc31b76c6f661 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 13 Jun 2025 15:37:42 +0100 Subject: [PATCH 42/65] Rebuild against tree-sitter-0.25.6-1.fc43 From 14aefc94f9631375db3b6c001dc337dd522a155e Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 16 Jun 2025 00:15:03 +0100 Subject: [PATCH 43/65] 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 80ce0f3..2670ea1 100644 --- a/emacs.spec +++ b/emacs.spec @@ -61,6 +61,10 @@ Patch: 0001-Don-t-specify-StartupWMClass-in-emacs.desktop.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 735ea3cc3cbf567942f8712545d7c24b68da6646 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 16 Jun 2025 00:41:54 +0100 Subject: [PATCH 44/65] Fix pretest version detection. --- emacs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index 2670ea1..227fbce 100644 --- a/emacs.spec +++ b/emacs.spec @@ -12,7 +12,7 @@ Version: 30.1 Release: %autorelease License: GPL-3.0-or-later AND CC0-1.0 URL: https://www.gnu.org/software/emacs/ -%if %{lua: print(select(3, string.find(rpm.expand('%version'), '%d+%.(%d+)')))} == 0 +%if %{lua: print(select(3, string.find(rpm.expand('%version'), '%d+%.%d+%.(%d+)')) or 0)} >= 90 Source0: https://alpha.gnu.org/gnu/emacs/pretest/emacs-%{version}.tar.xz Source1: https://alpha.gnu.org/gnu/emacs/pretest/emacs-%{version}.tar.xz.sig %else From 59744aef6208652ddb3e2d86b5639a92382472fd Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 16 Jun 2025 11:59:55 +0100 Subject: [PATCH 45/65] 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 227fbce..441fc92 100644 --- a/emacs.spec +++ b/emacs.spec @@ -255,9 +255,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 3936b0f4b541eff55a40a167d2687bd4ccb18ff0 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 18 Jul 2025 12:52:35 +0100 Subject: [PATCH 46/65] Rebuild against tree-sitter-0.25.8-1.fc43 From 442688e43dc4ddcb7ce1108b7311196e6c8d22cc Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Fri, 18 Jul 2025 14:17:18 +0200 Subject: [PATCH 47/65] ignore symlinks in dependency computation Symlinks inside the buildroot (e.g., /builddir/build/BUILD/.../BUILDROOT/...) may point to non-existent paths during build, as their targets are only valid after installation (e.g., /usr/lib64/...). This causes dependency generators to fail when attempting to resolve such symlinks. Since symlinks either: * Point outside the package (and are processed separately), or * Point inside the package (and their targets are processed directly), we now skip symlink resolution entirely during dependency analysis. This avoids build-host path errors while preserving post-install correctness. Signed-off-by: Peter Lemenkov --- emacs_lisp.rec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs_lisp.rec b/emacs_lisp.rec index 5da43fb..588c810 100755 --- a/emacs_lisp.rec +++ b/emacs_lisp.rec @@ -13,8 +13,8 @@ (condition-case nil (while (setq filename (read-from-minibuffer "")) - (when (string-match-p (rx ".el" (optional ".gz") line-end) - filename) + (when (and (string-match-p (rx ".el" (optional ".gz") line-end) + filename) (not (file-symlink-p filename))) (with-temp-buffer (insert-file-contents filename) (setq parsers ()) From 2f9fd6b99a34a1d07657a124536fcae60011d4e4 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sat, 19 Jul 2025 00:05:58 +0100 Subject: [PATCH 48/65] Dependency generator: ensure error messages are sent to stderr only. --- emacs_lisp.rec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs_lisp.rec b/emacs_lisp.rec index 688cf12..1971b6f 100755 --- a/emacs_lisp.rec +++ b/emacs_lisp.rec @@ -9,7 +9,8 @@ ;;; Code: -(setq jka-compr-verbose nil) +(setq backtrace-on-error-noninteractive nil + jka-compr-verbose nil) (condition-case nil (while (setq filename (read-from-minibuffer "")) From 006f58a1387893ea6a76aeb1352280c19e973234 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sat, 19 Jul 2025 00:13:10 +0100 Subject: [PATCH 49/65] Dependency generator: look for absolute symlinks in $RPM_BUILD_ROOT --- emacs_lisp.rec | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/emacs_lisp.rec b/emacs_lisp.rec index 1971b6f..acf02d7 100755 --- a/emacs_lisp.rec +++ b/emacs_lisp.rec @@ -14,23 +14,36 @@ (condition-case nil (while (setq filename (read-from-minibuffer "")) - (when (and (string-match-p (rx ".el" (optional ".gz") line-end) + (when (string-match-p (rx ".el" (optional ".gz") line-end) filename) - (not (file-symlink-p filename))) - (with-temp-buffer - (insert-file-contents filename) - (setq parsers ()) - (while - (search-forward-regexp (rx "(" (or "treesit-ensure-installed" - "treesit-parser-create" - "treesit-ready-p") - " '") - nil t) - (add-to-list 'parsers (thing-at-point 'symbol t))) - (when parsers - (princ (concat ";" filename "\n")) - (dolist (parser parsers) - (princ (concat "tree-sitter(" parser ")" "\n"))))))) + (condition-case err + (let* ((symlink-target (file-symlink-p filename)) + (source-filename + (if (and (stringp symlink-target) + (string-match-p (rx line-start "/") + symlink-target)) + (file-name-concat (getenv "RPM_BUILD_ROOT") + symlink-target) + filename))) + (with-temp-buffer + (insert-file-contents source-filename) + (setq parsers ()) + (while + (search-forward-regexp + (rx "(" (or "treesit-ensure-installed" + "treesit-parser-create" + "treesit-ready-p") + " '") + nil t) + (add-to-list 'parsers (thing-at-point 'symbol t))) + (when parsers + (princ (concat ";" filename "\n")) + (dolist (parser parsers) + (princ (concat "tree-sitter(" parser ")" "\n")))))) + + ;; Missing files are probably caused by "broken" symlinks + ;; (which may actually be fulfilled by some other package). + (file-missing (message "warning: %s" (error-message-string err)))))) (end-of-file nil)) ;;; emacs_lisp.rec ends here From 680f81bce4fdc3de5ef0dbb420b0dc6a24e95c87 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Mon, 21 Jul 2025 11:38:31 +0100 Subject: [PATCH 50/65] Suggest emacs-nw for emacs within mock. --- emacs.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs.spec b/emacs.spec index 441fc92..e1c905d 100644 --- a/emacs.spec +++ b/emacs.spec @@ -149,6 +149,7 @@ the editor. Provides: emacs(bin) = %{epoch}:%{version}-%{release} Requires: (emacs-pgtk = %{epoch}:%{version}-%{release} or emacs-gtk+x11 = %{epoch}:%{version}-%{release} or emacs-lucid = %{epoch}:%{version}-%{release} or emacs-nw = %{epoch}:%{version}-%{release}) +Suggests: (emacs-nw if fedora-release-basic) Suggests: (emacs-nw if fedora-release-cloud) Suggests: (emacs-nw if fedora-release-container) Suggests: (emacs-nw if fedora-release-coreos) From 262e998b29cfbea3c8247ceb60ddf3b3e4a9328b Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 22 Jul 2025 13:05:37 +0100 Subject: [PATCH 51/65] Fix typo. --- emacs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index e1c905d..25f1f9a 100644 --- a/emacs.spec +++ b/emacs.spec @@ -149,7 +149,7 @@ the editor. Provides: emacs(bin) = %{epoch}:%{version}-%{release} Requires: (emacs-pgtk = %{epoch}:%{version}-%{release} or emacs-gtk+x11 = %{epoch}:%{version}-%{release} or emacs-lucid = %{epoch}:%{version}-%{release} or emacs-nw = %{epoch}:%{version}-%{release}) -Suggests: (emacs-nw if fedora-release-basic) +Suggests: (emacs-nw if fedora-release-identity-basic) Suggests: (emacs-nw if fedora-release-cloud) Suggests: (emacs-nw if fedora-release-container) Suggests: (emacs-nw if fedora-release-coreos) From b2f275ac7a5889e3a2f66a90443e8a1bc91f13bc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 19:48:10 +0000 Subject: [PATCH 52/65] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From a8890f9765be58c765a5dad80b69cf0e5e939ac1 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 15 Aug 2025 11:12:37 +0100 Subject: [PATCH 53/65] 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 25f1f9a..cfc9f9a 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/ @@ -57,14 +57,6 @@ Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49505#67 Patch: 0001-Don-t-specify-StartupWMClass-in-emacs.desktop.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 From 75773e660603e84459a0a2d3cea63de711fe76b1 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 9 Sep 2025 14:39:40 +0100 Subject: [PATCH 54/65] Rebuild against tree-sitter-0.25.9-1.fc44 From 2004733785acf791eec0810e513ba1dbcf700721 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 24 Sep 2025 15:20:36 +0100 Subject: [PATCH 55/65] Rebuild against tree-sitter-0.25.10-1.fc44 From 6156d97ca7ee47e3f44d5bc57ab4eb634e51f5a0 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 14 Oct 2025 14:08:43 +0100 Subject: [PATCH 56/65] Recent vanilla ~/.emacs defaults to lexical binding. --- dotemacs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotemacs.el b/dotemacs.el index e1bee17..f7ddcf9 100644 --- a/dotemacs.el +++ b/dotemacs.el @@ -1,4 +1,4 @@ -;; .emacs +;;; -*- lexical-binding: t -*- (custom-set-variables ;; uncomment to always end a file with a newline From 3b2d62a20fdf74256caee7f696a8999aca16441e Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 14 Oct 2025 14:12:58 +0100 Subject: [PATCH 57/65] Enable lexical binding in `site-start.el` and `default.el` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emacs 31 will warn when loading an Elisp file that does not specify whether to use lexical binding. We don’t use dynamic binding in these files, so we may as well switch it on now. While we’re here, keep `checkdoc` happy. --- default.el | 16 +++++++++++----- site-start.el | 11 +++++++++-- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/default.el b/default.el index 7df4cee..7ec900f 100644 --- a/default.el +++ b/default.el @@ -1,7 +1,13 @@ -;;; default.el - loaded after ".emacs" on startup -;;; -;;; Setting `inhibit-default-init' non-nil in "~/.emacs" -;;; prevents loading of this file. Also the "-q" option to emacs -;;; prevents both "~/.emacs" and this file from being loaded at startup. +;;; default.el --- loaded after ".emacs" on startup -*- lexical-binding: t -*- + +;;; Commentary: +;; +;; Setting `inhibit-default-init' non-nil in "~/.emacs" +;; prevents loading of this file. Also the "-q" option to "emacs" +;; prevents both "~/.emacs" and this file from being loaded at startup. + +;;; Code: (setq-default smime-CA-directory "/etc/ssl/certs") + +;;; default.el ends here diff --git a/site-start.el b/site-start.el index efbb75b..87b3b13 100644 --- a/site-start.el +++ b/site-start.el @@ -1,9 +1,16 @@ -;;; loaded before user's ".emacs" file and default.el +;;; site-start.el --- loaded before user's ".emacs" file and default.el -*- lexical-binding: t -*- + +;;; Commentary: +;; +;; Load *.el and *.elc in /usr/share/emacs/site-lisp/site-start.d on startup + +;;; Code: -;; load *.el and *.elc in /usr/share/emacs/site-lisp/site-start.d on startup (mapc 'load (delete-dups (mapcar 'file-name-sans-extension (directory-files "/usr/share/emacs/site-lisp/site-start.d" t "\\.elc?\\'")))) + +;;; site-start.el ends here From 038733a4d2d9e2ee76011fc5409e4f790219a744 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 14 Nov 2025 17:07:45 +0000 Subject: [PATCH 58/65] Own etags and man page (rhbz#2414055). --- emacs.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emacs.spec b/emacs.spec index cfc9f9a..99c0e02 100644 --- a/emacs.spec +++ b/emacs.spec @@ -779,6 +779,7 @@ fi %license build-pgtk/etc/COPYING %doc build-pgtk/doc/NEWS build-pgtk/BUGS build-pgtk/README %{_bindir}/ebrowse +%ghost %{_bindir}/etags %{_bindir}/etags.emacs %{_bindir}/gctags %{_datadir}/applications/emacs.desktop @@ -791,6 +792,7 @@ fi %{_mandir}/man1/ebrowse.1* %{_mandir}/man1/emacs.1* %{_mandir}/man1/etags.emacs.1* +%ghost %{_mandir}/man1/etags.1* %{_mandir}/man1/gctags.1* %dir %{_datadir}/emacs/%{version} %{_datadir}/emacs/%{version}/etc From 8baaa786dfe29a7b01fa46d040155326fe653170 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 14 Nov 2025 17:18:11 +0000 Subject: [PATCH 59/65] Drop alternatives for etags Since ctags-5.9, there is no-longer any other provider in Fedora, so we can simplify. --- emacs.spec | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/emacs.spec b/emacs.spec index 99c0e02..0d44537 100644 --- a/emacs.spec +++ b/emacs.spec @@ -532,10 +532,9 @@ install -p -m 0644 %SOURCE6 %{buildroot}%{site_lisp} echo "(setq source-directory \"%{_datadir}/emacs/%{version}/\")" \ >> %{buildroot}%{site_lisp}/site-start.el -mv %{buildroot}%{_bindir}/{etags,etags.emacs} mv %{buildroot}%{_mandir}/man1/{ctags.1.gz,gctags.1.gz} -mv %{buildroot}%{_mandir}/man1/{etags.1.gz,etags.emacs.1.gz} mv %{buildroot}%{_bindir}/{ctags,gctags} + # BZ 927996 mv %{buildroot}%{_infodir}/{info.info.gz,info.gz} @@ -725,13 +724,7 @@ fi %endif %preun common -if [ $1 = 0 ]; then - /usr/sbin/alternatives --remove emacs.etags %{_bindir}/etags.emacs || : -fi - -%posttrans common -/usr/sbin/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ - --slave %{_mandir}/man1/etags.1.gz emacs.etags.man %{_mandir}/man1/etags.emacs.1.gz || : +/usr/sbin/alternatives --remove emacs.etags %{_bindir}/etags.emacs || : %files @@ -779,8 +772,7 @@ fi %license build-pgtk/etc/COPYING %doc build-pgtk/doc/NEWS build-pgtk/BUGS build-pgtk/README %{_bindir}/ebrowse -%ghost %{_bindir}/etags -%{_bindir}/etags.emacs +%{_bindir}/etags %{_bindir}/gctags %{_datadir}/applications/emacs.desktop %{_datadir}/applications/emacs-mail.desktop @@ -791,8 +783,7 @@ fi %{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg %{_mandir}/man1/ebrowse.1* %{_mandir}/man1/emacs.1* -%{_mandir}/man1/etags.emacs.1* -%ghost %{_mandir}/man1/etags.1* +%{_mandir}/man1/etags.1* %{_mandir}/man1/gctags.1* %dir %{_datadir}/emacs/%{version} %{_datadir}/emacs/%{version}/etc From 585fcc155adcd1afa2c210c9feb0f709b8394af6 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 21 Nov 2025 14:39:04 +0000 Subject: [PATCH 60/65] Set source-directory via site-start.d dropin. --- emacs.spec | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/emacs.spec b/emacs.spec index 0d44537..e6903e6 100644 --- a/emacs.spec +++ b/emacs.spec @@ -469,6 +469,18 @@ cat > macros.emacs << EOF %%_emacs_bytecompile(W) /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(push nil load-path)' %%{-W:--eval '(setq byte-compile-error-on-warn t)' }-f batch-byte-compile %%* EOF +cat > 10-source-directory.el << 'EOF' +;;; 10-source-directory.el --- Set source-directory -*- lexical-binding: t -*- + +;;; Commentary: +;; +;; This solves rhbz#474958; Function `update-directory-autoloads' now +;; finally works. + +(setq source-directory "%{_datadir}/emacs/%{version}/") + +;;; 10-source-directory.el ends here +EOF %install %if %{with nw} @@ -523,14 +535,10 @@ ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-nox # Make sure movemail isn't setgid chmod 755 %{buildroot}%{emacs_libexecdir}/movemail -mkdir -p %{buildroot}%{site_lisp} +mkdir -p %{buildroot}%{site_lisp} %{buildroot}%{site_start_d} install -p -m 0644 %SOURCE5 %{buildroot}%{site_lisp}/site-start.el install -p -m 0644 %SOURCE6 %{buildroot}%{site_lisp} - -# This solves bz#474958, "update-directory-autoloads" now finally -# works the path is different each version, so we'll generate it here -echo "(setq source-directory \"%{_datadir}/emacs/%{version}/\")" \ - >> %{buildroot}%{site_lisp}/site-start.el +install -p -m 0644 10-source-directory.el %{buildroot}%{site_start_d}/ mv %{buildroot}%{_mandir}/man1/{ctags.1.gz,gctags.1.gz} mv %{buildroot}%{_bindir}/{ctags,gctags} @@ -538,8 +546,6 @@ mv %{buildroot}%{_bindir}/{ctags,gctags} # BZ 927996 mv %{buildroot}%{_infodir}/{info.info.gz,info.gz} -mkdir -p %{buildroot}%{site_lisp}/site-start.d - # Default initialization file mkdir -p %{buildroot}%{_sysconfdir}/skel install -p -m 0644 %SOURCE4 %{buildroot}%{_sysconfdir}/skel/.emacs @@ -800,6 +806,7 @@ fi %{_userunitdir}/emacs.service %attr(0644,root,root) %config(noreplace) %{site_lisp}/default.el %attr(0644,root,root) %config %{site_lisp}/site-start.el +%{site_start_d}/10-source-directory.el %{pkgconfig}/emacs.pc From 514c0430fbe86afa48c02debdc96f379dc65ad62 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Fri, 21 Nov 2025 14:39:52 +0000 Subject: [PATCH 61/65] New RPM macro %_emacs_archsitelispdir for Emacs dynamic modules. --- emacs.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/emacs.spec b/emacs.spec index e6903e6..35937e0 100644 --- a/emacs.spec +++ b/emacs.spec @@ -264,7 +264,7 @@ License: GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND BSD-3-Cl Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: /usr/bin/readlink -Requires: %{name}-filesystem +Requires: %{name}-filesystem >= 1:30.1 Requires: emacsclient Requires: libgccjit Recommends: emacs = %{epoch}:%{version}-%{release} @@ -464,11 +464,25 @@ cat > macros.emacs << EOF %%_emacs_version %{version} %%_emacs_ev %{?epoch:%{epoch}:}%{version} %%_emacs_evr %{?epoch:%{epoch}:}%{version}-%{release} +%%_emacs_archsitelispdir %%{_libdir}/emacs/site-lisp %%_emacs_sitelispdir %{site_lisp} %%_emacs_sitestartdir %{site_start_d} %%_emacs_bytecompile(W) /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(push nil load-path)' %%{-W:--eval '(setq byte-compile-error-on-warn t)' }-f batch-byte-compile %%* EOF +cat > 00-dynamic-module-dir.el << 'EOF' +;;; 00-dynamic-module-dir.el --- Add arch-specifc dir to load-path -*- lexical-binding: t -*- + +;;; Commentary: +;; +;; This directory is for installing Emacs dynamic modules into. See +;; also RPM macro %%_emacs_archsitelispdir. + +(add-to-list 'load-path "%{_libdir}/emacs/site-lisp") + +;;; 00-dynamic-module-dir.el ends here +EOF + cat > 10-source-directory.el << 'EOF' ;;; 10-source-directory.el --- Set source-directory -*- lexical-binding: t -*- @@ -538,6 +552,7 @@ chmod 755 %{buildroot}%{emacs_libexecdir}/movemail mkdir -p %{buildroot}%{site_lisp} %{buildroot}%{site_start_d} install -p -m 0644 %SOURCE5 %{buildroot}%{site_lisp}/site-start.el install -p -m 0644 %SOURCE6 %{buildroot}%{site_lisp} +install -p -m 0644 00-dynamic-module-dir.el %{buildroot}%{site_start_d}/ install -p -m 0644 10-source-directory.el %{buildroot}%{site_start_d}/ mv %{buildroot}%{_mandir}/man1/{ctags.1.gz,gctags.1.gz} @@ -806,6 +821,7 @@ fi %{_userunitdir}/emacs.service %attr(0644,root,root) %config(noreplace) %{site_lisp}/default.el %attr(0644,root,root) %config %{site_lisp}/site-start.el +%{site_start_d}/00-dynamic-module-dir.el %{site_start_d}/10-source-directory.el %{pkgconfig}/emacs.pc From b4c76f9a5356cd0ee5c8089cedb255b25e3897f4 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Tue, 25 Nov 2025 13:17:25 +0000 Subject: [PATCH 62/65] Move ownership of %{_libdir}/emacs to emacs-filesystem package. --- emacs.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/emacs.spec b/emacs.spec index 35937e0..11a717a 100644 --- a/emacs.spec +++ b/emacs.spec @@ -264,7 +264,7 @@ License: GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND BSD-3-Cl Requires(preun): /usr/sbin/alternatives Requires(posttrans): /usr/sbin/alternatives Requires: /usr/bin/readlink -Requires: %{name}-filesystem >= 1:30.1 +Requires: %{name}-filesystem >= 1:30.2 Requires: emacsclient Requires: libgccjit Recommends: emacs = %{epoch}:%{version}-%{release} @@ -809,7 +809,6 @@ fi %dir %{_datadir}/emacs/%{version} %{_datadir}/emacs/%{version}/etc %{_datadir}/emacs/%{version}/site-lisp -%dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/%{version} %dir %{native_lisp} %dir %{_libexecdir}/emacs From 3b048fcb3792a89b3ebff278543ebaa2878a3579 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 10 Dec 2025 12:05:42 +0000 Subject: [PATCH 63/65] Support Tree-sitter version 0.26 and later (rhbz#2420305). --- ...t-Tree-sitter-version-0.26-and-later.patch | 115 ++++++++++++++++++ emacs.spec | 5 + 2 files changed, 120 insertions(+) create mode 100644 0001-Support-Tree-sitter-version-0.26-and-later.patch diff --git a/0001-Support-Tree-sitter-version-0.26-and-later.patch b/0001-Support-Tree-sitter-version-0.26-and-later.patch new file mode 100644 index 0000000..b6def99 --- /dev/null +++ b/0001-Support-Tree-sitter-version-0.26-and-later.patch @@ -0,0 +1,115 @@ +From d587ce8c65a0e22ab0a63ef2873a3dfcfbeba166 Mon Sep 17 00:00:00 2001 +From: Eli Zaretskii +Date: Fri, 17 Oct 2025 14:15:41 +0300 +Subject: [PATCH] Support Tree-sitter version 0.26 and later + +* src/treesit.c (init_treesit_functions) +[TREE_SITTER_LANGUAGE_VERSION >= 15]: Define prototype for, and +load 'ts_language_abi_version' instead of the deprecated (and +removed in tree-sitter 0.26) 'ts_language_version'. +(ts_language_abi_version) [TREE_SITTER_LANGUAGE_VERSION >= 15]: +Define on WINDOWSNT, instead of 'ts_language_version'. +(treesit_language_abi_version): New compatibility function. +(treesit_load_language, Ftreesit_language_abi_version): Use +'treesit_language_abi_version' instead of 'ts_language_version'. +(Bug#79627) +--- + src/treesit.c | 36 ++++++++++++++++++++++++++++++++++-- + 1 file changed, 34 insertions(+), 2 deletions(-) + +diff --git a/src/treesit.c b/src/treesit.c +index bf982de580b..69751b5ea10 100644 +--- a/src/treesit.c ++++ b/src/treesit.c +@@ -35,7 +35,11 @@ Copyright (C) 2021-2025 Free Software Foundation, Inc. + # include "w32common.h" + + /* In alphabetical order. */ ++#if TREE_SITTER_LANGUAGE_VERSION >= 15 ++#undef ts_language_abi_version ++#else + #undef ts_language_version ++#endif + #undef ts_node_child + #undef ts_node_child_by_field_name + #undef ts_node_child_count +@@ -90,7 +94,11 @@ Copyright (C) 2021-2025 Free Software Foundation, Inc. + #undef ts_tree_get_changed_ranges + #undef ts_tree_root_node + ++#if TREE_SITTER_LANGUAGE_VERSION >= 15 ++DEF_DLL_FN (uint32_t, ts_language_abi_version, (const TSLanguage *)); ++#else + DEF_DLL_FN (uint32_t, ts_language_version, (const TSLanguage *)); ++#endif + DEF_DLL_FN (TSNode, ts_node_child, (TSNode, uint32_t)); + DEF_DLL_FN (TSNode, ts_node_child_by_field_name, + (TSNode, const char *, uint32_t)); +@@ -167,7 +175,11 @@ init_treesit_functions (void) + if (!library) + return false; + ++#if TREE_SITTER_LANGUAGE_VERSION >= 15 ++ LOAD_DLL_FN (library, ts_language_abi_version); ++#else + LOAD_DLL_FN (library, ts_language_version); ++#endif + LOAD_DLL_FN (library, ts_node_child); + LOAD_DLL_FN (library, ts_node_child_by_field_name); + LOAD_DLL_FN (library, ts_node_child_count); +@@ -225,7 +237,11 @@ init_treesit_functions (void) + return true; + } + ++#if TREE_SITTER_LANGUAGE_VERSION >= 15 ++#define ts_language_abi_version fn_ts_language_abi_version ++#else + #define ts_language_version fn_ts_language_version ++#endif + #define ts_node_child fn_ts_node_child + #define ts_node_child_by_field_name fn_ts_node_child_by_field_name + #define ts_node_child_count fn_ts_node_child_count +@@ -711,6 +727,22 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name, + } + } + ++/* This function is a compatibility shim. Tree-sitter 0.25 introduced ++ ts_language_abi_version as a replacement for ts_language_version, and ++ tree-sitter 0.26 removed ts_language_version. Here we use the fact ++ that 0.25 bumped TREE_SITTER_LANGUAGE_VERSION to 15, to use the new ++ function instead of the old one, when Emacs is compiled against ++ tree-sitter version 0.25 or newer. */ ++static uint32_t ++treesit_language_abi_version (const TSLanguage *ts_lang) ++{ ++#if TREE_SITTER_LANGUAGE_VERSION >= 15 ++ return ts_language_abi_version (ts_lang); ++#else ++ return ts_language_version (ts_lang); ++#endif ++} ++ + /* Load the dynamic library of LANGUAGE_SYMBOL and return the pointer + to the language definition. + +@@ -832,7 +864,7 @@ treesit_load_language (Lisp_Object language_symbol, + build_string ("%s's ABI version is %d, but supported versions are %d-%d"); + Lisp_Object formatted_msg = + CALLN (Fformat_message, fmt, loaded_lib, +- make_fixnum (ts_language_version (lang)), ++ make_fixnum (treesit_language_abi_version (lang)), + make_fixnum (TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION), + make_fixnum (TREE_SITTER_LANGUAGE_VERSION)); + *signal_symbol = Qtreesit_load_language_error; +@@ -914,7 +946,7 @@ DEFUN ("treesit-language-abi-version", Ftreesit_language_abi_version, + TSLanguage *ts_language = lang.lang; + if (ts_language == NULL) + return Qnil; +- uint32_t version = ts_language_version (ts_language); ++ uint32_t version = treesit_language_abi_version (ts_language); + return make_fixnum((ptrdiff_t) version); + } + } +-- +2.52.0 + diff --git a/emacs.spec b/emacs.spec index 11a717a..70f3d6d 100644 --- a/emacs.spec +++ b/emacs.spec @@ -57,6 +57,11 @@ Patch: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49505#67 Patch: 0001-Don-t-specify-StartupWMClass-in-emacs.desktop.patch +# Don't wait for Emacs 31 before updating to Tree-sitter 0.26. +# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63555 +# https://bugzilla.redhat.com/show_bug.cgi?id=2420305 +Patch: 0001-Support-Tree-sitter-version-0.26-and-later.patch + BuildRequires: alsa-lib-devel BuildRequires: atk-devel BuildRequires: autoconf From 91bcd98e446c016850c32ab9ea66ba1077bd48fb Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 10 Dec 2025 13:03:09 +0000 Subject: [PATCH 64/65] Fix Tree-sitter 0.26 patch for Emacs 30. --- ...t-Tree-sitter-version-0.26-and-later.patch | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/0001-Support-Tree-sitter-version-0.26-and-later.patch b/0001-Support-Tree-sitter-version-0.26-and-later.patch index b6def99..936ca2e 100644 --- a/0001-Support-Tree-sitter-version-0.26-and-later.patch +++ b/0001-Support-Tree-sitter-version-0.26-and-later.patch @@ -1,4 +1,4 @@ -From d587ce8c65a0e22ab0a63ef2873a3dfcfbeba166 Mon Sep 17 00:00:00 2001 +From 16f0be6354ea13331859c861fa7d423a0b54bec7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 17 Oct 2025 14:15:41 +0300 Subject: [PATCH] Support Tree-sitter version 0.26 and later @@ -14,14 +14,14 @@ Define on WINDOWSNT, instead of 'ts_language_version'. 'treesit_language_abi_version' instead of 'ts_language_version'. (Bug#79627) --- - src/treesit.c | 36 ++++++++++++++++++++++++++++++++++-- - 1 file changed, 34 insertions(+), 2 deletions(-) + src/treesit.c | 34 +++++++++++++++++++++++++++++++++- + 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/treesit.c b/src/treesit.c -index bf982de580b..69751b5ea10 100644 +index e2986c186b8..4d6bf9a5dbd 100644 --- a/src/treesit.c +++ b/src/treesit.c -@@ -35,7 +35,11 @@ Copyright (C) 2021-2025 Free Software Foundation, Inc. +@@ -34,7 +34,11 @@ Copyright (C) 2021-2025 Free Software Foundation, Inc. # include "w32common.h" /* In alphabetical order. */ @@ -33,7 +33,7 @@ index bf982de580b..69751b5ea10 100644 #undef ts_node_child #undef ts_node_child_by_field_name #undef ts_node_child_count -@@ -90,7 +94,11 @@ Copyright (C) 2021-2025 Free Software Foundation, Inc. +@@ -89,7 +93,11 @@ Copyright (C) 2021-2025 Free Software Foundation, Inc. #undef ts_tree_get_changed_ranges #undef ts_tree_root_node @@ -45,7 +45,7 @@ index bf982de580b..69751b5ea10 100644 DEF_DLL_FN (TSNode, ts_node_child, (TSNode, uint32_t)); DEF_DLL_FN (TSNode, ts_node_child_by_field_name, (TSNode, const char *, uint32_t)); -@@ -167,7 +175,11 @@ init_treesit_functions (void) +@@ -166,7 +174,11 @@ init_treesit_functions (void) if (!library) return false; @@ -57,7 +57,7 @@ index bf982de580b..69751b5ea10 100644 LOAD_DLL_FN (library, ts_node_child); LOAD_DLL_FN (library, ts_node_child_by_field_name); LOAD_DLL_FN (library, ts_node_child_count); -@@ -225,7 +237,11 @@ init_treesit_functions (void) +@@ -224,7 +236,11 @@ init_treesit_functions (void) return true; } @@ -69,7 +69,7 @@ index bf982de580b..69751b5ea10 100644 #define ts_node_child fn_ts_node_child #define ts_node_child_by_field_name fn_ts_node_child_by_field_name #define ts_node_child_count fn_ts_node_child_count -@@ -711,6 +727,22 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name, +@@ -632,6 +648,22 @@ treesit_load_language_push_for_each_suffix (Lisp_Object lib_base_name, } } @@ -92,17 +92,8 @@ index bf982de580b..69751b5ea10 100644 /* Load the dynamic library of LANGUAGE_SYMBOL and return the pointer to the language definition. -@@ -832,7 +864,7 @@ treesit_load_language (Lisp_Object language_symbol, - build_string ("%s's ABI version is %d, but supported versions are %d-%d"); - Lisp_Object formatted_msg = - CALLN (Fformat_message, fmt, loaded_lib, -- make_fixnum (ts_language_version (lang)), -+ make_fixnum (treesit_language_abi_version (lang)), - make_fixnum (TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION), - make_fixnum (TREE_SITTER_LANGUAGE_VERSION)); - *signal_symbol = Qtreesit_load_language_error; -@@ -914,7 +946,7 @@ DEFUN ("treesit-language-abi-version", Ftreesit_language_abi_version, - TSLanguage *ts_language = lang.lang; +@@ -817,7 +849,7 @@ DEFUN ("treesit-language-abi-version", Ftreesit_language_abi_version, + &signal_data); if (ts_language == NULL) return Qnil; - uint32_t version = ts_language_version (ts_language); From 8caa8a9f69e8f0ac55b930f0486c0df496c9b072 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Wed, 10 Dec 2025 15:07:07 +0000 Subject: [PATCH 65/65] =?UTF-8?q?Eliminate=20=E2=80=9CFile=20listed=20twic?= =?UTF-8?q?e=E2=80=9D=20warning.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emacs.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/emacs.spec b/emacs.spec index 70f3d6d..e10f642 100644 --- a/emacs.spec +++ b/emacs.spec @@ -825,8 +825,6 @@ fi %{_userunitdir}/emacs.service %attr(0644,root,root) %config(noreplace) %{site_lisp}/default.el %attr(0644,root,root) %config %{site_lisp}/site-start.el -%{site_start_d}/00-dynamic-module-dir.el -%{site_start_d}/10-source-directory.el %{pkgconfig}/emacs.pc