From 3df653fe09360f3107fba003a0944097fb369d13 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Fri, 10 May 2019 14:55:03 +0300 Subject: openwsman: Upgrade 2.6.8 -> 2.6.9 Remove patches applied upstream. Signed-off-by: Adrian Bunk Signed-off-by: Khem Raj --- ...CURLE_SSL_CACERT-deprecation-in-curl-7.62.patch | 42 ------------ .../openwsman/0001-openSSL-1.1.0-API-fixes.patch | 77 ---------------------- .../recipes-extended/openwsman/openwsman_2.6.8.bb | 75 --------------------- .../recipes-extended/openwsman/openwsman_2.6.9.bb | 73 ++++++++++++++++++++ 4 files changed, 73 insertions(+), 194 deletions(-) delete mode 100644 meta-oe/recipes-extended/openwsman/openwsman/0001-Adjust-for-CURLE_SSL_CACERT-deprecation-in-curl-7.62.patch delete mode 100644 meta-oe/recipes-extended/openwsman/openwsman/0001-openSSL-1.1.0-API-fixes.patch delete mode 100644 meta-oe/recipes-extended/openwsman/openwsman_2.6.8.bb create mode 100644 meta-oe/recipes-extended/openwsman/openwsman_2.6.9.bb diff --git a/meta-oe/recipes-extended/openwsman/openwsman/0001-Adjust-for-CURLE_SSL_CACERT-deprecation-in-curl-7.62.patch b/meta-oe/recipes-extended/openwsman/openwsman/0001-Adjust-for-CURLE_SSL_CACERT-deprecation-in-curl-7.62.patch deleted file mode 100644 index 4dcd108005..0000000000 --- a/meta-oe/recipes-extended/openwsman/openwsman/0001-Adjust-for-CURLE_SSL_CACERT-deprecation-in-curl-7.62.patch +++ /dev/null @@ -1,42 +0,0 @@ -From f2c37fab5dbaffa06c1268ee1309596306c9a4df Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 20 Nov 2018 12:23:47 -0800 -Subject: [PATCH] Adjust for CURLE_SSL_CACERT deprecation in curl >= 7.62 - -Use CURLE_PEER_FAILED_VERIFICATION instead - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - src/lib/wsman-curl-client-transport.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/lib/wsman-curl-client-transport.c b/src/lib/wsman-curl-client-transport.c -index d0a3829b..92727f4f 100644 ---- a/src/lib/wsman-curl-client-transport.c -+++ b/src/lib/wsman-curl-client-transport.c -@@ -186,16 +186,23 @@ convert_to_last_error(CURLcode r) - return WS_LASTERR_SSL_CONNECT_ERROR; - case CURLE_BAD_FUNCTION_ARGUMENT: - return WS_LASTERR_CURL_BAD_FUNCTION_ARG; -+#if LIBCURL_VERSION_NUM < 0x073E00 - case CURLE_SSL_PEER_CERTIFICATE: - return WS_LASTERR_SSL_PEER_CERTIFICATE; -+#endif - case CURLE_SSL_ENGINE_NOTFOUND: - return WS_LASTERR_SSL_ENGINE_NOTFOUND; - case CURLE_SSL_ENGINE_SETFAILED: - return WS_LASTERR_SSL_ENGINE_SETFAILED; - case CURLE_SSL_CERTPROBLEM: - return WS_LASTERR_SSL_CERTPROBLEM; -+#if LIBCURL_VERSION_NUM < 0x073E00 - case CURLE_SSL_CACERT: - return WS_LASTERR_SSL_CACERT; -+#else -+ case CURLE_PEER_FAILED_VERIFICATION: -+ return WS_LASTERR_SSL_PEER_CERTIFICATE; -+#endif - #if LIBCURL_VERSION_NUM > 0x70C01 - case CURLE_SSL_ENGINE_INITFAILED: - return WS_LASTERR_SSL_ENGINE_INITFAILED; diff --git a/meta-oe/recipes-extended/openwsman/openwsman/0001-openSSL-1.1.0-API-fixes.patch b/meta-oe/recipes-extended/openwsman/openwsman/0001-openSSL-1.1.0-API-fixes.patch deleted file mode 100644 index 8d230ba6d9..0000000000 --- a/meta-oe/recipes-extended/openwsman/openwsman/0001-openSSL-1.1.0-API-fixes.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 634b95157e1823672a2c95fac0cecf079b5967e7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= -Date: Mon, 19 Nov 2018 15:31:27 +0100 -Subject: [PATCH] openSSL 1.1.0 API fixes - ---- - src/server/shttpd/io_ssl.c | 5 +++++ - src/server/shttpd/shttpd.c | 11 ++++++++++- - src/server/shttpd/ssl.h | 3 +++ - 3 files changed, 18 insertions(+), 1 deletion(-) - -diff --git a/src/server/shttpd/io_ssl.c b/src/server/shttpd/io_ssl.c -index 6de0db2a..ece610ef 100644 ---- a/src/server/shttpd/io_ssl.c -+++ b/src/server/shttpd/io_ssl.c -@@ -21,8 +21,13 @@ struct ssl_func ssl_sw[] = { - {"SSL_set_fd", {0}}, - {"SSL_new", {0}}, - {"SSL_CTX_new", {0}}, -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - {"SSLv23_server_method", {0}}, - {"SSL_library_init", {0}}, -+#else -+ {"TLS_server_method", {0}}, -+ {"OPENSSL_init_ssl", {0}}, -+#endif - {"SSL_CTX_use_PrivateKey_file", {0}}, - {"SSL_CTX_use_certificate_file",{0}}, - {NULL, {0}} -diff --git a/src/server/shttpd/shttpd.c b/src/server/shttpd/shttpd.c -index f0f3fbd8..652aea17 100644 ---- a/src/server/shttpd/shttpd.c -+++ b/src/server/shttpd/shttpd.c -@@ -1489,9 +1489,14 @@ set_ssl(struct shttpd_ctx *ctx, const char *pem) - } - - /* Initialize SSL crap */ -- SSL_library_init(); - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+ SSL_library_init(); - if ((CTX = SSL_CTX_new(SSLv23_server_method())) == NULL) -+#else -+ OPENSSL_init_ssl(); -+ if ((CTX = SSL_CTX_new(TLS_server_method())) == NULL) -+#endif - _shttpd_elog(E_LOG, NULL, "SSL_CTX_new error"); - else if (SSL_CTX_use_certificate_file(CTX, wsmand_options_get_ssl_cert_file(), SSL_FILETYPE_PEM) != 1) - _shttpd_elog(E_LOG, NULL, "cannot open certificate file %s", pem); -@@ -1552,6 +1557,10 @@ set_ssl(struct shttpd_ctx *ctx, const char *pem) - if (rc != 1) { - _shttpd_elog(E_LOG, NULL, "Failed to set SSL cipher list \"%s\"", ssl_cipher_list); - } -+ else if ((*ssl_cipher_list == 0) || (*ssl_cipher_list == ' ')) { -+ _shttpd_elog(E_LOG, NULL, "Empty 'ssl_cipher_list' defaults to 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256'."); -+ _shttpd_elog(E_LOG, NULL, "Check openSSL documentation."); -+ } - } - ctx->ssl_ctx = CTX; - -diff --git a/src/server/shttpd/ssl.h b/src/server/shttpd/ssl.h -index 2304b70a..89a73c49 100644 ---- a/src/server/shttpd/ssl.h -+++ b/src/server/shttpd/ssl.h -@@ -56,6 +56,9 @@ extern struct ssl_func ssl_sw[]; - #if OPENSSL_VERSION_NUMBER < 0x10100000L - #define SSLv23_server_method() (* (SSL_METHOD * (*)(void)) FUNC(9))() - #define SSL_library_init() (* (int (*)(void)) FUNC(10))() -+#else -+#define TLS_server_method() (* (SSL_METHOD * (*)(void)) FUNC(9))() -+#define OPENSSL_init_ssl() (* (int (*)(void)) FUNC(10))() - #endif - #define SSL_CTX_use_PrivateKey_file(x,y,z) (* (int (*)(SSL_CTX *, \ - const char *, int)) FUNC(11))((x), (y), (z)) --- -2.19.1 - diff --git a/meta-oe/recipes-extended/openwsman/openwsman_2.6.8.bb b/meta-oe/recipes-extended/openwsman/openwsman_2.6.8.bb deleted file mode 100644 index f04ff01d96..0000000000 --- a/meta-oe/recipes-extended/openwsman/openwsman_2.6.8.bb +++ /dev/null @@ -1,75 +0,0 @@ -SUMMARY = "Opensource Implementation of WS-Management" -DESCRIPTION = "Openwsman is a project intended to provide an open-source \ -implementation of the Web Services Management specipication \ -(WS-Management) and to expose system management information on the \ -Linux operating system using the WS-Management protocol. WS-Management \ -is based on a suite of web services specifications and usage \ -requirements that exposes a set of operations focused on and covers \ -all system management aspects. \ -Openwsman Server and service libraries" -HOMEPAGE = "http://www.openwsman.org/" -SECTION = "Applications/System" - -DEPENDS = "curl libxml2 openssl libpam" - -inherit distro_features_check -REQUIRED_DISTRO_FEATURES = "pam" - -# v2.6.8 -SRCREV = "b9cd0b72534854abb6dd834c8c11e02111b4c8d7" - -SRC_URI = "git://github.com/Openwsman/openwsman.git \ - file://libssl-is-required-if-eventint-supported.patch \ - file://openwsmand.service \ - file://0001-lock.c-Define-PTHREAD_MUTEX_RECURSIVE_NP-if-undefine.patch \ - file://0001-openSSL-1.1.0-API-fixes.patch \ - file://0001-Adjust-for-CURLE_SSL_CACERT-deprecation-in-curl-7.62.patch \ - " - -S = "${WORKDIR}/git" - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=d4f53d4c6cf73b9d43186ce3be6dd0ba" - -inherit systemd cmake pkgconfig python3native perlnative - -SYSTEMD_SERVICE_${PN} = "openwsmand.service" -SYSTEMD_AUTO_ENABLE = "disable" - -LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', " -fuse-ld=bfd ", '', d)}" - -EXTRA_OECMAKE = "-DBUILD_BINDINGS=NO \ - -DBUILD_LIBCIM=NO \ - -DBUILD_PERL=YES \ - -DBUILD_PYTHON3=YES \ - -DBUILD_PYTHON=NO \ - -DCMAKE_INSTALL_PREFIX=${prefix} \ - -DLIB=${baselib} \ - " - -do_configure_prepend() { - export STAGING_INCDIR=${STAGING_INCDIR} - export STAGING_LIBDIR=${STAGING_LIBDIR} -} - -do_install_append() { - install -d ${D}/${sysconfdir}/init.d - install -m 755 ${B}/etc/init/openwsmand.sh ${D}/${sysconfdir}/init.d/openwsmand - ln -sf ${sysconfdir}/init.d/openwsmand ${D}/${sbindir}/rcopenwsmand - chmod 755 ${D}/${sysconfdir}/openwsman/owsmangencert.sh - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}/${systemd_unitdir}/system - install -m 644 ${WORKDIR}/openwsmand.service ${D}/${systemd_unitdir}/system - - sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/openwsmand.service - sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/openwsmand.service - sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/openwsmand.service - fi -} - -FILES_${PN}-dbg += "${libdir}/openwsman/plugins/.debug/ \ - ${libdir}/openwsman/authenticators/.debug/ \ - " - -INSANE_SKIP_${PN} = "dev-so" -RDEPENDS_${PN} = "ruby" diff --git a/meta-oe/recipes-extended/openwsman/openwsman_2.6.9.bb b/meta-oe/recipes-extended/openwsman/openwsman_2.6.9.bb new file mode 100644 index 0000000000..e5bb0765f6 --- /dev/null +++ b/meta-oe/recipes-extended/openwsman/openwsman_2.6.9.bb @@ -0,0 +1,73 @@ +SUMMARY = "Opensource Implementation of WS-Management" +DESCRIPTION = "Openwsman is a project intended to provide an open-source \ +implementation of the Web Services Management specipication \ +(WS-Management) and to expose system management information on the \ +Linux operating system using the WS-Management protocol. WS-Management \ +is based on a suite of web services specifications and usage \ +requirements that exposes a set of operations focused on and covers \ +all system management aspects. \ +Openwsman Server and service libraries" +HOMEPAGE = "http://www.openwsman.org/" +SECTION = "Applications/System" + +DEPENDS = "curl libxml2 openssl libpam" + +inherit distro_features_check +REQUIRED_DISTRO_FEATURES = "pam" + +# v2.6.9 +SRCREV = "5efb1545dbac7e6d1e0a992f3e84ca12cea1c18e" + +SRC_URI = "git://github.com/Openwsman/openwsman.git \ + file://libssl-is-required-if-eventint-supported.patch \ + file://openwsmand.service \ + file://0001-lock.c-Define-PTHREAD_MUTEX_RECURSIVE_NP-if-undefine.patch \ + " + +S = "${WORKDIR}/git" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=d4f53d4c6cf73b9d43186ce3be6dd0ba" + +inherit systemd cmake pkgconfig python3native perlnative + +SYSTEMD_SERVICE_${PN} = "openwsmand.service" +SYSTEMD_AUTO_ENABLE = "disable" + +LDFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', " -fuse-ld=bfd ", '', d)}" + +EXTRA_OECMAKE = "-DBUILD_BINDINGS=NO \ + -DBUILD_LIBCIM=NO \ + -DBUILD_PERL=YES \ + -DBUILD_PYTHON3=YES \ + -DBUILD_PYTHON=NO \ + -DCMAKE_INSTALL_PREFIX=${prefix} \ + -DLIB=${baselib} \ + " + +do_configure_prepend() { + export STAGING_INCDIR=${STAGING_INCDIR} + export STAGING_LIBDIR=${STAGING_LIBDIR} +} + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -m 755 ${B}/etc/init/openwsmand.sh ${D}/${sysconfdir}/init.d/openwsmand + ln -sf ${sysconfdir}/init.d/openwsmand ${D}/${sbindir}/rcopenwsmand + chmod 755 ${D}/${sysconfdir}/openwsman/owsmangencert.sh + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}/${systemd_unitdir}/system + install -m 644 ${WORKDIR}/openwsmand.service ${D}/${systemd_unitdir}/system + + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/openwsmand.service + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/openwsmand.service + sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_unitdir}/system/openwsmand.service + fi +} + +FILES_${PN}-dbg += "${libdir}/openwsman/plugins/.debug/ \ + ${libdir}/openwsman/authenticators/.debug/ \ + " + +INSANE_SKIP_${PN} = "dev-so" +RDEPENDS_${PN} = "ruby" -- cgit 1.2.3-korg