diff --git a/emacs-28.2.tar.xz b/emacs-29.1.tar.xz similarity index 75% rename from emacs-28.2.tar.xz rename to emacs-29.1.tar.xz index 2e0d4082808bf42718cc39156602a2f1674b4d82..9323da9c97f2193679eb14956be8d524391c67fa 100644 Binary files a/emacs-28.2.tar.xz and b/emacs-29.1.tar.xz differ diff --git a/emacs-pdmp-fingerprint.patch b/emacs-pdmp-fingerprint.patch deleted file mode 100644 index db48a187ab97c497f757a24f51344c443767cdbd..0000000000000000000000000000000000000000 --- a/emacs-pdmp-fingerprint.patch +++ /dev/null @@ -1,171 +0,0 @@ -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) - if (!(emacs_executable && *emacs_executable)) - { -@@ -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.spec b/emacs.spec index da1c0e3ab79f8bea35c50d26e54e5796c427ec68..f88c3572b220fbd5e27b3c9c5eae846f0829ec4c 100644 --- a/emacs.spec +++ b/emacs.spec @@ -1,13 +1,13 @@ -%define anolis_release 5 +%define anolis_release 1 %global _hardened_build 1 # This file is encoded in UTF-8. -*- coding: utf-8 -*- Summary: GNU Emacs text editor Name: emacs Epoch: 1 -Version: 28.2 +Version: 29.1 Release: %{anolis_release}%{?dist} -License: GPLv3+ and CC0 +License: GPL-3.0-or-later AND CC0-1.0 URL: http://www.gnu.org/software/emacs/ Source0: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz Source2: dotemacs.el @@ -15,11 +15,9 @@ Source3: site-start.el Source4: default.el Source5: emacs-terminal.desktop Source6: emacs-terminal.sh -Source7: %{name}.appdata.xml Patch1: emacs-spellchecker.patch Patch2: emacs-system-crypto-policies.patch Patch3: emacs-libdir-vs-systemd.patch -Patch4: emacs-pdmp-fingerprint.patch BuildRequires: gcc BuildRequires: atk-devel @@ -131,13 +129,19 @@ on a terminal. Summary: Emacs common files # The entire source code is GPLv3+ except lib-src/etags.c which is # also BSD. Manual (info) is GFDL. -License: GPLv3+ and GFDL and BSD +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} Recommends: enchant2 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 +# 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 + %description common Emacs is a powerful, customizable, self-documenting, modeless text @@ -195,23 +199,6 @@ grep -v "pong.elc" lisp/Makefile.in > lisp/Makefile.in.new \ rm -f lisp/play/tetris.el lisp/play/tetris.elc rm -f lisp/play/pong.el lisp/play/pong.el -# Sorted list of info files -%define info_files ada-mode auth autotype bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq-w32 efaq eieio eintr elisp emacs-gnutls emacs-mime emacs epa erc ert eshell eudc eww flymake forms gnus htmlfontify idlwave ido info mairix-el message mh-e newsticker nxml-mode octave-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp url vhdl-mode vip viper widget wisent woman - -# Since the list of info files has to be maintained, check if all info files -# from the upstream tarball are actually present in %%info_files. -cd info -fs=( $(ls *.info) ) -is=( %info_files ) -files=$(echo ${fs[*]} | sed 's/\.info//'g | sort | tr -d '\n') -for i in $(seq 0 $(( ${#fs[*]} - 1 ))); do - if test "${fs[$i]}" != "${is[$i]}.info"; then - echo Please update %%info_files: ${fs[$i]} != ${is[$i]}.info >&2 - break - fi -done -cd .. - %define setarch %{nil} # Avoid duplicating doc files in the common subpackage @@ -308,8 +295,6 @@ mkdir -p %{buildroot}%{site_lisp} install -p -m 0644 %SOURCE3 %{buildroot}%{site_lisp}/site-start.el install -p -m 0644 %SOURCE4 %{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 @@ -336,6 +321,9 @@ install -p -m 0644 macros.emacs %{buildroot}%{_rpmconfigdir}/macros.d/ # Installing emacs-terminal binary install -p -m 755 %SOURCE6 %{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 \ %SOURCE5 @@ -360,6 +348,14 @@ rm -f *-filelist {common,el}-*-files .%{_datadir}/emacs/site-lisp \( -type f -name '*.elc' -fprint $TOPDIR/common-lisp-none-elc-files \) -o \( -type d -fprintf $TOPDIR/common-lisp-dir-files "%%%%dir %%p\n" \) -o \( -name '*.el.gz' -fprint $TOPDIR/el-bytecomped-files -o -fprint $TOPDIR/common-not-comped-files \) ) +# Sorted list of info files +%define info_files auth autotype bovine calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq eieio eintr elisp emacs-gnutls emacs-mime emacs epa erc ert eshell eudc eww flymake forms gnus htmlfontify idlwave ido mairix-el message mh-e modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar srecode todo-mode tramp transient url use-package vhdl-mode vip viper vtable widget wisent woman + +for info_f in %info_files; do + echo "%{_infodir}/${info_f}.info*" >> info-filelist +done +# info.gz is a rename of info.info.gz and thus needs special handling +echo "%{_infodir}/info*" >> info-filelist # Put the lists together after filtering ./usr to /usr sed -i -e "s|\.%{_prefix}|%{_prefix}|" *-files @@ -390,13 +386,30 @@ cp -ar build-lucid/native-lisp/${lucid_comp_native_ver} %{buildroot}%{native_lis 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 +(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" \) +) +(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" \) +) +(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" \) +) +echo %{emacs_libexecdir}/${gtk_pdmp} >> gtk-eln-filelist +echo %{emacs_libexecdir}/${lucid_pdmp} >> lucid-eln-filelist +echo %{emacs_libexecdir}/${nox_pdmp} >> nox-eln-filelist + +# remove leading . from filelists +sed -i -e "s|\.%{native_lisp}|%{native_lisp}|" *-eln-filelist *-dirs +# 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 +# ensure native files are newer than byte-code files +find %{buildroot}%{_libdir}/ -name '*eln' -type f | xargs touch %check appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.metainfo.xml @@ -431,7 +444,7 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %{_sbindir}/alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ --slave %{_mandir}/man1/etags.1%{_extension} emacs.etags.man%{_extension} %{_mandir}/man1/etags.emacs.1%{_extension} || : -%files -f gtk-filelist +%files -f gtk-eln-filelist -f gtk-dirs %{_bindir}/emacs-%{version} %{abidir}/emacs-%{version}-option.list %attr(0755,-,-) %ghost %{_bindir}/emacs @@ -443,19 +456,19 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/scalable/apps/emacs.ico %{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document.svg -%files lucid -f lucid-filelist +%files lucid -f lucid-eln-filelist -f lucid-dirs %{_bindir}/emacs-%{version}-lucid %{abidir}/emacs-%{version}-lucid-option.list %attr(0755,-,-) %ghost %{_bindir}/emacs %attr(0755,-,-) %ghost %{_bindir}/emacs-lucid -%files nox -f nox-filelist +%files nox -f nox-eln-filelist -f nox-dirs %{_bindir}/emacs-%{version}-nox %{abidir}/emacs-%{version}-nox-option.list %attr(0755,-,-) %ghost %{_bindir}/emacs %attr(0755,-,-) %ghost %{_bindir}/emacs-nox -%files common -f common-filelist -f el-filelist +%files common -f common-filelist -f el-filelist -f info-filelist %dir %{abidir} %config(noreplace) %{_sysconfdir}/skel/.emacs %{_rpmconfigdir}/macros.d/macros.emacs @@ -473,7 +486,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %dir %{_datadir}/emacs/%{version} %{_datadir}/emacs/%{version}/etc %{_datadir}/emacs/%{version}/site-lisp -%{_libexecdir}/emacs +%dir %{emacs_libexecdir}/ +%{emacs_libexecdir}/movemail +%{emacs_libexecdir}/hexl +%{emacs_libexecdir}/rcs2log %{_userunitdir}/emacs.service %attr(0644,root,root) %config(noreplace) %{_datadir}/emacs/site-lisp/default.el %attr(0644,root,root) %config %{_datadir}/emacs/site-lisp/site-start.el @@ -495,6 +511,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %{_includedir}/emacs-module.h %changelog +* Thu Aug 24 2023 happy_orange - 1:29.1-1 +- update to 29.1 to fix the CVE-2023-27985 and CVE-2022-45939 + * Tue Mar 28 2023 mgb01105731 - 1:28.2-5 - Del Specific Fields