diff --git a/cgit-0.9.1-highlightv3.patch b/cgit-0.9.1-highlightv3.patch new file mode 100644 index 0000000..df06a81 --- /dev/null +++ b/cgit-0.9.1-highlightv3.patch @@ -0,0 +1,13 @@ +diff -Nur cgit-0.9.1.orig/filters/syntax-highlighting.sh cgit-0.9.1/filters/syntax-highlighting.sh +--- cgit-0.9.1.orig/filters/syntax-highlighting.sh 2012-11-14 17:28:59.000000000 -0700 ++++ cgit-0.9.1/filters/syntax-highlighting.sh 2012-11-17 10:47:07.870778180 -0700 +@@ -53,7 +53,7 @@ + # found (for example) on EPEL 6. + # + # This is for version 2 +-exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null ++#exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null + + # This is for version 3 +-#exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null ++exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null diff --git a/cgit.spec b/cgit.spec index ff5e5c0..c8b21f4 100644 --- a/cgit.spec +++ b/cgit.spec @@ -20,7 +20,7 @@ make V=1 %{?_smp_mflags} \\\ Name: cgit Version: 0.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A fast web interface for git Group: Development/Tools @@ -31,6 +31,10 @@ Source1: http://www.kernel.org/pub/software/scm/git/git-%{gitver}.tar.bz2 Source2: cgitrc Source3: cgit.httpd Source4: README.SELinux +# On all but RHEL5 highlight is version 3. +%if 0%{?fedora} || 0%{?rhel} >= 6 +Patch1: cgit-0.9.1-highlightv3.patch +%endif BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: asciidoc @@ -51,6 +55,9 @@ Cgit is a fast web interface for git. It uses caching to increase performance. %prep %setup -q -a 1 +%if 0%{?fedora} || 0%{?rhel} >= 6 +%patch1 -p1 +%endif # setup the git dir rm -rf git @@ -94,6 +101,9 @@ rm -rf %{buildroot} %changelog +* Sat Nov 17 2012 Kevin Fenzi 0.9.1-2 +- Add patch to use correct version of highlight for all branches except epel5 + * Thu Nov 15 2012 Kevin Fenzi 0.9.1-1 - Update to 0.9.1 - Fixes bug #870714 - CVE-2012-4548