Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 300467cdce | |||
| 0721437f49 | |||
| 6d2a5044f5 | |||
| dbb5dd66cc | |||
| 8eb31f4f79 | |||
| acf789a807 | |||
| 68810c26ba | |||
| 8121b3b621 | |||
| 1386e9a847 | |||
| d63da6d7c9 | |||
| dd3edc2fa1 |
@@ -1,6 +1,6 @@
|
||||
diff -up ./etc/init/openwsmand.sh.in.new ./etc/init/openwsmand.sh.in
|
||||
--- ./etc/init/openwsmand.sh.in.new 2009-12-16 18:16:06.000000000 -0600
|
||||
+++ ./etc/init/openwsmand.sh.in 2009-12-16 18:16:18.000000000 -0600
|
||||
diff -up ./etc/init/openwsmand.sh.in.bak ./etc/init/openwsmand.sh.in
|
||||
--- ./etc/init/openwsmand.sh.in.bak 2010-08-10 10:43:50.158889277 -0500
|
||||
+++ ./etc/init/openwsmand.sh.in 2010-08-10 10:46:19.345860143 -0500
|
||||
@@ -4,21 +4,21 @@
|
||||
# Provides: openwsmand
|
||||
# Required-Start: $remote_fs
|
||||
@@ -46,7 +46,36 @@ diff -up ./etc/init/openwsmand.sh.in.new ./etc/init/openwsmand.sh.in
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
@@ -71,16 +73,28 @@ EOF
|
||||
@@ -52,35 +54,43 @@ case "$1" in
|
||||
echo "Using common server certificate /etc/ssl/servercerts/servercert.pem"
|
||||
ln -s /etc/ssl/servercerts/server{cert,key}.pem /etc/openwsman/
|
||||
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 so."
|
||||
+
|
||||
fi
|
||||
fi
|
||||
|
||||
# Start daemons.
|
||||
echo -n "Starting the $DESCRIPTIVE"
|
||||
@@ -79,7 +108,7 @@ diff -up ./etc/init/openwsmand.sh.in.new ./etc/init/openwsmand.sh.in
|
||||
rm -f $lockfile
|
||||
;;
|
||||
|
||||
@@ -91,19 +105,40 @@ EOF
|
||||
@@ -91,19 +101,40 @@ EOF
|
||||
;;
|
||||
|
||||
reload)
|
||||
@@ -126,3 +155,44 @@ diff -up ./etc/init/openwsmand.sh.in.new ./etc/init/openwsmand.sh.in
|
||||
+elif [ -f "/etc/redhat-release" ]; then
|
||||
+exit 0
|
||||
+fi
|
||||
diff -up ./etc/owsmangencert.sh.in.bak ./etc/owsmangencert.sh.in
|
||||
--- ./etc/owsmangencert.sh.in.bak 2010-08-10 10:46:36.554862986 -0500
|
||||
+++ ./etc/owsmangencert.sh.in 2010-08-10 10:50:45.843859853 -0500
|
||||
@@ -15,19 +15,34 @@ 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 <<EOF |openssl req -days 365 $@ -config $CNFFILE \
|
||||
-new -x509 -nodes -out $CERTFILE \
|
||||
-keyout $KEYFILE
|
||||
+--
|
||||
+SomeState
|
||||
+SomeCity
|
||||
+SomeOrganization
|
||||
+SomeOrganizationalUnit
|
||||
+${FQDN}
|
||||
+root@${FQDN}
|
||||
+EOF
|
||||
+
|
||||
chmod 600 $KEYFILE
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
addFilter("devel-file-in-non-devel-package .*/usr/lib.*/openwsman/.*/.*")
|
||||
addFilter("openwsman-client.*shlib-policy-name-error.*")
|
||||
+49
-132
@@ -1,47 +1,27 @@
|
||||
#
|
||||
# spec file for package openwsman (Version 2.2.0)
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%{!?python_sitelib: %define 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)")}
|
||||
%{!?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: perl-devel pkgconfig openssl-devel
|
||||
BuildRequires: libtool
|
||||
Requires: net-tools
|
||||
Version: 2.2.0
|
||||
Release: 3%{?dist}
|
||||
Url: http://www.openwsman.org/
|
||||
Name: openwsman
|
||||
Version: 2.2.0
|
||||
Release: 6%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/System
|
||||
Summary: Opensource Implementation of WS-Management
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
Source1: %{name}.rpmlintrc
|
||||
Patch0: %{name}-pam-auth.patch
|
||||
Patch1: %{name}-initscript.patch
|
||||
Url: http://www.openwsman.org/
|
||||
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
||||
Source2: python-config
|
||||
Patch0: %{name}-initscript.patch
|
||||
Patch1: %{name}-pam-auth.patch
|
||||
Patch2: perl-bindings.patch
|
||||
Patch3: %{name}-randfile.patch
|
||||
Patch3: openwsman-randfile.patch
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXXX)
|
||||
Group: System Environment/Daemons
|
||||
Summary: Opensource Implementation of WS-Management
|
||||
BuildRequires: sblim-sfcc-devel curl-devel libxml2-devel pkgconfig pam-devel openssl-devel swig python python-devel ruby ruby-devel libtool
|
||||
BuildRequires: perl pkgconfig openssl-devel net-tools
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
Requires(postun): initscripts
|
||||
|
||||
%description
|
||||
Openwsman is a project intended to provide an open-source
|
||||
@@ -52,14 +32,6 @@ 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.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Anas Nashif <anas.nashif@intel.com>
|
||||
Vadim Revyakin <vadim.revyakin@intel.com>
|
||||
Denis Sadykov <denis.sadykov@intel.com>
|
||||
|
||||
%package -n libwsman1
|
||||
License: BSD
|
||||
Group: System Environment/Libraries
|
||||
@@ -70,15 +42,6 @@ Requires: %{name}-client
|
||||
|
||||
%description -n libwsman1
|
||||
Openwsman library for packages dependent on openwsman
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Anas Nashif <anas.nashif@intel.com>
|
||||
Vadim Revyakin <vadim.revyakin@intel.com>
|
||||
Denis Sadykov <denis.sadykov@intel.com>
|
||||
|
||||
%package -n libwsman-devel
|
||||
License: BSD
|
||||
Group: Development/Libraries
|
||||
@@ -89,18 +52,11 @@ Requires: libwsman1 = %{version}
|
||||
Requires: %{name}-server = %{version}
|
||||
Requires: %{name}-client = %{version}
|
||||
Requires: sblim-sfcc-devel libxml2-devel pam-devel
|
||||
Requires: libcurl-devel
|
||||
Requires: curl-devel
|
||||
|
||||
%description -n libwsman-devel
|
||||
Development files for openwsman
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Anas Nashif <anas.nashif@intel.com>
|
||||
Vadim Revyakin <vadim.revyakin@intel.com>
|
||||
Denis Sadykov <denis.sadykov@intel.com>
|
||||
|
||||
%package client
|
||||
License: BSD
|
||||
Group: System Environment/Libraries
|
||||
@@ -109,14 +65,6 @@ Summary: Openwsman Client libraries
|
||||
%description client
|
||||
Openwsman Client libraries
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Anas Nashif <anas.nashif@intel.com>
|
||||
Vadim Revyakin <vadim.revyakin@intel.com>
|
||||
Denis Sadykov <denis.sadykov@intel.com>
|
||||
|
||||
%package server
|
||||
License: BSD
|
||||
Group: System Environment/Daemons
|
||||
@@ -131,13 +79,6 @@ Summary: Openwsman Server and service libraries
|
||||
Openwsman Server and service libraries
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Anas Nashif <anas.nashif@intel.com>
|
||||
Vadim Revyakin <vadim.revyakin@intel.com>
|
||||
Denis Sadykov <denis.sadykov@intel.com>
|
||||
|
||||
%package python
|
||||
License: BSD
|
||||
Group: Development/Libraries
|
||||
@@ -148,14 +89,6 @@ Requires: python
|
||||
This package provides Python bindings to access the openwsman client
|
||||
API.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Anas Nashif <anas.nashif@intel.com>
|
||||
Vadim Revyakin <vadim.revyakin@intel.com>
|
||||
Denis Sadykov <denis.sadykov@intel.com>
|
||||
|
||||
%package ruby
|
||||
License: BSD
|
||||
Group: Development/Libraries
|
||||
@@ -166,14 +99,6 @@ Summary: Ruby bindings for openwsman client API
|
||||
%description ruby
|
||||
This package provides Ruby bindings to access the openwsman client API.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Anas Nashif <anas.nashif@intel.com>
|
||||
Vadim Revyakin <vadim.revyakin@intel.com>
|
||||
Denis Sadykov <denis.sadykov@intel.com>
|
||||
|
||||
%package perl
|
||||
License: BSD
|
||||
Group: Development/Libraries
|
||||
@@ -185,40 +110,32 @@ This package provides Perl bindings to access the openwsman client API.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Anas Nashif <anas.nashif@intel.com>
|
||||
Vadim Revyakin <vadim.revyakin@intel.com>
|
||||
Denis Sadykov <denis.sadykov@intel.com>
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
cp -p %{SOURCE2} %{_builddir}/%{name}-%{version}
|
||||
sed -i -e 's|#!/usr/bin/python2.5|#!%{__python}|' %{_builddir}/%{name}-%{version}/python-config
|
||||
|
||||
%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
|
||||
chmod a-x src/lib/*.[ch]
|
||||
chmod a-x src/cpp/*.[ch]
|
||||
chmod a-x include/*.[ch]
|
||||
|
||||
# disable eventing, as Fedora libcurl isn't linked against openssl
|
||||
# disable tests in 2.1.0, http://www.openwsman.org/bug/263
|
||||
%configure --enable-python=yes --enable-ruby=yes --enable-eventing=no --disable-more-warnings --disable-static --enable-perl --enable-ipv6 PATH=$PATH:.
|
||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DFEDORA"
|
||||
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_flags}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
make DESTDIR=%{buildroot} install
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/openwsman/plugins/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/openwsman/authenticators/*.la
|
||||
@@ -229,8 +146,7 @@ install -m 755 etc/init/openwsmand.sh $RPM_BUILD_ROOT%{_sysconfdir}/init.d/openw
|
||||
ln -sf %{_sysconfdir}/init.d/openwsmand $RPM_BUILD_ROOT%{_sbindir}/rcopenwsmand
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
rm -rf %{buildroot}
|
||||
%post -n libwsman1 -p /sbin/ldconfig
|
||||
|
||||
%postun -n libwsman1 -p /sbin/ldconfig
|
||||
@@ -313,27 +229,28 @@ rm -f /var/log/wsmand.log
|
||||
%{_libdir}/libwsman_clientpp.so.*
|
||||
%doc AUTHORS COPYING ChangeLog README
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Dec 16 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-3
|
||||
- Changed the random file used by openssl to generate a certificate while
|
||||
- starting the openwsman-server service
|
||||
* Tue Aug 10 2010 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-6
|
||||
- Moved the cert generation from the the init script.
|
||||
|
||||
* Wed Dec 9 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-2
|
||||
- Re-wrote the spec file to break the openwmsman pkg into lib, client
|
||||
- and server components following the upstream spec file.
|
||||
* Tue Dec 29 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-5
|
||||
- Updating the spec file to follow the upstream packaging format.
|
||||
|
||||
* Thu Oct 1 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-1
|
||||
- Updated the sources to 2.2.0. Couple of major changes are as follows:
|
||||
- Major changes:
|
||||
- Adapt IANA ports of 5985 (http) and 5986 (https)
|
||||
- Change the Ruby bindings module name to 'Openwsman'
|
||||
- Change the Ruby plugin module name to 'Openwsman'
|
||||
- IPv6 support (A_Venkatachalam@Dell.com)
|
||||
- preliminary support for wbem intrinsic operations
|
||||
- 'EnumerateClassNames' and 'GetClass' (kkaempf@suse.de)
|
||||
- (needs fixed sblim-sfcc, see www.openwsman.org for details)
|
||||
|
||||
* Thu Oct 1 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-4
|
||||
- removed the hard coding of ruby_libdir
|
||||
|
||||
* Tue Sep 29 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-3
|
||||
- Changed back the hard coding of /usr/lib
|
||||
|
||||
* Tue Sep 29 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-2
|
||||
- check for python-configure in configure.ac fails because python-config
|
||||
- is not part of python-2.4 which is currently available in RHEL
|
||||
- So added a script python-config to the sources, and allowed configure to
|
||||
- search in BUILD/opewsman-2.2.0 for python-configure script.
|
||||
|
||||
* Wed Sep 23 2009 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.0-1
|
||||
- Added the new 2.2.0 sources.
|
||||
- Changed the release and version numbers.
|
||||
|
||||
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.1.0-4
|
||||
- rebuilt with new openssl
|
||||
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/python2.5
|
||||
|
||||
import sys
|
||||
import os
|
||||
import getopt
|
||||
from distutils import sysconfig
|
||||
|
||||
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
|
||||
'ldflags', 'help']
|
||||
|
||||
def exit_with_usage(code=1):
|
||||
print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0],
|
||||
'|'.join('--'+opt for opt in valid_opts))
|
||||
sys.exit(code)
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
|
||||
except getopt.error:
|
||||
exit_with_usage()
|
||||
|
||||
if not opts:
|
||||
exit_with_usage()
|
||||
|
||||
opt = opts[0][0]
|
||||
|
||||
pyver = sysconfig.get_config_var('VERSION')
|
||||
getvar = sysconfig.get_config_var
|
||||
|
||||
if opt == '--help':
|
||||
exit_with_usage(0)
|
||||
|
||||
elif opt == '--prefix':
|
||||
print sysconfig.PREFIX
|
||||
|
||||
elif opt == '--exec-prefix':
|
||||
print sysconfig.EXEC_PREFIX
|
||||
|
||||
elif opt in ('--includes', '--cflags'):
|
||||
flags = ['-I' + sysconfig.get_python_inc(),
|
||||
'-I' + sysconfig.get_python_inc(plat_specific=True)]
|
||||
if opt == '--cflags':
|
||||
flags.extend(getvar('CFLAGS').split())
|
||||
print ' '.join(flags)
|
||||
|
||||
elif opt in ('--libs', '--ldflags'):
|
||||
libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
|
||||
libs.append('-lpython'+pyver)
|
||||
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
|
||||
# shared library in prefix/lib/.
|
||||
if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'):
|
||||
libs.insert(0, '-L' + getvar('LIBPL'))
|
||||
print ' '.join(libs)
|
||||
|
||||
Reference in New Issue
Block a user