diff --git a/.gitignore b/.gitignore index e18d11b..a859577 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ +/bodhi.template.last +/emacs-*.src.rpm /emacs-23.3a.tar.bz2 -/php-mode.el /emacs-24.0.92.tar.gz /emacs-24.0.93.tar.gz /emacs-24.0.94.tar.gz @@ -35,9 +36,13 @@ /emacs-28.2.tar.xz.sig /emacs-29.1.tar.xz /emacs-29.1.tar.xz.sig -/emacs-29.2.tar.xz -/emacs-29.2.tar.xz.sig /emacs-29.3.tar.xz /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/ +/emacs-30.1.tar.xz +/emacs-30.1.tar.xz.sig diff --git a/0001-Pong-and-Tetris-are-excluded.patch b/0001-Pong-and-Tetris-are-excluded.patch new file mode 100644 index 0000000..989764a --- /dev/null +++ b/0001-Pong-and-Tetris-are-excluded.patch @@ -0,0 +1,86 @@ +From 6f29ac0393bb0bb70c8122d9f1bda0ae5d8cee24 Mon Sep 17 00:00:00 2001 +From: Peter Oliver +Date: Thu, 26 Sep 2024 13:20:06 +0100 +Subject: [PATCH] Pong and Tetris are excluded. + +--- + doc/emacs/ack.texi | 2 +- + doc/emacs/misc.texi | 7 +------ + lisp/menu-bar.el | 6 ------ + test/src/doc-tests.el | 4 ++-- + 4 files changed, 4 insertions(+), 15 deletions(-) + +diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi +index 5ec5cd53fa6..26f174831ca 100644 +--- a/doc/emacs/ack.texi ++++ b/doc/emacs/ack.texi +@@ -228,7 +228,7 @@ Acknowledgments + + @item + Glynn Clements provided @file{gamegrid.el} and a couple of games that +-use it, Snake and Tetris. ++use it, including Snake. + + @item + Andrew Cohen wrote @file{spam-wash.el}, to decode and clean email before +diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi +index 41e37fd094e..38e281bf59c 100644 +--- a/doc/emacs/misc.texi ++++ b/doc/emacs/misc.texi +@@ -3248,14 +3248,9 @@ Amusements + nato-region} converts the text in the region to NATO phonetic + alphabet; @kbd{M-x denato-region} converts it back. + +-@findex pong +-@cindex Pong game +-@findex tetris +-@cindex Tetris + @findex snake + @cindex Snake +- @kbd{M-x pong}, @kbd{M-x snake} and @kbd{M-x tetris} are +-implementations of the well-known Pong, Snake and Tetris games. ++ @kbd{M-x snake} is an implementation of the well-known Snake game. + + @findex solitaire + @cindex solitaire +diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el +index bcfa83cf8e4..1b0a0bce6a5 100644 +--- a/lisp/menu-bar.el ++++ b/lisp/menu-bar.el +@@ -1658,18 +1658,12 @@ menu-bar-games-menu + (bindings--define-key menu [zone] + '(menu-item "Zone Out" zone + :help "Play tricks with Emacs display when Emacs is idle")) +- (bindings--define-key menu [tetris] +- '(menu-item "Tetris" tetris +- :help "Falling blocks game")) + (bindings--define-key menu [solitaire] + '(menu-item "Solitaire" solitaire + :help "Get rid of all the stones")) + (bindings--define-key menu [snake] + '(menu-item "Snake" snake + :help "Move snake around avoiding collisions")) +- (bindings--define-key menu [pong] +- '(menu-item "Pong" pong +- :help "Bounce the ball to your opponent")) + (bindings--define-key menu [mult] + '(menu-item "Multiplication Puzzle" mpuz + :help "Exercise brain with multiplication")) +diff --git a/test/src/doc-tests.el b/test/src/doc-tests.el +index b41a7ac5fb6..24befb737bc 100644 +--- a/test/src/doc-tests.el ++++ b/test/src/doc-tests.el +@@ -34,8 +34,8 @@ doc-tests-documentation/autoloaded-macro + + (ert-deftest doc-tests-documentation/autoloaded-defun () + (skip-unless noninteractive) +- (should (autoloadp (symbol-function 'tetris))) +- (should (stringp (documentation 'tetris)))) ; See Bug#52969. ++ (should (autoloadp (symbol-function 'doctor))) ++ (should (stringp (documentation 'doctor)))) ; See Bug#52969. + + (ert-deftest doc-tests-quoting-style () + (should (memq (text-quoting-style) '(grave straight curve)))) +-- +2.46.1 + diff --git a/0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch b/0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch new file mode 100644 index 0000000..dbcf3d9 --- /dev/null +++ b/0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch @@ -0,0 +1,63 @@ +From 7099578f18b1ea6a168b1883fa7a4ac7f49fc08f Mon Sep 17 00:00:00 2001 +From: Peter Oliver +Date: Sun, 14 Jul 2024 20:47:14 +0100 +Subject: [PATCH 2/2] Fall back to the terminal from pure GTK when no display + is available +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* src/dispnew.c (init_display_interactive): Only use PGTK windowing if +at least one of the environment variables WAYLAND_DISPLAY, DISPLAY, +BROADWAY_DISPLAY is set. (Bug#63555) + +This patch is not suitable for merging, because it doesn’t consider +what happens if you try to use PGTK on Windows or MacOS. +--- + src/dispnew.c | 29 ++++++++++++++++++++++++++--- + 1 file changed, 26 insertions(+), 3 deletions(-) + +diff --git a/src/dispnew.c b/src/dispnew.c +index 7cf2b49273c..481d33a7302 100644 +--- a/src/dispnew.c ++++ b/src/dispnew.c +@@ -6557,10 +6557,33 @@ init_display_interactive (void) + #endif + + #ifdef HAVE_PGTK +- if (!inhibit_window_system && !will_dump_p ()) ++ if (!inhibit_window_system) + { +- Vinitial_window_system = Qpgtk; +- return; ++ if (!display_arg && !will_dump_p ()) ++ { ++ int i; ++ const char *gdk_display_variables[] = { ++ "WAYLAND_DISPLAY", ++ "DISPLAY", ++ "BROADWAY_DISPLAY", ++ }; ++ size_t n = ARRAYELTS (gdk_display_variables); ++ ++ for (i = 0; i < n; i++) ++ { ++ char *display; ++ display = getenv (gdk_display_variables[i]); ++ if (display != 0 && *display != 0) ++ { ++ display_arg = 1; ++ break; ++ } ++ } ++ } ++ if (display_arg) { ++ Vinitial_window_system = Qpgtk; ++ return; ++ } + } + #endif + +-- +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/changelog b/changelog index d7391d3..a14b4ef 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,9 @@ +* Sat Mar 01 2025 Michel Lind - 1:30.1-6 +- Pick up changes from Fedora 42/43's emacs-1:30.1-5 +- Fixes: CVE-2024-53920 +- Fixes: CVE-2025-1244 +- Resolves: https://pagure.io/centos-sig-hyperscale/package-updates/issue/384 + * Mon Jun 24 2024 Michel Lind - 1:29.4-1.1 - Update to version 29.4, fixing CVE-2024-39331 diff --git a/emacs-desktop.patch b/emacs-desktop.patch new file mode 100644 index 0000000..2453407 --- /dev/null +++ b/emacs-desktop.patch @@ -0,0 +1,26 @@ +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 new file mode 100755 index 0000000..30648ae --- /dev/null +++ b/emacs-desktop.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# The pure GTK build of emacs is not supported on X11, so try to avoid +# using if there is an alternative. + +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 + ;; + esac +fi + +exec emacs "$@" diff --git a/emacs-pgtk-on-x-error-message.patch b/emacs-pgtk-on-x-error-message.patch new file mode 100644 index 0000000..b49abee --- /dev/null +++ b/emacs-pgtk-on-x-error-message.patch @@ -0,0 +1,26 @@ +From eaaf4883aee50974eeb03e529a29585f8ddc1d9d Mon Sep 17 00:00:00 2001 +From: Bhavin Gandhi +Date: Wed, 31 May 2023 22:44:54 +0530 +Subject: [PATCH] Add package names to PGTK on X error message + +--- + src/pgtkterm.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/pgtkterm.c b/src/pgtkterm.c +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\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); +-- +2.40.1 + 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 189d736..fb6c091 100644 --- a/emacs.spec +++ b/emacs.spec @@ -1,84 +1,111 @@ -%global _hardened_build 1 - # This file is encoded in UTF-8. -*- coding: utf-8 -*- + +%bcond gpm %[!(0%{?rhel} >= 10)] +%bcond_without gtkx11 +%bcond_without lucid +%bcond_without nw + Summary: GNU Emacs text editor Name: emacs Epoch: 1 -Version: 29.4 +Version: 30.1 Release: %autorelease License: GPL-3.0-or-later AND CC0-1.0 -URL: http://www.gnu.org/software/emacs/ +URL: https://www.gnu.org/software/emacs/ +%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 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 -# Emacs Terminal Mode, #551949, #617355 -Source7: emacs-terminal.desktop -Source8: emacs-terminal.sh +Source9: emacs-desktop.sh + +# Avoid trademark issues +Patch: 0001-Pong-and-Tetris-are-excluded.patch + # rhbz#713600 -Patch1: emacs-spellchecker.patch -Patch2: emacs-system-crypto-policies.patch +Patch: emacs-spellchecker.patch + +Patch: emacs-system-crypto-policies.patch + # causes a dependency on pkgconfig(systemd) # => remove it if we stop using this patch -Patch3: emacs-libdir-vs-systemd.patch +Patch: emacs-libdir-vs-systemd.patch -BuildRequires: gcc +# Avoid using the pure GTK build on X11 where it is unsupported: +Patch: emacs-desktop.patch +Patch: emacs-pgtk-on-x-error-message.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: 0002-Fall-back-to-the-terminal-from-pure-GTK-when-no-disp.patch + +BuildRequires: alsa-lib-devel BuildRequires: atk-devel +BuildRequires: autoconf +BuildRequires: bzip2 +BuildRequires: cairo BuildRequires: cairo-devel -BuildRequires: freetype-devel -BuildRequires: fontconfig-devel BuildRequires: dbus-devel +BuildRequires: desktop-file-utils +BuildRequires: fontconfig-devel +BuildRequires: freetype-devel +BuildRequires: gcc BuildRequires: giflib-devel BuildRequires: glibc-devel -BuildRequires: libpng-devel -BuildRequires: libjpeg-turbo-devel +BuildRequires: gnupg2 +BuildRequires: gnutls-devel +BuildRequires: gtk3-devel +BuildRequires: gzip +BuildRequires: harfbuzz-devel +BuildRequires: libacl-devel +BuildRequires: libappstream-glib +BuildRequires: libgccjit-devel BuildRequires: libjpeg-turbo +BuildRequires: libjpeg-turbo-devel +BuildRequires: libotf-devel +BuildRequires: libpng-devel +BuildRequires: librsvg2-devel +BuildRequires: libselinux-devel BuildRequires: libtiff-devel +BuildRequires: libtree-sitter-devel +BuildRequires: libwebp-devel +BuildRequires: libxml2-devel +BuildRequires: m17n-lib-devel +BuildRequires: make +BuildRequires: ncurses-devel +BuildRequires: sqlite-devel +BuildRequires: systemd-devel +BuildRequires: texinfo +BuildRequires: zlib-devel + +%if %{with gpm} +BuildRequires: gpm-devel +%endif + +%if %{with lucid} || %{with gtkx11} BuildRequires: libX11-devel BuildRequires: libXau-devel BuildRequires: libXdmcp-devel BuildRequires: libXi-devel +BuildRequires: libXpm-devel BuildRequires: libXrender-devel BuildRequires: libXt-devel -BuildRequires: libXpm-devel -BuildRequires: ncurses-devel BuildRequires: xorg-x11-proto-devel -BuildRequires: zlib-devel -BuildRequires: gnutls-devel -BuildRequires: librsvg2-devel -BuildRequires: m17n-lib-devel -BuildRequires: libotf-devel -BuildRequires: libselinux-devel -BuildRequires: alsa-lib-devel -BuildRequires: gpm-devel -BuildRequires: liblockfile-devel -BuildRequires: libxml2-devel -BuildRequires: autoconf -BuildRequires: bzip2 -BuildRequires: cairo -BuildRequires: texinfo -BuildRequires: gzip -BuildRequires: desktop-file-utils -BuildRequires: libappstream-glib -BuildRequires: libacl-devel -BuildRequires: harfbuzz-devel -BuildRequires: jansson-devel -BuildRequires: systemd-devel -BuildRequires: libgccjit-devel -BuildRequires: libtree-sitter-devel -BuildRequires: libsqlite3x-devel -BuildRequires: libwebp-devel - -BuildRequires: gtk3-devel -BuildRequires: webkit2gtk3-devel - -BuildRequires: gnupg2 +%endif -# For lucid +%if %{with lucid} BuildRequires: Xaw3d-devel +%endif # for Patch3 BuildRequires: pkgconfig(systemd) @@ -86,77 +113,117 @@ BuildRequires: pkgconfig(systemd) %ifarch %{ix86} BuildRequires: util-linux %endif -BuildRequires: make -# Emacs requires info for info mode, rhbz#1989264 -Requires: info -# Emacs doesn't run without dejavu-sans-mono-fonts, rhbz#732422 -Requires: desktop-file-utils -Requires: dejavu-sans-mono-fonts -Requires: libgccjit -Requires(preun): %{_sbindir}/alternatives -Requires(posttrans): %{_sbindir}/alternatives +%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) %define site_lisp %{_datadir}/emacs/site-lisp %define site_start_d %{site_lisp}/site-start.d -%define bytecompargs -batch --no-init-file --no-site-file -f batch-byte-compile %define pkgconfig %{_datadir}/pkgconfig %define emacs_libexecdir %{_libexecdir}/emacs/%{version}/%{_host} %define native_lisp %{_libdir}/emacs/%{version}/native-lisp +%global desc %{expand:GNU Emacs is a powerful, customizable, self-documenting, modeless text +editor. It contains special code editing features, a scripting language +(elisp), and the capability to read mail, news, and more without leaving +the editor. +} + + %description -Emacs is a powerful, customizable, self-documenting, modeless text -editor. Emacs contains special code editing features, a scripting -language (elisp), and the capability to read mail, news, and more -without leaving the editor. +%desc +This package provides an emacs 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 +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) + +%description gtk+x11 +%desc +This package provides an emacs-gtk+x11 binary with support for the X +Window System, using the GTK toolkit. +%endif -This package provides an emacs binary with support for X windows. +%if %{with lucid} %package lucid -Summary: GNU Emacs text editor with LUCID toolkit X support -Requires: libgccjit -Requires(preun): %{_sbindir}/alternatives -Requires(posttrans): %{_sbindir}/alternatives +Summary: GNU Emacs text editor with Lucid toolkit X support +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(bin) = %{epoch}:%{version}-%{release} %description lucid -Emacs is a powerful, customizable, self-documenting, modeless text -editor. Emacs contains special code editing features, a scripting -language (elisp), and the capability to read mail, news, and more -without leaving the editor. +%desc +This package provides an emacs-lucid binary with support for the X +Window System, using the Lucid toolkit. +%endif -This package provides an emacs binary with support for X windows -using LUCID toolkit. -%package nox -Summary: GNU Emacs text editor without X support -Requires: libgccjit -Requires(preun): %{_sbindir}/alternatives -Requires(posttrans): %{_sbindir}/alternatives +%if %{with nw} +%package nw +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(bin) = %{epoch}:%{version}-%{release} +Provides: emacs-nox = %{epoch}:%{version}-%{release} +Obsoletes: emacs-nox < 1:30 + +%description nw +%desc +This package provides an emacs-nw binary without graphical display +support, for running on a terminal only. +%endif + -%description nox -Emacs is a powerful, customizable, self-documenting, modeless text -editor. Emacs contains special code editing features, a scripting -language (elisp), and the capability to read mail, news, and more -without leaving the editor. +%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} + +%description -n emacsclient +%desc +This package provides emacsclient, which can be used to control an Emacs +server. -This package provides an emacs binary with no X windows support for running -on a terminal. %package common Summary: Emacs common files # The entire source code is GPLv3+ except lib-src/etags.c which is # also BSD. Manual (info) is GFDL. License: GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND BSD-3-Clause -Requires(preun): %{_sbindir}/alternatives -Requires(posttrans): %{_sbindir}/alternatives -Requires: %{name}-filesystem = %{epoch}:%{version}-%{release} +Requires(preun): /usr/sbin/alternatives +Requires(posttrans): /usr/sbin/alternatives +Requires: /usr/bin/readlink +Requires: %{name}-filesystem +Requires: emacsclient +Requires: libgccjit +Recommends: (emacs or emacs-gtk+x11 or emacs-lucid or emacs-nw) Recommends: enchant2 +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 @@ -165,42 +232,23 @@ 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) -Recommends: git +Recommends: /usr/bin/git +Recommends: libtree-sitter-java %description common -Emacs is a powerful, customizable, self-documenting, modeless text -editor. Emacs contains special code editing features, a scripting -language (elisp), and the capability to read mail, news, and more -without leaving the editor. - -This package contains all the common files needed by emacs, emacs-lucid -or emacs-nox. - -%package terminal -Summary: A desktop menu item for GNU Emacs terminal. -Requires: emacs = %{epoch}:%{version}-%{release} -BuildArch: noarch +%desc +This package contains all the common files needed by emacs, emacs-gtk+x11, +emacs-lucid, or emacs-nw. -%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 filesystem -Summary: Emacs filesystem layout -BuildArch: noarch - -%description filesystem -This package provides some directories which are required by other -packages that add functionality to Emacs. %package devel Summary: Development header files for Emacs @@ -208,22 +256,21 @@ Summary: Development header files for Emacs %description devel Development header files for Emacs. + %prep -cat '%{SOURCE2}' '%{SOURCE3}' > keyring +cat '%{SOURCE100}' '%{SOURCE101}' '%{SOURCE102}' > keyring %{gpgverify} --keyring=keyring --signature='%{SOURCE1}' --data='%{SOURCE0}' rm keyring -%autosetup -p1 - -autoconf -grep -v "tetris.elc" lisp/Makefile.in > lisp/Makefile.in.new \ - && mv lisp/Makefile.in.new lisp/Makefile.in -grep -v "pong.elc" lisp/Makefile.in > lisp/Makefile.in.new \ - && mv lisp/Makefile.in.new lisp/Makefile.in +%autosetup -N -c +cd %{name}-%{version} +%autopatch -p1 # Avoid trademark issues -rm -f lisp/play/tetris.el lisp/play/tetris.elc -rm -f lisp/play/pong.el lisp/play/pong.elc +rm lisp/play/pong.el lisp/play/pong.elc \ + lisp/play/tetris.el lisp/play/tetris.elc + +autoconf %ifarch %{ix86} %define setarch setarch %{_arch} -R @@ -236,51 +283,126 @@ 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 . - -LDFLAGS=-Wl,-z,relro; export LDFLAGS; - -%configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \ - --with-tiff --with-xft --with-xpm --with-x-toolkit=lucid --with-gpm=no \ - --with-modules --with-harfbuzz --with-cairo --with-json \ - --with-native-compilation=aot --with-tree-sitter --with-sqlite3 \ - --with-webp --with-xinput2 +cd build-lucid +%configure \ + --disable-gc-mark-trace \ + --program-suffix=-lucid \ + --with-cairo \ + --with-dbus \ + --with-gif \ + --with-gpm=no \ + --with-harfbuzz \ + --with-jpeg \ + --with-modules \ + --with-native-compilation=aot \ + --with-png \ + --with-rsvg \ + --with-sqlite3 \ + --with-tiff \ + --with-tree-sitter \ + --with-webp \ + --with-x-toolkit=lucid \ + --with-xft \ + --with-xinput2 \ + --with-xpm \ + || ( cat config.log && false ) %{setarch} %make_build bootstrap %{setarch} %make_build cd .. +%endif +%if %{with nw} # Build binary without X support -mkdir build-nox && cd build-nox -ln -s ../configure . -%configure --with-x=no --with-modules --with-json \ - --with-native-compilation=aot --with-tree-sitter --with-sqlite3 +cd build-nw +%configure \ + --disable-gc-mark-trace \ + --program-suffix=-nw \ + --with-modules \ + --with-native-compilation=aot \ + --with-sqlite3 \ + --with-tree-sitter \ +%if %{without gpm} + --with-gpm=no \ +%endif + --with-x=no \ + || ( cat config.log && false ) %{setarch} %make_build bootstrap %{setarch} %make_build cd .. +%endif -# Build GTK+ binary -mkdir build-gtk && cd build-gtk -ln -s ../configure . - -LDFLAGS=-Wl,-z,relro; export LDFLAGS; - -%configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \ - --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no \ - --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json \ - --with-native-compilation=aot --with-tree-sitter --with-sqlite3 \ - --with-webp --with-xinput2 +%if %{with gtkx11} +# Build GTK/X11 binary +cd build-gtk+x11 +%configure \ + --disable-gc-mark-trace \ + --program-suffix=-gtk+x11 \ + --with-cairo \ + --with-dbus \ + --with-gif \ + --with-gpm=no \ + --with-harfbuzz \ + --with-jpeg \ + --with-modules \ + --with-native-compilation=aot \ + --with-png \ + --with-rsvg \ + --with-sqlite3 \ + --with-tiff \ + --with-tree-sitter \ + --with-webp \ + --with-x-toolkit=gtk3 \ + --with-xinput2 \ + --with-xpm \ + || ( cat config.log && false ) %{setarch} %make_build bootstrap %{setarch} %make_build cd .. +%endif -# Remove versioned file so that we end up with .1 suffix and only one DOC file -rm build-{gtk,lucid,nox}/src/emacs-%{version}.* +# Build pure GTK binary +cd build-pgtk +%configure \ + --disable-gc-mark-trace \ + --with-cairo \ + --with-dbus \ + --with-gif \ + --with-gpm=no \ + --with-harfbuzz \ + --with-jpeg \ + --with-modules \ + --with-native-compilation=aot \ + --with-pgtk \ + --with-png \ + --with-rsvg \ + --with-sqlite3 \ + --with-tiff \ + --with-tree-sitter \ + --with-webp \ + --with-xpm \ + || ( cat config.log && false ) +%{setarch} %make_build bootstrap +%{setarch} %make_build +cd .. # Create pkgconfig file cat > emacs.pc << EOF @@ -299,27 +421,59 @@ cat > macros.emacs << EOF %%_emacs_evr %{?epoch:%{epoch}:}%{version}-%{release} %%_emacs_sitelispdir %{site_lisp} %%_emacs_sitestartdir %{site_start_d} -%%_emacs_bytecompile /usr/bin/emacs -batch --no-init-file --no-site-file --eval '(progn (setq load-path (cons "." load-path)))' -f batch-byte-compile +%%_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 + %install -cd build-gtk -%make_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 -# Let alternatives manage the symlink -rm %{buildroot}%{_bindir}/emacs -touch %{buildroot}%{_bindir}/emacs +cd build-pgtk +%make_install +cd .. # 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 with LUCID toolkit -install -p -m 0755 build-lucid/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-lucid +# 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 -# Install the emacs without X -install -p -m 0755 build-nox/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-nox +# Compatibility with earlier Fedora packages +%if %{with nw} +ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-%{version}-nox +ln -s emacs-%{version}-nw %{buildroot}%{_bindir}/emacs-nox +%endif # Make sure movemail isn't setgid chmod 755 %{buildroot}%{emacs_libexecdir}/movemail @@ -354,18 +508,16 @@ install -p -m 0644 emacs.pc %{buildroot}/%{pkgconfig} mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d install -p -m 0644 macros.emacs %{buildroot}%{_rpmconfigdir}/macros.d/ -# Installing emacs-terminal binary -install -p -m 755 %SOURCE8 %{buildroot}%{_bindir}/emacs-terminal - # After everything is installed, remove info dir rm -f %{buildroot}%{_infodir}/dir -# Install desktop files -desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ - %SOURCE7 +# Install a wrapper to avoid running the Wayland-only build on X11 +install -p -m 0755 %SOURCE9 %{buildroot}%{_bindir}/emacs-desktop # Remove duplicate desktop-related files -rm %{buildroot}%{_datadir}/%{name}/%{version}/etc/%{name}.{desktop,service} +rm %{buildroot}%{_datadir}/%{name}/%{version}/etc/%{name}.{desktop,metainfo.xml,service} \ + %{buildroot}%{_datadir}/%{name}/%{version}/etc/%{name}-mail.desktop \ + %{buildroot}%{_datadir}/%{name}/%{version}/etc/org.gnu.emacs.defaults.gschema.xml # We don't ship the client variants yet # https://src.fedoraproject.org/rpms/emacs/pull-request/12 @@ -393,6 +545,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 @@ -401,123 +555,196 @@ 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 all the pdmp with fingerprints -gtk_pdmp="emacs-$(./build-gtk/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp" -install -p -m 0644 build-gtk/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${gtk_pdmp} - -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} - -nox_pdmp="emacs-$(./build-nox/src/emacs --fingerprint 2>&1 | sed 's/.* //').pdmp" -install -p -m 0644 build-nox/src/emacs.pdmp %{buildroot}%{emacs_libexecdir}/${nox_pdmp} - # Install native compiled Lisp of all builds -gtk_comp_native_ver=$(ls -1 build-gtk/native-lisp) -lucid_comp_native_ver=$(ls -1 build-lucid/native-lisp) -nox_comp_native_ver=$(ls -1 build-nox/native-lisp) -cp -ar build-gtk/native-lisp/${gtk_comp_native_ver} %{buildroot}%{native_lisp} -cp -ar build-lucid/native-lisp/${lucid_comp_native_ver} %{buildroot}%{native_lisp} -cp -ar build-nox/native-lisp/${nox_comp_native_ver} %{buildroot}%{native_lisp} +(TOPDIR=${PWD} + cd %{buildroot} + 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" \) +) +echo "%{emacs_libexecdir}/emacs-$(./build-pgtk/src/emacs --fingerprint).pdmp" \ + >> pgtk-filelist +%if %{with gtkx11} (TOPDIR=${PWD} cd %{buildroot} - find .%{native_lisp}/${gtk_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/gtk-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/gtk-dirs "%%%%dir %%p\n" \) + 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" \) ) +echo "%{emacs_libexecdir}/emacs-$(./build-gtk+x11/src/emacs --fingerprint).pdmp" \ + >> gtk+x11-filelist +%endif + +%if %{with lucid} (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 $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" \) ) +echo "%{emacs_libexecdir}/emacs-$(./build-lucid/src/emacs --fingerprint).pdmp" \ + >> lucid-filelist +%endif + +%if %{with nw} (TOPDIR=${PWD} cd %{buildroot} - find .%{native_lisp}/${nox_comp_native_ver} \( -type f -name '*eln' -fprintf $TOPDIR/nox-eln-filelist "%%%%attr(755,-,-) %%p\n" \) -o \( -type d -fprintf $TOPDIR/nox-dirs "%%%%dir %%p\n" \) + 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" \) ) -echo %{emacs_libexecdir}/${gtk_pdmp} >> gtk-eln-filelist -echo %{emacs_libexecdir}/${lucid_pdmp} >> lucid-eln-filelist -echo %{emacs_libexecdir}/${nox_pdmp} >> nox-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 -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 + %check appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop + %preun -%{_sbindir}/alternatives --remove emacs %{_bindir}/emacs-%{version} || : +if [ $1 = 0 ]; then + /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-pgtk || : +fi %posttrans -%{_sbindir}/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version} 80 || : +/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-pgtk 80 || : +%if %{with lucid} %preun lucid -%{_sbindir}/alternatives --remove emacs %{_bindir}/emacs-%{version}-lucid || : -%{_sbindir}/alternatives --remove emacs-lucid %{_bindir}/emacs-%{version}-lucid || : +if [ $1 = 0 ]; then + /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-lucid || : +fi %posttrans lucid -%{_sbindir}/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version}-lucid 70 || : -%{_sbindir}/alternatives --install %{_bindir}/emacs-lucid emacs-lucid %{_bindir}/emacs-%{version}-lucid 60 || : +/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-lucid 70 || : +# 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-lucid ]; then + ln -s emacs-%{version}-lucid %{_bindir}/emacs-lucid +fi +%endif -%preun nox -%{_sbindir}/alternatives --remove emacs %{_bindir}/emacs-%{version}-nox || : -%{_sbindir}/alternatives --remove emacs-nox %{_bindir}/emacs-%{version}-nox || : +%if %{with gtkx11} +%preun gtk+x11 +if [ $1 = 0 ]; then + /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-gtk+x11 || : +fi + +%posttrans gtk+x11 +/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-gtk+x11 75 || : +# 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-gtk+x11 ]; then + ln -s emacs-%{version}-gtk+x11 %{_bindir}/emacs-gtk+x11 +fi +%endif -%posttrans nox -%{_sbindir}/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version}-nox 70 || : -%{_sbindir}/alternatives --install %{_bindir}/emacs-nox emacs-nox %{_bindir}/emacs-%{version}-nox 60 || : +%if %{with nw} +%preun nw +if [ $1 = 0 ]; then + /usr/sbin/alternatives --remove emacs %{_bindir}/emacs-nw || : +fi + +%posttrans nw +/usr/sbin/alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nw 70 || : +# 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 + ln -s emacs-%{version}-nw %{_bindir}/emacs-nw +fi +%endif %preun common -%{_sbindir}/alternatives --remove emacs.etags %{_bindir}/etags.emacs || : +if [ $1 = 0 ]; then + /usr/sbin/alternatives --remove emacs.etags %{_bindir}/etags.emacs || : +fi %posttrans common -%{_sbindir}/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ +/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 gtk-eln-filelist -f gtk-dirs -%{_bindir}/emacs-%{version} -%attr(0755,-,-) %ghost %{_bindir}/emacs -%{_datadir}/applications/emacs.desktop -%{_datadir}/applications/emacs-mail.desktop -%{_metainfodir}/%{name}.metainfo.xml -%{_datadir}/icons/hicolor/*/apps/emacs.png -%{_datadir}/icons/hicolor/scalable/apps/emacs.svg -%{_datadir}/icons/hicolor/scalable/apps/emacs.ico -%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg -%files lucid -f lucid-eln-filelist -f lucid-dirs +%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-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-filelist -f lucid-dirlist +%ghost %{_bindir}/emacs %{_bindir}/emacs-%{version}-lucid -%attr(0755,-,-) %ghost %{_bindir}/emacs -%attr(0755,-,-) %ghost %{_bindir}/emacs-lucid +%{_bindir}/emacs-lucid +%endif -%files nox -f nox-eln-filelist -f nox-dirs +%if %{with nw} +%files nw -f nw-filelist -f nw-dirlist +%ghost %{_bindir}/emacs %{_bindir}/emacs-%{version}-nox -%attr(0755,-,-) %ghost %{_bindir}/emacs -%attr(0755,-,-) %ghost %{_bindir}/emacs-nox +%{_bindir}/emacs-%{version}-nw +%{_bindir}/emacs-nox +%{_bindir}/emacs-nw +%endif + +%files -n emacsclient +%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}/emacsclient +%{_bindir}/emacs-desktop %{_bindir}/etags.emacs %{_bindir}/gctags +%{_datadir}/applications/emacs.desktop +%{_datadir}/applications/emacs-mail.desktop +%{_metainfodir}/%{name}.metainfo.xml +%{_datadir}/icons/hicolor/*/apps/emacs.png +%{_datadir}/icons/hicolor/scalable/apps/emacs.svg +%{_datadir}/icons/hicolor/scalable/apps/emacs.ico +%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg %{_mandir}/man1/ebrowse.1* %{_mandir}/man1/emacs.1* -%{_mandir}/man1/emacsclient.1* %{_mandir}/man1/etags.emacs.1* %{_mandir}/man1/gctags.1* %dir %{_datadir}/emacs/%{version} %{_datadir}/emacs/%{version}/etc %{_datadir}/emacs/%{version}/site-lisp -%dir %{emacs_libexecdir}/ +%dir %{_libdir}/%{name} +%dir %{_libdir}/%{name}/%{version} +%dir %{native_lisp} +%dir %{_libexecdir}/emacs +%dir %{_libexecdir}/emacs/%{version} +%dir %{emacs_libexecdir} %{emacs_libexecdir}/movemail %{emacs_libexecdir}/hexl %{emacs_libexecdir}/rcs2log @@ -526,15 +753,6 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %attr(0644,root,root) %config %{site_lisp}/site-start.el %{pkgconfig}/emacs.pc -%files terminal -%{_bindir}/emacs-terminal -%{_datadir}/applications/emacs-terminal.desktop - -%files filesystem -%dir %{_datadir}/emacs -%dir %{_datadir}/emacs/site-lisp -%dir %{_datadir}/emacs/site-lisp/site-start.d - %files devel %{_includedir}/emacs-module.h 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