a fast web-interface for git repositories
Created attachment 154057 [details] www-apps/cgit-9999
Created attachment 154059 [details] files/postinstall-en.txt
Diego, according to [1] this might be interesting for you. Please review/test. [1] http://blog.flameeyes.eu/articles/tag/git
Created attachment 154061 [details] www-apps/cgit-9999.ebuild Logo path was wrong
Created attachment 168914 [details] Adapted the ebuild for latest stable version v0.8.1
Created attachment 168916 [details] cgitrc Upstream no longer includes an example cgitrc separately, they have cgitrc.5.txt including an example which I have tweaked slightly and attached.
Created attachment 179954 [details] Sample cgitrc with fixed typo
Created attachment 179956 [details] Bumped (with small modification) for cgit-0.8.1.1
Created attachment 180693 [details] www-apps/cgit-0.8.2
The various paths used by cgit are set at compile time, which would make using webapp inappropriate. In fact, this makes compiling using portage a poor choice in general.
Created attachment 194444 [details] ebuild for 0.8.2.1 version with few improvements Following README file any existing into portage git could be used. So i've replaced GIT_V initialization with `git --version` check. (Anyway, we are depending on git, yes? Actually we shouldn't, we need only sources, but portageq calls not allowed into global scope. Maybe EAPI=3 will fix this) Also, we should use `need_httpd_fcgi` or `need_httpd_cgi`, but they are completelly broken and unconditionally depending on local httpd server, which is incorrect for many fast-cgi setups. So we're missing them for now. There is two config files. One global: /etc/cgitrc Second is local for every webapp-config setup: ${MY_APPDIR}/conf/cgitrc. It should be specified with CGIT_CONFIG enviromental variable within spawner or httpd server config. It's probably useless for most setups, but such option can't be just lost. Also: cgit.cgi was moved into MY_CGIBINDIR, where it should be. I really don't know what to do with webapp-config - it refuses to work if no httpd servers installed.
Created attachment 194445 [details] Now right ebuild Argg... Sorry, I've forgoten to pull git changes.
Created attachment 194446 [details] Postinstall with warning about possible configs Maybe it should be rewritten by someone with better English
Created attachment 194448 [details] ebuild with data/binary split via USE-flags Futher improvements (or complexifications). I don't know for good this changes or for evil, I'm just adopting it for my needs - I have nginx on one host and repositories on another - trying to save normal-setup compatibility. Now ebuild supports bare-data or bare-binary installations via 'standalone' (only binary /usr/bin/cgit.cgi) and 'dataonly' (only data into webapp structure). If no of this flags specified it should install both binary and data in webapp structure. With no 'standalone' flag ebuild depends on httpd server. 'dataonly' flag actually skips any kind of compilation, so git sources unneeded If no 'dataonly' flag specified - documentation for /etc/cgitrc or analogs (cgitrc.5.txt) installed via dodoc. TODO: maybe it will be usefull to ship different postinst files for with/without dataonly installations , but it's not so critical... Normal setup isn't tested, so if anybody will use this ebuild for normal installation (without splitting), please, comment it's workability. In reply to comment #10: No, most of valuable compile-time options could be overridden via /etc/cgitrc config file. If any really valuable option left compile-time only - it could be implemented via savedconfig.eclass framework.
Created attachment 194449 [details] valid metadata.xml with use descriptions
ebuild works well for latest 0.8.3. I would like to suggest that the cgit ebuild should install the binary cgit.cgi into a web application directory. I don't know where gentoo installs such kind of things. Together with this binary the default cgit.css should be installed, too. To improve the usability, the ebuild should also suggest to put something like "cgit.cgi --scan-tree=/gitrepo-parent-path > /etc/cgitrepos" into a cron table and use "include=/etc/cgitrepos" in cgitrc. This way it's simpler and more convenient. You don't need to update your cgitrc every time you add a new repository.
*cgit-0.8.3.1 (20 Feb 2010) 20 Feb 2010; Lance Albertson <ramereth@gentoo.org> +cgit-0.8.3.1.ebuild, +files/cgitrc, +files/postinstall-en.txt, +metadata.xml: Initial ebuild Thanks to everyone who helped in #223339 for contributing to the ebuild. --- I decided to keep with the KISS principles and used one of the earlier versions of the ebuild without the split standalone use flags. I just couldn't see a valid justification for it and it just made things more confusing than they needed to be. Plus, having to deal with slots of the cgi all the time would be annoying. Thanks for all your input!
There is a missing dependency on app-text/docbook-xsl-stylesheets overwise you'll get this error : make -j1 man-doc a2x -f manpage cgitrc.5.txt /usr/bin/asciidoc:9: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module. import sys, os, re, time, traceback, tempfile, popen2, codecs, locale I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" compilation error: file /etc/asciidoc/docbook-xsl/manpage.xsl line 13 element import xsl:import : unable to load http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl a2x: failed: xsltproc --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0 --nonet "/etc/asciidoc/docbook-xsl/manpage.xsl" "/var/tmp/portage/www-apps/cgit-0.8.3.1/work/cgit-0.8.3.1/cgitrc.5.xml" make: *** [man-doc] Error 1
(In reply to comment #18) > There is a missing dependency on app-text/docbook-xsl-stylesheets overwise > you'll get this error : Same problem. When trying to compile with doc USE flag an error occurs. Installation app-text/docbook-xsl-stylesheets helps.