{"thread":{"id":"26749","subject":"[RFD] Gitweb: Source configuration from file separate from the CGI script","startedAt":"2011-03-16T14:26:22Z","lastAt":"2011-03-22T21:50:10Z","messageCount":12,"participants":["Drew Northup","Jonathan Nieder","Jakub Narebski","Todd Zullinger","Matt Ryan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"163474","messageId":"1300285582.28805.25.camel@drew-northup.unet.maine.edu","threadId":"26749","inReplyTo":null,"subject":"[RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Drew Northup","fromEmail":"drew.northup@maine.edu","sentAt":"2011-03-16T14:26:22Z","receivedAt":"2011-03-16T14:26:22Z","isPatch":false,"sender":{"key":"drew.northup@maine.edu","avatar":"https://avatars.githubusercontent.com/u/18331571?v=4"},"body":"I just upgraded my Gitweb package (I'm testing the EPEL RHEL5 latest;\nI'm not too happy with them tweaking the paths) and as I should have\nexpected all of my Gitweb configuration is now gone. Not that it's a big\ndeal to put it back, but we should probably give the option of keeping\nthat configuration information separate from the executable in my\nopinion.\nAnybody else want to speak up with respect to this? I have some idea\nwhat a prospective patch would look like, but I'd like to hear from\npeople before putting it together (and to let it solidify in my head for\na while first as well).\n\n-- \n-Drew Northup\n________________________________________________\n\"As opposed to vegetable or mineral error?\"\n-John Pescatore, SANS NewsBites Vol. 12 Num. 59\n"},{"id":"163475","messageId":"20110316143420.GA15371@elie","threadId":"26749","inReplyTo":"1300285582.28805.25.camel@drew-northup.unet.maine.edu","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-03-16T14:34:20Z","receivedAt":"2011-03-16T14:34:20Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nDrew Northup wrote:\n\n> I just upgraded my Gitweb package (I'm testing the EPEL RHEL5 latest;\n> I'm not too happy with them tweaking the paths) and as I should have\n> expected all of my Gitweb configuration is now gone.\n\nIn gitweb/README, I see:\n\n| You can adjust gitweb behaviour using the file specified in `GITWEB_CONFIG`\n| (defaults to 'gitweb_config.perl' in the same directory as the CGI), and\n| as a fallback `GITWEB_CONFIG_SYSTEM` (defaults to /etc/gitweb.conf).\n\nHope that helps,\nJonathan\n"},{"id":"163477","messageId":"1300286650.28805.29.camel@drew-northup.unet.maine.edu","threadId":"26749","inReplyTo":"20110316143420.GA15371@elie","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Drew Northup","fromEmail":"drew.northup@maine.edu","sentAt":"2011-03-16T14:44:10Z","receivedAt":"2011-03-16T14:44:10Z","isPatch":false,"sender":{"key":"drew.northup@maine.edu","avatar":"https://avatars.githubusercontent.com/u/18331571?v=4"},"body":"\nOn Wed, 2011-03-16 at 09:34 -0500, Jonathan Nieder wrote:\n> Hi,\n> \n> Drew Northup wrote:\n> \n> > I just upgraded my Gitweb package (I'm testing the EPEL RHEL5 latest;\n> > I'm not too happy with them tweaking the paths) and as I should have\n> > expected all of my Gitweb configuration is now gone.\n> \n> In gitweb/README, I see:\n> \n> | You can adjust gitweb behaviour using the file specified in `GITWEB_CONFIG`\n> | (defaults to 'gitweb_config.perl' in the same directory as the CGI), and\n> | as a fallback `GITWEB_CONFIG_SYSTEM` (defaults to /etc/gitweb.conf).\n> \n> Hope that helps,\n> Jonathan\n\nI apparently missed that. Alas, I didn't see it in the code when I was\nsetting my values so I assumed that it wasn't available. Perhaps we can\nmake this a little more obvious? I'll go try that out and see if I can\nmake it break--putting it in the same directory definitely wouldn't have\nhelped this time.\n\n-- \n-Drew Northup\n________________________________________________\n\"As opposed to vegetable or mineral error?\"\n-John Pescatore, SANS NewsBites Vol. 12 Num. 59\n"},{"id":"163548","messageId":"m3lj0e59ps.fsf@localhost.localdomain","threadId":"26749","inReplyTo":"1300286650.28805.29.camel@drew-northup.unet.maine.edu","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-03-17T10:21:48Z","receivedAt":"2011-03-17T10:21:48Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Drew Northup <drew.northup@maine.edu> writes:\n> On Wed, 2011-03-16 at 09:34 -0500, Jonathan Nieder wrote:\n> > Drew Northup wrote:\n> > \n> > > I just upgraded my Gitweb package (I'm testing the EPEL RHEL5 latest;\n> > > I'm not too happy with them tweaking the paths) and as I should have\n> > > expected all of my Gitweb configuration is now gone.\n\nWe discourage configuring gitweb by editing generated gitweb.cgi file\nfor a long, long time, at least since v1.4.2-rc2-102-gc8d138a (gitweb:\noptionally read config from GITWEB_CONFIG, 2006-08-02).  It is\ndescribed in gitweb/README since v1.4.3-rc1-7-g45a3b12 (gitweb:\nDocument features better, 2006-10-07).\n\n> > \n> > In gitweb/README, I see:\n\nNot only gitweb/README; in gitweb.cgi that you are, I suppose,\nediting, you have $GITWEB_CONFIG mentioned 25 times as a place\nto override default configuration.\n\n> > \n> > | You can adjust gitweb behaviour using the file specified in `GITWEB_CONFIG`\n> > | (defaults to 'gitweb_config.perl' in the same directory as the CGI), and\n> > | as a fallback `GITWEB_CONFIG_SYSTEM` (defaults to /etc/gitweb.conf).\n> \n> I apparently missed that. Alas, I didn't see it in the code when I was\n> setting my values so I assumed that it wasn't available.\n\n$GITWEB_CONFIG is mentioned 25 times in gitweb source; is it not enough?\n\n> Perhaps we can make this a little more obvious?\n\nHow can we make it more obvious?  gitweb/INSTALL has \"Build time\nconfiguration\" just below instruction on how to build it, and it\nmentions \"How to configure gitweb for your local system\" section in\ngitweb/README in very first line of this section.\n\n> I'll go try that out and see if I can make it break--putting it in\n> the same directory definitely wouldn't have helped this time.\n\nFirst, as Jonathan cited, you can by default beside\n'gitweb_config.perl' in the same directory as the CGI use '\n/etc/gitweb.conf' file.\n\nSecond, you can configure where GITWEB_CONFIG and GITWEB_CONFIG_SYSTEM\nare to be found dusing build time, e.g.\n\n  $ make GITWEB_CONFIG_SYSTEM=/etc/gitweb/gitweb_config.perl \\\n         install-gitweb\n\nThird, you can override where gitweb searches for its config files\nusing GITWEB_CONFIG and/or GITWEB_CONFIG_SYSTEM configuration\nvariables; quite useful for debugging gitweb, and for gitweb tests in\ngit.git repository.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"163564","messageId":"201103171641.29021.jnareb@gmail.com","threadId":"26749","inReplyTo":"1300361067.3010.1.camel@drew-northup.unet.maine.edu","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-03-17T15:41:26Z","receivedAt":"2011-03-17T15:41:26Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Drew Northup wrote:\n\n> I'm obviously a moron because I didn't to bother to scroll through the\n> whole thing first. I'm just not going to fight with you.\n> I'm going to crawl back under my rock now.\n\nI came to strong; I am very, very sorry about that.  We are really\ninterested how we can make existence and use of gitweb config file\nmore obvious.\n\nThe \"Build time configuration\" section in gitweb/INSTALL is \nunfortunately after the one-page fold, so that's probably why\nyou didn't notice that.  It was probably pushed out by changes\nin previous section.\n\nWhat were your changes to gitweb.cgi script, i.e. where in gitweb\nsources we should add notification about build time and runtime\ngitweb configuration?\n\n-- \nJakub Narebski\nPoland\n"},{"id":"163635","messageId":"1300457243.12245.13.camel@drew-northup.unet.maine.edu","threadId":"26749","inReplyTo":"201103171641.29021.jnareb@gmail.com","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Drew Northup","fromEmail":"drew.northup@maine.edu","sentAt":"2011-03-18T14:07:23Z","receivedAt":"2011-03-18T14:07:23Z","isPatch":false,"sender":{"key":"drew.northup@maine.edu","avatar":"https://avatars.githubusercontent.com/u/18331571?v=4"},"body":"\nOn Thu, 2011-03-17 at 16:41 +0100, Jakub Narebski wrote:\n> Drew Northup wrote:\n> \n> > I'm obviously a moron because I didn't to bother to scroll through the\n> > whole thing first. I'm just not going to fight with you.\n> > I'm going to crawl back under my rock now.\n> \n> I came to strong; I am very, very sorry about that.  We are really\n> interested how we can make existence and use of gitweb config file\n> more obvious.\n> \n> The \"Build time configuration\" section in gitweb/INSTALL is \n> unfortunately after the one-page fold, so that's probably why\n> you didn't notice that.  It was probably pushed out by changes\n> in previous section.\n> \n> What were your changes to gitweb.cgi script, i.e. where in gitweb\n> sources we should add notification about build time and runtime\n> gitweb configuration?\n\nJakub,\nI'll have another look soon, perhaps this weekend depending on when I'm\ndone my other obligations. \nAt the very least I'm considering making a man page for the\nconfiguration file. I don't know off-hand how much that will be\nseemingly repetitive of the README, but I suspect I'm not the only one\nwho often finds monolithic files tucked away in /usr/share/doc (/usr/doc\nfor some systems) a daunting reading prospect when I really don't care\nabout the project history since 1937 (which, all too often, was the\napparent perspective taken when writing the README). I don't think the\ngitweb README rises quite to that level, but I do think that benefit may\nbe drawn from doing to it what has been proposed for the rest of\ngitweb--making it into smaller digestible chunks. I don't plan on\nbothering anybody here about that until I've had a chance to make a mess\nin my own repo hacking it to pieces for a while.\n\n-- \n-Drew Northup\n________________________________________________\n\"As opposed to vegetable or mineral error?\"\n-John Pescatore, SANS NewsBites Vol. 12 Num. 59\n"},{"id":"163646","messageId":"20110318145147.GA26236@inocybe.localdomain","threadId":"26749","inReplyTo":"1300457243.12245.13.camel@drew-northup.unet.maine.edu","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2011-03-18T14:51:47Z","receivedAt":"2011-03-18T14:51:47Z","isPatch":false,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Hi Drew,\n\nDrew Northup wrote:\n> At the very least I'm considering making a man page for the\n> configuration file. I don't know off-hand how much that will be\n> seemingly repetitive of the README, but I suspect I'm not the only\n> one who often finds monolithic files tucked away in /usr/share/doc\n> (/usr/doc for some systems) a daunting reading prospect\n[...]\n\nFWIW, with git-1.7.4.1 in EPEL we now include a commented\n/etc/gitweb.conf in the package.  This wasn't present in the very old\n1.5.5.6 we had in EPEL until recently.  This config file doesn't list\nall the available options, but it does point to the README and INSTALL\nfiles for further help.\n\n(Also worth noting is that the package was in the epel-testing\nrepository for 3 weeks and was announced on both epel-devel and\nepel-announce to try and get testing from folks before pushing it\nstable.  Sadly, very few folks do so, and issues are sometimes not\ncaught.)\n\nSorry if the update caused you trouble.\n\n-- \nTodd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nCuriosity killed the cat, but for awhile I was a suspect.\n    -- Steven Wright\n\n"},{"id":"163648","messageId":"1300461702.12245.27.camel@drew-northup.unet.maine.edu","threadId":"26749","inReplyTo":"20110318145147.GA26236@inocybe.localdomain","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Drew Northup","fromEmail":"drew.northup@maine.edu","sentAt":"2011-03-18T15:21:42Z","receivedAt":"2011-03-18T15:21:42Z","isPatch":false,"sender":{"key":"drew.northup@maine.edu","avatar":"https://avatars.githubusercontent.com/u/18331571?v=4"},"body":"\nOn Fri, 2011-03-18 at 10:51 -0400, Todd Zullinger wrote:\n> Hi Drew,\n> \n> Drew Northup wrote:\n> > At the very least I'm considering making a man page for the\n> > configuration file. I don't know off-hand how much that will be\n> > seemingly repetitive of the README, but I suspect I'm not the only\n> > one who often finds monolithic files tucked away in /usr/share/doc\n> > (/usr/doc for some systems) a daunting reading prospect\n> [...]\n> \n> FWIW, with git-1.7.4.1 in EPEL we now include a commented\n> /etc/gitweb.conf in the package.  This wasn't present in the very old\n> 1.5.5.6 we had in EPEL until recently.  This config file doesn't list\n> all the available options, but it does point to the README and INSTALL\n> files for further help.\n\nI did find that following Jonathan's prompting. I hadn't been using the\nEPEL git packages but had been building my own. Alas I also haven't\nfigured out yet how to auto-exclude individual package sets from upgrade\nvia channel (something for a discussion somewhere else--when I have time\nto mess with it) and I missed the new EPEL ones in the list. (It's my\ntest/dev box so I let it run packages there for a while first before\nrolling them out elsewhere.)\n\n> (Also worth noting is that the package was in the epel-testing\n> repository for 3 weeks and was announced on both epel-devel and\n> epel-announce to try and get testing from folks before pushing it\n> stable.  Sadly, very few folks do so, and issues are sometimes not\n> caught.)\n> \n> Sorry if the update caused you trouble.\n\nThe main thing that annoyed me was that EPEL and git's \"make rpm\" seem\nto still have very different ideas about where stuff belongs on a\nmachine. I wish I had more time to read the \"epel-testing\" release\nnotes, but that wouldn't have actually helped me in this case.\n\n-- \n-Drew Northup\n________________________________________________\n\"As opposed to vegetable or mineral error?\"\n-John Pescatore, SANS NewsBites Vol. 12 Num. 59\n"},{"id":"163651","messageId":"20110318153827.GF26236@inocybe.localdomain","threadId":"26749","inReplyTo":"1300461702.12245.27.camel@drew-northup.unet.maine.edu","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2011-03-18T15:38:28Z","receivedAt":"2011-03-18T15:38:28Z","isPatch":false,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Drew Northup wrote:\n> The main thing that annoyed me was that EPEL and git's \"make rpm\"\n> seem to still have very different ideas about where stuff belongs on\n> a machine. I wish I had more time to read the \"epel-testing\" release\n> notes, but that wouldn't have actually helped me in this case.\n\nYeah, for the EPEL-5 packages, we chose to keep gitexecdir = /usr/bin,\nso that people updating wouldn't find any scripts broken by the change\nto /usr/libexec/git-core.  This should be good for folks updating from\nolder EPEL packages but not as hot for anyone that had rolled their\nown from git.git, unfortunately.  On the upside, I think that should\naffect relatively few commands.  If you have particular examples,\nperhaps they are things we can provide better work-arounds for in the\nEPEL packages?\n\n-- \nTodd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nThe worth of a state, in the long run, is the worth of the individuals\ncomposing it.\n    -- John Stuart Mill\n\n"},{"id":"163658","messageId":"20110318175311.GA22421@elie","threadId":"26749","inReplyTo":"1300457243.12245.13.camel@drew-northup.unet.maine.edu","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-03-18T17:54:10Z","receivedAt":"2011-03-18T17:54:10Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Drew Northup wrote:\n\n> At the very least I'm considering making a man page for the\n> configuration file. I don't know off-hand how much that will be\n> seemingly repetitive of the README, but I suspect I'm not the only one\n> who often finds monolithic files tucked away in /usr/share/doc\n\nYes, please!  I'd say, beyond that: please feel free to replace large\nchunks of the README with \"See the manpage (or <source file for the\nmanpage>) for further information.\".\n\nHappily,\nJonathan\n"},{"id":"164059","messageId":"loom.20110322T165315-910@post.gmane.org","threadId":"26749","inReplyTo":"m3lj0e59ps.fsf@localhost.localdomain","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Matt Ryan","fromEmail":"matt@devaldez.com","sentAt":"2011-03-22T16:01:20Z","receivedAt":"2011-03-22T16:01:20Z","isPatch":false,"sender":{"key":"matt@devaldez.com","avatar":null},"body":"Hey, I don't mean to contribute to the confusion. \nBut, after adding a gitweb_config.perl in the \nsame directory as the cgi I haven't seen all the \nchanges take place. I tried something simple to start like so:\n\n$feature{'blame'}{'override'} = [1];\n$feature{'forks'}{'default'} = [1];\n$feature{'avatar'}{'default'} = ['gravatar'];\n\nGravtar is now working, but I haven't seen \nthe blame or forks added. Any help would be appreciated, \nthanks!\n"},{"id":"164093","messageId":"m339mex299.fsf@localhost.localdomain","threadId":"26749","inReplyTo":"loom.20110322T165315-910@post.gmane.org","subject":"Re: [RFD] Gitweb: Source configuration from file separate from the CGI script","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-03-22T21:50:10Z","receivedAt":"2011-03-22T21:50:10Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Matt Ryan <matt@devaldez.com> writes:\n\n> Hey, I don't mean to contribute to the confusion. \n> But, after adding a gitweb_config.perl in the \n> same directory as the cgi I haven't seen all the \n> changes take place. I tried something simple to start like so:\n> \n> $feature{'blame'}{'override'} = [1];\n\nThis doesn't turn on 'blame' feature, but only allows override with\nper-repository gitweb.blame repository configuration variable.\n\nYou probably wanted to use 'default', not 'override' here.\n\n> $feature{'forks'}{'default'} = [1];\n\nAs you can read in comments, this is about very specific layout of\nrepositories, namely that forks of 'path/to/repo.git' are all\nsomewhere below 'path/to/repo' directory.\n\nIf you don't have forks organized in such way, you wouldn't see\nchanges from this feature.\n\n> $feature{'avatar'}{'default'} = ['gravatar'];\n\nThis requires that email addresses of authors, committers and taggers\nhave gravatar entry.  This means that you have to create \"account\" on\nhttp://www.gravatar.com).\n\n> \n> Gravtar is now working, but I haven't seen \n> the blame or forks added. Any help would be appreciated, \n> thanks!\n\n\nHope that helps.\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"}]}