Fixed couple of things in the spec file

This commit is contained in:
Praveen K Paladugu 2010-04-22 14:57:28 +00:00
parent 6206abc073
commit c8234dd49c
3 changed files with 78 additions and 80 deletions

14
openwsman-authors.patch Normal file
View File

@ -0,0 +1,14 @@
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 <anas.nashif@intel.com>
+ Vadim Revyakin <vadim.revyakin@intel.com>
+ Denis Sadykov <denis.sadykov@intel.com>
+
If you think you name should be here and I forgot it, please let me know.

View File

@ -1,12 +1,14 @@
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-01-21 11:12:34.000000000 +0100
+++ openwsman-2.2.3/etc/init/openwsmand.sh.in 2010-03-02 14:29:31.618984202 +0100
@@ -4,15 +4,13 @@
--- openwsman-2.2.3/etc/init/openwsmand.sh.in.orig 2010-04-22 09:36:29.186800378 -0500
+++ openwsman-2.2.3/etc/init/openwsmand.sh.in 2010-04-22 09:38:15.507820659 -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
@ -18,7 +20,7 @@ diff -up openwsman-2.2.3/etc/init/openwsmand.sh.in.orig openwsman-2.2.3/etc/init
# description: Openwsman Daemon
# processname: openwsmand
@@ -61,7 +59,7 @@ start()
@@ -61,7 +61,7 @@ start()
if [ "x${FQDN}" = "x" ]; then
FQDN=localhost.localdomain
fi
@ -27,3 +29,18 @@ diff -up openwsman-2.2.3/etc/init/openwsmand.sh.in.orig openwsman-2.2.3/etc/init
--
SomeState
SomeCity
@@ -145,8 +145,13 @@ case "$1" in
fi
;;
+
+ condrestart)
+ [ -e $lockfile ] && restart
+
+
*)
- echo "Usage: $0 {restart|start|stop|reload|force-reload|status}"
+ echo "Usage: $0 {restart|start|stop|reload|force-reload|status|condrestart}"
esac
if [ $lsb -ne 0 ]; then

View File

@ -1,18 +1,5 @@
#
# 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/
# spec file for package openwsman (Version 2.2.3)
#
# norootforbuild
@ -30,14 +17,15 @@ BuildRequires: perl-devel pkgconfig openssl-devel
BuildRequires: libtool
Requires: net-tools
Version: 2.2.3
Release: 2%{?dist}
Release: 3%{?dist}
Url: http://www.openwsman.org/
License: BSD
Group: Applications/System
Summary: Opensource Implementation of WS-Management
Source: %{name}-%{version}.tar.bz2
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
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXXX)
%description
@ -51,11 +39,6 @@ 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
@ -63,18 +46,12 @@ Group: System Environment/Libraries
Summary: Opensource Implementation of WS-Management
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
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
@ -92,11 +69,6 @@ Requires: libcurl-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
@ -108,17 +80,11 @@ 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
Requires: net-tools
Requires: openwsman-client
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(postun): initscripts
@ -129,11 +95,6 @@ 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
@ -147,11 +108,6 @@ API.
Authors:
--------
Anas Nashif <anas.nashif@intel.com>
Vadim Revyakin <vadim.revyakin@intel.com>
Denis Sadykov <denis.sadykov@intel.com>
%package ruby
License: BSD
@ -165,11 +121,6 @@ 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
@ -182,16 +133,12 @@ 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
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
sh autoconfiscate.sh
@ -213,18 +160,18 @@ make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_flags}
%install
rm -rf %{buildroot}
make DESTDIR=$RPM_BUILD_ROOT 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
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
install -m 644 etc/openwsman.conf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman
install -m 644 etc/ssleay.cnf $RPM_BUILD_ROOT%{_sysconfdir}/openwsman
install -m 755 etc/init/openwsmand.sh $RPM_BUILD_ROOT%{_sysconfdir}/init.d/openwsmand
ln -sf %{_sysconfdir}/init.d/openwsmand $RPM_BUILD_ROOT%{_sbindir}/rcopenwsmand
make DESTDIR=%{buildroot} install
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
install -m 644 etc/openwsman.conf %{buildroot}/%{_sysconfdir}/openwsman
install -m 644 etc/ssleay.cnf %{buildroot}/%{_sysconfdir}/openwsman
install -m 755 etc/init/openwsmand.sh %{buildroot}/%{_sysconfdir}/init.d/openwsmand
ln -sf %{_sysconfdir}/init.d/openwsmand %{buildroot}/%{_sbindir}/rcopenwsmand
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%post -n libwsman1 -p /sbin/ldconfig
@ -235,10 +182,17 @@ rm -rf $RPM_BUILD_ROOT
chkconfig --add openwsmand
%preun server
chkconfig --del openwsmand
if [ $1 = 0 ] ; then
/sbin/service %{name}d stop >/dev/null 2>&1
/sbin/chkconfig --del openwsmand
fi
%postun server
rm -f /var/log/wsmand.log
if [ "$1" -ge "1" ] ; then
/sbin/service %{name}d condrestart >/dev/null 2>&1 || :
fi
/sbin/ldconfig
%post client -p /sbin/ldconfig
@ -246,21 +200,21 @@ rm -f /var/log/wsmand.log
%postun client -p /sbin/ldconfig
%files -n libwsman1
%defattr(-,root,root)
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog README TODO
%{_libdir}/libwsman.so.*
%{_libdir}/libwsman_client.so.*
%{_libdir}/libwsman_curl_client_transport.so.*
%files -n libwsman-devel
%defattr(-,root,root)
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/pkgconfig/*
%{_libdir}/*.so
%doc AUTHORS COPYING ChangeLog README
%files python
%defattr(-,root,root)
%defattr(-,root,root,-)
%{python_sitearch}/*.so
%{python_sitelib}/*.py
%{python_sitelib}/*.pyc
@ -268,7 +222,7 @@ rm -f /var/log/wsmand.log
%doc AUTHORS COPYING ChangeLog README
%files ruby
%defattr(-,root,root)
%defattr(-,root,root,-)
%{ruby_sitearch}/openwsman.so
%dir %{ruby_sitelib}/openwsman
%{ruby_sitelib}/openwsman/openwsman.rb
@ -276,7 +230,7 @@ rm -f /var/log/wsmand.log
%doc AUTHORS COPYING ChangeLog README
%files perl
%defattr(-,root,root)
%defattr(-,root,root,-)
%{perl_vendorarch}/openwsman.so
%{perl_vendorlib}/openwsman.pm
%doc AUTHORS COPYING ChangeLog README
@ -284,7 +238,7 @@ rm -f /var/log/wsmand.log
%files server
# Don't remove *.so files from the server package.
# the server fails to start without these files.
%defattr(-,root,root)
%defattr(-,root,root,-)
%dir %{_sysconfdir}/openwsman
%config(noreplace) %{_sysconfdir}/openwsman/openwsman.conf
%config(noreplace) %{_sysconfdir}/openwsman/ssleay.cnf
@ -304,12 +258,24 @@ rm -f /var/log/wsmand.log
%doc AUTHORS COPYING ChangeLog README
%files client
%defattr(-,root,root)
%defattr(-,root,root,-)
%{_libdir}/libwsman_clientpp.so.*
%doc AUTHORS COPYING ChangeLog README
%changelog
* Tue Apr 22 2010 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.3-3
- authors.patch: Moved all the AUTHORS info to AUTHORS file.
- Corrected the Source tag.
- Corrected the package dependencies to break cyclic dependencies.
- Fixed the default attributes.
- Fixed the preun & postun scripts, to make sure the openwsmand service
- is stopped before the package is removed.
- Added 'condrestart' function to the init script.
- Had to let the *.so files be part of the openwsman-server becuase
- some of the source files explicitly call out for *.so files.
* Thu Apr 15 2010 Praveen K Paladugu <praveen_paladugu@dell.com> - 2.2.3-2
- Updated the spec file to adhere to the upstream standard of breaking
- the package in server, client, lib modules
@ -324,6 +290,7 @@ rm -f /var/log/wsmand.log
* Wed Mar 3 2010 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.2.3-1
- Update to openwsman-2.2.3
* 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.