diff options
Diffstat (limited to 'meta/recipes-devtools/librepo')
8 files changed, 103 insertions, 179 deletions
diff --git a/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch b/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch deleted file mode 100644 index 08a58f1755..0000000000 --- a/meta/recipes-devtools/librepo/librepo/0001-Correctly-set-the-library-installation-directory.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 36d87919223db9b054862ad38cdda8d9222a2bab Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 30 Dec 2016 18:04:35 +0200 -Subject: [PATCH 1/4] Correctly set the library installation directory - -Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - librepo/CMakeLists.txt | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/librepo/CMakeLists.txt b/librepo/CMakeLists.txt -index 2fe76d8..5026def 100644 ---- a/librepo/CMakeLists.txt -+++ b/librepo/CMakeLists.txt -@@ -60,7 +60,8 @@ CONFIGURE_FILE("version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.h" @ONLY) - IF (CMAKE_SIZEOF_VOID_P MATCHES "8") - SET (LIB_SUFFIX "64") - ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8") --SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") -+#SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") -+SET (LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") - - INSTALL(FILES ${librepo_HEADERS} DESTINATION include/librepo) - INSTALL(TARGETS librepo LIBRARY DESTINATION ${LIB_INSTALL_DIR}) --- -2.11.0 - diff --git a/meta/recipes-devtools/librepo/librepo/0001-gpg_gpgme.c-fix-build-errors-with-older-gcc.patch b/meta/recipes-devtools/librepo/librepo/0001-gpg_gpgme.c-fix-build-errors-with-older-gcc.patch new file mode 100644 index 0000000000..8727b181b3 --- /dev/null +++ b/meta/recipes-devtools/librepo/librepo/0001-gpg_gpgme.c-fix-build-errors-with-older-gcc.patch @@ -0,0 +1,36 @@ +From b525cdec3051d1c6ff0c3cd38bf3070b18d6fb50 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Wed, 6 Mar 2024 10:13:38 +0100 +Subject: [PATCH] gpg_gpgme.c: fix build errors with older gcc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When selinux is not enabled, older gcc versions error out this way: + +| /home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/hosttools/gcc -DG_LOG_DOMAIN=\"librepo\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -Dlibrepo_EXPORTS -I/home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/git -I/home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/include/libmount -I/home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/include/blkid -I/home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/include/glib-2.0 -I/home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/lib/glib-2.0/include -I/home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/recipe-sysroot-native/usr/lib/pkgconfig/../../../usr/include/libxml2 -isystem/home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/recipe-sysroot-native/usr/include -O2 -pipe -std=c99 -Wall -fPIC -MD -MT librepo/CMakeFiles/librepo.dir/gpg_gpgme.c.o -MF librepo/CMakeFiles/librepo.dir/gpg_gpgme.c.o.d -o librepo/CMakeFiles/librepo.dir/gpg_gpgme.c.o -c /home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/git/librepo/gpg_gpgme.c +| /home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/git/librepo/gpg_gpgme.c: In function ‘lr_gpg_ensure_socket_dir_exists’: +| /home/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-1938845/tmp-mc-tiny/work/aarch64-linux/librepo-native/1.17.0/git/librepo/gpg_gpgme.c:135:1: error: label at end of compound statement +| 135 | exit: +| | ^~~~ + +Ensuring the exit: block is not empty fixes the issue. + +Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/300] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + librepo/gpg_gpgme.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/librepo/gpg_gpgme.c b/librepo/gpg_gpgme.c +index c4addb2..47c3153 100644 +--- a/librepo/gpg_gpgme.c ++++ b/librepo/gpg_gpgme.c +@@ -144,6 +144,7 @@ exit: + } + freecon(old_default_context); + #endif ++ return; + } + + static gpgme_ctx_t diff --git a/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch index 7138dfce21..4a851ad1e2 100644 --- a/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch +++ b/meta/recipes-devtools/librepo/librepo/0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch @@ -1,41 +1,35 @@ -From 1570ad33dd7e5d83f3ee80bd104b114709ac1e34 Mon Sep 17 00:00:00 2001 +From 76052aa40c61580869472fd3f009a4ab1620b998 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 30 Dec 2016 18:05:36 +0200 -Subject: [PATCH 2/4] Do not try to obtain PYTHON_INSTALL_DIR by running - python. +Subject: [PATCH] Do not try to obtain PYTHON_INSTALL_DIR by running python. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> --- - librepo/python/python2/CMakeLists.txt | 2 +- - librepo/python/python3/CMakeLists.txt | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + librepo/python/CMakeLists.txt | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) -diff --git a/librepo/python/python2/CMakeLists.txt b/librepo/python/python2/CMakeLists.txt -index 3615e17..cffa99f 100644 ---- a/librepo/python/python2/CMakeLists.txt -+++ b/librepo/python/python2/CMakeLists.txt -@@ -1,6 +1,6 @@ - FIND_PACKAGE (PythonLibs 2 ) - FIND_PACKAGE (PythonInterp 2 REQUIRED) --EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) -+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) - INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) +diff --git a/librepo/python/CMakeLists.txt b/librepo/python/CMakeLists.txt +index 8523ca7..06e5f7b 100644 +--- a/librepo/python/CMakeLists.txt ++++ b/librepo/python/CMakeLists.txt +@@ -16,12 +16,12 @@ SET (librepomodule_SRCS - MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") -diff --git a/librepo/python/python3/CMakeLists.txt b/librepo/python/python3/CMakeLists.txt -index dfecac9..38bcc72 100644 ---- a/librepo/python/python3/CMakeLists.txt -+++ b/librepo/python/python3/CMakeLists.txt -@@ -10,7 +10,7 @@ message("--- ${PYTHON_INCLUDE_DIR}") + MESSAGE("Building python bindings") - FIND_PACKAGE(PythonLibs 3.0) - FIND_PACKAGE(PythonInterp 3.0 REQUIRED) --EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) -+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) +-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c " +-from sys import stdout +-from sysconfig import get_path +-path=get_path(name='platlib', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'}) +-stdout.write(path)" +-OUTPUT_VARIABLE PYTHON_INSTALL_DIR) ++#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c " ++#from sys import stdout ++#from sysconfig import get_path ++#path=get_path(name='platlib', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'}) ++#stdout.write(path)" ++#OUTPUT_VARIABLE PYTHON_INSTALL_DIR) INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) MESSAGE(STATUS "Python3 install dir is ${PYTHON_INSTALL_DIR}") --- -2.11.0 - diff --git a/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch b/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch deleted file mode 100644 index 89ca60e818..0000000000 --- a/meta/recipes-devtools/librepo/librepo/0003-tests-fix-a-race-when-deleting-temporary-directories.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b1a5c92dbd1d11f1afdc094fccea64de334d2783 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 30 Dec 2016 18:06:24 +0200 -Subject: [PATCH 3/4] tests: fix a race when deleting temporary directories - -Upstream-Status: Submitted [https://github.com/rpm-software-management/librepo/pull/110] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - tests/python/tests/test_yum_repo_downloading.py | 2 +- - tests/python/tests/test_yum_repo_locating.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/python/tests/test_yum_repo_downloading.py b/tests/python/tests/test_yum_repo_downloading.py -index ad597dc..4a32519 100644 ---- a/tests/python/tests/test_yum_repo_downloading.py -+++ b/tests/python/tests/test_yum_repo_downloading.py -@@ -32,7 +32,7 @@ class TestCaseYumRepoDownloading(TestCaseWithFlask): - os.environ.pop('GNUPGHOME') - else: - os.environ['GNUPGHOME'] = self._gnupghome -- shutil.rmtree(self.tmpdir) -+ shutil.rmtree(self.tmpdir, True) - - def test_download_repo_01(self): - h = librepo.Handle() -diff --git a/tests/python/tests/test_yum_repo_locating.py b/tests/python/tests/test_yum_repo_locating.py -index 8f4bea5..db4294c 100644 ---- a/tests/python/tests/test_yum_repo_locating.py -+++ b/tests/python/tests/test_yum_repo_locating.py -@@ -34,7 +34,7 @@ class TestCaseYumRepoLocating(TestCase): - os.environ.pop('GNUPGHOME') - else: - os.environ['GNUPGHOME'] = self._gnupghome -- shutil.rmtree(self.tmpdir) -+ shutil.rmtree(self.tmpdir, True) - - def test_read_mirrorlist(self): - h = librepo.Handle() --- -2.11.0 - diff --git a/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch b/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch index f7d7ab3a2a..fd1df95473 100644 --- a/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch +++ b/meta/recipes-devtools/librepo/librepo/0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch @@ -1,8 +1,8 @@ -From a36be8192615e2a1fb5a5856d44565277f15583b Mon Sep 17 00:00:00 2001 +From b5918f06d790dc346d41de4b3a3ec01f290c1d25 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 30 Dec 2016 18:23:27 +0200 -Subject: [PATCH 4/4] Set gpgme variables with pkg-config, not with cmake - module (which doesn't work properly) +Subject: [PATCH] Set gpgme variables with pkg-config, not with cmake module + (which doesn't work properly) Upstream-Status: Inappropriate [gpgme upstream does not have pkg-config support and is not interested in it] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> @@ -11,19 +11,16 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index ef07d2d..f1fa09b 100644 +index 6c00024..a2f57af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -31,7 +31,8 @@ PKG_CHECK_MODULES(GLIB2 glib-2.0 REQUIRED) - PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl) - FIND_PACKAGE(EXPAT REQUIRED) - FIND_PACKAGE(CURL REQUIRED) --FIND_PACKAGE(Gpgme REQUIRED) -+PKG_CHECK_MODULES(GPGME gpgme REQUIRED) -+set(GPGME_VANILLA_LIBRARIES ${GPGME_LIBRARIES}) - FIND_PACKAGE(Xattr REQUIRED) +@@ -37,7 +37,8 @@ PKG_CHECK_MODULES(LIBXML2 libxml-2.0 REQUIRED) + FIND_PACKAGE(CURL 7.52.0 REQUIRED) - INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS}) --- -2.11.0 - + IF (USE_GPGME) +- FIND_PACKAGE(Gpgme REQUIRED) ++ PKG_CHECK_MODULES(GPGME gpgme REQUIRED) ++ set(GPGME_VANILLA_LIBRARIES ${GPGME_LIBRARIES}) + IF (ENABLE_SELINUX) + PKG_CHECK_MODULES(SELINUX REQUIRED libselinux) + ENDIF(ENABLE_SELINUX) diff --git a/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch b/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch deleted file mode 100644 index b0c7d1ca30..0000000000 --- a/meta/recipes-devtools/librepo/librepo/0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch +++ /dev/null @@ -1,40 +0,0 @@ -From a4bbbccce6edc1a2d1bd475506e2975fd7696c88 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Thu, 8 Jun 2017 16:31:30 +0800 -Subject: [PATCH] Fix typo: correct LRO_SSLVERIFYHOST with - CURLOPT_SSL_VERIFYHOST - -In commit 51d32c6cd88ba0139c32793183fd6a236c1ef456 ---- -Author: Tomas Mlcoch <tmlcoch@redhat.com> -Date: Mon May 5 14:31:35 2014 +0200 - - Add LRO_SSLVERIFYPEER and LRO_SSLVERIFYHOST options (RhBug: 1093014) ---- - -It incorrectly setopt CURLOPT_SSL_VERIFYPEER for LRO_SSLVERIFYHOST. -Use CURLOPT_SSL_VERIFYHOST to correct. - -Upstream-Status: Submitted - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - librepo/handle.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/librepo/handle.c b/librepo/handle.c -index ccea79b..ff39db4 100644 ---- a/librepo/handle.c -+++ b/librepo/handle.c -@@ -629,7 +629,7 @@ lr_handle_setopt(LrHandle *handle, - - case LRO_SSLVERIFYHOST: - handle->sslverifyhost = va_arg(arg, long) ? 2 : 0; -- c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYPEER, handle->sslverifyhost); -+ c_rc = curl_easy_setopt(c_h, CURLOPT_SSL_VERIFYHOST, handle->sslverifyhost); - break; - - case LRO_SSLCLIENTCERT: --- -2.7.4 - diff --git a/meta/recipes-devtools/librepo/librepo_1.17.0.bb b/meta/recipes-devtools/librepo/librepo_1.17.0.bb new file mode 100644 index 0000000000..810191459d --- /dev/null +++ b/meta/recipes-devtools/librepo/librepo_1.17.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "A library providing C and Python (libcURL like) API \ + for downloading linux repository metadata and packages." +HOMEPAGE = "https://github.com/rpm-software-management/librepo" +DESCRIPTION = "${SUMMARY}" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = "git://github.com/rpm-software-management/librepo.git;branch=master;protocol=https \ + file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \ + file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \ + file://0001-gpg_gpgme.c-fix-build-errors-with-older-gcc.patch \ + " + +SRCREV = "ae727d99086f70f39fba5695af5460e1da908c1b" + +S = "${WORKDIR}/git" + +DEPENDS = "curl glib-2.0 openssl attr gpgme libxml2" + +inherit cmake setuptools3-base pkgconfig + +EXTRA_OECMAKE = " \ + -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} \ + -DPYTHON_DESIRED=3 \ + -DENABLE_TESTS=OFF \ + -DENABLE_DOCS=OFF \ + -DWITH_ZCHUNK=OFF \ + -DENABLE_SELINUX=OFF \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/librepo/librepo_git.bb b/meta/recipes-devtools/librepo/librepo_git.bb deleted file mode 100644 index 3238b14fac..0000000000 --- a/meta/recipes-devtools/librepo/librepo_git.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = " A library providing C and Python (libcURL like) API for downloading linux repository metadata and packages." -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" - -SRC_URI = "git://github.com/rpm-software-management/librepo.git \ - file://0001-Correctly-set-the-library-installation-directory.patch \ - file://0002-Do-not-try-to-obtain-PYTHON_INSTALL_DIR-by-running-p.patch \ - file://0003-tests-fix-a-race-when-deleting-temporary-directories.patch \ - file://0004-Set-gpgme-variables-with-pkg-config-not-with-cmake-m.patch \ - file://0005-Fix-typo-correct-LRO_SSLVERIFYHOST-with-CURLOPT_SSL_.patch \ - " - -PV = "1.7.20+git${SRCPV}" -SRCREV = "e1137cbbda78fecb192146300790680a5bc811b1" - -S = "${WORKDIR}/git" - -DEPENDS = "curl expat glib-2.0 openssl attr libcheck gpgme" - -inherit cmake distutils3-base pkgconfig - -EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3" - -BBCLASSEXTEND = "native nativesdk" - |