summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/openwsman/openwsman/0001-Fix-to-build-with-GCC-15.patch25
-rw-r--r--meta-oe/recipes-extended/openwsman/openwsman/0001-cmake-Avoid-using-absolute-paths-in-dlopen.patch54
-rw-r--r--meta-oe/recipes-extended/openwsman/openwsman_2.8.1.bb9
3 files changed, 82 insertions, 6 deletions
diff --git a/meta-oe/recipes-extended/openwsman/openwsman/0001-Fix-to-build-with-GCC-15.patch b/meta-oe/recipes-extended/openwsman/openwsman/0001-Fix-to-build-with-GCC-15.patch
new file mode 100644
index 0000000000..32e055c300
--- /dev/null
+++ b/meta-oe/recipes-extended/openwsman/openwsman/0001-Fix-to-build-with-GCC-15.patch
@@ -0,0 +1,25 @@
1From f1b4ef78719146d84f16e86bf77de027e608eb17 Mon Sep 17 00:00:00 2001
2From: Vitezslav Crhonek <vcrhonek@redhat.com>
3Date: Mon, 3 Feb 2025 11:30:15 +0100
4Subject: [PATCH] Fix to build with GCC 15.
5
6Upstream-Status: Backport [https://github.com/Openwsman/openwsman/pull/209]
7Signed-off-by: Vitezslav Crhonek <vcrhonek@redhat.com>
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 src/plugins/swig/src/target_ruby.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/plugins/swig/src/target_ruby.c b/src/plugins/swig/src/target_ruby.c
14index bbce398..e17bb44 100644
15--- a/src/plugins/swig/src/target_ruby.c
16+++ b/src/plugins/swig/src/target_ruby.c
17@@ -49,7 +49,7 @@
18 */
19
20 static VALUE
21-load_module()
22+load_module(VALUE)
23 {
24 ruby_script(PLUGIN_FILE);
25 return rb_require(PLUGIN_FILE);
diff --git a/meta-oe/recipes-extended/openwsman/openwsman/0001-cmake-Avoid-using-absolute-paths-in-dlopen.patch b/meta-oe/recipes-extended/openwsman/openwsman/0001-cmake-Avoid-using-absolute-paths-in-dlopen.patch
new file mode 100644
index 0000000000..a9e98ef392
--- /dev/null
+++ b/meta-oe/recipes-extended/openwsman/openwsman/0001-cmake-Avoid-using-absolute-paths-in-dlopen.patch
@@ -0,0 +1,54 @@
1From 03d3f19c00f959bb77464dfa90bcb197eb71b27a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 25 Jul 2025 20:41:05 -0700
4Subject: [PATCH] cmake: Avoid using absolute paths in dlopen()
5
6This encodes absolutes paths currently, via LIB_SSL
7which is detected in cmake and then passed to compiler
8via a define in src/server/CMakeLists.txt#L19
9
10ADD_DEFINITIONS(-DSSL_LIB="${SSL_LIB}")
11
12This define is then used by a dlopen() call in
13src/server/shttpd/shttpd.c#L1514
14
15if ((lib = dlopen(SSL_LIB, RTLD_LAZY)) == NULL) {
16
17This ends up emitting absolute path into openwsmand
18binary
19
20It breaks reproducible builds, especially in cross-build
21e.g. yocto, where build time install dir will never be same as
22runtime install dir, this absolute path will be
23non-existent on targets and this call will fail.
24
25Removing path element and leaving libssl.so which will/can be
26in /usr/lib on targets
27
28This approach makes your binary more portable
29since it doesn't hardcode absolute paths.
30
31Upstream-Status: Submitted [https://github.com/Openwsman/openwsman/pull/213]
32Signed-off-by: Khem Raj <raj.khem@gmail.com>
33---
34 src/server/CMakeLists.txt | 7 ++++++-
35 1 file changed, 6 insertions(+), 1 deletion(-)
36
37diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt
38index 79702787..39568504 100644
39--- a/src/server/CMakeLists.txt
40+++ b/src/server/CMakeLists.txt
41@@ -16,7 +16,12 @@ SET(openwsmand_SOURCES ${openwsmand_SOURCES} gss.c wsmand.c)
42 IF(USE_OPENSSL)
43 SET(SSL_LIB ${OPENSSL_SSL_LIBRARY})
44 MESSAGE(STATUS "SSL_LIB is at >${SSL_LIB}<")
45-ADD_DEFINITIONS(-DSSL_LIB="${SSL_LIB}")
46+
47+# Extract just the filename from the full path
48+get_filename_component(SSL_LIB_NAME ${SSL_LIB} NAME)
49+MESSAGE(STATUS "SSL_LIB filename is >${SSL_LIB_NAME}<")
50+
51+ADD_DEFINITIONS(-DSSL_LIB="${SSL_LIB_NAME}")
52 ENDIF(USE_OPENSSL)
53
54 ADD_DEFINITIONS(-DDELIM_CHARS=", " )
diff --git a/meta-oe/recipes-extended/openwsman/openwsman_2.8.1.bb b/meta-oe/recipes-extended/openwsman/openwsman_2.8.1.bb
index 5abe06d07b..9078f571e6 100644
--- a/meta-oe/recipes-extended/openwsman/openwsman_2.8.1.bb
+++ b/meta-oe/recipes-extended/openwsman/openwsman_2.8.1.bb
@@ -20,6 +20,8 @@ SRCREV = "20efbccaf804a5a27a914eb8802b806416c03ece"
20SRC_URI = "git://github.com/Openwsman/openwsman.git;branch=main;protocol=https;tag=v${PV} \ 20SRC_URI = "git://github.com/Openwsman/openwsman.git;branch=main;protocol=https;tag=v${PV} \
21 file://openwsmand.service \ 21 file://openwsmand.service \
22 file://0001-lock.c-Define-PTHREAD_MUTEX_RECURSIVE_NP-if-undefine.patch \ 22 file://0001-lock.c-Define-PTHREAD_MUTEX_RECURSIVE_NP-if-undefine.patch \
23 file://0001-Fix-to-build-with-GCC-15.patch \
24 file://0001-cmake-Avoid-using-absolute-paths-in-dlopen.patch \
23 " 25 "
24 26
25LICENSE = "BSD-3-Clause" 27LICENSE = "BSD-3-Clause"
@@ -29,21 +31,16 @@ inherit systemd cmake pkgconfig python3native perlnative
29 31
30SYSTEMD_SERVICE:${PN} = "openwsmand.service" 32SYSTEMD_SERVICE:${PN} = "openwsmand.service"
31SYSTEMD_AUTO_ENABLE = "disable" 33SYSTEMD_AUTO_ENABLE = "disable"
32
33EXTRA_OECMAKE = "-DBUILD_BINDINGS=NO \ 34EXTRA_OECMAKE = "-DBUILD_BINDINGS=NO \
34 -DBUILD_LIBCIM=NO \ 35 -DBUILD_LIBCIM=NO \
35 -DBUILD_PERL=YES \ 36 -DBUILD_PERL=YES \
36 -DBUILD_PYTHON3=YES \ 37 -DBUILD_PYTHON3=YES \
37 -DBUILD_PYTHON=NO \ 38 -DBUILD_PYTHON=NO \
38 -DCMAKE_INSTALL_PREFIX=${prefix} \ 39 -DCMAKE_INSTALL_PREFIX=${prefix} \
40 -DPACKAGE_ARCHITECTURE='${HOST_ARCH}' \
39 -DLIB=${baselib} \ 41 -DLIB=${baselib} \
40 " 42 "
41 43
42do_configure:prepend() {
43 export STAGING_INCDIR=${STAGING_INCDIR}
44 export STAGING_LIBDIR=${STAGING_LIBDIR}
45}
46
47do_install:append() { 44do_install:append() {
48 install -d ${D}/${sysconfdir}/init.d 45 install -d ${D}/${sysconfdir}/init.d
49 install -m 755 ${B}/etc/init/openwsmand.sh ${D}/${sysconfdir}/init.d/openwsmand 46 install -m 755 ${B}/etc/init/openwsmand.sh ${D}/${sysconfdir}/init.d/openwsmand