diff --git a/0001-tests-Fix-incorrect-usage-of-the-fail-unless-macro.patch b/0001-tests-Fix-incorrect-usage-of-the-fail-unless-macro.patch new file mode 100644 index 0000000..0916248 --- /dev/null +++ b/0001-tests-Fix-incorrect-usage-of-the-fail-unless-macro.patch @@ -0,0 +1,36 @@ +From 89930d46c8fe833b9baf1cf76662275bfcb2f0d4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hr=C3=A1zk=C3=BD?= +Date: Thu, 6 Aug 2020 10:59:59 +0200 +Subject: [PATCH] tests: Fix incorrect usage of the fail_unless macro + +--- + tests/hawkey/test_query.cpp | 2 +- + tests/hawkey/test_sack.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/hawkey/test_query.cpp b/tests/hawkey/test_query.cpp +index bf21e3349..12c7733c8 100644 +--- a/tests/hawkey/test_query.cpp ++++ b/tests/hawkey/test_query.cpp +@@ -306,7 +306,7 @@ START_TEST(test_query_pkg) + hy_query_filter(q, HY_PKG_NAME, HY_EQ, "jay"); + pset = hy_query_run_set(q); + hy_query_free(q); +- fail_unless(dnf_packageset_count(pset), 2); ++ fail_unless(dnf_packageset_count(pset) == 2); + + // use hy_query_filter_package_in(): + q = hy_query_create(test_globals.sack); +diff --git a/tests/hawkey/test_sack.cpp b/tests/hawkey/test_sack.cpp +index ba54602d1..5eab83b3f 100644 +--- a/tests/hawkey/test_sack.cpp ++++ b/tests/hawkey/test_sack.cpp +@@ -83,7 +83,7 @@ START_TEST(test_list_arches) + const char ** arches = dnf_sack_list_arches(sack); + + /* noarch, x86_64, athlon, i686, i586, i486, i386 */ +- fail_unless(g_strv_length((gchar**)arches), 7); ++ fail_unless(g_strv_length((gchar**)arches) == 7); + + if (strcmp(arches[2], "athlon") == 0) { + // Fedora, Mageia diff --git a/libdnf.spec b/libdnf.spec index c7d0e7b..a097b30 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -7,6 +7,8 @@ %global libdnf_minor_version 48 %global libdnf_micro_version 0 +%define __cmake_in_source_build 1 + # set sphinx package name according to distro %global requires_python2_sphinx python2-sphinx %global requires_python3_sphinx python3-sphinx @@ -54,11 +56,12 @@ Name: libdnf Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version} -Release: 3%{?dist} +Release: 4%{?dist} Summary: Library providing simplified C and Python API to libsolv License: LGPLv2+ URL: https://github.com/rpm-software-management/libdnf Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Patch1: 0001-tests-Fix-incorrect-usage-of-the-fail-unless-macro.patch BuildRequires: cmake BuildRequires: gcc @@ -306,6 +309,10 @@ popd %endif %changelog +* Mon Aug 10 2020 Nicola Sella - 0.48.0-4 +- spec: Fix building with new cmake macros +- tests: Fix incorrect usage of the fail_unless macros + * Sat Aug 01 2020 Fedora Release Engineering - 0.48.0-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild