[viewvc] Obsolete viewvc-httpd and replace with viewvc-httpd-fcgi. Also provide viewvc-httpd-wsgi.

bojan bojan at fedoraproject.org
Sun Apr 29 07:44:15 UTC 2012


commit 9e6004f26d9b3f55ccc8c39bbab1e7cb522df662
Author: Bojan Smojver <bojan at rexursive.com>
Date:   Sun Apr 29 17:43:29 2012 +1000

    Obsolete viewvc-httpd and replace with viewvc-httpd-fcgi. Also provide
    viewvc-httpd-wsgi.

 README.httpd     |    9 ++++++-
 viewvc-fcgi.conf |    8 +++++++
 viewvc-wsgi.conf |    8 +++++++
 viewvc.conf      |   15 --------------
 viewvc.spec      |   58 ++++++++++++++++++++++++++++++++++++++++--------------
 5 files changed, 66 insertions(+), 32 deletions(-)
---
diff --git a/README.httpd b/README.httpd
index 6be0588..14ae0c8 100644
--- a/README.httpd
+++ b/README.httpd
@@ -1,2 +1,7 @@
-In order to run ViewVC under Apache and mod_python, you must install
-viewvc-httpd package.
+In order to run ViewVC under Apache and mod_fcgid, you should install
+viewvc-httpd-fcgi package. This package obsoletes the old view-httpd package.
+
+In order to run ViewVC under Apache and mod_wsgi, you should install
+viewvc-httpd-wsgi package.
+
+The old mod_python setup is no longer supported in Fedora.
diff --git a/viewvc-fcgi.conf b/viewvc-fcgi.conf
new file mode 100644
index 0000000..c3f60d5
--- /dev/null
+++ b/viewvc-fcgi.conf
@@ -0,0 +1,8 @@
+ScriptAlias /viewvc __python_sitelib__/viewvc/bin/wsgi/viewvc.fcgi
+Alias /viewvc-static __datadir__/viewvc/templates/docroot
+
+<Directory __datadir__/viewvc/templates/docroot>
+    Options -Indexes
+    Order allow,deny
+    Allow from 127.0.0.1
+</Directory>
diff --git a/viewvc-wsgi.conf b/viewvc-wsgi.conf
new file mode 100644
index 0000000..ae32d65
--- /dev/null
+++ b/viewvc-wsgi.conf
@@ -0,0 +1,8 @@
+WSGIScriptAlias /viewvc __python_sitelib__/viewvc/bin/wsgi/viewvc.wsgi
+Alias /viewvc-static __datadir__/viewvc/templates/docroot
+
+<Directory __datadir__/viewvc/templates/docroot>
+    Options -Indexes
+    Order allow,deny
+    Allow from 127.0.0.1
+</Directory>
diff --git a/viewvc.spec b/viewvc.spec
index f79bfcb..5a28bf2 100644
--- a/viewvc.spec
+++ b/viewvc.spec
@@ -2,16 +2,17 @@
 
 Name:           viewvc
 Version:        1.1.13
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Browser interface for CVS and SVN version control repositories
 
 Group:          Development/Tools
 License:        BSD
 URL:            http://www.viewvc.org/
 Source0:        http://www.viewvc.org/%{name}-%{version}.tar.gz
-Source1:        viewvc.conf
-Source2:        README.httpd
-Source3:        viewvc-lexer-mimetypes.py
+Source1:        viewvc-fcgi.conf
+Source2:        viewvc-wsgi.conf
+Source3:        README.httpd
+Source4:        viewvc-lexer-mimetypes.py
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Obsoletes:      %{name}-selinux < 1.0.3-13
@@ -33,13 +34,23 @@ as well as diffs between those versions. Basically, ViewVC provides the bulk
 of the report-like functionality you expect out of your version control tool,
 but much more prettily than the average textual command-line program output.
 
-%package httpd
-Summary:        ViewVC configuration for Apache/mod_python
+%package httpd-fcgi
+Summary:        ViewVC configuration for Apache/mod_fcgid
 Group:          Development/Tools
-Requires:       httpd, %{name} = %{version}-%{release}, mod_python
+Obsoletes:      viewvc-httpd <= 1.1.13-1
+Requires:       httpd, %{name} = %{version}-%{release}, mod_fcgid, python-flup
 
-%description httpd
-ViewVC configuration for Apache/mod_python. This package should provide ViewVC
+%description httpd-fcgi
+ViewVC configuration for Apache/mod_fcgid. This package should provide ViewVC
+with decent performance when run under Apache.
+
+%package httpd-wsgi
+Summary:        ViewVC configuration for Apache/mod_wsgi
+Group:          Development/Tools
+Requires:       httpd, %{name} = %{version}-%{release}, mod_wsgi
+
+%description httpd-wsgi
+ViewVC configuration for Apache/mod_wsgi. This package should provide ViewVC
 with decent performance when run under Apache.
 
 %prep
@@ -65,6 +76,10 @@ with decent performance when run under Apache.
   -e 's|CONF_PATHNAME =.*|CONF_PATHNAME = r"%{_sysconfdir}/viewvc/viewvc.conf"|g;' \
   $(find %{buildroot}%{python_sitelib}/viewvc/ -type f)
 
+# Fix python files shebang for WSGI files
+%{__sed} -i -e '1i#!%{_bindir}/python' \
+ $(find %{buildroot}%{python_sitelib}/viewvc/ -type f -name '*.wsgi')
+
 # Set mode 755 on executable scripts
 %{__grep} -rl '^#!' %{buildroot}%{python_sitelib}/viewvc | xargs %{__chmod} 0755
 
@@ -84,13 +99,16 @@ with decent performance when run under Apache.
 %{__install} -Dp -m0644 %{buildroot}%{python_sitelib}/viewvc/mimetypes.conf %{buildroot}%{_sysconfdir}/viewvc/mimetypes.conf
 %{__rm} -f %{buildroot}%{python_sitelib}/viewvc/mimetypes.conf
 
-%{SOURCE3} >> %{buildroot}%{_sysconfdir}/viewvc/mimetypes.conf
+%{SOURCE4} >> %{buildroot}%{_sysconfdir}/viewvc/mimetypes.conf
 
 # Install Apache configuration and README
 %{__sed} -e s,__datadir__,%{_datadir}, \
-         -e s,__python_sitelib__,%{python_sitelib}, %{SOURCE1} > viewvc.conf
-%{__install} -Dp -m0644 viewvc.conf %{buildroot}/etc/httpd/conf.d/viewvc.conf
-%{__cp} %{SOURCE2} README.httpd
+         -e s,__python_sitelib__,%{python_sitelib}, %{SOURCE1} > viewvc-fcgi.conf
+%{__sed} -e s,__datadir__,%{_datadir}, \
+         -e s,__python_sitelib__,%{python_sitelib}, %{SOURCE2} > viewvc-wsgi.conf
+%{__install} -Dp -m0644 viewvc-fcgi.conf %{buildroot}/etc/httpd/conf.d/viewvc-fcgi.conf
+%{__install} -Dp -m0644 viewvc-wsgi.conf %{buildroot}/etc/httpd/conf.d/viewvc-wsgi.conf
+%{__cp} %{SOURCE3} README.httpd
 
 # mod_python files mustn't be executable since they don't have shebang
 # make rpmlint happy!
@@ -113,12 +131,22 @@ with decent performance when run under Apache.
 %{python_sitelib}/*
 %{_datadir}/*
 
-%files httpd
+%files httpd-fcgi
 %defattr(-, root, root, -)
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/viewvc.conf
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/viewvc-fcgi.conf
+%attr(0700,apache,apache) %{_localstatedir}/spool/viewvc
+
+%files httpd-wsgi
+%defattr(-, root, root, -)
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/viewvc-wsgi.conf
 %attr(0700,apache,apache) %{_localstatedir}/spool/viewvc
 
 %changelog
+* Sun Apr 29 2012 Bojan Smojver <bojan at rexursive.com> - 1.1.13-2
+- drop viewvc-httpd package, which depends on mod_python
+- introduce viewvc-httpd-fcgi, obsoletes viewvc-httpd
+- introduce viewvc-httpd-wsgi
+
 * Tue Jan 24 2012 Bojan Smojver <bojan at rexursive.com> - 1.1.13-1
 - bump up to 1.1.13
 


More information about the scm-commits mailing list