9958fee
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
9958fee
9958fee
Name:           viewvc
6e79bd5
Version:        1.1.17
cd76f5f
Release:        1%{?dist}
9958fee
Summary:        Browser interface for CVS and SVN version control repositories
9958fee
9958fee
Group:          Development/Tools
9958fee
License:        BSD
9958fee
URL:            http://www.viewvc.org/
b55c6d5
Source0:        http://www.viewvc.org/%{name}-%{version}.tar.gz
9e6004f
Source1:        viewvc-fcgi.conf
9e6004f
Source2:        viewvc-wsgi.conf
9e6004f
Source3:        README.httpd
9e6004f
Source4:        viewvc-lexer-mimetypes.py
9958fee
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
9958fee
628650f
Obsoletes:      %{name}-selinux < 1.0.3-13
628650f
Conflicts:      selinux-policy < 2.5.10-2
c69dd44
9958fee
BuildArch:      noarch
c385cd0
BuildRequires:  python-devel >= 2.0, python-pygments
1650126
Requires:       rcs, diffutils
9958fee
Requires:       subversion >= 1.2
4683463
Requires:       subversion-python >= 1.2
a06f255
Requires:       cvsgraph
a06f255
Requires:       python-pygments
9958fee
9958fee
%description
9958fee
ViewVC is a browser interface for CVS and Subversion version control
9958fee
repositories. It generates templatized HTML to present navigable directory,
9958fee
revision, and change log listings. It can display specific versions of files
9958fee
as well as diffs between those versions. Basically, ViewVC provides the bulk
9958fee
of the report-like functionality you expect out of your version control tool,
9958fee
but much more prettily than the average textual command-line program output.
9958fee
9e6004f
%package httpd-fcgi
9e6004f
Summary:        ViewVC configuration for Apache/mod_fcgid
dad40ba
Group:          Development/Tools
4d10ab9
Obsoletes:      viewvc-httpd < 1.1.13-2
9e6004f
Requires:       httpd, %{name} = %{version}-%{release}, mod_fcgid, python-flup
dad40ba
9e6004f
%description httpd-fcgi
9e6004f
ViewVC configuration for Apache/mod_fcgid. This package should provide ViewVC
9e6004f
with decent performance when run under Apache.
9e6004f
9e6004f
%package httpd-wsgi
9e6004f
Summary:        ViewVC configuration for Apache/mod_wsgi
9e6004f
Group:          Development/Tools
9e6004f
Requires:       httpd, %{name} = %{version}-%{release}, mod_wsgi
9e6004f
9e6004f
%description httpd-wsgi
9e6004f
ViewVC configuration for Apache/mod_wsgi. This package should provide ViewVC
dad40ba
with decent performance when run under Apache.
dad40ba
9958fee
%prep
b55c6d5
%setup -q
9958fee
9958fee
%build
9958fee
9958fee
%install
9958fee
%{__rm} -rf %{buildroot}
9958fee
%{__python} viewvc-install --destdir="%{buildroot}" --prefix="%{python_sitelib}/viewvc"
9958fee
9958fee
# Remove unneeded files
4794945
%{__rm} -f %{buildroot}%{python_sitelib}/viewvc/bin/mod_python/.htaccess
9958fee
9958fee
# Move non-python to /usr/share
9958fee
%{__mkdir} -p %{buildroot}%{_datadir}/viewvc
9958fee
%{__mv} %{buildroot}%{python_sitelib}/viewvc/templates %{buildroot}%{_datadir}/viewvc
9958fee
9958fee
# Fix python files shebang and CONF_PATHNAME
9958fee
%{__perl} -pi \
9958fee
  -e 's|/usr/local/bin/python|%{_bindir}/python|g;' \
9958fee
  -e 's|\s*/usr/bin/env python|%{_bindir}/python|g;' \
9958fee
  -e 's|CONF_PATHNAME =.*|CONF_PATHNAME = r"%{_sysconfdir}/viewvc/viewvc.conf"|g;' \
9958fee
  $(find %{buildroot}%{python_sitelib}/viewvc/ -type f)
9958fee
9e6004f
# Fix python files shebang for WSGI files
9e6004f
%{__sed} -i -e '1i#!%{_bindir}/python' \
9e6004f
 $(find %{buildroot}%{python_sitelib}/viewvc/ -type f -name '*.wsgi')
9e6004f
9958fee
# Set mode 755 on executable scripts
9958fee
%{__grep} -rl '^#!' %{buildroot}%{python_sitelib}/viewvc | xargs %{__chmod} 0755
9958fee
9958fee
# Fix paths in configuration
9958fee
%{__perl} -pi \
f881031
  -e 's|^#* *template_dir = .*|template_dir = %{_datadir}/viewvc/templates|g;' \
f881031
  -e 's|^#* *docroot = .*|docroot = /viewvc-static|;' \
f881031
  -e 's|^#* *cvsgraph_conf = .*|cvsgraph_conf = %{_sysconfdir}/viewvc/cvsgraph.conf|;' \
f881031
  -e 's|^#* *use_cvsgraph = .*|use_cvsgraph = 1|;' \
9958fee
  %{buildroot}%{python_sitelib}/viewvc/viewvc.conf
9958fee
9958fee
# Install config to sysconf directory
9958fee
%{__install} -Dp -m0644 %{buildroot}%{python_sitelib}/viewvc/viewvc.conf %{buildroot}%{_sysconfdir}/viewvc/viewvc.conf
9958fee
%{__rm} -f %{buildroot}%{python_sitelib}/viewvc/viewvc.conf
9958fee
%{__install} -Dp -m0644 %{buildroot}%{python_sitelib}/viewvc/cvsgraph.conf %{buildroot}%{_sysconfdir}/viewvc/cvsgraph.conf
9958fee
%{__rm} -f %{buildroot}%{python_sitelib}/viewvc/cvsgraph.conf
c385cd0
%{__install} -Dp -m0644 %{buildroot}%{python_sitelib}/viewvc/mimetypes.conf %{buildroot}%{_sysconfdir}/viewvc/mimetypes.conf
c385cd0
%{__rm} -f %{buildroot}%{python_sitelib}/viewvc/mimetypes.conf
c385cd0
9e6004f
%{SOURCE4} >> %{buildroot}%{_sysconfdir}/viewvc/mimetypes.conf
9958fee
dad40ba
# Install Apache configuration and README
9958fee
%{__sed} -e s,__datadir__,%{_datadir}, \
9e6004f
         -e s,__python_sitelib__,%{python_sitelib}, %{SOURCE1} > viewvc-fcgi.conf
9e6004f
%{__sed} -e s,__datadir__,%{_datadir}, \
9e6004f
         -e s,__python_sitelib__,%{python_sitelib}, %{SOURCE2} > viewvc-wsgi.conf
9e6004f
%{__install} -Dp -m0644 viewvc-fcgi.conf %{buildroot}/etc/httpd/conf.d/viewvc-fcgi.conf
9e6004f
%{__install} -Dp -m0644 viewvc-wsgi.conf %{buildroot}/etc/httpd/conf.d/viewvc-wsgi.conf
9e6004f
%{__cp} %{SOURCE3} README.httpd
9958fee
9958fee
# mod_python files mustn't be executable since they don't have shebang
9958fee
# make rpmlint happy!
9958fee
%{__chmod} 0644 %{buildroot}%{python_sitelib}/viewvc/bin/mod_python/*.py
9958fee
6b2e58e
# Rename viewvc.py to viewvc-mp.py for mod_python to avoid import cycle errors
6b2e58e
%{__mv} %{buildroot}%{python_sitelib}/viewvc/bin/mod_python/viewvc.py \
6b2e58e
        %{buildroot}%{python_sitelib}/viewvc/bin/mod_python/viewvc-mp.py
6b2e58e
9958fee
# Make spool directory for temp files
9958fee
%{__mkdir} -p %{buildroot}%{_localstatedir}/spool/viewvc
9958fee
9958fee
%clean
9958fee
%{__rm} -rf %{buildroot}
9958fee
9958fee
%files
9958fee
%defattr(-, root, root, -)
a06f255
%doc CHANGES README README.httpd INSTALL COMMITTERS LICENSE.html docs
9958fee
%config(noreplace) %{_sysconfdir}/viewvc
9958fee
%{python_sitelib}/*
9958fee
%{_datadir}/*
9958fee
9e6004f
%files httpd-fcgi
dad40ba
%defattr(-, root, root, -)
9e6004f
%config(noreplace) %{_sysconfdir}/httpd/conf.d/viewvc-fcgi.conf
9e6004f
%attr(0700,apache,apache) %{_localstatedir}/spool/viewvc
9e6004f
9e6004f
%files httpd-wsgi
9e6004f
%defattr(-, root, root, -)
9e6004f
%config(noreplace) %{_sysconfdir}/httpd/conf.d/viewvc-wsgi.conf
1650126
%attr(0700,apache,apache) %{_localstatedir}/spool/viewvc
dad40ba
9958fee
%changelog
6e79bd5
* Fri Oct 26 2012 Bojan Smojver <bojan@rexursive.com> - 1.1.17-1
6e79bd5
- bump up to 1.1.17
6e79bd5
cd76f5f
* Thu Oct 25 2012 Bojan Smojver <bojan@rexursive.com> - 1.1.16-1
cd76f5f
- bump up to 1.1.16
cd76f5f
- drop patch for CVE-2012-4533, part of the release
cd76f5f
d0b5791
* Mon Oct 22 2012 Bojan Smojver <bojan@rexursive.com> - 1.1.15-3
d0b5791
- patch CVE-2012-4533, bug #868606
d0b5791
f276512
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.15-2
f276512
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f276512
9aa14d4
* Sat Jun 23 2012 Bojan Smojver <bojan@rexursive.com> - 1.1.15-1
9aa14d4
- bump up to 1.1.15
9aa14d4
1694288
* Wed Jun 13 2012 Bojan Smojver <bojan@rexursive.com> - 1.1.14-1
1694288
- bump up to 1.1.14
1694288
9e6004f
* Sun Apr 29 2012 Bojan Smojver <bojan@rexursive.com> - 1.1.13-2
9e6004f
- drop viewvc-httpd package, which depends on mod_python
9e6004f
- introduce viewvc-httpd-fcgi, obsoletes viewvc-httpd
9e6004f
- introduce viewvc-httpd-wsgi
9e6004f
ac10a5f
* Tue Jan 24 2012 Bojan Smojver <bojan@rexursive.com> - 1.1.13-1
ac10a5f
- bump up to 1.1.13
ac10a5f
281c6ec
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.12-2
281c6ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
281c6ec
d1eedb3
* Fri Nov  4 2011 Bojan Smojver <bojan@rexursive.com> - 1.1.12-1
d1eedb3
- bump up to 1.1.12
d1eedb3
4683463
* Tue Nov  1 2011 Bojan Smojver <bojan@rexursive.com> - 1.1.11-3
4683463
- require subversion-python
4683463
1650126
* Wed Jun  1 2011 Bojan Smojver <bojan@rexursive.com> - 1.1.11-2
1650126
- in response to bug #708721:
1650126
-   remove webserver dependency, can run standalone
1650126
-   require httpd for httpd package
1650126
-   move spool directory to httpd package
1650126
83cf257
* Wed May 18 2011 Bojan Smojver <bojan@rexursive.com> - 1.1.11-1
83cf257
- bump up to 1.1.11
83cf257
33a6c02
* Wed Mar 16 2011 Bojan Smojver <bojan@rexursive.com> - 1.1.10-1
33a6c02
- bump up to 1.1.10
33a6c02
ce08b29
* Mon Feb 21 2011 Bojan Smojver <bojan@rexursive.com> - 1.1.9-1
ce08b29
- bump up to 1.1.9
ce08b29
945a78f
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.8-2
945a78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
945a78f
b9e0a9c
* Mon Dec  6 2010 Bojan Smojver <bojan@rexursive.com> - 1.1.8-1
b9e0a9c
- bump up to 1.1.8
b9e0a9c
58295a9
* Fri Sep 10 2010 Bojan Smojver <bojan@rexursive.com> - 1.1.7-1
58295a9
- bump up to 1.1.7
58295a9
- address bug #565805, allow access to templates from localhost
58295a9
c589516
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.1.6-2
c589516
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
c589516
658f07a
* Thu Jun  3 2010 Bojan Smojver <bojan@rexursive.com> - 1.1.6-1
658f07a
- bump up to 1.1.6
658f07a
- drop patch for upstream issue #454
658f07a
106be19
* Tue May 25 2010 Bojan Smojver <bojan@rexursive.com> - 1.1.5-2
106be19
- patch upstream issue #454
106be19
a539cdb
* Tue Mar 30 2010 Bojan Smojver <bojan@rexursive.com> - 1.1.5-1
a539cdb
- bump up to 1.1.5
a539cdb
5273fb5
* Thu Mar 11 2010 Bojan Smojver <bojan@rexursive.com> - 1.1.4-1
5273fb5
- bump up to 1.1.4
5273fb5
bb99200
* Fri Jan  8 2010 Bojan Smojver <bojan@rexursive.com> - 1.1.3-2
bb99200
- patch upstream issue #445
bb99200
9f9cf7e
* Wed Dec 23 2009 Bojan Smojver <bojan@rexursive.com> - 1.1.3-1
9f9cf7e
- bump up to 1.1.3
9f9cf7e
- drop patch for upstream issue #427
9f9cf7e
5797952
* Wed Sep 23 2009 Bojan Smojver <bojan@rexursive.com> - 1.1.2-5
5797952
- patch upstream issue #427
5797952
7de404d
* Thu Aug 13 2009 Bojan Smojver <bojan@rexursive.com> - 1.1.2-4
7de404d
- try one more time
7de404d
5c5d22a
* Thu Aug 13 2009 Bojan Smojver <bojan@rexursive.com> - 1.1.2-3
5c5d22a
- better mimetypes.conf generation script
5c5d22a
f881031
* Wed Aug 12 2009 Bojan Smojver <bojan@rexursive.com> - 1.1.2-2
2ef207e
- fix replacement of various config variables
f881031
29058ea
* Wed Aug 12 2009 Bojan Smojver <bojan@rexursive.com> - 1.1.2-1
29058ea
- bump up to 1.1.2
29058ea
- security fix: validate the 'view' parameter to avoid XSS attack
29058ea
- security fix: avoid printing illegal parameter names and values
29058ea
c385cd0
* Tue Aug 11 2009 Bojan Smojver <bojan@rexursive.com> - 1.1.1-3
c385cd0
- install mimetypes.conf
c385cd0
- populate mimetypes.conf with what pygments understands
c385cd0
a1d15ea
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
a1d15ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a1d15ea
1174fd2
* Thu Jun  4 2009 Bojan Smojver <bojan@rexursive.com> - 1.1.1-1
1174fd2
- Bump up to 1.1.1
1174fd2
b55c6d5
* Thu May 14 2009 Bojan Smojver <bojan@rexursive.com> - 1.1.0-1
b55c6d5
- Final 1.1.0
b55c6d5
1d09fa2
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-0.beta1.1.2
1d09fa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
1d09fa2
ac8fd5f
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.1.0-0.beta1.1.1
ac8fd5f
- Rebuild for Python 2.6
ac8fd5f
a06f255
* Thu Nov  6 2008 Bojan Smojver <bojan@rexursive.com> - 1.1.0-0.beta1.1
a06f255
- Rebase to 1.1.x
a06f255
dad40ba
* Mon Oct 27 2008 Bojan Smojver <bojan@rexursive.com> - 1.0.7-2
dad40ba
- Depend on webserver to avoid pulling in Apache/mod_python (bug #457691)
dad40ba
- Provide viewvc-httpd package for mod_python specific configuration
dad40ba
a89ca40
* Wed Oct 15 2008 Bojan Smojver <bojan@rexursive.com> - 1.0.7-1
a89ca40
- Bump up to 1.0.7
a89ca40
6407e7f
* Fri Sep 19 2008 Bojan Smojver <bojan@rexursive.com> - 1.0.6-1
6407e7f
- Bump up to 1.0.6
6407e7f
4794945
* Fri Feb 29 2008 Bojan Smojver <bojan@rexursive.com> - 1.0.5-1
4794945
- Bump up to 1.0.5
4794945
6b2e58e
* Sun Jun  3 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.4-2
6b2e58e
- Avoid import cycle errors (temporary fix)
6b2e58e
ec53f53
* Tue May 15 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.4-1
ec53f53
- Bump up to 1.0.4
ec53f53
c69dd44
* Wed Mar 28 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-13
628650f
- Supply obsoletes/conflicts
628650f
  (suggestions by Peter Gordon, Bernard Johnson and Ville Skyttä)
c69dd44
78cba07
* Thu Mar 22 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-12
78cba07
- Drop selinux package, required context now in official policy
78cba07
d72d0f8
* Fri Mar 09 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-11
d72d0f8
- Bump for tag
d72d0f8
9958fee
* Tue Mar 06 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-10
9958fee
- Enable enscript only when available
9958fee
9958fee
* Tue Mar 06 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-9
9958fee
- Enable cvsgraph
9958fee
9958fee
* Sun Mar 04 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-8
9958fee
- EPEL support patch by Bernard Johnson
9958fee
9958fee
* Sat Mar 03 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-7
9958fee
- Incorporate suggestions from package review process by Bernard Johnson
9958fee
9958fee
* Sat Mar 03 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-6
9958fee
- Use restorecon instead of chcon
9958fee
9958fee
* Fri Mar 02 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-5
9958fee
- SELinux integration
9958fee
9958fee
* Fri Mar 02 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-4
9958fee
- Incorporate suggestions from package review process by Bernard Johnson
9958fee
9958fee
* Fri Mar 02 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-3
9958fee
- Move non-python files out of %%{python_sitelib}
9958fee
9958fee
* Thu Mar 01 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-2
9958fee
- Incorporate suggestions from package review process by Bernard Johnson
9958fee
9958fee
* Thu Mar 01 2007 Bojan Smojver <bojan@rexursive.com> - 1.0.3-1
9958fee
- Initial release, 1.0.3
9958fee
- Based on package provided by Dag Wieers