diff --git a/.devhelp.metadata b/.devhelp.metadata index 8b994a1..1f86538 100644 --- a/.devhelp.metadata +++ b/.devhelp.metadata @@ -1 +1 @@ -e25a93f80a818bcc53a3befece9a17a5498df98b SOURCES/devhelp-3.8.2.tar.xz +f369c063c83437f504373d34c0e4ca42fb93bfe5 SOURCES/devhelp-3.14.0.tar.xz diff --git a/.gitignore b/.gitignore index 0171a85..b1b018a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/devhelp-3.8.2.tar.xz +SOURCES/devhelp-3.14.0.tar.xz diff --git a/SOURCES/devhelp-3.14.0-python2.patch b/SOURCES/devhelp-3.14.0-python2.patch new file mode 100644 index 0000000..5a16c2e --- /dev/null +++ b/SOURCES/devhelp-3.14.0-python2.patch @@ -0,0 +1,21 @@ +diff -up devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.in.python2 devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.in +--- devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.in.python2 2016-04-11 10:42:43.761181264 -0400 ++++ devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.in 2016-04-11 10:43:05.676213069 -0400 +@@ -1,5 +1,5 @@ + [Plugin] +-Loader=python3 ++Loader=python + Module=devhelp + IAge=3 + _Name=Devhelp support +diff -up devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop.python2 devhelp-3.14.0/misc/gedit-plugin/devhelp.desktop +diff -up devhelp-3.14.0/misc/gedit-plugin/devhelp.plugin.python2 devhelp-3.14.0/misc/gedit-plugin/devhelp.plugin +--- devhelp-3.14.0/misc/gedit-plugin/devhelp.plugin.python2 2016-04-11 10:42:50.634191239 -0400 ++++ devhelp-3.14.0/misc/gedit-plugin/devhelp.plugin 2016-04-11 10:43:17.006229512 -0400 +@@ -1,5 +1,5 @@ + [Plugin] +-Loader=python3 ++Loader=python + Module=devhelp + IAge=3 + Name=Devhelp support diff --git a/SOURCES/devhelp-3.8.2-python2.patch b/SOURCES/devhelp-3.8.2-python2.patch deleted file mode 100644 index f4dd27e..0000000 --- a/SOURCES/devhelp-3.8.2-python2.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up devhelp-3.8.2/misc/gedit-plugin/devhelp.desktop.in.python2 devhelp-3.8.2/misc/gedit-plugin/devhelp.desktop.in ---- devhelp-3.8.2/misc/gedit-plugin/devhelp.desktop.in.python2 2013-10-14 10:59:03.055271977 -0400 -+++ devhelp-3.8.2/misc/gedit-plugin/devhelp.desktop.in 2013-10-14 10:57:35.016035127 -0400 -@@ -1,5 +1,5 @@ - [Plugin] --Loader=python3 -+Loader=python - Module=devhelp - IAge=3 - _Name=Devhelp support -diff -up devhelp-3.8.2/misc/gedit-plugin/devhelp.desktop.python2 devhelp-3.8.2/misc/gedit-plugin/devhelp.desktop ---- devhelp-3.8.2/misc/gedit-plugin/devhelp.desktop.python2 2013-10-14 10:56:59.052955646 -0400 -+++ devhelp-3.8.2/misc/gedit-plugin/devhelp.desktop 2013-10-14 10:57:32.120176311 -0400 -@@ -1,5 +1,5 @@ - [Plugin] --Loader=python3 -+Loader=python - Module=devhelp - IAge=3 - Name=Devhelp support -diff -up devhelp-3.8.2/misc/gedit-plugin/devhelp.plugin.python2 devhelp-3.8.2/misc/gedit-plugin/devhelp.plugin ---- devhelp-3.8.2/misc/gedit-plugin/devhelp.plugin.python2 2013-10-14 10:57:16.577509343 -0400 -+++ devhelp-3.8.2/misc/gedit-plugin/devhelp.plugin 2013-10-14 10:58:02.394275280 -0400 -@@ -1,5 +1,5 @@ - [Plugin] --Loader=python3 -+Loader=python - Module=devhelp - IAge=3 - Name=Devhelp support diff --git a/SOURCES/devhelp-handle-empty-devhelp-files.patch b/SOURCES/devhelp-handle-empty-devhelp-files.patch new file mode 100644 index 0000000..8fd39c1 --- /dev/null +++ b/SOURCES/devhelp-handle-empty-devhelp-files.patch @@ -0,0 +1,113 @@ +From 0ad2461ede6002eab14b3becfd0bb4e5e00a3be1 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Tue, 6 Jan 2015 16:51:54 +0100 +Subject: [PATCH 1/2] Don't crash with empty .devhelp* files + +Call g_markup_parse_context_end_parse after we are done reading the +file to catch empty files among other things. This is the only method +that raises G_MARKUP_ERROR_EMPTY, so it is particularly necessary for +this case. + +It was necessary to remove parser_error_cb because we should not be +freeing the context inside it and dh_parser_free would have done it +for us anyway. The error callback is called from set_error_literal +inside g_markup_parse_context_end_parse, and invalidating the context +can lead to bad things. + +Construction of a DhBook instance can fail due to parsing errors, so +be careful about that. + +https://bugzilla.gnome.org/show_bug.cgi?id=742447 +--- + src/dh-book-manager.c | 2 ++ + src/dh-parser.c | 17 +++++------------ + 2 files changed, 7 insertions(+), 12 deletions(-) + +diff --git a/src/dh-book-manager.c b/src/dh-book-manager.c +index a8e1ad2..51110d2 100644 +--- a/src/dh-book-manager.c ++++ b/src/dh-book-manager.c +@@ -648,6 +648,8 @@ book_manager_add_from_filepath (DhBookManager *book_manager, + + /* Allocate new book struct */ + book = dh_book_new (book_path); ++ if (book == NULL) ++ return; + + /* Check if book with same path was already loaded in the manager */ + if (g_list_find_custom (priv->books, +diff --git a/src/dh-parser.c b/src/dh-parser.c +index 35d3179..469da8e 100644 +--- a/src/dh-parser.c ++++ b/src/dh-parser.c +@@ -468,17 +468,6 @@ parser_end_node_cb (GMarkupParseContext *context, + } + } + +-static void +-parser_error_cb (GMarkupParseContext *context, +- GError *error, +- gpointer user_data) +-{ +- DhParser *parser = user_data; +- +- g_markup_parse_context_free (parser->context); +- parser->context = NULL; +-} +- + static gboolean + parser_read_gz_file (DhParser *parser, + const gchar *path, +@@ -565,7 +554,6 @@ dh_parser_read_file (const gchar *path, + + parser->m_parser->start_element = parser_start_node_cb; + parser->m_parser->end_element = parser_end_node_cb; +- parser->m_parser->error = parser_error_cb; + + parser->context = g_markup_parse_context_new (parser->m_parser, 0, + parser, NULL); +@@ -614,6 +602,11 @@ dh_parser_read_file (const gchar *path, + goto exit; + } + } ++ ++ if (!g_markup_parse_context_end_parse (parser->context, error)) { ++ result = FALSE; ++ goto exit; ++ } + } + + exit: +-- +2.1.0 + + +From 6cf3b4a20bc08d9c8245a14ee6abdc60620c6531 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Tue, 20 Jan 2015 19:15:22 +0100 +Subject: [PATCH 2/2] Don't rely on the GError** passed by the caller + +https://bugzilla.gnome.org/show_bug.cgi?id=742447 +--- + src/dh-parser.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/dh-parser.c b/src/dh-parser.c +index 469da8e..3972f00 100644 +--- a/src/dh-parser.c ++++ b/src/dh-parser.c +@@ -595,9 +595,8 @@ dh_parser_read_file (const gchar *path, + if (io_status == G_IO_STATUS_EOF || io_status == G_IO_STATUS_ERROR) { + break; + } +- g_markup_parse_context_parse (parser->context, buf, +- bytes_read, error); +- if (error != NULL && *error != NULL) { ++ if (!g_markup_parse_context_parse (parser->context, buf, ++ bytes_read, error)) { + result = FALSE; + goto exit; + } +-- +2.1.0 + diff --git a/SPECS/devhelp.spec b/SPECS/devhelp.spec index 3d45135..636e3f5 100644 --- a/SPECS/devhelp.spec +++ b/SPECS/devhelp.spec @@ -1,17 +1,21 @@ ### Abstract ### Name: devhelp -Version: 3.8.2 -Release: 7%{?dist} +Version: 3.14.0 +Release: 2%{?dist} Epoch: 1 License: GPLv2+ Group: Development/Tools Summary: API documention browser URL: http://live.gnome.org/devhelp #VCS: git:git://git.gnome.org/devhelp -Source: http://download.gnome.org/sources/devhelp/3.8/devhelp-%{version}.tar.xz +Source: http://download.gnome.org/sources/devhelp/3.14/devhelp-%{version}.tar.xz -Patch0: devhelp-3.8.2-python2.patch +# https://bugzilla.gnome.org/show_bug.cgi?id=742447 +Patch0: devhelp-handle-empty-devhelp-files.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1235584 +Patch1: devhelp-3.14.0-python2.patch ### Dependencies ### @@ -20,12 +24,12 @@ Requires(postun): /usr/bin/gtk-update-icon-cache ### Build Dependencies ### +BuildRequires: chrpath BuildRequires: desktop-file-utils >= 0.3 BuildRequires: gettext BuildRequires: intltool BuildRequires: gtk3-devel BuildRequires: webkitgtk3-devel -BuildRequires: GConf2-devel %description Devhelp is an API documentation browser for the GNOME desktop. @@ -34,7 +38,7 @@ It works natively with API documentation generated by gtk-doc. %package devel Summary: Library to embed Devhelp in other applications Group: Development/Libraries -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} %description devel Devhelp is an API documentation browser for the GNOME desktop. @@ -43,7 +47,8 @@ into other applications such as IDEs. %prep %setup -q -%patch0 -p1 -b .python2 +%patch0 -p1 +%patch1 -p1 %build %configure --disable-static @@ -56,6 +61,8 @@ find ${RPM_BUILD_ROOT} -type f -name "*.la" -exec rm -f {} ';' mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books +chrpath --delete $RPM_BUILD_ROOT%{_bindir}/devhelp + %find_lang devhelp desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/devhelp.desktop @@ -84,6 +91,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_datadir}/applications/devhelp.desktop %{_datadir}/devhelp +%{_datadir}/appdata/devhelp.appdata.xml %{_datadir}/GConf/gsettings/devhelp.convert %{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml %{_datadir}/icons/hicolor/16x16/apps/devhelp.png @@ -103,6 +111,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %{_libdir}/pkgconfig/* %changelog +* Mon Apr 11 2016 Matthew Barnes - 3.14.0-2 +- Rebase to 3.14.0 (sync with f21) + Resolves: #1235584 + +* Fri Jun 26 2015 Matej Cepl - 3.8.2-8 +- Remove broken gedit plugin + Resolves: #1236016 + * Thu May 21 2015 Ray Strode - 1:3.8.2-7 - rebuild Resolves: #1221601 @@ -491,7 +507,7 @@ Bumped to consume new soname in webkit library. - Add builds for ia64 s390 s390x * Thu May 19 2005 Ray Strode 0.10.0-1 -- Update to 0.10.0 (bug #157753) +- Update to 0.10.0 (bug #157753) * Fri May 13 2005 Christopher Aillon 0.9.3-7 - Depend on mozilla 1.7.8 @@ -532,7 +548,7 @@ Bumped to consume new soname in webkit library. - Drop ppc from the build since mozilla doesn't build there anymore. * Wed Aug 25 2004 Christopher Aillon 0.9.1-3 -- Add Johan Svedberg's patch to add accelerators for back and forward +- Add Johan Svedberg's patch to add accelerators for back and forward * Mon Aug 09 2004 Christopher Aillon - Rebuild