Remove patches already part of emacs-29
- remove emacs-pdmp-fingerprint.patch, it was cherry picked from emacs 29.1 - remove emacs-configure-c99-2.patch, already part of emacs-29 - remove fixed-ctags-local-command-execute-vulnerability.patch - remove fix-searching-for-end-of-string-in-python-nav-end-of.patch - remove native-compile-with_-Q.patch - remove webkit2gtk-4.1.patch, has been implemented in emacs-29 via 7287b7b53a17f9b2d1b474466106806a9d57af47
This commit is contained in:
parent
28d8e707a9
commit
da33813951
@ -1,19 +0,0 @@
|
|||||||
Avoid an implicit declaration of the malloc function. Improves C99
|
|
||||||
compatibility.
|
|
||||||
|
|
||||||
Submitted upstream:
|
|
||||||
|
|
||||||
<https://lists.gnu.org/archive/html/emacs-devel/2022-12/msg01020.html>
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index cc390d40b33a1d8f..7be08de740cfc486 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -4590,6 +4590,7 @@ AC_CACHE_CHECK([whether signals can be handled on alternate stack],
|
|
||||||
[emacs_cv_alternate_stack],
|
|
||||||
[AC_COMPILE_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM([[#include <signal.h>
|
|
||||||
+ #include <stdlib.h>
|
|
||||||
]],
|
|
||||||
[[stack_t ss;
|
|
||||||
struct sigaction sa;
|
|
@ -1,171 +0,0 @@
|
|||||||
From 31607778ef262e5c25a65eb479f9531c5803f4a6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Glenn Morris <rgm@gnu.org>
|
|
||||||
Date: Mon, 11 Oct 2021 14:03:26 +0200
|
|
||||||
Subject: [PATCH] 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 c902b46ced..f8b8058d96 100644
|
|
||||||
--- a/Makefile.in
|
|
||||||
+++ b/Makefile.in
|
|
||||||
@@ -313,6 +313,7 @@ TRANSFORM =
|
|
||||||
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:
|
|
||||||
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 ffab2b2213..b3f84098e7 100644
|
|
||||||
--- a/doc/emacs/cmdargs.texi
|
|
||||||
+++ b/doc/emacs/cmdargs.texi
|
|
||||||
@@ -185,6 +185,11 @@ Action Arguments
|
|
||||||
@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 0a90b0913b..1907065a95 100644
|
|
||||||
--- a/src/emacs.c
|
|
||||||
+++ b/src/emacs.c
|
|
||||||
@@ -133,6 +133,7 @@ #define MAIN_PROGRAM
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "pdumper.h"
|
|
||||||
+#include "fingerprint.h"
|
|
||||||
#include "epaths.h"
|
|
||||||
|
|
||||||
static const char emacs_version[] = PACKAGE_VERSION;
|
|
||||||
@@ -255,6 +256,7 @@ #define MAIN_PROGRAM
|
|
||||||
#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))
|
|
||||||
{
|
|
||||||
@@ -1424,6 +1434,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 b0167299d7..56a5e2ec6d 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 8383283894..002e1d88ce 100644
|
|
||||||
--- a/src/pdumper.h
|
|
||||||
+++ b/src/pdumper.h
|
|
||||||
@@ -50,6 +50,9 @@ #define PDUMPER_IGNORE(thing) ((void) &(thing))
|
|
||||||
#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
|
|
||||||
--
|
|
||||||
2.37.3
|
|
||||||
|
|
11
emacs.spec
11
emacs.spec
@ -24,18 +24,7 @@ Patch2: emacs-system-crypto-policies.patch
|
|||||||
# causes a dependency on pkgconfig(systemd)
|
# causes a dependency on pkgconfig(systemd)
|
||||||
# => remove it if we stop using this patch
|
# => remove it if we stop using this patch
|
||||||
Patch3: emacs-libdir-vs-systemd.patch
|
Patch3: emacs-libdir-vs-systemd.patch
|
||||||
Patch4: emacs-pdmp-fingerprint.patch
|
|
||||||
Patch5: emacs-configure-c99-1.patch
|
Patch5: emacs-configure-c99-1.patch
|
||||||
Patch6: emacs-configure-c99-2.patch
|
|
||||||
# CVE-2022-45939
|
|
||||||
Patch7: https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51#./fixed-ctags-local-command-execute-vulnerability.patch
|
|
||||||
# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60208
|
|
||||||
# backport of https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=e59216d3be86918b995bd63273c851ebc6176a83
|
|
||||||
Patch8: native-compile-with_-Q.patch
|
|
||||||
Patch9: webkit2gtk-4.1.patch
|
|
||||||
# Fix infinite loop error https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58780
|
|
||||||
# Can be removed on next release of Emacs rhbz#2187041
|
|
||||||
Patch10: fix-searching-for-end-of-string-in-python-nav-end-of.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: atk-devel
|
BuildRequires: atk-devel
|
||||||
|
@ -1,106 +0,0 @@
|
|||||||
From 62cfa24a89fdbf90cbe866ad88ca635327eb1f49 Mon Sep 17 00:00:00 2001
|
|
||||||
From: kobarity <kobarity@gmail.com>
|
|
||||||
Date: Sun, 5 Mar 2023 17:06:26 +0900
|
|
||||||
Subject: [PATCH 1/2] Fix searching for end of string in
|
|
||||||
python-nav-end-of-statement
|
|
||||||
|
|
||||||
* lisp/progmodes/python.el (python-nav-end-of-statement): Add
|
|
||||||
searching for corresponding string-quote.
|
|
||||||
* test/lisp/progmodes/python-tests.el (python-nav-end-of-statement-3)
|
|
||||||
(python-nav-end-of-statement-4, python-info-current-defun-4): New
|
|
||||||
tests. (Bug#58780)
|
|
||||||
---
|
|
||||||
lisp/progmodes/python.el | 14 ++++++---
|
|
||||||
test/lisp/progmodes/python-tests.el | 44 +++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 54 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
|
|
||||||
index 1f970633bfc..cc4ece1669c 100644
|
|
||||||
--- a/lisp/progmodes/python.el
|
|
||||||
+++ b/lisp/progmodes/python.el
|
|
||||||
@@ -2076,10 +2076,16 @@ python-nav-end-of-statement
|
|
||||||
(goto-char (+ (point)
|
|
||||||
(python-syntax-count-quotes
|
|
||||||
(char-after (point)) (point))))
|
|
||||||
- (setq last-string-end
|
|
||||||
- (or (re-search-forward
|
|
||||||
- (rx (syntax string-delimiter)) nil t)
|
|
||||||
- (goto-char (point-max)))))))
|
|
||||||
+ (setq
|
|
||||||
+ last-string-end
|
|
||||||
+ (or (if (eq t (nth 3 (syntax-ppss)))
|
|
||||||
+ (re-search-forward
|
|
||||||
+ (rx (syntax string-delimiter)) nil t)
|
|
||||||
+ (ignore-error scan-error
|
|
||||||
+ (goto-char string-start)
|
|
||||||
+ (python-nav--lisp-forward-sexp)
|
|
||||||
+ (point)))
|
|
||||||
+ (goto-char (point-max)))))))
|
|
||||||
((python-syntax-context 'paren)
|
|
||||||
;; The statement won't end before we've escaped
|
|
||||||
;; at least one level of parenthesis.
|
|
||||||
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
|
|
||||||
index 4f24c042c6a..e9df4a2c843 100644
|
|
||||||
--- a/test/lisp/progmodes/python-tests.el
|
|
||||||
+++ b/test/lisp/progmodes/python-tests.el
|
|
||||||
@@ -2943,6 +2943,36 @@ python-nav-end-of-statement-2
|
|
||||||
"'\n''\n"
|
|
||||||
(python-nav-end-of-statement)))
|
|
||||||
|
|
||||||
+(ert-deftest python-nav-end-of-statement-3 ()
|
|
||||||
+ "Test unmatched quotes (Bug#58780)."
|
|
||||||
+ (python-tests-with-temp-buffer
|
|
||||||
+ "
|
|
||||||
+' \"\"\"
|
|
||||||
+v = 1
|
|
||||||
+"
|
|
||||||
+ (python-tests-look-at "v =")
|
|
||||||
+ (should (= (save-excursion
|
|
||||||
+ (python-nav-end-of-statement)
|
|
||||||
+ (point))
|
|
||||||
+ (save-excursion
|
|
||||||
+ (point-max))))))
|
|
||||||
+
|
|
||||||
+(ert-deftest python-nav-end-of-statement-4 ()
|
|
||||||
+ (python-tests-with-temp-buffer
|
|
||||||
+ "
|
|
||||||
+abc = 'a\\
|
|
||||||
+b\\
|
|
||||||
+c'
|
|
||||||
+d = '''d'''
|
|
||||||
+"
|
|
||||||
+ (python-tests-look-at "b\\")
|
|
||||||
+ (should (= (save-excursion
|
|
||||||
+ (python-nav-end-of-statement)
|
|
||||||
+ (point))
|
|
||||||
+ (save-excursion
|
|
||||||
+ (python-tests-look-at "c'")
|
|
||||||
+ (pos-eol))))))
|
|
||||||
+
|
|
||||||
(ert-deftest python-nav-forward-statement-1 ()
|
|
||||||
(python-tests-with-temp-buffer
|
|
||||||
"
|
|
||||||
@@ -5209,6 +5239,20 @@ python-info-current-defun-3
|
|
||||||
(should (string= (python-info-current-defun t)
|
|
||||||
"def decoratorFunctionWithArguments"))))
|
|
||||||
|
|
||||||
+(ert-deftest python-info-current-defun-4 ()
|
|
||||||
+ "Ensure unmatched quotes do not cause hang (Bug#58780)."
|
|
||||||
+ (python-tests-with-temp-buffer
|
|
||||||
+ "
|
|
||||||
+def func():
|
|
||||||
+ ' \"\"\"
|
|
||||||
+ v = 1
|
|
||||||
+"
|
|
||||||
+ (python-tests-look-at "v = 1")
|
|
||||||
+ (should (string= (python-info-current-defun)
|
|
||||||
+ "func"))
|
|
||||||
+ (should (string= (python-info-current-defun t)
|
|
||||||
+ "def func"))))
|
|
||||||
+
|
|
||||||
(ert-deftest python-info-current-symbol-1 ()
|
|
||||||
(python-tests-with-temp-buffer
|
|
||||||
"
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
|||||||
--- emacs-28.2/lisp/emacs-lisp/comp.el~ 2022-09-07 05:31:53.000000000 +0800
|
|
||||||
+++ emacs-28.2/lisp/emacs-lisp/comp.el 2022-12-23 15:02:25.446994014 +0800
|
|
||||||
@@ -3706,7 +3706,7 @@
|
|
||||||
(if (zerop
|
|
||||||
(call-process (expand-file-name invocation-name
|
|
||||||
invocation-directory)
|
|
||||||
- nil t t "--batch" "-l" temp-file))
|
|
||||||
+ nil t t "-Q" "--batch" "-l" temp-file))
|
|
||||||
(progn
|
|
||||||
(delete-file temp-file)
|
|
||||||
output)
|
|
||||||
@@ -3976,7 +3976,7 @@
|
|
||||||
:command (list
|
|
||||||
(expand-file-name invocation-name
|
|
||||||
invocation-directory)
|
|
||||||
- "--batch" "-l" temp-file)
|
|
||||||
+ "-Q" "--batch" "-l" temp-file)
|
|
||||||
:sentinel
|
|
||||||
(lambda (process _event)
|
|
||||||
(run-hook-with-args
|
|
||||||
|
|
||||||
Diff finished. Fri Dec 23 15:02:42 2022
|
|
@ -1,14 +0,0 @@
|
|||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 0b3a1bc..79c88a1 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -2750,8 +2750,7 @@ HAVE_XWIDGETS=no
|
|
||||||
XWIDGETS_OBJ=
|
|
||||||
if test "$with_xwidgets" != "no"; then
|
|
||||||
if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then
|
|
||||||
- WEBKIT_REQUIRED=2.12
|
|
||||||
- WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED"
|
|
||||||
+ WEBKIT_MODULES="webkit2gtk-4.1"
|
|
||||||
EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES])
|
|
||||||
HAVE_XWIDGETS=$HAVE_WEBKIT
|
|
||||||
XWIDGETS_OBJ="xwidget.o"
|
|
Loading…
Reference in New Issue
Block a user