sysrepo: fix "buildpaths" QA error
PATCH 1/1 sysrepo: fix "buildpaths" QA error
From: Denys Dmytriyenko <[email protected]>
Finding tar binary and using it's absolute path in the code doesn't work for cross-compilation and causes "buildpaths" QA error.
Signed-off-by Denys Dmytriyenko <[email protected]>
--- ...-Hardcode-correct-path-to-tar-binary.patch | 34 +++++++++++++++++++ .../recipes-sysrepo/sysrepo/sysrepo_git.bb | 3 ++ 2 files changed, 37 insertions(+) create mode 100644 meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo/0001-Hardcode-correct-path-to-tar-binary.patch
meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo/0001-Hardcode-correct-path-to-tar-binary.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 367e806a9affbfa351fe799b200f2361eb9d7934 Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko <[email protected]> +Date: Mon, 15 Jul 2024 16:14:23 -0400 +Subject: [PATCH] Hardcode correct path to tar binary + +Otherwise the hostpath location gets embedded, which is incorrect for +the target and trips the "buildpaths" QA error. + +Upstream-Status: Inappropriate [OE/crosscompile specific] + +Signed-off-by: Denys Dmytriyenko <[email protected]> +--- + CMakeLists.txt | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 22c95420..2ba1f44e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -402,10 +402,7 @@ check_symbol_exists(mkstemps "stdlib.h" SR_HAVE_MKSTEMPS) + unset(CMAKE_REQUIRED_DEFINITIONS) + + # tar +-find_program(TAR_BINARY "tar") +-if(NOT TAR_BINARY) +- message(FATAL_ERROR "tar binary was not found.") +-endif() ++set(TAR_BINARY "/usr/bin/tar") + + # generate files + configure_file("${PROJECT_SOURCE_DIR}/src/config.h.in" "${PROJECT_BINARY_DIR}/config.h" ESCAPE_QUOTES @ONLY) +-- +2.25.1 +
meta-arago-extras/recipes-sysrepo/sysrepo/sysrepo_git.bb +3 -0
@@ -5,6 +5,7 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=ef345f161efb68c3836e6f5648b2312f" SRC_URI = "git://github.com/sysrepo/sysrepo.git;protocol=https;branch=devel \ + file://0001-Hardcode-correct-path-to-tar-binary.patch \ ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', \ 'file://sysrepo','', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \
@@ -32,6 +33,8 @@ SYSTEMD_PACKAGES = "${PN}" SYSTEMD_SERVICE:${PN} = "sysrepod.service" SYSTEMD_AUTO_ENABLE:${PN} = "disable" +RDEPENDS:${PN} += "tar" + do_install:append () { install -d ${D}${sysconfdir}/sysrepo/data/notifications install -d ${D}${sysconfdir}/sysrepo/yang
Signature · 1 line
2.25.1