From 79be47dd2beb6bd31b1547f56d3b032ddad70b09 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2018 05:16:25 +0000 Subject: import gtk-doc-1.28-2.el7 --- diff --git a/.gitignore b/.gitignore index 8b551b9..00f8260 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/gtk-doc-1.25.tar.xz +SOURCES/gtk-doc-1.28.tar.xz diff --git a/.gtk-doc.metadata b/.gtk-doc.metadata index 4620397..254b1ab 100644 --- a/.gtk-doc.metadata +++ b/.gtk-doc.metadata @@ -1 +1 @@ -bd93ff19403805b4faddcd86b58a6f338ce1fd6d SOURCES/gtk-doc-1.25.tar.xz +f48311fd3def5b393ebb32d5480a61ec6dfd2809 SOURCES/gtk-doc-1.28.tar.xz diff --git a/SOURCES/0001-Fix-a-missed-variable-rename-in-ScanDirectory-caused.patch b/SOURCES/0001-Fix-a-missed-variable-rename-in-ScanDirectory-caused.patch new file mode 100644 index 0000000..0f50acb --- /dev/null +++ b/SOURCES/0001-Fix-a-missed-variable-rename-in-ScanDirectory-caused.patch @@ -0,0 +1,33 @@ +From 203785526af7308a799401c0b037db409269119c Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 10 May 2018 11:00:17 -0700 +Subject: [PATCH 1/2] Fix a missed variable rename in ScanDirectory (caused a + crash) + +halfline ran into gtk-doc crashing when he was trying to cut an +accountsservice release; looking into it we found that the first +arg to ScanDirectory was renamed from `dir` to `scan_dir` in +9292e0a (to avoid overriding a builtin, I guess) but this one +reference to it was not changed. This should fix it. + +Signed-off-by: Adam Williamson +--- + gtkdoc/rebase.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gtkdoc/rebase.py b/gtkdoc/rebase.py +index 424c3e6..2a1d495 100755 +--- a/gtkdoc/rebase.py ++++ b/gtkdoc/rebase.py +@@ -108,7 +108,7 @@ def ScanDirectory(scan_dir, options): + + if onlinedir and entry == "index.sgml": + log(options, "Reading index from index.sgml") +- onlinedir = ReadIndex(dir, entry) ++ onlinedir = ReadIndex(scan_dir, entry) + have_index = True + elif entry == "index.sgml.gz" and not os.path.exists(os.path.join(scan_dir, 'index.sgml')): + # debian/ubuntu started to compress this as index.sgml.gz :/ +-- +2.17.0 + diff --git a/SOURCES/0002-Replace-match.groups-1-with-match.group-1.patch b/SOURCES/0002-Replace-match.groups-1-with-match.group-1.patch new file mode 100644 index 0000000..e0eb7c9 --- /dev/null +++ b/SOURCES/0002-Replace-match.groups-1-with-match.group-1.patch @@ -0,0 +1,64 @@ +From 43fac1c26c9c6bdede2d32b5243e74636bda8a98 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 10 May 2018 11:08:02 -0700 +Subject: [PATCH 2/2] Replace `match.groups(1)` with `match.group(1)` + +halfline ran into a crash in gtk-doc when trying to cut an +accountsservice release, a TypeError pointing to this re.sub +call. Looking at it, the use of `match.groups(1)` is clearly +wrong. `match.groups()` returns a tuple consisting of *all* +the match subgroups; the argument it takes is the value to use +for subgroups which didn't capture anything (the default being +None). What the code here clearly actually *wants* is not that +tuple, but the contents of the first match subgroup only, as a +string. To get that you do `match.group(1)`. So, let's fix that. + +There are two other occurrences of the same error later in the +file, so let's fix that too. If I'm reading it correctly, those +ones wouldn't have caused crashes, they would only cause the +block they're in not to work properly and produce "Can't +determine package for '(something)'" log messages even when it +should have worked (because 'package' will be the tuple, not the +subgroup, and will never be 'in' `OnlineMap` or `LocalMap`). + +Note, these have been lying around for a long time, but the one +that causes the crash was not hit until 1.28, because of the +regex error fixed by b77d97b. Until that regex was fixed, +ReadDevhelp never worked on this codebase, so we never hit the +bug in ReadIndex. The crash might have happened with some other +codebase for which the ReadDevhelp regex *did* work, though. + +Signed-off-by: Adam Williamson +--- + gtkdoc/rebase.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gtkdoc/rebase.py b/gtkdoc/rebase.py +index 2a1d495..4b0266c 100755 +--- a/gtkdoc/rebase.py ++++ b/gtkdoc/rebase.py +@@ -154,7 +154,7 @@ def ReadIndex(dir, file): + match = re.match(r'''^''', line) + if match: + # Remove trailing non-directory component. +- onlinedir = re.sub(r'''(.*/).*''', r'\1', match.groups(1)) ++ onlinedir = re.sub(r'''(.*/).*''', r'\1', match.group(1)) + return onlinedir + + +@@ -226,10 +226,10 @@ def RebaseLink(href, options): + else: + match = re.match(r'\.\./([^/]+)', href) + if match is not None: +- package = match.groups(1) ++ package = match.group(1) + elif options.aggressive: + match = re.search(r'''([^/]+)/$''', href) +- package = match.groups(1) ++ package = match.group(1) + + if package: + if options.online and package in OnlineMap: +-- +2.17.0 + diff --git a/SOURCES/filter-requires-gtk-doc.sh b/SOURCES/filter-requires-gtk-doc.sh deleted file mode 100755 index 3787dbb..0000000 --- a/SOURCES/filter-requires-gtk-doc.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/usr/lib/rpm/perl.req $* | grep -v 'perl(gtkdoc-common.pl)' diff --git a/SPECS/gtk-doc.spec b/SPECS/gtk-doc.spec index 1d55ecd..b401b4e 100644 --- a/SPECS/gtk-doc.spec +++ b/SPECS/gtk-doc.spec @@ -1,52 +1,42 @@ %global debug_package %{nil} Name: gtk-doc -Version: 1.25 -Release: 1%{?dist} +Version: 1.28 +Release: 2%{?dist} Summary: API documentation generation tool for GTK+ and GNOME License: GPLv2+ and GFDL URL: http://www.gtk.org/gtk-doc -Source: http://download.gnome.org/sources/gtk-doc/1.25/gtk-doc-%{version}.tar.xz - +Source0: http://download.gnome.org/sources/gtk-doc/1.28/gtk-doc-%{version}.tar.xz +# Fix a crasher bug caused by mismatched variable name: +# https://bugzilla.gnome.org/show_bug.cgi?id=796011 +Patch0: 0001-Fix-a-missed-variable-rename-in-ScanDirectory-caused.patch +# Fix another crasher bug caused by wrong use of re groups: +# https://bugzilla.gnome.org/show_bug.cgi?id=796012 +Patch1: 0002-Replace-match.groups-1-with-match.group-1.patch + +BuildRequires: dblatex BuildRequires: docbook-utils -BuildRequires: jade BuildRequires: /usr/bin/xsltproc BuildRequires: docbook-style-xsl -%if 0%{?fedora} -BuildRequires: perl-generators -%endif -BuildRequires: perl-Test-Simple BuildRequires: python2-devel -BuildRequires: gnome-doc-utils +BuildRequires: python-six BuildRequires: gettext BuildRequires: source-highlight BuildRequires: yelp-tools # Following are not automatically installed -Requires: docbook-utils openjade /usr/bin/xsltproc docbook-style-xsl -# we are installing an automake macro -Requires: automake -# we are installing an sgml catalog -Requires: sgml-common +Requires: docbook-utils /usr/bin/xsltproc docbook-style-xsl +Requires: python-six Requires: source-highlight -Source1: filter-requires-gtk-doc.sh -%define __perl_requires %{SOURCE1} - %description gtk-doc is a tool for generating API reference documentation. It is used for generating the documentation for GTK+, GLib and GNOME. %prep -%setup -q - -%if 0%{?rhel} == 7 -# Lower unnecessarily high perl requirement -# https://bugzilla.gnome.org/show_bug.cgi?id=773151 -sed -i -e 's/require v5\.18\.0/require v5.16.0/' configure -%endif +%autosetup -p1 # Move this doc file to avoid name collisions mv doc/README doc/README.docs @@ -58,23 +48,29 @@ make %{?_smp_mflags} %install %make_install -mkdir -p $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html - %check -make check +# For reasons unknown first make check fails with texlive debug spew in log +# files. Just run it twice to work this around. +make check || make check %files %license COPYING COPYING-DOCS %doc AUTHORS README doc/* examples %{_bindir}/* -%{_datadir}/aclocal/gtk-doc.m4 +%{_datadir}/aclocal/ %{_datadir}/gtk-doc/ -%{_datadir}/sgml/gtk-doc/ %{_datadir}/pkgconfig/gtk-doc.pc %{_datadir}/help/*/gtk-doc-manual/ %{_libdir}/cmake/ %changelog +* Thu May 10 2018 Adam Williamson - 1.28-2 +- Fix a couple of crasher bugs encountered by halfline (BGO#79601{1,2)) + +* Sat Mar 24 2018 Kalev Lember - 1.28-1 +- Update to 1.28 +- Resolves: #1569971 + * Tue Mar 22 2016 Kalev Lember - 1.25-1 - Update to 1.25 - Resolves: #1386981