Open kloczek opened 1 year ago
Looks like even with installed gpgme devel librepo is not able to find gpgme.
-- Found CURL: /usr/lib64/libcurl.so (found suitable version "7.86.0", minimum required is "7.52.0")
-- No usable gpgme flavours found.
and ..
tkloczko@pers-jacek SPECS]$ pkgconf --list-all | grep gpgme
gpgme-glib gpgme-glib - GnuPG Made Easy to access GnuPG with Glib
gpgme gpgme - GnuPG Made Easy to access GnuPG
Looks like https://github.com/rpm-software-management/librepo/blob/master/cmake/Modules/FindGpgme.cmake does not contain actual gpgme library detection (it was copied from some other project) and whole that file can be replaced by single pkg_check_modules()
call.
Please could you try to run - dnf builddep librepo.spec
. It should install missing dependencies. Anyway we will try to fix reported issue, but right now it has low priority.
My build infrastructure uses always dnf builddep
to install all build dependencies in build env.
Relaying on indirect dependencies is always bad practice because some of them may be optional.
The patch from Andreas Metzler in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024576#12 was used in Debian to fix this problem.
Updated patch for 1.15.1
--- a/librepo/CMakeLists.txt
+++ b/librepo/CMakeLists.txt
@@ -50,7 +50,7 @@ TARGET_LINK_LIBRARIES(librepo
${LIBXML2_LIBRARIES}
${CURL_LIBRARY}
${LIBCRYPTO_LIBRARIES}
- ${GPGME_VANILLA_LIBRARIES}
+ ${GPGME_LIBRARIES}
${GLIB2_LIBRARIES}
)
IF (WITH_ZCHUNK)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,9 +31,8 @@
PKG_CHECK_MODULES(GLIB2 glib-2.0>=2.28 gio-2.0 REQUIRED)
PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl)
PKG_CHECK_MODULES(LIBXML2 libxml-2.0 REQUIRED)
+PKG_SEARCH_MODULE(GPGME REQUIRED gpgme)
FIND_PACKAGE(CURL 7.52.0 REQUIRED)
-FIND_PACKAGE(Gpgme REQUIRED)
-
IF (WITH_ZCHUNK)
PKG_CHECK_MODULES(ZCHUNKLIB zck>=0.9.11 REQUIRED)
gpgme dropped gpgme-config
which is used on *nix, so this should be changed in a PR to support both scenario's. The path above is drops Windows support.
From camek output
and build fails with
If gpgme dependency is not optional cmake should fail.