rpm-ostree/SOURCES/0001-build-sys-Disable-zchu...

42 lines
1.4 KiB
Diff

From 0bfd20c900e75d8c4a42d80d7e2c3405141dd90b Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Thu, 14 May 2020 00:38:48 +0000
Subject: [PATCH] build-sys: Disable zchunk for libdnf if we don't have it
Going to update rpm-ostree for RHEL 8.3, we did a huge bump
in libdnf which now defaults to enabling zchunk in its build
system. We added the infrastructure before to detect things,
so propagate that to libdnf.
---
configure.ac | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 684f202b..57d9ae24 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,8 +131,9 @@ AS_IF([pkg-config --atleast-version=4.14.2 rpm], [], [AC_MSG_ERROR([librpm 4.14.
dnl We don't *actually* use this ourself, but librepo does, and libdnf gets confused
dnl if librepo doesn't support it.
+have_zchunk=no
AS_IF([pkg-config --exists zck],
- [AC_DEFINE([HAVE_ZCHUNK], 1, [Define if we have zchunk])])
+ [have_zchunk=yes; AC_DEFINE([HAVE_ZCHUNK], 1, [Define if we have zchunk])])
AC_PATH_PROG([XSLTPROC], [xsltproc])
@@ -259,6 +260,9 @@ cmake_args=-DCMAKE_BUILD_TYPE=RelWithDebugInfo
if test ${debug_release} = debug; then
cmake_args="-DCMAKE_BUILD_TYPE=Debug"
fi
+if test x${have_zchunk} = xno; then
+ cmake_args="${cmake_args} -DWITH_ZCHUNK:BOOL=0"
+fi
export cmake_args
dnl I picked /usr/libexec/rpm-ostree just because we need an
--
2.18.4