summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/recipes-devtools/createrepo-c
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/meta/recipes-devtools/createrepo-c')
-rw-r--r--external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch28
-rw-r--r--external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch27
-rw-r--r--external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Fix-setup-of-logging-log-domains-RhBug-1645897.patch73
-rw-r--r--external/poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb37
4 files changed, 165 insertions, 0 deletions
diff --git a/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch b/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
new file mode 100644
index 00000000..cd72084e
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Correctly-install-the-shared-library.patch
@@ -0,0 +1,28 @@
+From fef835e1fdedc72c97d9c3e5704302e56e1bdef0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 2 Jan 2017 17:23:59 +0200
+Subject: [PATCH] Correctly install the shared library
+
+Upstream-Status: Submitted [https://github.com/rpm-software-management/createrepo_c/pull/78]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index f3635e8..46dc037 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -110,7 +110,8 @@ CONFIGURE_FILE("deltarpms.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/deltarpms.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 ${headers} DESTINATION "include/createrepo_c")
+ INSTALL(FILES "createrepo_c.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+--
+2.11.0
+
diff --git a/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
new file mode 100644
index 00000000..95310709
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch
@@ -0,0 +1,27 @@
+From bef487b5c2515062c5dd73c21082ce42f69aa717 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Dec 2016 18:31:02 +0200
+Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/python/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
+index 9f1ac64..eae0cbb 100644
+--- a/src/python/CMakeLists.txt
++++ b/src/python/CMakeLists.txt
+@@ -19,7 +19,7 @@ else()
+ FIND_PACKAGE(PythonInterp 3.0 REQUIRED)
+ endif()
+
+-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})
+
+ MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
+--
+2.11.0
+
diff --git a/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Fix-setup-of-logging-log-domains-RhBug-1645897.patch b/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Fix-setup-of-logging-log-domains-RhBug-1645897.patch
new file mode 100644
index 00000000..6de9c055
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Fix-setup-of-logging-log-domains-RhBug-1645897.patch
@@ -0,0 +1,73 @@
+From 80810f04f2de6bae6e394f52ad9cdd2189862f74 Mon Sep 17 00:00:00 2001
+From: Jaroslav Rohel <jrohel@redhat.com>
+Date: Fri, 9 Nov 2018 07:35:13 +0100
+Subject: [PATCH] Fix setup of logging (log domains) (RhBug:1645897)
+
+New debug messages were added into GLib library. These messages come
+from the "GLib" log domain and were not hidden in the standard and
+quiet mode of the application.
+This fix hides log messages regardless on source log domain.
+
+Upstream-Status: Backport
+
+Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
+---
+ src/createrepo_shared.c | 19 ++++++-------------
+ src/misc.c | 5 ++++-
+ 2 files changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/src/createrepo_shared.c b/src/createrepo_shared.c
+index 8a26787..7cb8ba8 100644
+--- a/src/createrepo_shared.c
++++ b/src/createrepo_shared.c
+@@ -270,24 +270,17 @@ cr_lock_repo(const gchar *repo_dir,
+ void
+ cr_setup_logging(gboolean quiet, gboolean verbose)
+ {
+- g_log_set_default_handler (cr_log_fn, NULL);
+-
+ if (quiet) {
+ // Quiet mode
+- GLogLevelFlags levels = G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO |
+- G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_WARNING;
+- g_log_set_handler(NULL, levels, cr_null_log_fn, NULL);
+- g_log_set_handler("C_CREATEREPOLIB", levels, cr_null_log_fn, NULL);
++ GLogLevelFlags hidden_levels = G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO |
++ G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_WARNING;
++ g_log_set_default_handler (cr_log_fn, GINT_TO_POINTER(hidden_levels));
+ } else if (verbose) {
+ // Verbose mode
+- GLogLevelFlags levels = G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO |
+- G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_WARNING;
+- g_log_set_handler(NULL, levels, cr_log_fn, NULL);
+- g_log_set_handler("C_CREATEREPOLIB", levels, cr_log_fn, NULL);
++ g_log_set_default_handler (cr_log_fn, GINT_TO_POINTER(0));
+ } else {
+ // Standard mode
+- GLogLevelFlags levels = G_LOG_LEVEL_DEBUG;
+- g_log_set_handler(NULL, levels, cr_null_log_fn, NULL);
+- g_log_set_handler("C_CREATEREPOLIB", levels, cr_null_log_fn, NULL);
++ GLogLevelFlags hidden_levels = G_LOG_LEVEL_DEBUG;
++ g_log_set_default_handler (cr_log_fn, GINT_TO_POINTER(hidden_levels));
+ }
+ }
+diff --git a/src/misc.c b/src/misc.c
+index 9937480..9549a44 100644
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -912,8 +912,11 @@ void
+ cr_log_fn(const gchar *log_domain,
+ GLogLevelFlags log_level,
+ const gchar *message,
+- G_GNUC_UNUSED gpointer user_data)
++ gpointer user_data)
+ {
++ gint hidden_log_levels = GPOINTER_TO_INT(user_data);
++ if (log_level & hidden_log_levels)
++ return;
+ switch(log_level) {
+ case G_LOG_LEVEL_ERROR:
+ if (log_domain) g_printerr("%s: ", log_domain);
+--
+1.8.3.1
+
diff --git a/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb b/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
new file mode 100644
index 00000000..08766b31
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/createrepo-c/createrepo-c_git.bb
@@ -0,0 +1,37 @@
+DESCRIPTION = "C implementation of createrepo."
+HOMEPAGE = "https://github.com/rpm-software-management/createrepo_c/wiki"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/rpm-software-management/createrepo_c \
+ file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
+ file://0001-Correctly-install-the-shared-library.patch \
+ file://0001-Fix-setup-of-logging-log-domains-RhBug-1645897.patch \
+ "
+
+PV = "0.11.1+git${SRCPV}"
+SRCREV = "434a40babdde57ab405e9a1085a30e9575ea0c92"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "expat curl glib-2.0 libxml2 openssl bzip2 zlib file sqlite3 xz rpm"
+DEPENDS_append_class-native = " file-replacement-native"
+
+inherit cmake pkgconfig bash-completion distutils3-base
+
+EXTRA_OECMAKE = " -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Direct createrepo to read rpm configuration from our sysroot, not the one it was compiled in
+do_install_append_class-native() {
+ create_wrapper ${D}/${bindir}/createrepo_c \
+ RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm
+}
+
+do_install_append_class-nativesdk() {
+ create_wrapper ${D}/${bindir}/createrepo_c \
+ RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm
+ rm -rf ${D}/etc
+}