diff options
| -rw-r--r-- | recipes-compliance/openscap/files/0001-CMakeLists.txt-fix-installation-directory-for-system.patch | 29 | ||||
| -rw-r--r-- | recipes-compliance/openscap/openscap_1.3.10.bb | 16 |
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 @@ | |||
| 1 | From 887bd1b60720f02e937c57568d7ef4d3df4b00e8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
| 3 | Date: Mon, 24 Jun 2024 11:27:30 +0800 | ||
| 4 | Subject: [PATCH] CMakeLists.txt: fix installation directory for systemd unit | ||
| 5 | file | ||
| 6 | |||
| 7 | Upstream-Status: Inappropriate [oe specific] | ||
| 8 | |||
| 9 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 10 | --- | ||
| 11 | CMakeLists.txt | 2 +- | ||
| 12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 13 | |||
| 14 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 15 | index 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 | -- | ||
| 28 | 2.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 |
| 13 | SRCREV = "6d008616978306ce5e68997dce554a1683064f8f" | 13 | SRCREV = "6d008616978306ce5e68997dce554a1683064f8f" |
| 14 | SRC_URI = "git://github.com/OpenSCAP/openscap.git;branch=maint-1.3;protocol=https " | 14 | SRC_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 | ||
| 16 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
| 17 | 19 | ||
| @@ -24,7 +26,7 @@ PACKAGECONFIG[rpm] = "-DENABLE_OSCAP_UTIL_AS_RPM=ON, ,rpm, rpm" | |||
| 24 | PACKAGECONFIG[gcrypt] = "-DWITH_CRYPTO=gcrypt, ,libgcrypt" | 26 | PACKAGECONFIG[gcrypt] = "-DWITH_CRYPTO=gcrypt, ,libgcrypt" |
| 25 | PACKAGECONFIG[nss3] = "-DWITH_CRYPTO=nss3, ,nss" | 27 | PACKAGECONFIG[nss3] = "-DWITH_CRYPTO=nss3, ,nss" |
| 26 | PACKAGECONFIG[selinux] = ", ,libselinux" | 28 | PACKAGECONFIG[selinux] = ", ,libselinux" |
| 27 | PACKAGECONFIG[remdediate_service] = "-DENABLE_OSCAP_REMEDIATE_SERVICE=ON,-DENABLE_OSCAP_REMEDIATE_SERVICE=NO," | 29 | PACKAGECONFIG[remediate_service] = "-DENABLE_OSCAP_REMEDIATE_SERVICE=ON,-DENABLE_OSCAP_REMEDIATE_SERVICE=OFF," |
| 28 | 30 | ||
| 29 | EXTRA_OECMAKE += "-DENABLE_PROBES_LINUX=ON -DENABLE_PROBES_UNIX=ON \ | 31 | EXTRA_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 | ||
| 50 | do_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 | |||
| 58 | do_install:class-native[cleandirs] += " ${STAGING_OSCAP_BUILDDIR}" | 52 | do_install:class-native[cleandirs] += " ${STAGING_OSCAP_BUILDDIR}" |
| 59 | do_install:append:class-native () { | 53 | do_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 | ||
| 66 | SYSTEMD_PACKAGES = "${PN}" | 60 | SYSTEMD_PACKAGES = "${PN}" |
| 67 | SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG','remdediate_service', 'oscap-remediate.service', '',d)}" | 61 | SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG','remediate_service', 'oscap-remediate.service', '',d)}" |
| 68 | SYSTEMD_AUTO_ENABLE = "disable" | 62 | SYSTEMD_AUTO_ENABLE = "disable" |
| 69 | 63 | ||
| 70 | 64 | ||
