summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-compliance/openscap/files/0001-CMakeLists.txt-fix-installation-directory-for-system.patch29
-rw-r--r--recipes-compliance/openscap/openscap_1.3.10.bb16
2 files changed, 34 insertions, 11 deletions
diff --git a/recipes-compliance/openscap/files/0001-CMakeLists.txt-fix-installation-directory-for-system.patch b/recipes-compliance/openscap/files/0001-CMakeLists.txt-fix-installation-directory-for-system.patch
new file mode 100644
index 0000000..87dd00b
--- /dev/null
+++ b/recipes-compliance/openscap/files/0001-CMakeLists.txt-fix-installation-directory-for-system.patch
@@ -0,0 +1,29 @@
1From 887bd1b60720f02e937c57568d7ef4d3df4b00e8 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Mon, 24 Jun 2024 11:27:30 +0800
4Subject: [PATCH] CMakeLists.txt: fix installation directory for systemd unit
5 file
6
7Upstream-Status: Inappropriate [oe specific]
8
9Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
10---
11 CMakeLists.txt | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/CMakeLists.txt b/CMakeLists.txt
15index fdeda6eb4..77645ecd4 100644
16--- a/CMakeLists.txt
17+++ b/CMakeLists.txt
18@@ -637,7 +637,7 @@ if(NOT WIN32)
19 configure_file("oscap-remediate.service.in" "oscap-remediate.service" @ONLY)
20 install(FILES
21 ${CMAKE_CURRENT_BINARY_DIR}/oscap-remediate.service
22- DESTINATION ${CMAKE_INSTALL_PREFIX}/${SYSTEMD_UNITDIR}
23+ DESTINATION ${SYSTEMD_UNITDIR}
24 )
25 endif()
26 endif()
27--
282.25.1
29
diff --git a/recipes-compliance/openscap/openscap_1.3.10.bb b/recipes-compliance/openscap/openscap_1.3.10.bb
index d3e44a8..c439d71 100644
--- a/recipes-compliance/openscap/openscap_1.3.10.bb
+++ b/recipes-compliance/openscap/openscap_1.3.10.bb
@@ -11,7 +11,9 @@ DEPENDS:class-native = "pkgconfig-native swig-native curl-native libxml2-native
11 11
12#March 18th, 2024 12#March 18th, 2024
13SRCREV = "6d008616978306ce5e68997dce554a1683064f8f" 13SRCREV = "6d008616978306ce5e68997dce554a1683064f8f"
14SRC_URI = "git://github.com/OpenSCAP/openscap.git;branch=maint-1.3;protocol=https " 14SRC_URI = "git://github.com/OpenSCAP/openscap.git;branch=maint-1.3;protocol=https \
15 file://0001-CMakeLists.txt-fix-installation-directory-for-system.patch \
16 "
15 17
16S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
17 19
@@ -24,7 +26,7 @@ PACKAGECONFIG[rpm] = "-DENABLE_OSCAP_UTIL_AS_RPM=ON, ,rpm, rpm"
24PACKAGECONFIG[gcrypt] = "-DWITH_CRYPTO=gcrypt, ,libgcrypt" 26PACKAGECONFIG[gcrypt] = "-DWITH_CRYPTO=gcrypt, ,libgcrypt"
25PACKAGECONFIG[nss3] = "-DWITH_CRYPTO=nss3, ,nss" 27PACKAGECONFIG[nss3] = "-DWITH_CRYPTO=nss3, ,nss"
26PACKAGECONFIG[selinux] = ", ,libselinux" 28PACKAGECONFIG[selinux] = ", ,libselinux"
27PACKAGECONFIG[remdediate_service] = "-DENABLE_OSCAP_REMEDIATE_SERVICE=ON,-DENABLE_OSCAP_REMEDIATE_SERVICE=NO," 29PACKAGECONFIG[remediate_service] = "-DENABLE_OSCAP_REMEDIATE_SERVICE=ON,-DENABLE_OSCAP_REMEDIATE_SERVICE=OFF,"
28 30
29EXTRA_OECMAKE += "-DENABLE_PROBES_LINUX=ON -DENABLE_PROBES_UNIX=ON \ 31EXTRA_OECMAKE += "-DENABLE_PROBES_LINUX=ON -DENABLE_PROBES_UNIX=ON \
30 -DENABLE_PROBES_SOLARIS=OFF -DENABLE_PROBES_INDEPENDENT=ON \ 32 -DENABLE_PROBES_SOLARIS=OFF -DENABLE_PROBES_INDEPENDENT=ON \
@@ -47,14 +49,6 @@ do_configure:append:class-native () {
47 sed -i 's:OSCAP_DEFAULT_XSLT_PATH.*$:OSCAP_DEFAULT_XSLT_PATH "${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/xsl":' ${B}/config.h 49 sed -i 's:OSCAP_DEFAULT_XSLT_PATH.*$:OSCAP_DEFAULT_XSLT_PATH "${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/xsl":' ${B}/config.h
48} 50}
49 51
50do_install:append () {
51 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
52 if ${@bb.utils.contains('PACKAGECONFIG','remdediate_service','true','false',d)}; then
53 install -D -m 0644 ${B}/oscap-remediate.service ${D}${systemd_system_unitdir}/oscap-remediate.service
54 fi
55 fi
56}
57
58do_install:class-native[cleandirs] += " ${STAGING_OSCAP_BUILDDIR}" 52do_install:class-native[cleandirs] += " ${STAGING_OSCAP_BUILDDIR}"
59do_install:append:class-native () { 53do_install:append:class-native () {
60 oscapdir=${STAGING_OSCAP_BUILDDIR}/${datadir_native} 54 oscapdir=${STAGING_OSCAP_BUILDDIR}/${datadir_native}
@@ -64,7 +58,7 @@ do_install:append:class-native () {
64 58
65 59
66SYSTEMD_PACKAGES = "${PN}" 60SYSTEMD_PACKAGES = "${PN}"
67SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG','remdediate_service', 'oscap-remediate.service', '',d)}" 61SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG','remediate_service', 'oscap-remediate.service', '',d)}"
68SYSTEMD_AUTO_ENABLE = "disable" 62SYSTEMD_AUTO_ENABLE = "disable"
69 63
70 64