Compare commits

..

11 Commits

Author SHA1 Message Date
Praveen K Paladugu 300467cdce Moved the cert generation 2010-08-10 11:02:27 -05:00
Fedora Release Engineering 0721437f49 dist-git conversion 2010-07-29 05:20:22 +00:00
Praveen K Paladugu 6d2a5044f5 Updated the spec file to follow the upstream packaging format 2009-12-31 20:05:14 +00:00
Bill Nottingham dbb5dd66cc Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:25:14 +00:00
Praveen K Paladugu 8eb31f4f79 removed some hard coded paths in %files 2009-10-01 18:14:51 +00:00
Praveen K Paladugu acf789a807 increased the release after the previous change 2009-09-29 18:02:36 +00:00
Praveen K Paladugu 68810c26ba Hardcoding back the path to /usr/lib in %files 2009-09-29 18:01:13 +00:00
Praveen K Paladugu 8121b3b621 Made a few changes to support python-config test on RHEL5. 2009-09-29 17:29:00 +00:00
Praveen K Paladugu 1386e9a847 Added the new openwsman-2.2.0 sources 2009-09-24 22:57:22 +00:00
srinivas ramanatha d63da6d7c9 Initial Import to EL-5 2008-11-01 10:34:43 +00:00
Huzaifa Sidhpurwala dd3edc2fa1 Initialize branch EL-5 for openwsman 2008-10-13 10:50:40 +00:00
4 changed files with 177 additions and 139 deletions
+75 -5
View File
@@ -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
-2
View File
@@ -1,2 +0,0 @@
addFilter("devel-file-in-non-devel-package .*/usr/lib.*/openwsman/.*/.*")
addFilter("openwsman-client.*shlib-policy-name-error.*")
+49 -132
View File
@@ -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
View File
@@ -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)