From e79d2e526a673309c7345e614dbc487587d083cb Mon Sep 17 00:00:00 2001 From: Bhavin Gandhi Date: Sat, 8 Jan 2022 18:56:58 +0530 Subject: [PATCH] emacs-28.1 is available (#2071638) - Enables native compilation which requires libgccjit - Use upstream AppStream metainfo - Add %{setarch} to make bootstrap as it builds architecture specific .eln files. - Move the GTK+ build at the end to avoid rebuilding during make install in the %install section. This rebuild does not compile .eln files as the .elc files from nox build are present and we don't run make bootstrap here. The resulting .pdmp file does not load .eln files, so Emacs fails to find exact path to the .eln files at the run time after installation. See https://debbugs.gnu.org/52376#89 - Use pdmp files with fingerprints Keeping the .pdmp files alongside the binaries is not recommended. See https://debbugs.gnu.org/52488 Applying the patch which creates and loads pdmp files with binary specific fingerprints https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e81f1faca4 This allows us to put these files into their correct location in libexec. Signed-off-by: Bhavin Gandhi --- .gitignore | 4 +- Use-a-64KB-page-size-for-pdump.patch | 26 --- emacs-glibc-2.34.patch | 40 ---- emacs-modula2.patch | 30 --- emacs-pdmp-fingerprint.patch | 171 ++++++++++++++++++ emacs-spellchecker.patch | 16 +- emacs.appdata.xml | 64 ------- emacs.spec | 130 +++++++------ ...E90D521672C04631B1183EE78DAE0F3115E06B.gpg | 53 ++++++ ...C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg | 29 --- sources | 4 +- 11 files changed, 313 insertions(+), 254 deletions(-) delete mode 100644 Use-a-64KB-page-size-for-pdump.patch delete mode 100644 emacs-glibc-2.34.patch delete mode 100644 emacs-modula2.patch create mode 100644 emacs-pdmp-fingerprint.patch delete mode 100644 emacs.appdata.xml create mode 100644 gpgkey-17E90D521672C04631B1183EE78DAE0F3115E06B.gpg delete mode 100644 gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg diff --git a/.gitignore b/.gitignore index 701646d..00773df 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,6 @@ /emacs-27.1.tar.xz /emacs-27.1.tar.xz.sig /emacs-27.2.tar.xz -/emacs-27.2.tar.xz.sig \ No newline at end of file +/emacs-27.2.tar.xz.sig +/emacs-28.1.tar.xz +/emacs-28.1.tar.xz.sig \ No newline at end of file diff --git a/Use-a-64KB-page-size-for-pdump.patch b/Use-a-64KB-page-size-for-pdump.patch deleted file mode 100644 index cc21eac..0000000 --- a/Use-a-64KB-page-size-for-pdump.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit 216c65b135c2b0be7e048cdc6683873b03b99b9a -Author: Lars Ingebrigtsen -Date: Sun Mar 28 19:13:00 2021 +0200 - - Use a 64KB page size for pdump - - * src/pdumper.c (dump_get_page_size): Use a 64KB page size on all - architectures, as this many vary between systems (bug#47125). - -diff --git a/src/pdumper.c b/src/pdumper.c -index 337742fda4..fdd9b3bacb 100644 ---- a/src/pdumper.c -+++ b/src/pdumper.c -@@ -162,11 +162,7 @@ ptrdiff_t_to_dump_off (ptrdiff_t value) - static int - dump_get_page_size (void) - { --#if defined (WINDOWSNT) || defined (CYGWIN) -- return 64 * 1024; /* Worst-case allocation granularity. */ --#else -- return getpagesize (); --#endif -+ return 64 * 1024; - } - - #define dump_offsetof(type, member) \ diff --git a/emacs-glibc-2.34.patch b/emacs-glibc-2.34.patch deleted file mode 100644 index 6d764aa..0000000 --- a/emacs-glibc-2.34.patch +++ /dev/null @@ -1,40 +0,0 @@ -From f97e07ea807cc6d38774a3888a15091b20645ac6 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Tue, 9 Mar 2021 11:22:59 -0800 -Subject: [PATCH] Port alternate signal stack to upcoming glibc 2.34 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -* src/sysdep.c (sigsegv_stack): Increase size to 64 KiB and align -it to max_align_t. This copies from Gnulib’s c-stack.c, and works -around a portability bug in draft glibc 2.34, which no longer -defines SIGSTKSZ when _GNU_SOURCE is defined. ---- - src/sysdep.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/src/sysdep.c b/src/sysdep.c -index 941b4e2fa2..24d8832b2f 100644 ---- a/src/sysdep.c -+++ b/src/sysdep.c -@@ -1785,7 +1785,15 @@ handle_arith_signal (int sig) - - /* Alternate stack used by SIGSEGV handler below. */ - --static unsigned char sigsegv_stack[SIGSTKSZ]; -+/* Storage for the alternate signal stack. -+ 64 KiB is not too large for Emacs, and is large enough -+ for all known platforms. Smaller sizes may run into trouble. -+ For example, libsigsegv 2.6 through 2.8 have a bug where some -+ architectures use more than the Linux default of an 8 KiB alternate -+ stack when deciding if a fault was caused by stack overflow. */ -+static max_align_t sigsegv_stack[(64 * 1024 -+ + sizeof (max_align_t) - 1) -+ / sizeof (max_align_t)]; - - - /* Return true if SIGINFO indicates a stack overflow. */ --- -2.29.2 - diff --git a/emacs-modula2.patch b/emacs-modula2.patch deleted file mode 100644 index 2d0fde8..0000000 --- a/emacs-modula2.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 462ca0654d2aa2a2b6506f2e9a1a9ceb8e683cad Mon Sep 17 00:00:00 2001 -From: Gregory Heytings -Date: Sun, 25 Apr 2021 10:33:48 +0000 -Subject: [PATCH] Fix infloop in Modula-2 mode - -* lisp/progmodes/modula2.el (m2-smie-refine-colon): Stop looping when -point does not move with forward-sexp (Bug#48011) ---- - lisp/progmodes/modula2.el | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el -index 2a0374aa81..5756d91831 100644 ---- a/lisp/progmodes/modula2.el -+++ b/lisp/progmodes/modula2.el -@@ -201,7 +201,10 @@ m2-smie-refine-colon - ((zerop (length tok)) - (let ((forward-sexp-function nil)) - (condition-case nil -- (forward-sexp -1) -+ (let ((p (point))) -+ (forward-sexp -1) -+ (if (= p (point)) -+ (setq res ":"))) - (scan-error (setq res ":"))))) - ((member tok '("|" "OF" "..")) (setq res ":-case")) - ((member tok '(":" "END" ";" "BEGIN" "VAR" "RECORD" "PROCEDURE")) --- -2.30.2 - diff --git a/emacs-pdmp-fingerprint.patch b/emacs-pdmp-fingerprint.patch new file mode 100644 index 0000000..b2247e6 --- /dev/null +++ b/emacs-pdmp-fingerprint.patch @@ -0,0 +1,171 @@ +From e81f1faca4382ed5c8f15fec84fb7c900a5468f9 Mon Sep 17 00:00:00 2001 +From: Glenn Morris +Date: Mon, 11 Oct 2021 14:03:26 +0200 +Subject: Make the installed pmdp file use a fingerprint + +* Makefile.in (EMACS_PDMP): Use --fingerprint. + +* doc/emacs/cmdargs.texi (Action Arguments): Document --fingerprint. + +* src/emacs.c (load_pdump): Load the fingerprinted version of the +pdmp file (bug#42790). +(main): Support --fingerprint. + +* src/pdumper.c (dump_fingerprint): Make non-static. + +* src/pdumper.h: Declare dump_fingerprint. +--- + Makefile.in | 3 ++- + doc/emacs/cmdargs.texi | 5 +++++ + src/emacs.c | 31 +++++++++++++++++++++++++++++-- + src/pdumper.c | 2 +- + src/pdumper.h | 3 +++ + 5 files changed, 40 insertions(+), 4 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 5fc1edc..c6c507f 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -313,6 +313,7 @@ TRANSFORM = @program_transform_name@ + EMACS_NAME = `echo emacs | sed '$(TRANSFORM)'` + EMACS = ${EMACS_NAME}${EXEEXT} + EMACSFULL = `echo emacs-${version} | sed '$(TRANSFORM)'`${EXEEXT} ++EMACS_PDMP = `./src/emacs${EXEEXT} --fingerprint 2>&1 | sed 's/.* //'`.pdmp + + # Subdirectories to make recursively. + SUBDIR = $(NTDIR) lib lib-src src lisp +@@ -521,7 +522,7 @@ install-arch-dep: src install-arch-indep install-etcdoc install-$(NTDIR) + ifeq (${ns_self_contained},no) + ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} "$(DESTDIR)${bindir}/$(EMACSFULL)" + ifeq (${DUMPING},pdumper) +- ${INSTALL_DATA} src/emacs.pdmp "$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}"/emacs.pdmp ++ ${INSTALL_DATA} src/emacs.pdmp "$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}"/emacs-${EMACS_PDMP} + endif + -chmod 755 "$(DESTDIR)${bindir}/$(EMACSFULL)" + ifndef NO_BIN_LINK +diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi +index d5177fa..313682b 100644 +--- a/doc/emacs/cmdargs.texi ++++ b/doc/emacs/cmdargs.texi +@@ -185,6 +185,11 @@ successfully. + @item --version + @opindex --version + Print Emacs version, then exit successfully. ++ ++@item --fingerprint ++@opindex --fingerprint ++Print the Emacs ``fingerprint'', which is used to uniquely identify ++the compiled version of Emacs. + @end table + + @node Initial Options +diff --git a/src/emacs.c b/src/emacs.c +index 866e43f..cda7a9b 100644 +--- a/src/emacs.c ++++ b/src/emacs.c +@@ -133,6 +133,7 @@ extern char etext; + #endif + + #include "pdumper.h" ++#include "fingerprint.h" + #include "epaths.h" + + static const char emacs_version[] = PACKAGE_VERSION; +@@ -255,6 +256,7 @@ Initialization options:\n\ + #ifdef HAVE_PDUMPER + "\ + --dump-file FILE read dumped state from FILE\n\ ++--fingerprint output fingerprint and exit\n\ + ", + #endif + #if SECCOMP_USABLE +@@ -830,6 +832,8 @@ load_pdump (int argc, char **argv) + const char *const suffix = ".pdmp"; + int result; + char *emacs_executable = argv[0]; ++ ptrdiff_t hexbuf_size; ++ char *hexbuf; + const char *strip_suffix = + #if defined DOS_NT || defined CYGWIN + ".exe" +@@ -927,9 +931,15 @@ load_pdump (int argc, char **argv) + /* Look for "emacs.pdmp" in PATH_EXEC. We hardcode "emacs" in + "emacs.pdmp" so that the Emacs binary still works if the user + copies and renames it. */ ++ hexbuf_size = 2 * sizeof fingerprint; ++ hexbuf = xmalloc (hexbuf_size + 1); ++ hexbuf_digest (hexbuf, (char *)fingerprint, sizeof fingerprint); ++ hexbuf[hexbuf_size] = '\0'; + needed = (strlen (path_exec) + + 1 + + strlen (argv0_base) ++ + 1 ++ + strlen (hexbuf) + + strlen (suffix) + + 1); + if (bufsize < needed) +@@ -937,8 +947,8 @@ load_pdump (int argc, char **argv) + xfree (dump_file); + dump_file = xpalloc (NULL, &bufsize, needed - bufsize, -1, 1); + } +- sprintf (dump_file, "%s%c%s%s", +- path_exec, DIRECTORY_SEP, argv0_base, suffix); ++ sprintf (dump_file, "%s%c%s-%s%s", ++ path_exec, DIRECTORY_SEP, argv0_base, hexbuf, suffix); + #if !defined (NS_SELF_CONTAINED) + /* Assume the Emacs binary lives in a sibling directory as set up by + the default installation configuration. */ +@@ -1387,6 +1397,23 @@ main (int argc, char **argv) + exit (0); + } + ++#ifdef HAVE_PDUMPER ++ if (argmatch (argv, argc, "-fingerprint", "--fingerprint", 4, ++ NULL, &skip_args)) ++ { ++ if (initialized) ++ { ++ dump_fingerprint ("fingerprint", (unsigned char *)fingerprint); ++ exit (0); ++ } ++ else ++ { ++ fputs ("Not initialized\n", stderr); ++ exit (1); ++ } ++ } ++#endif ++ + emacs_wd = emacs_get_current_dir_name (); + #ifdef HAVE_PDUMPER + if (dumped_with_pdumper_p ()) +diff --git a/src/pdumper.c b/src/pdumper.c +index 11c680d..977f4fb 100644 +--- a/src/pdumper.c ++++ b/src/pdumper.c +@@ -312,7 +312,7 @@ dump_reloc_set_offset (struct dump_reloc *reloc, dump_off offset) + error ("dump relocation out of range"); + } + +-static void ++void + dump_fingerprint (char const *label, + unsigned char const xfingerprint[sizeof fingerprint]) + { +diff --git a/src/pdumper.h b/src/pdumper.h +index deec9af..bc339c4 100644 +--- a/src/pdumper.h ++++ b/src/pdumper.h +@@ -50,6 +50,9 @@ enum { PDUMPER_NO_OBJECT = -1 }; + #define PDUMPER_REMEMBER_SCALAR(thing) \ + pdumper_remember_scalar (&(thing), sizeof (thing)) + ++extern void dump_fingerprint (const char *label, ++ const unsigned char *xfingerprint); ++ + extern void pdumper_remember_scalar_impl (void *data, ptrdiff_t nbytes); + + INLINE void +-- +cgit v1.1 + diff --git a/emacs-spellchecker.patch b/emacs-spellchecker.patch index 4551dcb..f2eab01 100644 --- a/emacs-spellchecker.patch +++ b/emacs-spellchecker.patch @@ -1,20 +1,20 @@ diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el -index 65f61644b6..254c3e6a82 100644 +index 0a3a49d868..b6c0975857 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el -@@ -197,14 +197,11 @@ ispell-choices-win-default-height - :type 'integer - :group 'ispell) +@@ -191,12 +191,12 @@ Must be greater than 1." + :type 'integer) --;; XXX Add enchant to this list once enchant >= 2.1.0 is widespread. --;; Before that, adding it is useless, as if it is found, it will just --;; cause an error; and one of the other spelling engines below is --;; almost certainly installed in any case, for enchant to use. (defcustom ispell-program-name - (or (executable-find "aspell") - (executable-find "ispell") ++ ;; Enchant is commonly installed as `enchant-2', so use this ++ ;; name and avoid old versions of `enchant'. + (or (executable-find "enchant-2") (executable-find "hunspell") +- ;; Enchant is commonly installed as `enchant-2', so use this +- ;; name and avoid old versions of `enchant'. +- (executable-find "enchant-2") + (executable-find "aspell") + (executable-find "ispell") "ispell") diff --git a/emacs.appdata.xml b/emacs.appdata.xml deleted file mode 100644 index 94ba985..0000000 --- a/emacs.appdata.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - emacs.desktop - CC0-1.0 - GPL-3.0+ - GNU Emacs - Edit text files, view pictures and binary files - -

- Emacs is a powerful, customizable, self-documenting, modeless - editor. It is used primarely to edit text, including text - documents, source code of programs, web pages and XML documents, - but can also be used to display and edit binary files. -

-

- Emacs allows efficient editing of text with shortcuts which - allow operating on letters, words, sentences, and paragraphs as - single units. This includes both moving around and operations - like copying, deleting, transposing, and pasting. Macros can be - conveniently defined to repeat sequences of commands. In - addition, Emacs is (partially) built in a scripting language - (elisp) which can also be used to define further functions - extending existing capabilities. -

-

- Emacs has extensive support for editing source code, including - programmable syntax highlighting, automatic indentation, source - code indexing, overview modes, and navigation based on language - specific units like functions and blocks. It is also possible to - invoke the compiler from within Emacs and easily move between - compiler output and corresponding positions in the source. -

-

- Emacs has multiple modules which provide further functionality. - This provides the capability to read mail, news, browse - pictures, read man and info pages, browse the web, execute - arbitrary programs, and more, without leaving the editor. -

-
- - - http://in.waw.pl/~zbyszek/fedora/emacs-two-buffers.png - - - http://in.waw.pl/~zbyszek/fedora/emacs-editing-xml.png - - - http://in.waw.pl/~zbyszek/fedora/emacs-hexl-mode.png - - - http://in.waw.pl/~zbyszek/fedora/emacs-showing-svg.png - - - http://in.waw.pl/~zbyszek/fedora/emacs-with-python-source.png - - - http://www.gnu.org/software/emacs/ - https://www.gnu.org/software/emacs/manual/html_node/emacs/Bugs.html - https://my.fsf.org/donate/ - https://www.gnu.org/software/emacs/manual/ - zbyszek@in.waw.pl - -
diff --git a/emacs.spec b/emacs.spec index 637de76..5b117a0 100644 --- a/emacs.spec +++ b/emacs.spec @@ -4,16 +4,15 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 -Version: 27.2 -Release: 11%{?dist} +Version: 28.1 +Release: 1%{?dist} License: GPLv3+ and CC0 URL: http://www.gnu.org/software/emacs/ Source0: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz Source1: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz.sig -# generate the keyring via: -# wget https://ftp.gnu.org/gnu/gnu-keyring.gpg -# gpg2 --keyring ./gnu-keyring.gpg --armor --export E6C9029C363AD41D787A8EBB91C1262F01EB8D39 > gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg -Source2: gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg +# get Eli Zaretskii's key +# wget https://keys.openpgp.org/vks/v1/by-fingerprint/17E90D521672C04631B1183EE78DAE0F3115E06B -O gpgkey-17E90D521672C04631B1183EE78DAE0F3115E06B.gpg +Source2: gpgkey-17E90D521672C04631B1183EE78DAE0F3115E06B.gpg Source3: https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/cdefs.h;hb=refs/heads/master#./cdefs.h Source4: dotemacs.el Source5: site-start.el @@ -21,15 +20,11 @@ Source6: default.el # Emacs Terminal Mode, #551949, #617355 Source7: emacs-terminal.desktop Source8: emacs-terminal.sh -Source10: %{name}.appdata.xml # rhbz#713600 Patch1: emacs-spellchecker.patch Patch2: emacs-system-crypto-policies.patch -Patch3: emacs-glibc-2.34.patch -Patch4: emacs-libdir-vs-systemd.patch -Patch5: https://lists.gnu.org/archive/html/bug-gnu-emacs/2021-04/txt0tY7uKvJKS.txt#./emacs-modula2.patch -# cherry picked from 216c65b135c2b0be7e048cdc6683873b03b99b9a -Patch6: Use-a-64KB-page-size-for-pdump.patch +Patch3: emacs-libdir-vs-systemd.patch +Patch4: emacs-pdmp-fingerprint.patch BuildRequires: gcc BuildRequires: atk-devel @@ -72,6 +67,7 @@ BuildRequires: libacl-devel BuildRequires: harfbuzz-devel BuildRequires: jansson-devel BuildRequires: systemd-devel +BuildRequires: libgccjit-devel BuildRequires: gtk3-devel BuildRequires: webkit2gtk3-devel @@ -91,6 +87,7 @@ 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 Requires: emacs-common = %{epoch}:%{version}-%{release} @@ -101,6 +98,7 @@ Provides: emacs(bin) = %{epoch}:%{version}-%{release} %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 %description Emacs is a powerful, customizable, self-documenting, modeless text @@ -112,6 +110,7 @@ This package provides an emacs binary with support for X windows. %package lucid Summary: GNU Emacs text editor with LUCID toolkit X support +Requires: libgccjit Requires(preun): %{_sbindir}/alternatives Requires(posttrans): %{_sbindir}/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} @@ -128,6 +127,7 @@ using LUCID toolkit. %package nox Summary: GNU Emacs text editor without X support +Requires: libgccjit Requires(preun): %{_sbindir}/alternatives Requires(posttrans): %{_sbindir}/alternatives Requires: emacs-common = %{epoch}:%{version}-%{release} @@ -198,10 +198,8 @@ mv %{SOURCE3} lib/ %patch1 -p1 -b .spellchecker %patch2 -p1 -b .system-crypto-policies -%patch3 -p1 -b .glibc2.34 -%patch4 -p1 -b .libdir-vs-systemd -%patch5 -p1 -%patch6 -p1 +%patch3 -p1 -b .libdir-vs-systemd +%patch4 -p1 -b .pdmp-fingerprint autoconf grep -v "tetris.elc" lisp/Makefile.in > lisp/Makefile.in.new \ @@ -245,19 +243,6 @@ ln -s ../../%{name}/%{version}/etc/NEWS doc export CFLAGS="-DMAIL_USE_LOCKF %{build_cflags}" %set_build_flags -# 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-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no \ - --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json -make bootstrap -%{setarch} %make_build -cd .. - # Build Lucid binary mkdir build-lucid && cd build-lucid ln -s ../configure . @@ -266,15 +251,31 @@ 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 -make bootstrap + --with-modules --with-harfbuzz --with-cairo --with-json \ + --with-native-compilation +%{setarch} %make_build bootstrap NATIVE_FULL_AOT=1 %{setarch} %make_build cd .. # Build binary without X support mkdir build-nox && cd build-nox ln -s ../configure . -%configure --with-x=no --with-modules --with-json +%configure --with-x=no --with-modules --with-json --with-native-compilation +%{setarch} %make_build bootstrap NATIVE_FULL_AOT=1 +%{setarch} %make_build +cd .. + +# 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-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=no \ + --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json \ + --with-native-compilation +%{setarch} %make_build bootstrap NATIVE_FULL_AOT=1 %{setarch} %make_build cd .. @@ -310,23 +311,15 @@ cd .. rm %{buildroot}%{_bindir}/emacs touch %{buildroot}%{_bindir}/emacs -# Remove emacs.pdmp from common -rm %{buildroot}%{emacs_libexecdir}/emacs.pdmp - # 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 emacs.pdmp of the emacs with GTK+ -install -p -m 0644 build-gtk/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{version}.pdmp - # Install the emacs with LUCID toolkit install -p -m 0755 build-lucid/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-lucid -install -p -m 0644 build-lucid/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{version}-lucid.pdmp # Install the emacs without X install -p -m 0755 build-nox/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-nox -install -p -m 0644 build-nox/src/emacs.pdmp %{buildroot}%{_bindir}/emacs-%{version}-nox.pdmp # Make sure movemail isn't setgid chmod 755 %{buildroot}%{emacs_libexecdir}/movemail @@ -357,12 +350,6 @@ install -p -m 0644 %SOURCE4 %{buildroot}%{_sysconfdir}/skel/.emacs mkdir -p %{buildroot}/%{pkgconfig} install -p -m 0644 emacs.pc %{buildroot}/%{pkgconfig} -# Install app data -mkdir -p %{buildroot}/%{_datadir}/appdata -cp -a %SOURCE10 %{buildroot}/%{_datadir}/appdata -# Upstream ships its own appdata file, but it's quite terse. -rm %{buildroot}/%{_metainfodir}/emacs.appdata.xml - # Install rpm macro definition file mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d install -p -m 0644 macros.emacs %{buildroot}%{_rpmconfigdir}/macros.d/ @@ -380,6 +367,11 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ # Remove duplicate desktop-related files rm %{buildroot}%{_datadir}/%{name}/%{version}/etc/%{name}.{desktop,service} +# We don't ship the client variants yet +# https://src.fedoraproject.org/rpms/emacs/pull-request/12 +rm %{buildroot}%{_datadir}/applications/emacsclient.desktop +rm %{buildroot}%{_datadir}/applications/emacsclient-mail.desktop + # # Create file lists # @@ -402,8 +394,34 @@ cat el-*-files common-lisp-dir-files > el-filelist # 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} + +# List of binary specific files +echo %{emacs_libexecdir}/${gtk_pdmp} > gtk-filelist +echo %{emacs_libexecdir}/${lucid_pdmp} > lucid-filelist +echo %{emacs_libexecdir}/${nox_pdmp} > nox-filelist +echo %{native_lisp}/${gtk_comp_native_ver} >> gtk-filelist +echo %{native_lisp}/${lucid_comp_native_ver} >> lucid-filelist +echo %{native_lisp}/${nox_comp_native_ver} >> nox-filelist + %check -appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml +appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %preun @@ -435,26 +453,24 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %{_sbindir}/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 +%files -f gtk-filelist %{_bindir}/emacs-%{version} -%{_bindir}/emacs-%{version}.pdmp %attr(0755,-,-) %ghost %{_bindir}/emacs %{_datadir}/applications/emacs.desktop -%{_datadir}/appdata/%{name}.appdata.xml +%{_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 +%files lucid -f lucid-filelist %{_bindir}/emacs-%{version}-lucid -%{_bindir}/emacs-%{version}-lucid.pdmp %attr(0755,-,-) %ghost %{_bindir}/emacs %attr(0755,-,-) %ghost %{_bindir}/emacs-lucid -%files nox +%files nox -f nox-filelist %{_bindir}/emacs-%{version}-nox -%{_bindir}/emacs-%{version}-nox.pdmp %attr(0755,-,-) %ghost %{_bindir}/emacs %attr(0755,-,-) %ghost %{_bindir}/emacs-nox @@ -491,6 +507,12 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %{_includedir}/emacs-module.h %changelog +* Mon Apr 4 2022 Bhavin Gandhi - 1:28.1-1 +- emacs-28.1 is available, fixes rhbz#2071638 +- Build with Native Compilation support and natively compile all .el files +- Use upstream app data file +- Use pdmp files with fingerprints + * Wed Mar 23 2022 Dan Čermák - 1:27.2-11 - Include upstream version of bundled glib cdefs.h, fixes rhbz#2045136 diff --git a/gpgkey-17E90D521672C04631B1183EE78DAE0F3115E06B.gpg b/gpgkey-17E90D521672C04631B1183EE78DAE0F3115E06B.gpg new file mode 100644 index 0000000..5e2fd16 --- /dev/null +++ b/gpgkey-17E90D521672C04631B1183EE78DAE0F3115E06B.gpg @@ -0,0 +1,53 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Comment: 17E9 0D52 1672 C046 31B1 183E E78D AE0F 3115 E06B +Comment: Eli Zaretskii + +xsFNBGIorlcBEADDfvr2wRY5BvUYDRelVXoyPg9kmufSw7M4mNRgjJ/ACzTL0DrT +/MiItj/9hFYofCKvqbKNXoidD0K8yW3hg6C4EKEBdh7Tgd1owcn6R4QlxPyWd9a+ +bJBf/9TV4RtJDdgFSysxpg+q6IiKu91+RH6ioHMHHbMt1VHV8hRwrfr/z9NbWGKw +Q5V3dyd+bJcxa2Jrq4Bai1JUj3CJFXmLq7tRqnJwXWURgmyG2R6hV0pGiscxcIAt ++aP6iFPVIjOg7y8ttI2DoTA59pqpRD1kcQ3h9wgzRHIKKJwlEkhudeoGgwciGPyp +GYKDC5gY02BFRcEr669DP24toJ9RiGA6YBg6ajZZ4k/qLBoBChN9HrbnG+Jh2/ZC +ncXTpnwQpGOrdJ20kdUI816PoUISIVTrb2jXJbiYVsJ1PVXYKoSOBr4Zdk2KJLLB +L69QCJLf3ERaV4t7lknpSVqyglSPnuQf42FmdXwsu4w4BoD+p2oKsqWaNVIWjCwH +kBXCVxhs0lqpce8X60tQ3fo66QQ0UyznEg0wOYFxDqnMo2DF2YMTMW+GQ5W1gHEr ++Ehtz4lV/PMlUaTc0bIPz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ltbzwOyTiADgR9n8r6wIFBhIyVShhuKgeNpaTJaJ5 +kNuc3kYwPV8bliblKiYdkN/dSWEn8TDW5cAhKyxyRho0XoZoDO54/sfApSEHM/S1 +43PMSZp+0WpV/znm87mv68DhzMBby45MaIfcPFszbvtTyLDK/vcQKenTQIG/CFZ3 +cIrRlfOjtQf2abs/xxfQXknl38jD6IXG3g/kN9XVLRXVYPK58nNnjaU0b2Cb1gy8 +keZsV/4wEN1Mipv0SFLcd5zNzirfAlJMecPv8cCNHDkA8IOR7zp/VQ== +=+3ql +-----END PGP PUBLIC KEY BLOCK----- diff --git a/gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg b/gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg deleted file mode 100644 index 85ae139..0000000 --- a/gpgkey-E6C9029C363AD41D787A8EBB91C1262F01EB8D39.gpg +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQENBF+pf4UBCAC6vjkWLSAsQpe8YIGKLQzNOJx/IjGtCdFF8uzmO5jmME+SD8RO -uJN+t5KXVw58uzu75EFD0vHTY9e+udJ2gkpuy0NnzkFcbumdLLo2ERKCoSctZZRh -zKXI5z5cHxCqW0B2ygHRrRLtoNlGID7bAgcgSViT1ptGqTXO7zGVu4Airok7dNzc -PtHgns8GlR5YAFX0TvE6oGd0l2VPghNeVJKJOjrbfhoDxl3ucFpqbqMH8z9HTLDO -Fpz8UaYYUdJMi3xX6vwTZxI2sM2RRVLUpZyllAkSMI4lln1OOgazM/62DJUs/rKI -HKBnF6h3/qsJUjUYXaAHbrXY26mWllAd536lABEBAAG0I0VsaSBaYXJldHNraWkg -KGVsaXopIDxlbGl6QGdudS5vcmc+iQE4BBMBAgAiBQJfqX+FAhsDBgsJCAcDAgYV -CAIJCgsEFgIDAQIeAQIXgAAKCRCRwSYvAeuNOYUQB/4/iIKKOG45ijNaRoTvmJJZ -Mvj1S07WQxEm7c5SHEeEQb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CK----- diff --git a/sources b/sources index ef667bc..1895ed4 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (emacs-27.2.tar.xz) = 0f63a5a8709b113ef790c1a64845dad05ead096f93f62164ff221c517a35b91ea7bced75a992d794981a85382cda03cca7338da2f5ef8f6ef1459b88018a4ce9 -SHA512 (emacs-27.2.tar.xz.sig) = 60d273c537aed3c996d065374307b043c3a92d803668f6ab770dd6cab6814a32959d8632d2809c7389c4bc51c7a75b13ecd68a9ea9ca11df3bb63281816132c6 +SHA512 (emacs-28.1.tar.xz) = c146ff7086aba49fa6c18adf4e485a59eb4c6525fddb9d385034446830b8bb0ac9e6fb76e7b6d94a9fddc41643415f36acad57a1ae16a841c97f61bc211459d9 +SHA512 (emacs-28.1.tar.xz.sig) = cc905fb3d75c2f03c491fb1e0edd883312147d65125a667dcf77e6a078a6381f0674e321feba24a205d819275b6f31282a54910b3fc1c1284421a0fd35a2882a