diff --git a/.gitignore b/.gitignore index e8812a6..2eda3af 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ openwsman-2.2.3.tar.bz2 +/openwsman-2.2.4.tar.bz2 diff --git a/openwsman-2.2.3-initscript.patch b/openwsman-2.2.3-initscript.patch index a41f418..432e962 100644 --- a/openwsman-2.2.3-initscript.patch +++ b/openwsman-2.2.3-initscript.patch @@ -1,7 +1,25 @@ -diff -up openwsman-2.2.3/etc/init/openwsmand.sh.in.orig openwsman-2.2.3/etc/init/openwsmand.sh.in ---- openwsman-2.2.3/etc/init/openwsmand.sh.in.orig 2010-09-06 15:49:57.000000000 +0200 -+++ openwsman-2.2.3/etc/init/openwsmand.sh.in 2010-09-13 15:09:17.823620695 +0200 -@@ -19,13 +19,13 @@ +diff -up openwsman-2.2.4/etc/init/openwsmand.sh.cmake.orig openwsman-2.2.4/etc/init/openwsmand.sh.cmake +--- openwsman-2.2.4/etc/init/openwsmand.sh.cmake.orig 2010-10-06 11:10:10.000000000 +0200 ++++ openwsman-2.2.4/etc/init/openwsmand.sh.cmake 2010-11-11 16:52:19.494661859 +0100 +@@ -4,28 +4,28 @@ + # Provides: openwsmand + # Required-Start: $remote_fs + # Required-Stop: $network +-# Default-Start: 2 3 4 5 +-# Default-Stop: 0 1 6 ++# Default-Start: ++# Default-Stop: + # Short-Description: Openwsman Daemon + # Description: openwsmand + # Start/Stop the Openwsman Daemon + ### END INIT INFO + # + # +-# chkconfig: 2345 36 64 ++# chkconfig: - 36 64 + # description: Openwsman Daemon + # processname: openwsmand + NAME=openwsmand DAEMON=/usr/sbin/$NAME OPTIONS=-S # with SSL @@ -20,8 +38,8 @@ diff -up openwsman-2.2.3/etc/init/openwsmand.sh.in.orig openwsman-2.2.3/etc/init @@ -65,6 +65,7 @@ start() echo "NOTE: The script uses /dev/random device for generating some random bits while generating the server key." - echo -e " If this takes too long, you can replace the value of \"RANDFILE\" in @SYSCONFDIR@/ssleay.cnf with /dev/urandom.\n Please understand the implications of doing do." -+ exit 6 # Six means "program is not configured", seems to be suitable value + echo " If this takes too long, you can replace the value of \"RANDFILE\" in @SYSCONFDIR@/ssleay.cnf with /dev/urandom. Please understand the implications of replacing the RNADFILE." ++ exit 6 # Six means "program is not configured", seems to be suitable value fi fi @@ -31,15 +49,14 @@ diff -up openwsman-2.2.3/etc/init/openwsmand.sh.in.orig openwsman-2.2.3/etc/init rm -f $lockfile + # pid file should be removed by server itself, but it's marked as + # TODO in wsmand.c source file;) -+ rm -f $PIDFILE ++ rm -f $PIDFILE ;; restart) -@@ -136,7 +140,16 @@ case "$1" in - if [ $? -eq 0 ]; then +@@ -137,6 +141,16 @@ case "$1" in echo " running" else -- echo " stopped" + echo " stopped" + if [ -e $PIDFILE ]; then + echo " stopped, but pid file exists" + exit 1 @@ -53,10 +70,10 @@ diff -up openwsman-2.2.3/etc/init/openwsmand.sh.in.orig openwsman-2.2.3/etc/init fi fi ;; -@@ -147,6 +160,8 @@ case "$1" in +@@ -147,6 +161,8 @@ case "$1" in *) - echo "Usage: $0 {restart|start|stop|reload|force-reload|status}" + echo "Usage: $0 {restart|start|stop|reload|force-reload|status|condrestart}" + [ "$1" = "usage" ] && exit 0 + exit 2 esac diff --git a/openwsman-authors.patch b/openwsman-authors.patch deleted file mode 100644 index 999609f..0000000 --- a/openwsman-authors.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up openwsman-2.2.3/AUTHORS.diff openwsman-2.2.3/AUTHORS ---- openwsman-2.2.3/AUTHORS.diff 2010-04-20 10:42:40.156797595 -0500 -+++ openwsman-2.2.3/AUTHORS 2010-04-20 10:43:10.440803220 -0500 -@@ -13,5 +13,10 @@ Contributions and Patches by: - Viktor Mihajlovski, IBM - Klaus Kaempf, Novell - -+AUTHORS from Spec file: -+ Anas Nashif -+ Vadim Revyakin -+ Denis Sadykov -+ - - If you think you name should be here and I forgot it, please let me know. diff --git a/openwsman-initscript.patch b/openwsman-initscript.patch deleted file mode 100644 index c6f8aad..0000000 --- a/openwsman-initscript.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff -up ./etc/init/openwsmand.sh.in.old ./etc/init/openwsmand.sh.in ---- ./etc/init/openwsmand.sh.in.old 2010-08-04 16:43:40.212100948 -0500 -+++ ./etc/init/openwsmand.sh.in 2010-08-04 17:26:20.013849220 -0500 -@@ -4,15 +4,15 @@ - # Provides: openwsmand - # Required-Start: $remote_fs - # Required-Stop: $network --# Default-Start: 2 3 4 5 --# Default-Stop: 0 1 6 -+# Default-Start: -+# Default-Stop: - # Short-Description: Openwsman Daemon - # Description: openwsmand - # Start/Stop the Openwsman Daemon - ### END INIT INFO - # - # --# chkconfig: 2345 36 64 -+# chkconfig: - 36 64 - # description: Openwsman Daemon - # processname: openwsmand - -@@ -56,20 +56,16 @@ start() - echo "Using common server certificate /etc/ssl/servercerts/servercert.pem" - ln -s /etc/ssl/servercerts/server{cert,key}.pem @SYSCONFDIR@ - else -- echo "Generating Openwsman server public certificate and private key" -- FQDN=`hostname --fqdn` -- if [ "x${FQDN}" = "x" ]; then -- FQDN=localhost.localdomain -- fi --cat << EOF | sh @SYSCONFDIR@/owsmangencert.sh > /dev/null 2>&1 ---- --SomeState --SomeCity --SomeOrganization --SomeOrganizationalUnit --${FQDN} --root@${FQDN} --EOF -+ echo "FAILED: Starting openwsman server" -+ echo "There is no ssl server key available for openwsman server to use." -+ echo -e "Please generate one with the following script and start the openwsman service again:\n" -+ echo "##################################" -+ echo "/etc/openwsman/owsmangencert.sh" -+ echo "=================================" -+ -+ echo "NOTE: The script uses /dev/random device for generating some random bits while generating the server key." -+ echo -e " If this takes too long, you can replace the value of \"RANDFILE\" in @SYSCONFDIR@/ssleay.cnf with /dev/urandom.\n Please understand the implications of doing do." -+ - fi - fi - -@@ -145,6 +141,10 @@ case "$1" in - fi - ;; - -+ condrestart) -+ [ -e $lockfile ] && restart -+ ;; -+ - *) - echo "Usage: $0 {restart|start|stop|reload|force-reload|status}" - esac -diff -up ./etc/owsmangencert.sh.in.old ./etc/owsmangencert.sh.in ---- ./etc/owsmangencert.sh.in.old 2010-08-04 17:14:31.241100874 -0500 -+++ ./etc/owsmangencert.sh.in 2010-08-04 17:21:02.944850958 -0500 -@@ -1,7 +1,5 @@ - #!/bin/sh - --#!/bin/sh -e -- - CERTFILE=@SYSCONFDIR@/servercert.pem - KEYFILE=@SYSCONFDIR@/serverkey.pem - CNFFILE=@SYSCONFDIR@/ssleay.cnf -@@ -15,19 +13,33 @@ if [ "$1" = "--force" ]; then - shift - fi - -+FQDN=`hostname --fqdn` -+ if [ "x${FQDN}" = "x" ]; then -+ FQDN=localhost.localdomain -+ fi - echo - echo creating selfsingned certificate - echo "replace it with one signed by a certification authority (CA)" - echo --echo enter your ServerName at the Common Name prompt -+#echo enter your ServerName at the Common Name prompt - echo - - # use special .cnf, because with normal one no valid selfsigned - # certificate is created - --export RANDFILE=/dev/random --openssl req -days 365 $@ -config $CNFFILE \ -+#export RANDFILE=/dev/random -+cat < 10331) -+]) -+ -+AC_DEFUN([SWIG_VERSION_BAD],[ -+ AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]) -+ SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' -+]) -+ - AC_DEFUN([AC_PROG_SWIG],[ - AC_PATH_PROG([SWIG],[swig]) - if test -z "$SWIG" ; then -@@ -199,19 +213,44 @@ AC_DEFUN([AC_PROG_SWIG],[ - if test -z "$available_patch" ; then - [available_patch=0] - fi -- if test $available_major -ne $required_major \ -- -o $available_minor -ne $required_minor \ -- -o $available_patch -lt $required_patch ; then -- AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]) -- SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' -- else -- AC_MSG_NOTICE([SWIG executable is '$SWIG']) -- SWIG_LIB=`$SWIG -swiglib` -- AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB']) -- SWIG_VERSION=`echo $(( $available_major * 100 * 100 + $available_minor * 100 + $available_patch ))` -- AC_MSG_NOTICE([SWIG version is '$SWIG_VERSION']) -- # AM_CONDITIONAL(SWIG_NEW_OPTIONS, test "$SWIG_VERSION" \> 10331) -- fi -+ -+ -+ -+ if test $available_major -gt $required_major; then -+ # the available major is greater than required major --GOOD -+ SWIG_VERSION_GOOD() -+ -+ elif test $available_major -lt $required_major ; then -+ # the avialable major is less than required major -- BAD -+ SWIG_VERSION_BAD() -+ else -+ # the available and require major are equal check the minor and patch versions. -+ -+ if test $available_minor -gt $required_minor ; then -+ # GOOD -+ SWIG_VERSION_GOOD() -+ elif test $avaialble_minor -lt $required_minor ; then -+ # BAD -+ SWIG_VERSION_BAD() -+ else -+ # the minor version are also equal -+ -+ if test $available_patch -gt $required_patch ; then -+ # GOOD -+ SWIG_VERSION_GOOD() -+ elif test $available_minor -lt $required_minor ; then -+ # BAD -+ SWIG_VERSION_BAD() -+ else -+ # all the available major, minor and patch levels are the same as the required -- GOOD -+ SWIG_VERSION_GOOD() -+ fi -+ fi -+ fi -+ -+ -+ -+ - else - AC_MSG_WARN([cannot determine SWIG version]) - SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' diff --git a/openwsman.spec b/openwsman.spec index 892668c..f9e0d19 100644 --- a/openwsman.spec +++ b/openwsman.spec @@ -1,34 +1,29 @@ -# -# spec file for package openwsman (Version 2.2.3) -# -# norootforbuild - -%{!?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)")} +%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_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif %{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')} %{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"] ')} Name: openwsman BuildRequires: swig BuildRequires: libcurl-devel libxml2-devel pam-devel sblim-sfcc-devel -BuildRequires: python python-devel ruby ruby-devel perl +BuildRequires: python python-devel ruby ruby-devel ruby-rdoc perl BuildRequires: perl-devel pkgconfig openssl-devel -BuildRequires: libtool +BuildRequires: cmake Requires: net-tools -Version: 2.2.3 -Release: 9%{?dist} +Version: 2.2.4 +Release: 1%{?dist} Url: http://www.openwsman.org/ License: BSD Group: Applications/System -Summary: Opensource Implementation of WS-Management +Summary: Open source Implementation of WS-Management Source: http://downloads.sourceforge.net/project/openwsman/%{name}/%{version}/%{name}-%{version}.tar.bz2 -Patch0: %{name}-initscript.patch -Patch1: %{name}-randfile.patch -Patch2: %{name}-authors.patch -Patch3: %{name}-swig-ver-check.patch -Patch4: %{name}-sitelibdir.patch -Patch5: openwsman-2.2.3-initscript.patch +# help2man generated manpage for openwsmand binary +Source1: openwsmand.8.gz +Patch0: %{name}-sitelibdir.patch +Patch1: openwsman-2.2.3-initscript.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXXX) %description @@ -46,7 +41,7 @@ all system management aspects. %package -n libwsman1 License: BSD Group: System Environment/Libraries -Summary: Opensource Implementation of WS-Management +Summary: Open source Implementation of WS-Management Provides: %{name} = %{version} Obsoletes: %{name} < %{version} @@ -59,7 +54,7 @@ Openwsman library for packages dependent on openwsman %package -n libwsman-devel License: BSD Group: Development/Libraries -Summary: Opensource Implementation of WS-Management +Summary: Open source Implementation of WS-Management Provides: %{name}-devel = %{version} Obsoletes: %{name}-devel < %{version} Requires: libwsman1 = %{version} @@ -139,43 +134,57 @@ This package provides Perl bindings to access the openwsman client API. %prep %setup -q +# don't make backup of file patched by patch0, it'll be installed... %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -b .initscript +%patch1 -p1 -b .initscript %build -sh autoconfiscate.sh # Removing executable permissions on .c and .h files to fix rpmlint warnings. chmod -x src/cpp/WsmanClient.h -chmod -x src/lib/wsman-filter.c -chmod -x include/wsman-filter.h -%configure \ - --disable-more-warnings \ - --disable-static \ - --enable-python \ - --enable-ruby \ - --enable-perl \ - --enable-ipv6 -#make clean + +rm -rf build +mkdir build export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DFEDORA" -make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_flags} +export SSL_LIB=`readlink %{_libdir}/libssl.so` +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} \ + .. + +make CFLAGS="-DSSL_LIB='\"$SSL_LIB\"'" %install rm -rf %{buildroot} +cd build make DESTDIR=%{buildroot} install +cd .. rm -f %{buildroot}/%{_libdir}/*.la rm -f %{buildroot}/%{_libdir}/openwsman/plugins/*.la rm -f %{buildroot}/%{_libdir}/openwsman/authenticators/*.la -mkdir -p %{buildroot}/%{_sysconfdir}/init.d +[ -d %{buildroot}/%{ruby_sitelib} ] && rm -f %{buildroot}/%{ruby_sitelib}/openwsmanplugin.rb +[ -d %{buildroot/}%{ruby_vendorlib} ] && rm -f %{buildroot}/%{ruby_vendorlib}/openwsmanplugin.rb +mkdir -p %{buildroot}%{_sysconfdir}/init.d install -m 644 etc/openwsman.conf %{buildroot}/%{_sysconfdir}/openwsman -install -m 644 etc/ssleay.cnf %{buildroot}/%{_sysconfdir}/openwsman +install -m 644 etc/openwsman_client.conf %{buildroot}/%{_sysconfdir}/openwsman mkdir -p %{buildroot}/%{_sysconfdir}/rc.d/init.d -install -m 755 etc/init/openwsmand.sh %{buildroot}/%{_sysconfdir}/rc.d/init.d/openwsmand +install -m 755 build/etc/init/openwsmand.sh %{buildroot}/%{_sysconfdir}/rc.d/init.d/openwsmand +install -m 644 etc/ssleay.cnf %{buildroot}/%{_sysconfdir}/openwsman ln -sf %{_sysconfdir}/rc.d/init.d/openwsmand %{buildroot}/%{_sbindir}/rcopenwsmand +# install manpage +mkdir -p %{buildroot}/%{_mandir}/man8/ +cp %SOURCE1 %{buildroot}/%{_mandir}/man8/ +# install missing headers +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-dispatcher.h %{buildroot}/%{_includedir}/openwsman %clean rm -rf %{buildroot} @@ -223,17 +232,16 @@ fi %files python %defattr(-,root,root,-) %{python_sitearch}/*.so -%{python_sitelib}/*.py -%{python_sitelib}/*.pyc -%{python_sitelib}/*.pyo +%{python_sitearch}/*.py +%{python_sitearch}/*.pyc +%{python_sitearch}/*.pyo %doc AUTHORS COPYING ChangeLog README %files ruby %defattr(-,root,root,-) %{ruby_sitearch}/openwsman.so %dir %{ruby_sitelib}/openwsman -%{ruby_sitelib}/openwsman/openwsman.rb -%{ruby_sitelib}/openwsman/xmlnode.rb +%{ruby_sitelib}/openwsman/*.rb %doc AUTHORS COPYING ChangeLog README %files perl @@ -262,15 +270,23 @@ fi %{_sbindir}/openwsmand %{_sbindir}/rcopenwsmand %{_libdir}/libwsman_server.so.* +%{_mandir}/man8/* %doc AUTHORS COPYING ChangeLog README %files client %defattr(-,root,root,-) %{_libdir}/libwsman_clientpp.so.* +%config(noreplace) %{_sysconfdir}/openwsman/openwsman_client.conf %doc AUTHORS COPYING ChangeLog README %changelog +* Tue Nov 16 2010 Vitezslav Crhonek - 2.2.4-1 +- Update to openwsman-2.2.4 +- Add help2man generated manpage for openwsmand binary +- Add missing openwsman headers to libwsman-devel +- Add configuration file to openwsman-client + * Wed Sep 29 2010 jkeating - 2.2.3-9 - Rebuilt for gcc bug 634757 diff --git a/openwsmand.8.gz b/openwsmand.8.gz new file mode 100644 index 0000000..4d0729b Binary files /dev/null and b/openwsmand.8.gz differ diff --git a/sources b/sources index c9fec5e..fc57af3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -79f637d86a2cbd2d6763b80f68e4bc96 openwsman-2.2.3.tar.bz2 +e7e9da7a8c55d28c08151940d7ac61bd openwsman-2.2.4.tar.bz2