From 0588f11f7091b596fef366d45f35a40b0b3e1e91 Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: May 30 2018 11:25:38 +0000 Subject: emacs-26.1 is available (#1583433) Resolves: #1583433 --- diff --git a/emacs-pdf-default.patch b/emacs-pdf-default.patch deleted file mode 100644 index 9d112c0..0000000 --- a/emacs-pdf-default.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lisp/org/org.el b/lisp/org/org.el -index 2b5603c..52545d0 100644 ---- a/lisp/org/org.el -+++ b/lisp/org/org.el -@@ -1963,7 +1963,7 @@ See `org-file-apps'.") - '((auto-mode . emacs) - ("\\.mm\\'" . default) - ("\\.x?html?\\'" . default) -- ("\\.pdf\\'" . default)) -+ ("\\.pdf\\'" . xdg-open)) - "External applications for opening `file:path' items in a document. - Org-mode uses system defaults for different file types, but - you can use this variable to set the application for a given file diff --git a/emacs-spellchecker.patch b/emacs-spellchecker.patch index 24e1d3c..48c2b57 100644 --- a/emacs-spellchecker.patch +++ b/emacs-spellchecker.patch @@ -2,9 +2,9 @@ diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 1d28de7..1daec44 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el -@@ -351,9 +351,9 @@ Must be greater than 1." - :group 'ispell) - +@@ -200,9 +200,9 @@ + ;; 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") + (or (executable-find "hunspell") diff --git a/emacs-system-crypto-policies.patch b/emacs-system-crypto-policies.patch index 27c2357..2f2435c 100644 --- a/emacs-system-crypto-policies.patch +++ b/emacs-system-crypto-policies.patch @@ -1,10 +1,11 @@ --- a/src/gnutls.c 2016-01-24 10:29:58.000000000 +0100 +++ b/src/gnutls.c 2016-02-02 09:32:28.477274274 +0100 -@@ -1218,7 +1218,7 @@ one trustfile (usually a CA bundle). */ +@@ -1557,7 +1557,7 @@ gnutls_certificate_credentials_t x509_cred = NULL; gnutls_anon_client_credentials_t anon_cred = NULL; Lisp_Object global_init; - char const *priority_string_ptr = "NORMAL"; /* default priority string. */ + char const *priority_string_ptr = "@SYSTEM"; /* default priority string. */ - unsigned int peer_verification; char *c_hostname; + + /* Placeholders for the property list elements. */ diff --git a/emacs-xft-color-font-crash.patch b/emacs-xft-color-font-crash.patch deleted file mode 100644 index 7d8051a..0000000 --- a/emacs-xft-color-font-crash.patch +++ /dev/null @@ -1,48 +0,0 @@ -commit 408bf21a8c8b5bf5a78785608255463ad1038871 -Author: Robert Pluim -Date: Tue Apr 3 11:06:01 2018 +0200 - - Ignore color fonts when using Xft - - * src/font.c (syms_of_font): New configuration variable - xft-ignore-color-fonts, default t. - * src/ftfont.c (ftfont_spec_pattern): Tell fontconfig to ignore - color fonts if xft-ignore-color-fonts is t. (Bug#30874, Bug#30045) - * etc/NEWS: Document xft-ignore-color-fonts. - -diff --git a/src/font.c b/src/font.c -index a6d3f5d479..ef3f92b594 100644 ---- a/src/font.c -+++ b/src/font.c -@@ -5473,6 +5473,13 @@ Disabling compaction of font caches might enlarge the Emacs memory - footprint in sessions that use lots of different fonts. */); - inhibit_compacting_font_caches = 0; - -+ DEFVAR_BOOL ("xft-ignore-color-fonts", -+ Vxft_ignore_color_fonts, -+ doc: /* -+Non-nil means don't query fontconfig for color fonts, since they often -+cause Xft crashes. Only has an effect in Xft builds. */); -+ Vxft_ignore_color_fonts = 1; -+ - #ifdef HAVE_WINDOW_SYSTEM - #ifdef HAVE_FREETYPE - syms_of_ftfont (); -diff --git a/src/ftfont.c b/src/ftfont.c -index c2e093e633..24a92dd52e 100644 ---- a/src/ftfont.c -+++ b/src/ftfont.c -@@ -764,6 +764,13 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots - if (scalable >= 0 - && ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcFalse)) - goto err; -+#ifdef HAVE_XFT -+ /* We really don't like color fonts, they cause Xft crashes. See -+ Bug#30874. */ -+ if (Vxft_ignore_color_fonts -+ && ! FcPatternAddBool(pattern, FC_COLOR, FcFalse)) -+ goto err; -+#endif - - goto finish; - diff --git a/emacs-xwidget.patch b/emacs-xwidget.patch deleted file mode 100644 index 6601edd..0000000 --- a/emacs-xwidget.patch +++ /dev/null @@ -1,303 +0,0 @@ -commit d781662873f228b110a128f7a2b6583a4d5e0a3a -Author: Ricardo Wurmus -Date: Tue Oct 25 23:00:35 2016 -0700 - - xwidget: Use WebKit2 API - - * configure.ac: Check for webkit2gtk-4.0. - * src/xwidget.c: Adjust to use WebKit2 API. - * lisp/xwidget.el (xwidget-webkit-callback): Adjust matches for - `xwidget-event-type'. - -diff --git a/configure.ac b/configure.ac -index 998ff52..46fd434 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2630,8 +2630,8 @@ if test "$with_xwidgets" != "no"; then - test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none" || - AC_MSG_ERROR([xwidgets requested but gtk3 not used.]) - -- WEBKIT_REQUIRED=1.4.0 -- WEBKIT_MODULES="webkitgtk-3.0 >= $WEBKIT_REQUIRED" -+ WEBKIT_REQUIRED=2.12 -+ WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED" - EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES]) - HAVE_XWIDGETS=$HAVE_WEBKIT - test $HAVE_XWIDGETS = yes || -diff --git a/lisp/xwidget.el b/lisp/xwidget.el -index 7a0ca8b..1bae6bb 100644 ---- a/lisp/xwidget.el -+++ b/lisp/xwidget.el -@@ -187,7 +187,7 @@ XWIDGET instance, XWIDGET-EVENT-TYPE depends on the originating xwidget." - "error: callback called for xwidget with dead buffer") - (with-current-buffer (xwidget-buffer xwidget) - (let* ((strarg (nth 3 last-input-event))) -- (cond ((eq xwidget-event-type 'document-load-finished) -+ (cond ((eq xwidget-event-type 'load-changed) - (xwidget-log "webkit finished loading: '%s'" - (xwidget-webkit-get-title xwidget)) - ;;TODO - check the native/internal scroll -@@ -196,8 +196,7 @@ XWIDGET instance, XWIDGET-EVENT-TYPE depends on the originating xwidget." - (rename-buffer (format "*xwidget webkit: %s *" - (xwidget-webkit-get-title xwidget))) - (pop-to-buffer (current-buffer))) -- ((eq xwidget-event-type -- 'navigation-policy-decision-requested) -+ ((eq xwidget-event-type 'decide-policy) - (if (string-match ".*#\\(.*\\)" strarg) - (xwidget-webkit-show-id-or-named-element - xwidget -diff --git a/src/xwidget.c b/src/xwidget.c -index f5f4da0..78349a8 100644 ---- a/src/xwidget.c -+++ b/src/xwidget.c -@@ -98,13 +98,7 @@ along with GNU Emacs. If not, see - --#include --#include --#include --#include --#include --#include --#include -+#include - - static struct xwidget * - allocate_xwidget (void) -@@ -50,34 +47,16 @@ allocate_xwidget_view (void) - - static struct xwidget_view *xwidget_view_lookup (struct xwidget *, - struct window *); --static void webkit_document_load_finished_cb (WebKitWebView *, WebKitWebFrame *, -- gpointer); --static gboolean webkit_download_cb (WebKitWebView *, WebKitDownload *, gpointer); -+static void webkit_view_load_changed_cb (WebKitWebView *, -+ WebKitLoadEvent, -+ gpointer); -+static gboolean webkit_download_cb (WebKitWebContext *, WebKitDownload *, gpointer); - - static gboolean --webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *, -- WebKitWebFrame *, -- WebKitNetworkRequest *, -- gchar *, -- WebKitWebPolicyDecision *, -- gpointer); -- --static gboolean --webkit_new_window_policy_decision_requested_cb (WebKitWebView *, -- WebKitWebFrame *, -- WebKitNetworkRequest *, -- WebKitWebNavigationAction *, -- WebKitWebPolicyDecision *, -- gpointer); -- --static gboolean --webkit_navigation_policy_decision_requested_cb (WebKitWebView *, -- WebKitWebFrame *, -- WebKitNetworkRequest *, -- WebKitWebNavigationAction *, -- WebKitWebPolicyDecision *, -- gpointer); -- -+webkit_decide_policy_cb (WebKitWebView *, -+ WebKitPolicyDecision *, -+ WebKitPolicyDecisionType, -+ gpointer); - - - DEFUN ("make-xwidget", -@@ -168,29 +147,17 @@ Returns the newly constructed xwidget, or nil if construction fails. */) - if (EQ (xw->type, Qwebkit)) - { - g_signal_connect (G_OBJECT (xw->widget_osr), -- "document-load-finished", -- G_CALLBACK (webkit_document_load_finished_cb), xw); -+ "load-changed", -+ G_CALLBACK (webkit_view_load_changed_cb), xw); - -- g_signal_connect (G_OBJECT (xw->widget_osr), -- "download-requested", -+ g_signal_connect (G_OBJECT (webkit_web_context_get_default ()), -+ "download-started", - G_CALLBACK (webkit_download_cb), xw); - - g_signal_connect (G_OBJECT (xw->widget_osr), -- "mime-type-policy-decision-requested", -- G_CALLBACK -- (webkit_mime_type_policy_typedecision_requested_cb), -- xw); -- -- g_signal_connect (G_OBJECT (xw->widget_osr), -- "new-window-policy-decision-requested", -- G_CALLBACK -- (webkit_new_window_policy_decision_requested_cb), -- xw); -- -- g_signal_connect (G_OBJECT (xw->widget_osr), -- "navigation-policy-decision-requested", -+ "decide-policy", - G_CALLBACK -- (webkit_navigation_policy_decision_requested_cb), -+ (webkit_decide_policy_cb), - xw); - } - -@@ -284,81 +251,83 @@ store_xwidget_event_string (struct xwidget *xw, const char *eventname, - kbd_buffer_store_event (&event); - } - --/* TODO deprecated, use load-status. */ - void --webkit_document_load_finished_cb (WebKitWebView *webkitwebview, -- WebKitWebFrame *arg1, -- gpointer data) -+webkit_view_load_changed_cb (WebKitWebView *webkitwebview, -+ WebKitLoadEvent load_event, -+ gpointer data) - { -- struct xwidget *xw = g_object_get_data (G_OBJECT (webkitwebview), -- XG_XWIDGET); -- -- store_xwidget_event_string (xw, "document-load-finished", ""); -+ switch (load_event) { -+ case WEBKIT_LOAD_FINISHED: -+ { -+ struct xwidget *xw = g_object_get_data (G_OBJECT (webkitwebview), -+ XG_XWIDGET); -+ store_xwidget_event_string (xw, "load-changed", ""); -+ break; -+ } -+ default: -+ break; -+ } - } - - gboolean --webkit_download_cb (WebKitWebView *webkitwebview, -+webkit_download_cb (WebKitWebContext *webkitwebcontext, - WebKitDownload *arg1, - gpointer data) - { -- struct xwidget *xw = g_object_get_data (G_OBJECT (webkitwebview), -+ WebKitWebView *view = webkit_download_get_web_view(arg1); -+ WebKitURIRequest *request = webkit_download_get_request(arg1); -+ struct xwidget *xw = g_object_get_data (G_OBJECT (view), - XG_XWIDGET); -- store_xwidget_event_string (xw, "download-requested", -- webkit_download_get_uri (arg1)); -+ -+ store_xwidget_event_string (xw, "download-started", -+ webkit_uri_request_get_uri(request)); - return FALSE; - } - - static gboolean --webkit_mime_type_policy_typedecision_requested_cb (WebKitWebView *webView, -- WebKitWebFrame *frame, -- WebKitNetworkRequest *request, -- gchar *mimetype, -- WebKitWebPolicyDecision *policy_decision, -- gpointer user_data) -+webkit_decide_policy_cb (WebKitWebView *webView, -+ WebKitPolicyDecision *decision, -+ WebKitPolicyDecisionType type, -+ gpointer user_data) - { -- /* This function makes webkit send a download signal for all unknown -- mime types. TODO: Defer the decision to Lisp, so that it's -- possible to make Emacs handle mime text for instance. */ -- if (!webkit_web_view_can_show_mime_type (webView, mimetype)) -+ switch (type) { -+ case WEBKIT_POLICY_DECISION_TYPE_RESPONSE: -+ /* This function makes webkit send a download signal for all unknown -+ mime types. TODO: Defer the decision to Lisp, so that it's -+ possible to make Emacs handle mime text for instance. */ - { -- webkit_web_policy_decision_download (policy_decision); -- return TRUE; -+ WebKitResponsePolicyDecision *response = -+ WEBKIT_RESPONSE_POLICY_DECISION (decision); -+ if (!webkit_response_policy_decision_is_mime_type_supported (response)) -+ { -+ webkit_policy_decision_download (decision); -+ return TRUE; -+ } -+ else -+ return FALSE; -+ break; - } -- else -+ case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: -+ case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: -+ { -+ WebKitNavigationPolicyDecision *navigation_decision = -+ WEBKIT_NAVIGATION_POLICY_DECISION (decision); -+ WebKitNavigationAction *navigation_action = -+ webkit_navigation_policy_decision_get_navigation_action (navigation_decision); -+ WebKitURIRequest *request = -+ webkit_navigation_action_get_request (navigation_action); -+ -+ struct xwidget *xw = g_object_get_data (G_OBJECT (webView), XG_XWIDGET); -+ store_xwidget_event_string (xw, "decide-policy", -+ webkit_uri_request_get_uri (request)); -+ return FALSE; -+ break; -+ } -+ default: - return FALSE; -+ } - } - --static gboolean --webkit_new_window_policy_decision_requested_cb (WebKitWebView *webView, -- WebKitWebFrame *frame, -- WebKitNetworkRequest *request, -- WebKitWebNavigationAction *navigation_action, -- WebKitWebPolicyDecision *policy_decision, -- gpointer user_data) --{ -- struct xwidget *xw = g_object_get_data (G_OBJECT (webView), XG_XWIDGET); -- webkit_web_navigation_action_get_original_uri (navigation_action); -- -- store_xwidget_event_string (xw, "new-window-policy-decision-requested", -- webkit_web_navigation_action_get_original_uri -- (navigation_action)); -- return FALSE; --} -- --static gboolean --webkit_navigation_policy_decision_requested_cb (WebKitWebView *webView, -- WebKitWebFrame *frame, -- WebKitNetworkRequest *request, -- WebKitWebNavigationAction *navigation_action, -- WebKitWebPolicyDecision *policy_decision, -- gpointer user_data) --{ -- struct xwidget *xw = g_object_get_data (G_OBJECT (webView), XG_XWIDGET); -- store_xwidget_event_string (xw, "navigation-policy-decision-requested", -- webkit_web_navigation_action_get_original_uri -- (navigation_action)); -- return FALSE; --} - - /* For gtk3 offscreen rendered widgets. */ - static gboolean -@@ -599,8 +568,13 @@ DEFUN ("xwidget-webkit-execute-script", - { - WEBKIT_FN_INIT (); - CHECK_STRING (script); -- webkit_web_view_execute_script (WEBKIT_WEB_VIEW (xw->widget_osr), -- SSDATA (script)); -+ // TODO: provide callback function to do something with the return -+ // value! This allows us to get rid of the title hack. -+ webkit_web_view_run_javascript (WEBKIT_WEB_VIEW (xw->widget_osr), -+ SSDATA (script), -+ NULL, /*cancellable*/ -+ NULL, /*callback*/ -+ NULL /*user data*/); - return Qnil; - } - diff --git a/emacs.spec b/emacs.spec index 2734994..ed7a1d1 100644 --- a/emacs.spec +++ b/emacs.spec @@ -4,8 +4,8 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 -Version: 25.3 -Release: 9%{?dist} +Version: 26.1 +Release: 1%{?dist} License: GPLv3+ and CC0-1.0 URL: http://www.gnu.org/software/emacs/ Group: Applications/Editors @@ -21,14 +21,7 @@ Source8: emacs.service Source9: %{name}.appdata.xml # rhbz#713600 Patch1: emacs-spellchecker.patch - -# Fix for default PDF viewer bug #971162 -Patch2: emacs-pdf-default.patch -Patch3: emacs-system-crypto-policies.patch -# http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d781662873f228b110a128f7a2b6583a4d5e0a3a -Patch4: emacs-xwidget.patch -# https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=408bf21a8c8b5bf5a78785608255463ad1038871 -Patch5: emacs-xft-color-font-crash.patch +Patch2: emacs-system-crypto-policies.patch BuildRequires: atk-devel BuildRequires: cairo-devel @@ -190,10 +183,7 @@ packages that add functionality to Emacs. %setup -q %patch1 -p1 -b .spellchecker -%patch2 -p1 -b .pdf-default.patch -%patch3 -p1 -b .system-crypto-policies -%patch4 -p1 -%patch5 -p1 +%patch2 -p1 -b .system-crypto-policies autoconf # We prefer our emacs.desktop file @@ -356,11 +346,12 @@ install -p -m 755 %SOURCE7 %{buildroot}%{_bindir}/emacs-terminal # After everything is installed, remove info dir rm -f %{buildroot}%{_infodir}/dir -rm %{buildroot}%{_localstatedir}/games/emacs/* # Installing service file mkdir -p %{buildroot}%{_userunitdir} install -p -m 0644 %SOURCE8 %{buildroot}%{_userunitdir}/emacs.service +# Emacs 26.1 installs the upstream unit file to /usr/lib64 on 64bit archs, we don't want that +rm -f %{buildroot}/usr/lib64/systemd/user/emacs.service # Install desktop files mkdir -p %{buildroot}%{_datadir}/applications @@ -484,6 +475,9 @@ fi %dir %{_datadir}/emacs/site-lisp/site-start.d %changelog +* Wed May 30 2018 Jan Synáček - 1:26.1-1 +- emacs-26.1 is available (#1583433) + * Wed Apr 4 2018 Jan Synáček - 1:25.3-9 - Emacs crashes when loading color fonts (#1519038)