Accepting request 1236885 from editors
- Add patch emacs-29.4-boo1234673.patch * Avoid that Emacs recompiles some packages on every startup (boo#1234673) OBS-URL: https://build.opensuse.org/request/show/1236885 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/emacs?expand=0&rev=197
This commit is contained in:
commit
5e1c280c74
@ -10,11 +10,12 @@ even if the Xauthority file is not the default expected by XCloseDisplay()
|
||||
2 files changed, 45 insertions(+), 2 deletions(-)
|
||||
|
||||
--- etc/emacs.service
|
||||
+++ etc/emacs.service 2024-04-11 06:46:29.320172754 +0000
|
||||
@@ -5,9 +5,11 @@
|
||||
+++ etc/emacs.service 2025-01-09 13:32:23.071591602 +0000
|
||||
@@ -5,9 +5,12 @@
|
||||
[Unit]
|
||||
Description=Emacs text editor
|
||||
Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/
|
||||
+PartOf=graphical-session.target
|
||||
+After=graphical-session.target
|
||||
|
||||
[Service]
|
||||
@ -23,6 +24,12 @@ even if the Xauthority file is not the default expected by XCloseDisplay()
|
||||
ExecStart=emacs --fg-daemon
|
||||
|
||||
# Emacs will exit with status 15 after having received SIGTERM, which
|
||||
@@ -20,4 +23,4 @@ SuccessExitStatus=15
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
-WantedBy=default.target
|
||||
+WantedBy=graphical-session.target
|
||||
--- lisp/server.el
|
||||
+++ lisp/server.el 2024-04-11 06:17:17.692578500 +0000
|
||||
@@ -289,6 +289,11 @@ If nil, no instructions are displayed."
|
||||
|
27
emacs-29.4-boo1234673.patch
Normal file
27
emacs-29.4-boo1234673.patch
Normal file
@ -0,0 +1,27 @@
|
||||
https://emacs.stackexchange.com/questions/82010/why-is-emacs-recompiling-some-packages-on-every-startup
|
||||
|
||||
---
|
||||
lisp/emacs-lisp/comp.el | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
--- lisp/emacs-lisp/comp.el
|
||||
+++ lisp/emacs-lisp/comp.el 2025-01-09 09:34:45.706219439 +0000
|
||||
@@ -4177,6 +4177,18 @@ LOAD and SELECTOR work as described in `
|
||||
(cl-some (lambda (re)
|
||||
(string-match-p re file))
|
||||
native-comp-jit-compilation-deny-list))))
|
||||
+;; SUSE boo#1234673 -- Emacs freeze for a few seconds when opening any python file, with 100% Xorg usage
|
||||
+(defun fixed-native-compile-async-skip-p
|
||||
+ (native-compile-async-skip-p file load selector)
|
||||
+ (let* ((naive-elc-file (file-name-with-extension file "elc"))
|
||||
+ (elc-file (replace-regexp-in-string
|
||||
+ "\\.el\\.elc$" ".elc" naive-elc-file)))
|
||||
+ (or (gethash elc-file comp--no-native-compile)
|
||||
+ (funcall native-compile-async-skip-p file load selector))))
|
||||
+
|
||||
+(advice-add 'native-compile-async-skip-p
|
||||
+ :around 'fixed-native-compile-async-skip-p)
|
||||
+;; SUSE boo#1234673 -- end
|
||||
|
||||
(defun native--compile-async (files &optional recursively load selector)
|
||||
;; BEWARE, this function is also called directly from C.
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 9 12:26:03 UTC 2025 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add patch emacs-29.4-boo1234673.patch
|
||||
* Avoid that Emacs recompiles some packages on every startup (boo#1234673)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 13 14:42:16 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
|
14
emacs.spec
14
emacs.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package emacs
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -218,6 +218,7 @@ Patch25: emacs-26.1-xft4x11.patch
|
||||
Patch26: emacs-27.1-pdftex.patch
|
||||
Patch29: emacs-27.1-Xauthority4server.patch
|
||||
Patch30: emacs-CVE-2024-53920.patch
|
||||
Patch31: emacs-29.4-boo1234673.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{expand: %%global include_info %(test -s /usr/share/info/info.info* && echo 0 || echo 1)}
|
||||
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
|
||||
@ -325,7 +326,7 @@ Summary: Info files for GNU Emacs
|
||||
Group: Documentation/Other
|
||||
%if 0%{?suse_version} <= 1500
|
||||
Requires(post): %install_info_prereq
|
||||
Requires(preun):%install_info_prereq
|
||||
Requires(preun): %install_info_prereq
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
|
||||
@ -353,7 +354,7 @@ group called "games".
|
||||
Summary: Generate Tag Files for Use with Emacs
|
||||
Group: Development/Tools/Navigators
|
||||
Requires(post): coreutils update-alternatives
|
||||
Requires(preun):coreutils update-alternatives
|
||||
Requires(preun): coreutils update-alternatives
|
||||
Provides: ctags:/usr/bin/etags
|
||||
|
||||
%description -n etags
|
||||
@ -381,6 +382,7 @@ and most assembler-like syntaxes.
|
||||
%patch -P26 -p0 -b .fmt
|
||||
%patch -P29 -p0 -b .xauth
|
||||
%patch -P30 -p0 -b .cve202453920
|
||||
%patch -P31 -p0 -b .boo1234673
|
||||
%patch -P0 -p0 -b .0
|
||||
%if %{without tex4pdf}
|
||||
pushd etc/refcards/
|
||||
@ -755,6 +757,7 @@ rm -vf %{buildroot}%{_datadir}/emacs/%{version}/lisp/server.el.xauth
|
||||
rm -vf %{buildroot}%{_datadir}/emacs/%{version}/lisp/htmlfontify.el.cve202248339
|
||||
rm -vf %{buildroot}%{_datadir}/emacs/%{version}/lisp/progmodes/elisp-mode.el.el.cve202453920
|
||||
rm -vf %{buildroot}%{_datadir}/emacs/%{version}/lisp/progmodes/ruby-mode.el.cve202248338
|
||||
rm -vf %{buildroot}%{_datadir}/emacs/%{version}/lisp/emacs-lisp/comp.el.boo1234673
|
||||
rm -vf %{buildroot}%{_datadir}/emacs/%{version}/etc/emacsclient-mail.desktop.cve202327985
|
||||
rm -vf %{buildroot}%{_datadir}/emacs/%{version}/etc/emacsclient-mail.desktop.cve202327986
|
||||
rm -vf %{buildroot}%{_datadir}/emacs/%{version}/etc/emacsclient.desktop.cve202327985
|
||||
@ -869,7 +872,10 @@ export AR=gcc-ar-13
|
||||
export RANLIB=gcc-ranlib-13
|
||||
%endif
|
||||
%endif
|
||||
make check
|
||||
sed -ri '/sleep 2/{ s/sleep 2/sleep 6/ }' test/lisp/eshell/eshell-tests.el
|
||||
sed -ri '/\(sleep-for/{ s/1/5/ }' test/lisp/net/network-stream-tests.el
|
||||
export MAKEFLAGS="--jobs=1"
|
||||
make -k check
|
||||
%endif
|
||||
|
||||
%if %{with games} && "%{gattr}" == "02755"
|
||||
|
Loading…
Reference in New Issue
Block a user