Package: cgit
Version: 0.10.2.git2.0.1-3
Severity: normal

Hi there!

Using cgit, I've found a small issue if the source code is a debian package.
The d/rules is not shown if no lexer is found.

The apache log says this:

[cgi:error] [pid 24139] [client XX] AH01215: Traceback (most recent call 
last):, referer: http://www.example.org/git/pkg-debian/tree/debian
[cgi:error] [pid 24139] [client XX] AH01215:   File 
"/usr/lib/cgit/filters/syntax-highlighting.py", line 42, in <module>, referer: 
http://www.example.org/git/pkg-debian/tree/debian
[cgi:error] [pid 24139] [client XX] AH01215:     lexer = guess_lexer(data, 
encoding='utf-8'), referer: http://www.example.org/git/pkg-debian/tree/debian
[cgi:error] [pid 24139] [client XX] AH01215:   File 
"/usr/lib/python2.7/dist-packages/pygments/lexers/__init__.py", line 252, in 
guess_lexer, referer: http://www.example.org/git/pkg-debian/tree/debian
[cgi:error] [pid 24139] [client XX] AH01215:     raise ClassNotFound('no lexer 
matching the text found'), referer: 
http://www.example.org/git/pkg-debian/tree/debian
[cgi:error] [pid 24139] [client XX] AH01215: pygments.util.ClassNotFound: no 
lexer matching the text found, referer: 
http://www.example.org/git/pkg-debian/tree/debian

I think cgit should print the file with no syntax highlighting.

-- System Information:
Debian Release: 8.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages cgit depends on:
ii  libc6        2.19-18
ii  liblua5.1-0  5.1.5-7.1
ii  libssl1.0.0  1.0.1k-3
ii  zlib1g       1:1.2.8.dfsg-2+b1

Versions of packages cgit recommends:
ii  apache2 [httpd]              2.4.10-10
ii  apache2-mpm-prefork [httpd]  2.4.10-10
ii  python                       2.7.9-1

cgit suggests no packages.

-- Configuration Files:
/etc/apache2/conf-available/cgit.conf changed:
ScriptAlias /git/ "/usr/lib/cgit/cgit.cgi/"
RedirectMatch ^/git$ /git/
Alias /css/cgit.css "/usr/share/cgit/cgit.css"
<Directory "/usr/lib/cgit/">
   AllowOverride None
   Options ExecCGI FollowSymlinks
   Require all granted
</Directory>

/etc/cgitrc changed:
cache-size=1000
clone-url=g...@www.example.org:$CGIT_REPO_URL 
http://www.example.org/git/$CGIT_REPO_URL
css=/css/cgit.css
enable-index-owner=1
enable-http-clone=1
enable-index-links=1
enable-commit-graph=1
enable-log-filecount=1
enable-log-linecount=1
branch-sort=age
max-stats=quarter
root-title=www.example.org git repos
root-readme=/srv/www/git_stats.html
snapshots=tar.gz
mimetype.gif=image/gif
mimetype.html=text/html
mimetype.jpg=image/jpeg
mimetype.jpeg=image/jpeg
mimetype.pdf=application/pdf
mimetype.png=image/png
mimetype.svg=image/svg+xml
source-filter=/usr/lib/cgit/filters/syntax-highlighting.py
about-filter=/usr/lib/cgit/filters/about-formatting.sh
readme=:README.md
readme=:readme.md
readme=:README.mkd
readme=:readme.mkd
readme=:README.rst
readme=:readme.rst
readme=:README.html
readme=:readme.html
readme=:README.htm
readme=:readme.htm
readme=:README.txt
readme=:readme.txt
readme=:README
readme=:readme
readme=:INSTALL.md
readme=:install.md
readme=:INSTALL.mkd
readme=:install.mkd
readme=:INSTALL.rst
readme=:install.rst
readme=:INSTALL.html
readme=:install.html
readme=:INSTALL.htm
readme=:install.htm
readme=:INSTALL.txt
readme=:install.txt
readme=:INSTALL
readme=:install
include=/etc/cgitrepos


-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to