Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370681 - www-apps/cgit-0.9 should output more post-installation output information
Summary: www-apps/cgit-0.9 should output more post-installation output information
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Lance Albertson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 14:14 UTC by Olliver Schinagl
Modified: 2011-06-27 08:58 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olliver Schinagl 2011-06-08 14:14:44 UTC
Currently cgit, after running webapp-config outputs very little usefull information.

Most webapp ebuilds get you started pretty well. This one, lacks any usefull example apache configuration to start with (i'm still working on finding a working configuration for using:
webapp-config -I -h git.example.com -d cgit cgit 0.9

I'll have that solved by the time I re-check this post but anybody else may find this very confusing when nothing appears to work.

Also a link to the URL which should be accessed should be very helpfull to people. Visit http://localhost/cgi-bin/ to see cgit in action after configuring your repos, for example.

Also, the post installation suggest /etc/cgit_repos where as the config file uses /etc/cgitrepos as suggestion, so would be smart to recommend that also.


Reproducible: Always
Comment 1 Olliver Schinagl 2011-06-08 14:39:08 UTC
Actually, it seems installing it in subdirs doesn't even work properly, unless you add some alias rules to your apache config to alias the subdirs that you install into (e.g. the -d option)

Also, RewriteRule ^/(.*)$ /cgi-bin/cgit.cgi/$1 [PT]
seems to be required for cgit to work at all I think.
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2011-06-09 06:49:47 UTC
Oliver, could you suggest some text for post-installation output, please?
Comment 3 Olliver Schinagl 2011-06-09 06:59:42 UTC
As soon as I actually get it to work the way it should, I will :)
Comment 4 Olliver Schinagl 2011-06-09 13:55:35 UTC
=================================================================
POST-INSTALL INSTRUCTIONS
=================================================================

There is a few variants of configuration:
By default, cgit parses /etc/cgitrc

This can be overridden globally or per vhost via

SetEnv  CGIT_CONFIG   /etc/cgitrc

in your apache/vhost config.

With a default apache vhost config you can now access your repository at http://<vhostname>/cgi-bin/cgit.cgi/

If you wish to access your repository starting from the root and don't want 'cgi-bin/cgit.cgi' to be invisible, 2 things are needed.

In your apache vhost configuration file for your domain, add the following rewrite rules to your
<Directory /var/www/<vhostname>/htdocs> section.
<snip>
        RewriteEngine On
        # Redirect all non-existant urls to cgit
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^.* /cgi-bin/cgit.cgi/$0 [L,PT]

        # Redirect the empty url to cgit
        RewriteRule ^$ /cgi-bin/cgit.cgi/ [L,PT]
<snip>

To make cgit create the correct URL's internally add to /etc/cgitrc (or your local config file)
Enable virtual-root=/

After these rules, you can now access cgit via http://<vhostname>/ to get the listing, and http://<vhostname>/repository to go directly to repository.


Other notes:

Default css and logo in config file/uncommented are css:/css/cgit.css and logo:/img/mylogo.png

However the ebuild installs /<vhostname>/cgit.css and /<vhostname>/git.png

i'd suggest putting the css in /<vhostname>/css/cgit.css and /<vhostname>/mylogo.png (or rename mylogo.png to git.png and update the default config file).

As said before, use cgitrepos isntead of cgit_repos to be concisted with the example config file.

The entire config file is commented. Not sure on how that works with some of the defaults. Also there is a mention of a /conf somewhere locally to the domain, but it's not installed, nor is the directory created.

Finally, the post install instruction mention running the cgit.cgi from the installed localtion. I'd probably recommend running it from the webapp-config installed location, especially when using local config files because a) package can be unmerged, dunno why you'd want that, but still use the vhost. b) different versions etc.
Comment 5 Peter Volkov (RETIRED) gentoo-dev 2011-06-27 08:58:47 UTC
Thank you Oliver! Post-install information was just added to files/postinstall-en.txt. If there is something wrong, please, reopen bug or open new one.