Revert the offending commit to avoid RHBZ #1689037

This commit is contained in:
Adam Williamson 2019-07-12 15:09:09 -07:00
parent 2e8e66c09e
commit 68feab389f
2 changed files with 76 additions and 2 deletions

View File

@ -0,0 +1,61 @@
From b806a5491c0a0fec021844f85fb880f34b480161 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Fri, 12 Jul 2019 14:21:15 -0700
Subject: [PATCH] Revert e4e74c2751
To confirm it 'fixes' #1829 / RHBZ#1689037
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
src/hb-graphite2.cc | 28 +---------------------------
1 file changed, 1 insertion(+), 27 deletions(-)
diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc
index 9588fa4d..40ac9061 100644
--- a/src/hb-graphite2.cc
+++ b/src/hb-graphite2.cc
@@ -106,32 +106,6 @@ retry:
return d;
}
-static void hb_graphite2_release_table(const void *data, const void *table_buffer)
-{
- hb_graphite2_face_data_t *face_data = (hb_graphite2_face_data_t *) data;
- hb_graphite2_tablelist_t *tlist = face_data->tlist;
-
- hb_graphite2_tablelist_t *prev = nullptr;
- hb_graphite2_tablelist_t *curr = tlist;
- while (curr)
- {
- if (hb_blob_get_data(curr->blob, nullptr) == table_buffer)
- {
- if (prev == nullptr)
- face_data->tlist.cmpexch(tlist, curr->next);
- else
- prev->next = curr->next;
- hb_blob_destroy(curr->blob);
- free(curr);
- break;
- }
- prev = curr;
- curr = curr->next;
- }
-}
-
-static gr_face_ops hb_graphite2_face_ops = { sizeof(gr_face_ops), hb_graphite2_get_table, hb_graphite2_release_table };
-
hb_graphite2_face_data_t *
_hb_graphite2_shaper_face_data_create (hb_face_t *face)
{
@@ -150,7 +124,7 @@ _hb_graphite2_shaper_face_data_create (hb_face_t *face)
return nullptr;
data->face = face;
- data->grface = gr_make_face_with_ops (data, &hb_graphite2_face_ops, gr_face_preloadAll);
+ data->grface = gr_make_face (data, &hb_graphite2_get_table, gr_face_preloadAll);
if (unlikely (!data->grface)) {
free (data);
--
2.22.0

View File

@ -1,11 +1,21 @@
Name: harfbuzz
Version: 2.5.3
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Text shaping library
License: MIT
URL: http://freedesktop.org/wiki/Software/HarfBuzz
Source0: http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-%{version}.tar.xz
# https://bugzilla.redhat.com/show_bug.cgi?id=1689037
# https://github.com/harfbuzz/harfbuzz/issues/1829
# Hand-revert the commit that causes the above bug. This means we're
# using a deprecated graphite API, but it also means anaconda doesn't
# just suddenly die right after startup occasionally. Drop this when
# upstream has a proper fix. The function used here was marked
# deprecated in 1.3.12; as of 2019-07 Rawhide is on 1.3.10, if it gets
# to 1.3.12 while this patch is still in place, we may need to pass
# -Wno-deprecated-declarations for build to work
Patch0: 0001-Revert-e4e74c2751.patch
BuildRequires: cairo-devel
BuildRequires: freetype-devel
@ -36,7 +46,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains Harfbuzz ICU support library.
%prep
%autosetup
%autosetup -p1
%build
@ -84,6 +94,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{_libdir}/libharfbuzz-icu.so.*
%changelog
* Fri Jul 12 2019 Adam Williamson <awilliam@redhat.com> - 2.5.3-2
- Revert the offending commit to avoid RHBZ #1689037
* Thu Jun 27 2019 Parag Nemade <pnemade AT redhat DOT com> - 2.5.3-1
- Update to 2.5.3 version (#1724317)