[yawn] Update to latest upstream version (switched from mod_python to mod_wsgi)

vcrhonek vcrhonek at fedoraproject.org
Mon Jul 2 13:03:10 UTC 2012


commit ddf0e267c27ea02454ba9c0a05c6686b26259c33
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Mon Jul 2 15:02:55 2012 +0200

    Update to latest upstream version (switched from mod_python to mod_wsgi)

 .gitignore |    1 +
 sources    |    2 +-
 yawn.spec  |   65 ++++++++++++++++++++++++++---------------------------------
 3 files changed, 31 insertions(+), 37 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 064f268..8bdf0e0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /yawn.py
+/yawn-0.tar.gz
diff --git a/sources b/sources
index 722e239..eee40f4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ad45eb44484e60fc77513e6083823ec6  yawn.py
+2d7477378e12834b2dcd506d23eb5e64  yawn-0.tar.gz
diff --git a/yawn.spec b/yawn.spec
index 1bf8aa0..cd8dbc5 100644
--- a/yawn.spec
+++ b/yawn.spec
@@ -1,63 +1,49 @@
-
 %global htmldir /var/www/yawn
 %global apacheconfdir /etc/httpd
-%global svnrev 561
+%global svnrev 578
 
 Name:           yawn
 Version:        0
-Release:        0.4.20120227svn%{svnrev}%{?dist}
+Release:        0.5.20120620svn%{svnrev}%{?dist}
 Summary:        Yet Another WBEM Navigator
 
 
 Group:          Applications/System
 License:        GPLv2
 URL:            https://sourceforge.net/apps/mediawiki/pywbem/index.php?title=YAWN
-# The source for this package was pulled from upstream's vcs.  Use the
-# following command to get the file:
-#  wget http://pywbem.svn.sourceforge.net/viewvc/pywbem/yawn/trunk/yawn.py
-Source0:        yawn.py
-
-# Patch0: resolves bz#802683, reported upstream (see link in bz)
-Patch0:         yawn-0-content-type.patch
-# Patch1: fixes URLs
-Patch1:         yawn-0-urls.patch
-
-BuildRequires:  httpd
-Requires:       mod_python, pywbem, httpd
+# The source for this package was pulled from upstream svn repository.
+# Use the following commands to get the archive:
+#  svn export https://pywbem.svn.sourceforge.net/svnroot/pywbem/yawn/trunk/mod_wsgi yawn-0
+#  tar czvf yawn-0.tar.gz yawn-0/
+Source0:        %{name}-%{version}.tar.gz
+
+BuildRequires:  httpd, python-setuptools
+Requires:       mod_wsgi, pywbem, httpd, python-werkzeug
 BuildArch:      noarch
 
 %description
 Web-based CIM/WBEM browser
 
+%package server
+Summary: Standalone web server for yawn
+Requires: %{name}
+
+%description server
+Script to run yawn without Apache web server.
+
 %prep
-cp %{SOURCE0} .
-%patch0 -p1 -b .content-type
-%patch1 -p1 -b .urls
+%setup -q
 
 %build
+%{__python} setup.py build
 
 %install
 rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install --skip-build --root ${RPM_BUILD_ROOT}
 mkdir -p $RPM_BUILD_ROOT%{htmldir}
-install ./yawn.py $RPM_BUILD_ROOT%{htmldir}/index.py
+install ./scripts/yawn.wsgi $RPM_BUILD_ROOT%{htmldir}/index.wsgi
 install -d $RPM_BUILD_ROOT%{apacheconfdir}/conf.d/
-cat > $RPM_BUILD_ROOT%{apacheconfdir}/conf.d/yawn.conf << EOS
-Alias /yawn /var/www/yawn
-
-<Location /yawn>
-    Order deny,allow
-    Deny from all
-    Allow from 127.0.0.1
-    Allow from ::1
-    # Allow from .example.com
-</Location>
-
-<Directory /var/www/yawn>
-    SetHandler mod_python
-    PythonHandler mod_python.publisher
-    PythonDebug On
-</Directory>
-EOS
+install -m 0644 ./apache/yawn.conf ${RPM_BUILD_ROOT}/%{apacheconfdir}/conf.d/yawn.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -68,9 +54,16 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(-,root,root,-)
 %{htmldir}
+%{python_sitelib}/*
 %config(noreplace) %{apacheconfdir}/conf.d/yawn.conf
 
+%files server
+%{_bindir}/yawn.py
+
 %changelog
+* Mon Jul 02 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 0-0.5.20120620svn578
+- Update to latest upstream version (switched from mod_python to mod_wsgi)
+
 * Thu May 17 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 0-0.4.20120227svn561
 - Fix URLs (patch by Radek Novacek, rnovacek at redhat.com)
 


More information about the scm-commits mailing list