Browse Source

openwsman package update

Signed-off-by: basebuilder_pel7x64builder0 <basebuilder@powerel.org>
master
basebuilder_pel7x64builder0 4 years ago
parent
commit
0c537c62ce
  1. 12
      SOURCES/openwsman-2.2.7-libssl.patch
  2. 12
      SOURCES/openwsman-2.3.6-redirect.patch
  3. 148
      SPECS/openwsman.spec

12
SOURCES/openwsman-2.2.7-libssl.patch

@ -0,0 +1,12 @@
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) == '/')

12
SOURCES/openwsman-2.3.6-redirect.patch

@ -0,0 +1,12 @@
diff -up openwsman-2.3.6/src/plugins/redirect/redirect.c.orig openwsman-2.3.6/src/plugins/redirect/redirect.c
--- openwsman-2.3.6/src/plugins/redirect/redirect.c.orig 2014-02-10 12:57:37.736684292 +0100
+++ openwsman-2.3.6/src/plugins/redirect/redirect.c 2014-02-10 12:58:11.927816157 +0100
@@ -242,7 +242,7 @@ WsManClient* setup_redirect_client(WsCon
}
if (get_remote_cl_cert()){
- wsman_transport_set_cert(cl, get_remote_cert());
+ wsman_transport_set_cert(cl, get_remote_cl_cert());
if (!get_remote_cainfo())
debug("Warning: cainfo not set to enable SSL operation in Redirect Plugin\n");

148
SPECS/openwsman.spec

@ -1,9 +1,9 @@

%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif


%global commit 4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global compatver 2.3.6


Name: openwsman Name: openwsman
BuildRequires: swig BuildRequires: swig
@ -14,35 +14,23 @@ BuildRequires: perl-devel pkgconfig openssl-devel
#BuildRequires: java-1.8.0-openjdk-devel #BuildRequires: java-1.8.0-openjdk-devel
BuildRequires: cmake BuildRequires: cmake
BuildRequires: systemd-units BuildRequires: systemd-units
Version: 2.6.3 Version: 2.3.6
Release: 4.git%{shortcommit}%{?dist} Release: 13%{?dist}
Url: http://www.openwsman.org/ Url: http://www.openwsman.org/
License: BSD License: BSD
Group: Applications/System Group: Applications/System
Summary: Open source Implementation of WS-Management Summary: Open source Implementation of WS-Management
# The source for this package was pulled from upstream's vcs. Use the Source: http://downloads.sourceforge.net/project/openwsman/%{name}/%{version}/%{name}-%{version}.tar.bz2
# 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
Source0: %{name}-%{commit}.tar.gz
# help2man generated manpage for openwsmand binary # help2man generated manpage for openwsmand binary
Source1: openwsmand.8.gz Source1: openwsmand.8.gz
# service file for systemd # service file for systemd
Source2: openwsmand.service Source2: openwsmand.service
# script for testing presence of the certificates in ExecStartPre # script for testing presence of the certificates in ExecStartPre
Source3: owsmantestcert.sh Source3: owsmantestcert.sh
# source for libwsman_client lib compatibility Patch1: openwsman-2.2.7-libssl.patch
Source4: %{name}-%{compatver}.tar.bz2 Patch2: openwsman-2.4.0-pamsetup.patch
Patch0: openwsman-2.4.0-pamsetup.patch # Patch3: already upstream
# Patch1: partially upstream Patch3: openwsman-2.3.6-redirect.patch
Patch1: openwsman-2.6.2-openssl-1.1-fix.patch
# Patch2: already upstream
Patch2: openwsman-2.6.3-cipher-list-config.patch
# Patch3: fixes rhbz#1532722
Patch3: openwsman-2.6.3-http-status-line.patch
# Patch4: fixes rhbz#1547144, , already upstream
Patch4: openwsman-2.6.3-ecdh-support.patch


%description %description
Openwsman is a project intended to provide an open-source Openwsman is a project intended to provide an open-source
@ -138,14 +126,14 @@ Requires: libwsman1 = %{version}-%{release}
%description ruby %description ruby
This package provides Ruby bindings to access the openwsman client API. This package provides Ruby bindings to access the openwsman client API.


#%package java %package java
#Requires: java Requires: java
#Requires: libwsman1 = %{version} Requires: libwsman1 = %{version}
#Summary: Java bindings for openwsman client API Summary: Java bindings for openwsman client API
#Group: Development/Libraries Group: Development/Libraries


#%description java %description java
#This package provides Java bindings to access the openwsman client API. This package provides Java bindings to access the openwsman client API.




%package perl %package perl
@ -162,47 +150,12 @@ This package provides Perl bindings to access the openwsman client API.




%prep %prep
%setup -q -c -n %{name} -a 4 %setup -q
# apply patches for regular source %patch1 -p1 -b .libssl
cd %{name}-%{commit} %patch2 -p1 -b .pamsetup
%patch0 -p1 -b .pamsetup %patch3 -p1 -b .redirect
%patch1 -p1 -b .openssl-1.1-fix
%patch2 -p1 -b .cipher-list-config
%patch3 -p1 -b .http-status-line
%patch4 -p1 -b .ecdh-support


%build %build
# build regular source
cd %{name}-%{commit}
# Removing executable permissions on .c and .h files to fix rpmlint warnings.
chmod -x src/cpp/WsmanClient.h

rm -rf build
mkdir build

export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DFEDORA -DNO_SSL_CALLBACK"
export SSL_LIB=`readlink %{_libdir}/libssl.so`
export CFLAGS="-D_GNU_SOURCE -fPIE -DPIE"
export LDFLAGS="$LDFLAGS -Wl,-z,now -pie"
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS -fno-strict-aliasing" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
-DCMAKE_SKIP_RPATH=1 \
-DPACKAGE_ARCHITECTURE=`uname -m` \
-DLIB=%{_lib} \
-DBUILD_RUBY_GEM=no \
-DBUILD_JAVA=no \
..

make CFLAGS="-DSSL_LIB='\"$SSL_LIB\"'"


# build compat source
cd ../../%{name}-%{compatver}
# Removing executable permissions on .c and .h files to fix rpmlint warnings. # Removing executable permissions on .c and .h files to fix rpmlint warnings.
chmod -x src/cpp/WsmanClient.h chmod -x src/cpp/WsmanClient.h


@ -224,14 +177,11 @@ cmake \
-DPACKAGE_ARCHITECTURE=`uname -m` \ -DPACKAGE_ARCHITECTURE=`uname -m` \
-DLIB=%{_lib} \ -DLIB=%{_lib} \
-DBUILD_RUBY_GEM=no \ -DBUILD_RUBY_GEM=no \
-DBUILD_JAVA=no \
.. ..


make CFLAGS="-DSSL_LIB='\"$SSL_LIB\"'" make CFLAGS="-DSSL_LIB='\"$SSL_LIB\"'"


%install %install
# install regular source
cd %{name}-%{commit}
cd build cd build
make DESTDIR=%{buildroot} install make DESTDIR=%{buildroot} install
cd .. cd ..
@ -254,16 +204,6 @@ cp %SOURCE1 %{buildroot}/%{_mandir}/man8/
install -m 644 include/wsman-xml.h %{buildroot}/%{_includedir}/openwsman install -m 644 include/wsman-xml.h %{buildroot}/%{_includedir}/openwsman
install -m 644 include/wsman-xml-binding.h %{buildroot}/%{_includedir}/openwsman install -m 644 include/wsman-xml-binding.h %{buildroot}/%{_includedir}/openwsman
install -m 644 include/wsman-dispatcher.h %{buildroot}/%{_includedir}/openwsman install -m 644 include/wsman-dispatcher.h %{buildroot}/%{_includedir}/openwsman
# remove winrs
rm -f %{buildroot}/%{_bindir}/winrs

# install compat library
cd ../%{name}-%{compatver}
install build/src/lib/libwsman_client.so.1.0.0 %{buildroot}/%{_libdir}
# create symlink
pushd %{buildroot}/%{_libdir}
ln -s libwsman_client.so.1.0.0 libwsman_client.so.1
popd


%post -n libwsman1 -p /sbin/ldconfig %post -n libwsman1 -p /sbin/ldconfig


@ -286,7 +226,7 @@ rm -f /var/log/wsmand.log
%postun client -p /sbin/ldconfig %postun client -p /sbin/ldconfig


%files -n libwsman1 %files -n libwsman1
%doc %{name}-%{commit}/AUTHORS %{name}-%{commit}/COPYING %{name}-%{commit}/ChangeLog %{name}-%{commit}/README.md %{name}-%{commit}/TODO %doc AUTHORS COPYING ChangeLog README.md TODO
%{_libdir}/libwsman.so.* %{_libdir}/libwsman.so.*
%{_libdir}/libwsman_client.so.* %{_libdir}/libwsman_client.so.*
%{_libdir}/libwsman_curl_client_transport.so.* %{_libdir}/libwsman_curl_client_transport.so.*
@ -295,30 +235,30 @@ rm -f /var/log/wsmand.log
%{_includedir}/* %{_includedir}/*
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%{_libdir}/*.so %{_libdir}/*.so
%doc %{name}-%{commit}/AUTHORS %{name}-%{commit}/COPYING %{name}-%{commit}/ChangeLog %{name}-%{commit}/README.md %doc AUTHORS COPYING ChangeLog README.md


%files python %files python
%{python_sitearch}/*.so %{python_sitearch}/*.so
%{python_sitearch}/*.py %{python_sitearch}/*.py
#%{python_sitearch}/*.pyc #%{python_sitearch}/*.pyc
#%{python_sitearch}/*.pyo #%{python_sitearch}/*.pyo
%doc %{name}-%{commit}/AUTHORS %{name}-%{commit}/COPYING %{name}-%{commit}/ChangeLog %{name}-%{commit}/README.md %doc AUTHORS COPYING ChangeLog README.md


%files ruby %files ruby
%{ruby_vendorarchdir}/_openwsman.so %{ruby_vendorarchdir}/_openwsman.so
%dir %{ruby_vendorlibdir}/openwsman %dir %{ruby_vendorlibdir}/openwsman
%{ruby_vendorlibdir}/openwsman/*.rb %{ruby_vendorlibdir}/openwsman/*.rb
%doc %{name}-%{commit}/AUTHORS %{name}-%{commit}/COPYING %{name}-%{commit}/ChangeLog %{name}-%{commit}/README.md %doc AUTHORS COPYING ChangeLog README.md




#%files java %files java
#%defattr(-,root,root) %defattr(-,root,root)
#%{_javadir}/*jar %{_javadir}/*jar


%files perl %files perl
%{perl_vendorarch}/openwsman.so %{perl_vendorarch}/openwsman.so
%{perl_vendorlib}/openwsman.pm %{perl_vendorlib}/openwsman.pm
%doc %{name}-%{commit}/AUTHORS %{name}-%{commit}/COPYING %{name}-%{commit}/ChangeLog %{name}-%{commit}/README.md %doc AUTHORS COPYING ChangeLog README.md


%files server %files server
# Don't remove *.so files from the server package. # Don't remove *.so files from the server package.
@ -340,41 +280,15 @@ rm -f /var/log/wsmand.log
%{_sbindir}/openwsmand %{_sbindir}/openwsmand
%{_libdir}/libwsman_server.so.* %{_libdir}/libwsman_server.so.*
%{_mandir}/man8/* %{_mandir}/man8/*
%doc %{name}-%{commit}/AUTHORS %{name}-%{commit}/COPYING %{name}-%{commit}/ChangeLog %{name}-%{commit}/README.md %doc AUTHORS COPYING ChangeLog README.md


%files client %files client
%{_libdir}/libwsman_clientpp.so.* %{_libdir}/libwsman_clientpp.so.*
%config(noreplace) %{_sysconfdir}/openwsman/openwsman_client.conf %config(noreplace) %{_sysconfdir}/openwsman/openwsman_client.conf
%doc %{name}-%{commit}/AUTHORS %{name}-%{commit}/COPYING %{name}-%{commit}/ChangeLog %{name}-%{commit}/README.md %doc AUTHORS COPYING ChangeLog README.md




%changelog %changelog
* Fri Jun 15 2018 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.6.3-4.git4391e5c
- Explicitly disable build of java bindings
Resolves: #1540723
- Add support for ECDH key exchange algorithm
Resolves: #1547144

* Wed Jan 31 2018 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.6.3-3.git4391e5c
- Add libwsman-client.so.1 for backward compatibility
Resolves: #1537528

* Mon Jan 22 2018 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.6.3-2.git4391e5c
- Fix malformed HTTP 200 status line
Resolves: #1532722

* Tue Oct 03 2017 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.6.3-1.git4391e5c
- Update to openwsman-2.6.3 from upstream VCS
Resolves: #1208364 #1296198
- Backport support for configuring used cipher suite
Resolves: #1454607

* Wed Mar 15 2017 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.3.6-14
- Backport option for disabling various SSL protocols
Resolves: #1190689
- Fix curl_easy_setopt call for CURLOPT_SSL_VERIFYPEER/HOST
Resolves: #1319949

* Mon Feb 10 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.3.6-13 * Mon Feb 10 2014 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.3.6-13
- Fix libredirect.so doesn't load - Fix libredirect.so doesn't load
Resolves: #1061676 Resolves: #1061676

Loading…
Cancel
Save