Update to openwsman-2.6.3 from upstream VCS

This commit is contained in:
Vitezslav Crhonek 2017-01-17 09:54:36 +01:00
parent 6caad7afa8
commit 39db6f660e
7 changed files with 149 additions and 142 deletions

18
.gitignore vendored
View File

@ -1,18 +1,2 @@
openwsman-2.2.3.tar.bz2
/openwsman-2.2.4.tar.bz2
/openwsman-2.2.5.tar.bz2
/openwsman-2.2.7.tar.bz2
/openwsman-2.3.0.tar.bz2
/openwsman-2.3.5.tar.bz2
/openwsman-2.3.6.tar.bz2
/openwsmand.8.gz
/openwsman-2.4.0.tar.gz
/v2.4.3.tar.gz
/v2.4.4.tar.gz
/v2.4.6.tar.gz
/openwsman-2.4.12.tar.gz
/openwsman-2.4.14.tar.gz
/openwsman-2.4.15.tar.gz
/openwsman-2.6.0.tar.gz
/openwsman-2.6.1.tar.gz
/openwsman-2.6.2.tar.gz
/openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b.tar.gz

View File

@ -1,12 +0,0 @@
diff -up openwsman-2.2.7/src/server/shttpd/compat_unix.h.orig openwsman-2.2.7/src/server/shttpd/compat_unix.h
--- openwsman-2.2.7/src/server/shttpd/compat_unix.h.orig 2012-02-09 13:04:47.528527681 +0100
+++ openwsman-2.2.7/src/server/shttpd/compat_unix.h 2012-02-09 13:05:31.582568867 +0100
@@ -21,7 +21,7 @@
#include <dirent.h>
#include <dlfcn.h>
#ifndef SSL_LIB
-#define SSL_LIB "libssl.so"
+#define SSL_LIB "libssl.so.10"
#endif
#define DIRSEP '/'
#define IS_DIRSEP_CHAR(c) ((c) == '/')

View File

@ -6,7 +6,7 @@ diff -up openwsman-2.4.12/bindings/ruby/extconf.rb.orig openwsman-2.4.12/binding
major, minor, path = RUBY_VERSION.split(".")
-raise "SWIG failed to run" unless system("#{swig} -ruby -autorename -DRUBY_VERSION=#{major}#{minor} -I. -I/usr/include/openwsman -o openwsman_wrap.c openwsman.i")
+raise "SWIG failed to run" unless system("#{swig} -ruby -autorename -DRUBY_VERSION=#{major}#{minor} -I. -I/usr/include/openwsman -I/builddir/build/BUILD/openwsman-2.6.2/include/ -o openwsman_wrap.c openwsman.i")
+raise "SWIG failed to run" unless system("#{swig} -ruby -autorename -DRUBY_VERSION=#{major}#{minor} -I. -I/usr/include/openwsman -I/builddir/build/BUILD/openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/include/ -o openwsman_wrap.c openwsman.i")
$CPPFLAGS = "-I/usr/include/openwsman -I.."

View File

@ -1,7 +1,7 @@
diff -up openwsman-2.6.2/src/lib/wsman-curl-client-transport.c.orig openwsman-2.6.2/src/lib/wsman-curl-client-transport.c
--- openwsman-2.6.2/src/lib/wsman-curl-client-transport.c.orig 2015-10-19 15:27:46.000000000 +0200
+++ openwsman-2.6.2/src/lib/wsman-curl-client-transport.c 2017-01-09 15:12:40.823514921 +0100
@@ -239,12 +239,16 @@ write_handler( void *ptr, size_t size, s
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/lib/wsman-curl-client-transport.c.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/lib/wsman-curl-client-transport.c
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/lib/wsman-curl-client-transport.c.orig 2016-07-27 16:03:55.000000000 +0200
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/lib/wsman-curl-client-transport.c 2017-01-16 14:40:03.094728843 +0100
@@ -241,12 +241,16 @@ write_handler( void *ptr, size_t size, s
static int ssl_certificate_thumbprint_verify_callback(X509_STORE_CTX *ctx, void *arg)
{
unsigned char *thumbprint = (unsigned char *)arg;
@ -19,55 +19,55 @@ diff -up openwsman-2.6.2/src/lib/wsman-curl-client-transport.c.orig openwsman-2.
if ( X509_digest(cert, tempDigest, tempFingerprint, &tempFingerprintLen ) <= 0)
return 0;
if(!memcmp(tempFingerprint, thumbprint, tempFingerprintLen))
diff -up openwsman-2.6.2/src/server/shttpd/config.c.orig openwsman-2.6.2/src/server/shttpd/config.c
--- openwsman-2.6.2/src/server/shttpd/config.c.orig 2015-10-19 15:27:46.000000000 +0200
+++ openwsman-2.6.2/src/server/shttpd/config.c 2017-01-09 15:13:03.561467272 +0100
@@ -91,26 +91,16 @@ set_ssl(struct shttpd_ctx *ctx, void *ar
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/compat_unix.h.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/compat_unix.h
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/compat_unix.h.orig 2016-07-27 16:03:55.000000000 +0200
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/compat_unix.h 2017-01-16 14:40:03.094728843 +0100
@@ -27,7 +27,6 @@
pthread_create(&tid, NULL, (void *(*)(void *))a, c); } while (0)
#endif /* !NO_THREADS */
arg = NULL; /* Unused */
- /* Load SSL library dynamically */
- if ((lib = dlopen(SSL_LIB, RTLD_LAZY)) == NULL) {
- elog(E_FATAL, NULL, "set_ssl: cannot load %s", SSL_LIB);
- ctx->ssl_ctx = NULL;
- return;
- }
-
- for (fp = ssl_sw; fp->name != NULL; fp++) {
- if ((fp->ptr.v_void = dlsym(lib, fp->name)) == NULL) {
- elog(E_FATAL, NULL,"set_ssl: cannot find %s", fp->name);
- ctx->ssl_ctx = NULL;
- return;
- }
- }
-
/* Initialize SSL crap */
static int ssl_library_initialized = 0;
if(!ssl_library_initialized) {
debug("Initialize SSL");
+ SSL_load_error_strings();
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
+ #else
+ OPENSSL_init_ssl(0, NULL);
+ #endif
ssl_library_initialized = 1;
}
if ((CTX = SSL_CTX_new(SSLv23_server_method())) == NULL) {
@@ -150,7 +140,7 @@ set_ssl(struct shttpd_ctx *ctx, void *ar
for (idx = 0; protocols[idx].name ; ++idx) {
if (strncasecmp(protocols[idx].name, ssl_disabled_protocols, blank_ptr-ssl_disabled_protocols) == 0) {
debug("SSL: disable %s protocol", protocols[idx].name);
- SSL_CTX_ctrl(CTX, SSL_CTRL_OPTIONS, protocols[idx].opt, NULL);
+ SSL_CTX_set_options(CTX, protocols[idx].opt);
break;
}
}
diff -up openwsman-2.6.2/src/server/shttpd/io_ssl.c.orig openwsman-2.6.2/src/server/shttpd/io_ssl.c
--- openwsman-2.6.2/src/server/shttpd/io_ssl.c.orig 2015-10-19 15:27:46.000000000 +0200
+++ openwsman-2.6.2/src/server/shttpd/io_ssl.c 2017-01-09 15:12:40.824514919 +0100
@@ -11,26 +11,6 @@
#include "shttpd_defs.h"
-#define SSL_LIB "libssl.so"
#define DIRSEP '/'
#define IS_DIRSEP_CHAR(c) ((c) == '/')
#define O_BINARY 0
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/config.h.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/config.h
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/config.h.orig 2017-01-16 14:40:57.223705664 +0100
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/config.h 2017-01-16 14:38:15.000000000 +0100
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2004-2005 Sergey Lyubka <valenok@gmail.com>
+ * All rights reserved
+ *
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * Sergey Lyubka wrote this file. As long as you retain this notice you
+ * can do whatever you want with this stuff. If we meet some day, and you think
+ * this stuff is worth it, you can buy me a beer in return.
+ */
+
+#ifndef CONFIG_HEADER_DEFINED
+#define CONFIG_HEADER_DEFINED
+
+#define SHTTPD_VERSION "1.42" /* Version */
+#define CONFIG_FILE "shttpd.conf" /* Configuration file */
+#define HTPASSWD ".htpasswd" /* Passwords file name */
+#define URI_MAX 16384 /* Default max request size */
+#define LISTENING_PORTS "80" /* Default listening ports */
+#define INDEX_FILES "index.html,index.htm,index.php,index.cgi"
+#define CGI_EXT "cgi,pl,php" /* Default CGI extensions */
+#define SSI_EXT "shtml,shtm" /* Default SSI extensions */
+#define REALM "mydomain.com" /* Default authentication realm */
+#define DELIM_CHARS "," /* Separators for lists */
+#define EXPIRE_TIME 3600 /* Expiration time, seconds */
+#define ENV_MAX 4096 /* Size of environment block */
+#define CGI_ENV_VARS 64 /* Maximum vars passed to CGI */
+#define SERVICE_NAME "SHTTPD " VERSION /* NT service name */
+
+#endif /* CONFIG_HEADER_DEFINED */
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/io_ssl.c.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/io_ssl.c
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/io_ssl.c.orig 2016-07-27 16:03:55.000000000 +0200
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/io_ssl.c 2017-01-16 14:40:03.094728843 +0100
@@ -11,23 +11,6 @@
#include "defs.h"
#if !defined(NO_SSL)
-struct ssl_func ssl_sw[] = {
@ -84,21 +84,57 @@ diff -up openwsman-2.6.2/src/server/shttpd/io_ssl.c.orig openwsman-2.6.2/src/ser
- {"SSL_library_init", {0}},
- {"SSL_CTX_use_PrivateKey_file", {0}},
- {"SSL_CTX_use_certificate_file",{0}},
- {"SSL_CTX_free", {0}},
- {"SSL_pending", {0}},
- {"SSL_CTX_use_certificate_chain_file",{0}},
- {"SSL_CTX_ctrl", {0}},
- {NULL, {0}}
-};
-
void
ssl_handshake(struct stream *stream)
diff -up openwsman-2.6.2/src/server/shttpd/ssl.h.orig openwsman-2.6.2/src/server/shttpd/ssl.h
--- openwsman-2.6.2/src/server/shttpd/ssl.h.orig 2015-10-19 15:27:46.000000000 +0200
+++ openwsman-2.6.2/src/server/shttpd/ssl.h 2017-01-09 15:12:40.824514919 +0100
@@ -12,56 +12,4 @@
_shttpd_ssl_handshake(struct stream *stream)
{
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/shttpd.c.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/shttpd.c
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/shttpd.c.orig 2016-07-27 16:03:55.000000000 +0200
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/shttpd.c 2017-01-16 14:40:03.095728843 +0100
@@ -1474,20 +1474,14 @@ set_ssl(struct shttpd_ctx *ctx, const ch
char *ssl_disabled_protocols = wsmand_options_get_ssl_disabled_protocols();
int retval = FALSE;
# include <openssl/ssl.h>
- /* Load SSL library dynamically */
- if ((lib = dlopen(SSL_LIB, RTLD_LAZY)) == NULL) {
- _shttpd_elog(E_LOG, NULL, "set_ssl: cannot load %s", SSL_LIB);
- return (FALSE);
- }
-
- for (fp = ssl_sw; fp->name != NULL; fp++)
- if ((fp->ptr.v_void = dlsym(lib, fp->name)) == NULL) {
- _shttpd_elog(E_LOG, NULL,"set_ssl: cannot find %s", fp->name);
- return (FALSE);
- }
-
/* Initialize SSL crap */
+ debug("Initialize SSL");
+ SSL_load_error_strings();
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
SSL_library_init();
+ #else
+ OPENSSL_init_ssl(0, NULL);
+ #endif
if ((CTX = SSL_CTX_new(SSLv23_server_method())) == NULL)
_shttpd_elog(E_LOG, NULL, "SSL_CTX_new error");
@@ -1523,7 +1517,7 @@ set_ssl(struct shttpd_ctx *ctx, const ch
if (strncasecmp(protocols[idx].name, ssl_disabled_protocols, blank_ptr-ssl_disabled_protocols) == 0) {
//_shttpd_elog(E_LOG, NULL, "SSL: disable %s protocol", protocols[idx].name);
debug("SSL: disable %s protocol", protocols[idx].name);
- SSL_CTX_ctrl(CTX, SSL_CTRL_OPTIONS, protocols[idx].opt, NULL);
+ SSL_CTX_set_options(CTX, protocols[idx].opt);
break;
}
}
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/ssl.h.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/ssl.h
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/ssl.h.orig 2016-07-27 16:03:55.000000000 +0200
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/src/server/shttpd/ssl.h 2017-01-16 14:40:03.095728843 +0100
@@ -12,50 +12,4 @@
#include <openssl/ssl.h>
-#else
-
@ -114,8 +150,8 @@ diff -up openwsman-2.6.2/src/server/shttpd/ssl.h.orig openwsman-2.6.2/src/server
-
-#define SSL_ERROR_WANT_READ 2
-#define SSL_ERROR_WANT_WRITE 3
-#define SSL_ERROR_SYSCALL 5
-#define SSL_FILETYPE_PEM 1
-#define SSL_ERROR_SYSCALL 5
-#define SSL_FILETYPE_PEM 1
-
#endif
-
@ -147,9 +183,3 @@ diff -up openwsman-2.6.2/src/server/shttpd/ssl.h.orig openwsman-2.6.2/src/server
- const char *, int)) FUNC(11))((x), (y), (z))
-#define SSL_CTX_use_certificate_file(x,y,z) (* (int (*)(SSL_CTX *, \
- const char *, int)) FUNC(12))((x), (y), (z))
-#define SSL_CTX_use_certificate_chain_file(x,y) (* (int (*)(SSL_CTX *, \
- const char *)) FUNC(15))((x), (y))
-#define SSL_CTX_free(x) (*(void (*)(SSL_CTX *)) FUNC(13))(x)
-#define SSL_pending(x) (*(int (*)(SSL *)) FUNC(14))(x)
-#define SSL_CTX_ctrl(w,x,y,z) (*(long (*)(SSL_CTX *,int,long,void *)) FUNC(16))((w),(x),(y),(z))
-

View File

@ -1,6 +1,6 @@
diff -up openwsman-2.6.2/bindings/CMakeLists.txt.orig openwsman-2.6.2/bindings/CMakeLists.txt
--- openwsman-2.6.2/bindings/CMakeLists.txt.orig 2015-10-19 15:27:46.000000000 +0200
+++ openwsman-2.6.2/bindings/CMakeLists.txt 2016-08-10 11:55:36.588710280 +0200
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/CMakeLists.txt.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/CMakeLists.txt
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/CMakeLists.txt.orig 2016-07-27 16:03:55.000000000 +0200
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/CMakeLists.txt 2017-01-16 14:08:53.201529586 +0100
@@ -10,6 +10,7 @@ include_directories(${CMAKE_BINARY_DIR})
IF( BUILD_PYTHON )
@ -9,14 +9,14 @@ diff -up openwsman-2.6.2/bindings/CMakeLists.txt.orig openwsman-2.6.2/bindings/C
ENDIF( BUILD_PYTHON )
IF( BUILD_RUBY )
diff -up openwsman-2.6.2/bindings/python3/CMakeLists.txt.orig openwsman-2.6.2/bindings/python3/CMakeLists.txt
--- openwsman-2.6.2/bindings/python3/CMakeLists.txt.orig 2016-08-10 11:55:36.577710278 +0200
+++ openwsman-2.6.2/bindings/python3/CMakeLists.txt 2016-08-10 15:15:46.005991322 +0200
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python3/CMakeLists.txt.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python3/CMakeLists.txt
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python3/CMakeLists.txt.orig 2017-01-16 14:08:09.000000000 +0100
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python3/CMakeLists.txt 2017-01-16 14:10:48.945480021 +0100
@@ -12,11 +12,28 @@ enable_testing()
add_subdirectory(tests)
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" OUTPUT_VARIABLE PYTHON_LIB_DIR)
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))" OUTPUT_VARIABLE PYTHON_LIB_DIR)
-STRING(REPLACE "\n" "" PYTHON_LIB_DIR "${PYTHON_LIB_DIR}")
+MESSAGE(STATUS "Python3 build:")
+unset(Python_ADDITIONAL_VERSIONS)
@ -64,14 +64,14 @@ diff -up openwsman-2.6.2/bindings/python3/CMakeLists.txt.orig openwsman-2.6.2/bi
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pywsman.py DESTINATION ${PYTHON_LIB_DIR} )
+INSTALL(TARGETS pywsman LIBRARY DESTINATION ${PYTHON3_LIB_DIR})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pywsman.py DESTINATION ${PYTHON3_LIB_DIR} )
diff -up openwsman-2.6.2/bindings/python/CMakeLists.txt.orig openwsman-2.6.2/bindings/python/CMakeLists.txt
--- openwsman-2.6.2/bindings/python/CMakeLists.txt.orig 2015-10-19 15:27:46.000000000 +0200
+++ openwsman-2.6.2/bindings/python/CMakeLists.txt 2016-08-10 15:00:21.126141161 +0200
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python/CMakeLists.txt.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python/CMakeLists.txt
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python/CMakeLists.txt.orig 2016-07-27 16:03:55.000000000 +0200
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python/CMakeLists.txt 2017-01-16 14:12:51.954427345 +0100
@@ -12,11 +12,52 @@ enable_testing()
add_subdirectory(tests)
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" OUTPUT_VARIABLE PYTHON_LIB_DIR)
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))" OUTPUT_VARIABLE PYTHON_LIB_DIR)
-STRING(REPLACE "\n" "" PYTHON_LIB_DIR "${PYTHON_LIB_DIR}")
+MESSAGE(STATUS "Python2 build:")
+set(Python_ADDITIONAL_VERSIONS 2.7)
@ -143,18 +143,18 @@ diff -up openwsman-2.6.2/bindings/python/CMakeLists.txt.orig openwsman-2.6.2/bin
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pywsman.py DESTINATION ${PYTHON_LIB_DIR} )
+INSTALL(TARGETS pywsman LIBRARY DESTINATION ${PYTHON2_LIB_DIR})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pywsman.py DESTINATION ${PYTHON2_LIB_DIR} )
diff -up openwsman-2.6.2/CMakeLists.txt.orig openwsman-2.6.2/CMakeLists.txt
--- openwsman-2.6.2/CMakeLists.txt.orig 2015-10-19 15:27:46.000000000 +0200
+++ openwsman-2.6.2/CMakeLists.txt 2016-08-10 11:55:36.588710280 +0200
@@ -168,30 +168,6 @@ MESSAGE(STATUS "Building Ruby bindings"
diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/CMakeLists.txt.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/CMakeLists.txt
--- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/CMakeLists.txt.orig 2016-07-27 16:03:55.000000000 +0200
+++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/CMakeLists.txt 2017-01-16 14:13:37.300407926 +0100
@@ -175,30 +175,6 @@ MESSAGE(STATUS "Building Ruby bindings"
ENDIF(NOT RUBY_INCLUDE_PATH )
ENDIF( BUILD_RUBY )
-IF( BUILD_PYTHON )
- MESSAGE(STATUS "Building Python bindings" )
- FIND_PACKAGE(PythonLibs)
- FIND_PACKAGE(PythonLibs 2.6 REQUIRED)
- IF (PYTHON_LIBRARY)
- FIND_PACKAGE(PythonInterp REQUIRED)
- FIND_PACKAGE(PythonInterp 2.6 REQUIRED)
- MESSAGE(STATUS "Found PythonLibs...")
- FIND_PACKAGE(PythonLinkLibs)
- IF (PYTHON_LINK_LIBS)

View File

@ -1,6 +1,9 @@
# RubyGems's macros expect gem_name to exist.
%global gem_name %{name}
%global commit 4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: openwsman
BuildRequires: swig
BuildRequires: libcurl-devel libxml2-devel pam-devel sblim-sfcc-devel
@ -8,26 +11,28 @@ BuildRequires: python3 python3-devel python2 python2-devel ruby ruby-devel ruby
BuildRequires: perl-devel perl-generators pkgconfig openssl-devel
BuildRequires: cmake
BuildRequires: systemd-units
Version: 2.6.2
Release: 11%{?dist}
Version: 2.6.3
Release: 1.git%{shortcommit}%{?dist}
Url: http://www.openwsman.org/
License: BSD
Group: Applications/System
Summary: Open source Implementation of WS-Management
# You can get this tarball here:
# https://github.com/Openwsman/openwsman/archive/v%{version}.tar.gz
Source: %{name}-%{version}.tar.gz
# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
# git clone https://github.com/Openwsman/openwsman.git; cd openwsman
# git archive --format tar --prefix openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/ \
# 4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b | gzip > openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b.tar.gz
Source: %{name}-%{commit}.tar.gz
# help2man generated manpage for openwsmand binary
Source1: openwsmand.8.gz
# service file for systemd
Source2: openwsmand.service
# script for testing presence of the certificates in ExecStartPre
Source3: owsmantestcert.sh
Patch1: openwsman-2.2.7-libssl.patch
Patch2: openwsman-2.4.0-pamsetup.patch
Patch3: openwsman-2.4.12-ruby-binding-build.patch
Patch4: openwsman-2.6.2-python3.patch
Patch5: openwsman-2.6.2-openssl-1.1-fix.patch
Patch1: openwsman-2.4.0-pamsetup.patch
Patch2: openwsman-2.4.12-ruby-binding-build.patch
Patch3: openwsman-2.6.2-python3.patch
Patch4: openwsman-2.6.2-openssl-1.1-fix.patch
%description
Openwsman is a project intended to provide an open-source
@ -173,18 +178,17 @@ can use it to send shell commands to a remote Windows hosts.
%prep
%setup -q
%setup -q -n %{name}-%{commit}
# support python3
pushd bindings
cp -r python python3
popd
%patch1 -p1 -b .libssl
%patch2 -p1 -b .pamsetup
%patch3 -p1 -b .ruby-binding-build
%patch4 -p1 -b .python3
%patch5 -p1 -b .openssl-1.1-fix
%patch1 -p1 -b .pamsetup
%patch2 -p1 -b .ruby-binding-build
%patch3 -p1 -b .python3
%patch4 -p1 -b .openssl-1.1-fix
# support ruby 2.2
pushd bindings/ruby
@ -220,9 +224,9 @@ make
# Make the freshly build openwsman libraries available to build the gem's
# binary extension.
export LIBRARY_PATH=/builddir/build/BUILD/%{name}-%{version}/build/src/lib
export CPATH=/builddir/build/BUILD/%{name}-%{version}/include/
export LD_LIBRARY_PATH=/builddir/build/BUILD/%{name}-%{version}/build/src/lib/
export LIBRARY_PATH=/builddir/build/BUILD/%{name}-%{commit}/build/src/lib
export CPATH=/builddir/build/BUILD/%{name}-%{commit}/include/
export LD_LIBRARY_PATH=/builddir/build/BUILD/%{name}-%{commit}/build/src/lib/
%gem_install -n ./bindings/ruby/%{name}-%{version}.gem
@ -263,9 +267,6 @@ rm -rf %{buildroot}%{gem_instdir}/ext
mkdir -p %{buildroot}%{gem_extdir_mri}
cp -a ./build%{gem_extdir_mri}/{gem.build_complete,*.so} %{buildroot}%{gem_extdir_mri}/
# rename winrs.rb -> winrs
mv %{buildroot}/%{_bindir}/winrs.rb %{buildroot}%{_bindir}/winrs
%post -n libwsman1 -p /sbin/ldconfig
%postun -n libwsman1 -p /sbin/ldconfig
@ -359,6 +360,10 @@ rm -f /var/log/wsmand.log
%changelog
* Tue Jan 17 2017 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.6.3-1.git4391e5c
- Update to openwsman-2.6.3 from upstream VCS
(because it contains shttpd 1.42)
* Thu Jan 12 2017 Vít Ondruch <vondruch@redhat.com> - 2.6.2-11
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4

View File

@ -1,2 +1,2 @@
4f2d9b1d7da6d87fcd38a9aa23559723 openwsmand.8.gz
221163800046cca5ddb38868d3f82d7e openwsman-2.6.2.tar.gz
SHA512 (openwsmand.8.gz) = 751c40060781e8b5a847e09aee94833ed1e4fbe966f052e5023cb209361acc312078d0d75c0806bd9990da061d3048566418135d3670dd620c6b809e5d0e594c
SHA512 (openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b.tar.gz) = 9126053fb65457662e7a6275afe16b6fa6aaf978c2909aff97bca3d7dd3c8c1e7378e86ced97de42f86dd1060f2c7246ac3b1ecc4bf3d853606cc9d2d60d8eed