diff --git a/SOURCES/0001-fix-building-with-json-glib-1.2.0.patch b/SOURCES/0001-fix-building-with-json-glib-1.2.0.patch deleted file mode 100644 index e2477ef..0000000 --- a/SOURCES/0001-fix-building-with-json-glib-1.2.0.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 9bd50802ae027422720b358eaea3c01f2a55ecab Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Thu, 5 Jan 2017 11:25:02 +0100 -Subject: [PATCH] fix building with json-glib < 1.2.0 - -Signed-off-by: Igor Gnatenko ---- - CMakeLists.txt | 2 +- - rhsm/rhsm-entitlement-certificate.c | 8 ++++++++ - rhsm/rhsm-utils.c | 4 ++++ - 3 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2eff0df..887cce2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -20,7 +20,7 @@ find_package (PkgConfig REQUIRED) - pkg_check_modules (GLIB REQUIRED glib-2.0>=2.44) - pkg_check_modules (GOBJECT REQUIRED gobject-2.0>=2.44) - pkg_check_modules (GIO REQUIRED gio-2.0>=2.44) --pkg_check_modules (JSON_GLIB REQUIRED json-glib-1.0>=1.2) -+pkg_check_modules (JSON_GLIB REQUIRED json-glib-1.0) - pkg_check_modules (OPENSSL REQUIRED openssl) - - add_subdirectory (rhsm) -diff --git a/rhsm/rhsm-entitlement-certificate.c b/rhsm/rhsm-entitlement-certificate.c -index 5d37732..23b3b2c 100644 ---- a/rhsm/rhsm-entitlement-certificate.c -+++ b/rhsm/rhsm-entitlement-certificate.c -@@ -20,6 +20,10 @@ - - #include - -+#if !JSON_CHECK_VERSION (1, 2, 0) -+G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonParser, g_object_unref) -+#endif -+ - /** - * SECTION:rhsm-entitlement-certificate - * @short_description: the entitlement certificate -@@ -147,7 +151,11 @@ parse_entitlement_data (const gchar *data, - g_autoptr(GInputStream) zstream = g_memory_input_stream_new_from_data (zdata, zlen, g_free); - g_autoptr(GZlibDecompressor) decompressor = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_ZLIB); - g_autoptr(GInputStream) cstream = g_converter_input_stream_new (zstream, G_CONVERTER (decompressor)); -+#if JSON_CHECK_VERSION (1, 2, 0) - g_autoptr(JsonParser) parser = json_parser_new_immutable (); -+#else -+ g_autoptr(JsonParser) parser = json_parser_new (); -+#endif - if (!json_parser_load_from_stream (parser, cstream, NULL, error)) - return NULL; - -diff --git a/rhsm/rhsm-utils.c b/rhsm/rhsm-utils.c -index d9bb4a2..956633d 100644 ---- a/rhsm/rhsm-utils.c -+++ b/rhsm/rhsm-utils.c -@@ -27,6 +27,10 @@ - #include - #include - -+#if !JSON_CHECK_VERSION (1, 2, 0) -+G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonNode, json_node_free) -+#endif -+ - /* - * rhsm_utils_str_replace: - * @haystack: (inout): pointer to a nul-terminated string. --- -2.12.1 - diff --git a/SPECS/librhsm.spec b/SPECS/librhsm.spec index 8b14108..f92bc5a 100644 --- a/SPECS/librhsm.spec +++ b/SPECS/librhsm.spec @@ -2,7 +2,7 @@ Name: lib%{libname} Version: 0.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Red Hat Subscription Manager library License: LGPLv2+ @@ -12,17 +12,13 @@ Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # https://bugzilla.redhat.com/show_bug.cgi?id=1435653 Patch0001: 0001-utils-add-support-for-multiple-entitlement-certifica.patch -# Ugly workaround, drop in 7.4 -Patch1001: 0001-fix-building-with-json-glib-1.2.0.patch - BuildRequires: gcc BuildRequires: cmake >= 2.8.5 BuildRequires: make BuildRequires: pkgconfig(glib-2.0) >= 2.44 BuildRequires: pkgconfig(gobject-2.0) >= 2.44 BuildRequires: pkgconfig(gio-2.0) >= 2.44 -# 1.2 is required, but we have Patch1001 -BuildRequires: pkgconfig(json-glib-1.0) +BuildRequires: pkgconfig(json-glib-1.0) >= 1.2 BuildRequires: pkgconfig(openssl) %description @@ -59,8 +55,5 @@ popd %{_libdir}/pkgconfig/%{name}.pc %changelog -* Thu Mar 30 2017 Igor Gnatenko - 0.0.1-2 -- Backport patch to support multiple entitlement certificates - -* Mon Jan 23 2017 Igor Gnatenko - 0.0.1-1 -- Initial package +* Thu Mar 30 2017 Igor Gnatenko - 0.0.1-3 +- Initial release