rpms/viewvc/EL-5 README.httpd, NONE, 1.1 viewvc-lexer-mimetypes.py, NONE, 1.1 sources, 1.8, 1.9 viewvc.spec, 1.8, 1.9 viewvc-temp-location.patch, 1.1, NONE

bojan bojan at fedoraproject.org
Fri Sep 4 06:38:24 UTC 2009


Author: bojan

Update of /cvs/pkgs/rpms/viewvc/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24107

Modified Files:
	sources viewvc.spec 
Added Files:
	README.httpd viewvc-lexer-mimetypes.py 
Removed Files:
	viewvc-temp-location.patch 
Log Message:
Bump up to 1.1.2.


--- NEW FILE README.httpd ---
In order to run ViewVC under Apache and mod_python, you must install
viewvc-httpd package.


--- NEW FILE viewvc-lexer-mimetypes.py ---
#!/usr/bin/python

import sys
import re
from pygments.lexers import get_all_lexers

for fullname, names, exts, mimetype in get_all_lexers():
  if len(exts) > len(mimetype):
    for j in range(len(mimetype)):
      line=0
      for i in range(len(exts)):
        if re.match('\*\.',exts[i]):
          if i == 0:
            print mimetype[j],
            line=1
          if re.search('\[[0-9]+\]',exts[i]):
            s=re.search('\[[0-9]+\]',exts[i]).span()[0]+1
            e=re.search('\[[0-9]+\]',exts[i]).span()[1]-1
            for k in range(s,e):
              print exts[i][2:s-1]+exts[i][k]+exts[i][e+1:],
          else:
            print exts[i][2:],
        if line==1 and i == len(exts)-1:
          print
  elif len(exts) == 1:
    for i in range(len(mimetype)):
      if re.match('\*\.',exts[0]):
        if re.search('\[[0-9]+\]',exts[0]):
          s=re.search('\[[0-9]+\]',exts[0]).span()[0]+1
          e=re.search('\[[0-9]+\]',exts[0]).span()[1]-1
          print mimetype[i],
          for k in range(s,e):
            print exts[0][2:s-1]+exts[0][k]+exts[0][e+1:],
          print
        else:
          print mimetype[i], exts[0][2:]
  else:
    for i in range(len(mimetype)):
      if len(exts) > i:
        if re.match('\*\.',exts[i]):
          if re.search('\[[0-9]+\]',exts[i]):
            s=re.search('\[[0-9]+\]',exts[i]).span()[0]+1
            e=re.search('\[[0-9]+\]',exts[i]).span()[1]-1
            print mimetype[i],
            for k in range(s,e):
              print exts[i][2:s-1]+exts[i][k]+exts[i][e+1:],
            print
          else:
            print mimetype[i], exts[i][2:]


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/viewvc/EL-5/sources,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- sources	11 Aug 2009 22:25:23 -0000	1.8
+++ sources	4 Sep 2009 06:38:22 -0000	1.9
@@ -1 +1 @@
-5aa48bb866f65bfcf32aa0cd581bf7d3  viewvc-1.0.9.tar.gz
+8f14fc2f58f4e87b835500ae20d8d631  viewvc-1.1.2.tar.gz


Index: viewvc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/viewvc/EL-5/viewvc.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- viewvc.spec	11 Aug 2009 22:25:23 -0000	1.8
+++ viewvc.spec	4 Sep 2009 06:38:22 -0000	1.9
@@ -1,22 +1,7 @@
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
-# EL4 & EL5 do not have cvsgraph or enscript.. yet
-%if 0%{?rhel}
-%define with_cvsgraph_enscript 0
-%else
-%define with_cvsgraph_enscript 1
-%endif
-
-# EL4 has a subversion that does not meet the minimum reqs for subversion
-%if 0%{?rhel} && "%rhel" < "5"
-%define with_subversion 0
-%else
-%define with_subversion 1
-%endif
-
-
 Name:           viewvc
-Version:        1.0.9
+Version:        1.1.2
 Release:        1%{?dist}
 Summary:        Browser interface for CVS and SVN version control repositories
 
@@ -25,21 +10,19 @@ License:        BSD
 URL:            http://www.viewvc.org/
 Source0:        http://www.viewvc.org/%{name}-%{version}.tar.gz
 Source1:        viewvc.conf
-Patch0:         viewvc-temp-location.patch
+Source2:        README.httpd
+Source3:        viewvc-lexer-mimetypes.py
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Obsoletes:      %{name}-selinux < 1.0.3-11
 Conflicts:      selinux-policy < 2.4.6-46
 
 BuildArch:      noarch
-BuildRequires:  python-devel >= 2.0
-Requires:       mod_python, rcs, diffutils
-%if 0%{with_subversion}
+BuildRequires:  python-devel >= 2.0, python-pygments
+Requires:       webserver, rcs, diffutils
 Requires:       subversion >= 1.2
-%endif
-%if 0%{with_cvsgraph_enscript}
-Requires:       enscript, cvsgraph
-%endif
+Requires:       cvsgraph
+Requires:       python-pygments
 
 %description
 ViewVC is a browser interface for CVS and Subversion version control
@@ -49,13 +32,17 @@ as well as diffs between those versions.
 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.
 
-%if 0%{!?with_subversion}
-This version only supports CVS repositories.
-%endif
+%package httpd
+Summary:        ViewVC configuration for Apache/mod_python
+Group:          Development/Tools
+Requires:       %{name} = %{version}-%{release}, mod_python
+
+%description httpd
+ViewVC configuration for Apache/mod_python. This package should provide ViewVC
+with decent performance when run under Apache.
 
 %prep
 %setup -q
-%patch0 -p0 -b .temp-location
 
 %build
 
@@ -82,29 +69,27 @@ This version only supports CVS repositor
 
 # Fix paths in configuration
 %{__perl} -pi \
-  -e 's|templates/|%{_datadir}/viewvc/templates/|g;' \
-  -e 's|^template_dir = .*|template_dir = %{_datadir}/viewvc/templates|g;' \
-  -e 's|^#docroot = .*|docroot = /viewvc-static|;' \
-  -e 's|^cvsgraph_conf = .*|cvsgraph_conf = %{_sysconfdir}/viewvc/cvsgraph.conf|;' \
-  %{buildroot}%{python_sitelib}/viewvc/viewvc.conf
-
-%if 0%{with_cvsgraph_enscript}
-%{__perl} -pi \
-  -e 's|^use_cvsgraph = .*|use_cvsgraph = 1|;' \
-  -e 's|^use_enscript = .*|use_enscript = 1|;' \
+  -e 's|^#* *template_dir = .*|template_dir = %{_datadir}/viewvc/templates|g;' \
+  -e 's|^#* *docroot = .*|docroot = /viewvc-static|;' \
+  -e 's|^#* *cvsgraph_conf = .*|cvsgraph_conf = %{_sysconfdir}/viewvc/cvsgraph.conf|;' \
+  -e 's|^#* *use_cvsgraph = .*|use_cvsgraph = 1|;' \
   %{buildroot}%{python_sitelib}/viewvc/viewvc.conf
-%endif
 
 # Install config to sysconf directory
 %{__install} -Dp -m0644 %{buildroot}%{python_sitelib}/viewvc/viewvc.conf %{buildroot}%{_sysconfdir}/viewvc/viewvc.conf
 %{__rm} -f %{buildroot}%{python_sitelib}/viewvc/viewvc.conf
 %{__install} -Dp -m0644 %{buildroot}%{python_sitelib}/viewvc/cvsgraph.conf %{buildroot}%{_sysconfdir}/viewvc/cvsgraph.conf
 %{__rm} -f %{buildroot}%{python_sitelib}/viewvc/cvsgraph.conf
+%{__install} -Dp -m0644 %{buildroot}%{python_sitelib}/viewvc/mimetypes.conf %{buildroot}%{_sysconfdir}/viewvc/mimetypes.conf
+%{__rm} -f %{buildroot}%{python_sitelib}/viewvc/mimetypes.conf
 
-# Install Apache configuration
+%{SOURCE3} >> %{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
 
 # mod_python files mustn't be executable since they don't have shebang
 # make rpmlint happy!
@@ -118,14 +103,20 @@ This version only supports CVS repositor
 
 %files
 %defattr(-, root, root, -)
-%doc CHANGES README INSTALL TODO COMMITTERS LICENSE.html docs
+%doc CHANGES README README.httpd INSTALL COMMITTERS LICENSE.html docs
 %config(noreplace) %{_sysconfdir}/viewvc
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/viewvc.conf
 %{python_sitelib}/*
 %{_datadir}/*
 %attr(0700,apache,apache) %{_localstatedir}/spool/viewvc
 
+%files httpd
+%defattr(-, root, root, -)
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/viewvc.conf
+
 %changelog
+* Fri Sep  4 2009 Bojan Smojver <bojan at rexursive.com> - 1.1.2-1
+- bump up to 1.1.2
+
 * Wed Aug 12 2009 Bojan Smojver <bojan at rexursive.com> - 1.0.9-1
 - bump up to 1.0.9
 - security fix: validate the 'view' parameter to avoid XSS attack


--- viewvc-temp-location.patch DELETED ---




More information about the fedora-extras-commits mailing list