From bf7e72ef7aa3f68499bf7a5949b6eccbec0aabcb Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 11 Nov 2025 15:36:42 +0000 Subject: [PATCH] import UBI emacs-27.2-18.el9 --- .../emacs-fix-flymake-tests-with-gcc-14.patch | 28 ++++++++ SOURCES/emacs-nsm-should-check.patch | 28 ++++++++ .../emacs-pong-and-tetris-are-excluded.patch | 71 +++++++++++++++++++ SOURCES/emacs-tests-for-tetris.patch | 40 +++++++++++ SOURCES/emacs-untrusted-content.patch | 33 +++++++++ SPECS/emacs.spec | 45 ++++++++---- 6 files changed, 231 insertions(+), 14 deletions(-) create mode 100644 SOURCES/emacs-fix-flymake-tests-with-gcc-14.patch create mode 100644 SOURCES/emacs-nsm-should-check.patch create mode 100644 SOURCES/emacs-pong-and-tetris-are-excluded.patch create mode 100644 SOURCES/emacs-tests-for-tetris.patch create mode 100644 SOURCES/emacs-untrusted-content.patch diff --git a/SOURCES/emacs-fix-flymake-tests-with-gcc-14.patch b/SOURCES/emacs-fix-flymake-tests-with-gcc-14.patch new file mode 100644 index 0000000..484561d --- /dev/null +++ b/SOURCES/emacs-fix-flymake-tests-with-gcc-14.patch @@ -0,0 +1,28 @@ +From a769f171e7ebb8e30f198f4328d46f47fe7958fb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ulrich=20M=C3=BCller?= +Date: Mon, 24 Jun 2024 15:20:26 +0200 +Subject: [PATCH] ; Fix flymake tests with GCC 14. + +* test/lisp/progmodes/flymake-tests.el (included-c-header-files): +Fix test failure with GCC 14. (Bug#71749) +--- + test/lisp/progmodes/flymake-tests.el | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/test/lisp/progmodes/flymake-tests.el b/test/lisp/progmodes/flymake-tests.el +index 21dbb0711d2..93bc9028031 100644 +--- a/test/lisp/progmodes/flymake-tests.el ++++ b/test/lisp/progmodes/flymake-tests.el +@@ -174,7 +174,8 @@ included-c-header-files + (flymake-tests--with-flymake + ("some-problems.h") + (flymake-goto-next-error) +- (should (eq 'flymake-warning (face-at-point))) ++ ;; implicit-int was promoted from warning to error in GCC 14 ++ (should (memq (face-at-point) '(flymake-warning flymake-error))) + (flymake-goto-next-error) + (should (eq 'flymake-error (face-at-point))) + (should-error (flymake-goto-next-error nil nil t))) +-- +2.45.2 + diff --git a/SOURCES/emacs-nsm-should-check.patch b/SOURCES/emacs-nsm-should-check.patch new file mode 100644 index 0000000..4b7bba2 --- /dev/null +++ b/SOURCES/emacs-nsm-should-check.patch @@ -0,0 +1,28 @@ +From 6dc4fc7d621008086388dae48f6794f7d69edff9 Mon Sep 17 00:00:00 2001 +From: Robert Pluim +Date: Tue, 12 Jan 2021 18:36:01 +0100 +Subject: Fix nsm-should-check for "google.com" failure + +* lisp/net/nsm.el (nsm-should-check): Extract the mask from +'network-interface-list' rather than the broadcast +address (Bug#45798). +--- + lisp/net/nsm.el | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el +index 3f3e7133713..0ce65a35ead 100644 +--- a/lisp/net/nsm.el ++++ b/lisp/net/nsm.el +@@ -239,7 +239,7 @@ otherwise." + (mapc + (lambda (info) + (let ((local-ip (nth 1 info)) +- (mask (nth 2 info))) ++ (mask (nth 3 info))) + (when + (nsm-network-same-subnet (substring local-ip 0 -1) + (substring mask 0 -1) +-- +cgit v1.2.3 + diff --git a/SOURCES/emacs-pong-and-tetris-are-excluded.patch b/SOURCES/emacs-pong-and-tetris-are-excluded.patch new file mode 100644 index 0000000..8d3cc2e --- /dev/null +++ b/SOURCES/emacs-pong-and-tetris-are-excluded.patch @@ -0,0 +1,71 @@ +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")) +-- +2.46.1 + diff --git a/SOURCES/emacs-tests-for-tetris.patch b/SOURCES/emacs-tests-for-tetris.patch new file mode 100644 index 0000000..79c009e --- /dev/null +++ b/SOURCES/emacs-tests-for-tetris.patch @@ -0,0 +1,40 @@ +From 81969482e23b1c046354d9d860e548259f118b4e Mon Sep 17 00:00:00 2001 +From: Glenn Morris +Date: Mon, 28 Dec 2020 11:03:30 -0800 +Subject: Fix package tests for tetris no longer existing as a package + +* test/lisp/emacs-lisp/package-tests.el +(package-test-list-filter-by-name, package-test-list-clear-filter): +Use ansi-color instead of tetris, which no longer has a version:. +--- + test/lisp/emacs-lisp/package-tests.el | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el +index 23267545f83..92e593328c6 100644 +--- a/test/lisp/emacs-lisp/package-tests.el ++++ b/test/lisp/emacs-lisp/package-tests.el +@@ -405,9 +405,9 @@ Must called from within a `tar-mode' buffer." + "Ensure package list is filtered correctly by package name." + (with-package-test () + (let ((buf (package-list-packages))) +- (package-menu-filter-by-name "tetris") ++ (package-menu-filter-by-name "ansi-color") + (goto-char (point-min)) +- (should (re-search-forward "^\\s-+tetris" nil t)) ++ (should (re-search-forward "^\\s-+ansi-color" nil t)) + (should (= (count-lines (point-min) (point-max)) 1)) + (kill-buffer buf)))) + +@@ -463,7 +463,7 @@ Must called from within a `tar-mode' buffer." + (let ((buf (package-list-packages))) + (let ((num-packages (count-lines (point-min) (point-max)))) + (should (> num-packages 1)) +- (package-menu-filter-by-name "tetris") ++ (package-menu-filter-by-name "ansi-color") + (should (= (count-lines (point-min) (point-max)) 1)) + (package-menu-clear-filter) + (should (= (count-lines (point-min) (point-max)) num-packages))) +-- +cgit v1.2.3 + diff --git a/SOURCES/emacs-untrusted-content.patch b/SOURCES/emacs-untrusted-content.patch new file mode 100644 index 0000000..7fae519 --- /dev/null +++ b/SOURCES/emacs-untrusted-content.patch @@ -0,0 +1,33 @@ +From ccc188fcf98ad9166ee551fac9d94b2603c3a51b Mon Sep 17 00:00:00 2001 +From: Ihor Radchenko +Date: Tue, 20 Feb 2024 12:43:51 +0300 +Subject: * lisp/files.el (untrusted-content): New variable. + +The new variable is to be used when buffer contents comes from untrusted +source. +--- + lisp/files.el | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/lisp/files.el b/lisp/files.el +index c0d26b2343c..5536af014f6 100644 +--- a/lisp/files.el ++++ b/lisp/files.el +@@ -695,6 +695,14 @@ Also see the `permanently-enabled-local-variables' variable." + Some modes may wish to set this to nil to prevent directory-local + settings being applied, but still respect file-local ones.") + ++(defvar-local untrusted-content nil ++ "Non-nil means that current buffer originated from an untrusted source. ++Email clients and some other modes may set this non-nil to mark the ++buffer contents as untrusted. ++ ++This variable might be subject to change without notice.") ++(put 'untrusted-content 'permanent-local t) ++ + (defcustom trusted-content nil + "List of files and directories whose content we trust. + Be extra careful here since trusting means that Emacs might execute the +-- +cgit v1.2.3 + diff --git a/SPECS/emacs.spec b/SPECS/emacs.spec index 80c90ec..841f370 100644 --- a/SPECS/emacs.spec +++ b/SPECS/emacs.spec @@ -5,7 +5,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 Version: 27.2 -Release: 14%{?dist}.2 +Release: 18%{?dist} License: GPLv3+ and CC0-1.0 URL: http://www.gnu.org/software/emacs/ Source0: https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz @@ -39,6 +39,13 @@ Patch12: emacs-latex-preview.patch Patch13: emacs-org-link-expand-abbrev-unsafe-elisp.patch Patch14: emacs-man-el-shell-injection-vulnerability.patch Patch15: emacs-CVE-2024-53920.patch +# Avoid trademark issues +Patch16: emacs-pong-and-tetris-are-excluded.patch +Patch17: emacs-fix-flymake-tests-with-gcc-14.patch +Patch18: emacs-nsm-should-check.patch +Patch19: emacs-tests-for-tetris.patch +Patch20: emacs-untrusted-content.patch + BuildRequires: gcc BuildRequires: atk-devel BuildRequires: cairo-devel @@ -212,20 +219,21 @@ Development header files for Emacs. %patch -P 13 -p1 -b .org-link-expand-abbrev-unsafe-elisp %patch -P 14 -p1 -b .man-el-shell-injection-vulnerability %patch -P 15 -p1 -b .CVE-2024-53920 +%patch -P 16 -p1 -b .pong-and-tetris-are-excluded +%patch -P 17 -p1 -b .fix-flymake-tests-with-gcc-14 +%patch -P 18 -p1 -b .nsm-should-check +%patch -P 19 -p1 -b .tests-for-tetris +%patch -P 20 -p1 -b .untrusted-content + +# Avoid trademark issues +rm lisp/play/pong.el lisp/play/pong.elc \ + lisp/play/tetris.el lisp/play/tetris.elc + autoconf # We prefer our emacs.desktop file cp %SOURCE3 etc/emacs.desktop -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 - -# Avoid trademark issues -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 @@ -502,11 +510,20 @@ rm %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document23.svg %{_includedir}/emacs-module.h %changelog -* Wed May 21 2025 Jacek Migacz - 1:27.2-14.el9_6.2 -- Restore definition of variable "enable-dir-local-variables" (RHEL-92653) +* Mon Jun 23 2025 Jacek Migacz - 1:27.2-18 +- Fix nsm-should-check for "google.com" failure (RHEL-94297) +- Fix package tests for tetris no longer existing as a package (RHEL-94297) +- Introduce untrusted-content variable (RHEL-94297) -* Tue May 06 2025 Jacek Migacz - 1:27.2-14.el9_6.1 -- Bump Z-stream release +* Wed Jun 18 2025 Jacek Migacz - 1:27.2-17 +- Pong and Tetris are excluded (RHEL-94297) +- Fix flymake tests with GCC 14 (RHEL-94297) + +* Fri May 09 2025 Jacek Migacz - 1:27.2-16 +- Restore definition of variable "enable-dir-local-variables" (RHEL-92550) + +* Fri May 09 2025 Jacek Migacz - 1:27.2-15 +- Fix arbitrary code execution via Lisp macro expansion (RHEL-90181) * Mon Apr 28 2025 Jacek Migacz - 1:27.2-14 - Fix arbitrary code execution via Lisp macro expansion (RHEL-69399)