{"thread":{"id":"27353","subject":"[PATCH] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist","startedAt":"2011-05-14T19:37:15Z","lastAt":"2011-05-17T17:28:00Z","messageCount":8,"participants":["Jakub Narebski","Jonathan Nieder","Drew Northup","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"167862","messageId":"201105142137.16541.jnareb@gmail.com","threadId":"27353","inReplyTo":null,"subject":"[PATCH] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-05-14T19:37:15Z","receivedAt":"2011-05-14T19:37:15Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"gitweb obtains configuration from the following sources:\n\n  1. per-instance configuration file (default: gitweb_conf.perl)\n  2. system-wide configuration file (default: /etc/gitweb.conf)\n\nIf per-instance configuration file exists, then system-wide\nconfiguration was _not used at all_.  This is quite untypical and\nsuprising behavior.\n\nThis commit changes gitweb behavior so that configuration in\nper-instance configuration file can _override_ settings from\nsystem-wide configuration file.\n\nSuggested-by: Drew Northup <drew.northup@maine.edu>\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nThis is the response to discussion in the\n\n  [PATCH/WIP] Starting work on a man page for /etc/gitweb.conf\n  http://thread.gmane.org/gmane.comp.version-control.git/173422\n\nThe patch to gitweb.perl itself (without the commit message) was send\nas part of \n\n  http://thread.gmane.org/gmane.comp.version-control.git/173422/focus=173489\n\n(embedded in body of email).\n\nNote that changes to gitweb/README and gitweb/INSTALL were\nminimalized, so the final result might not be the best... but I think\nit is good enough.\n\n gitweb/INSTALL     |    8 +++++---\n gitweb/README      |    2 +-\n gitweb/gitweb.perl |    7 ++++---\n 3 files changed, 10 insertions(+), 7 deletions(-)\n\ndiff --git a/gitweb/INSTALL b/gitweb/INSTALL\nindex 4964a67..0584919 100644\n--- a/gitweb/INSTALL\n+++ b/gitweb/INSTALL\n@@ -98,15 +98,17 @@ Gitweb config file\n See also \"Runtime gitweb configuration\" section in README file\n for gitweb (in gitweb/README).\n \n-- You can configure gitweb further using the gitweb configuration file;\n+- You can configure gitweb further using the per-instance gitweb configuration file;\n   by default this is a file named gitweb_config.perl in the same place as\n   gitweb.cgi script. You can control the default place for the config file\n   using the GITWEB_CONFIG build configuration variable, and you can set it\n-  using the GITWEB_CONFIG environment variable. If this file does not\n-  exist, gitweb looks for a system-wide configuration file, normally\n+  using the GITWEB_CONFIG environment variable.\n+  gitweb also looks for a system-wide configuration file, normally\n   /etc/gitweb.conf. You can change the default using the\n   GITWEB_CONFIG_SYSTEM build configuration variable, and override it\n   through the GITWEB_CONFIG_SYSTEM environment variable.\n+  Settings from per-instance configuration file override those from\n+  system-wide configuration file.\n \n - The gitweb config file is a fragment of perl code. You can set variables\n   using \"our $variable = value\"; text from \"#\" character until the end\ndiff --git a/gitweb/README b/gitweb/README\nindex a92bde7..334f13e 100644\n--- a/gitweb/README\n+++ b/gitweb/README\n@@ -126,7 +126,7 @@ Runtime gitweb configuration\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+`GITWEB_CONFIG_SYSTEM` (defaults to /etc/gitweb.conf), in that order.\n The most notable thing that is not configurable at compile time are the\n optional features, stored in the '%features' variable.\n \ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex acdc5b8..9527cd2 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -637,12 +637,13 @@ sub evaluate_gitweb_config {\n \tour $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || \"++GITWEB_CONFIG++\";\n \tour $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || \"++GITWEB_CONFIG_SYSTEM++\";\n \t# die if there are errors parsing config file\n+\tif (-e $GITWEB_CONFIG_SYSTEM) {\n+\t\tdo $GITWEB_CONFIG_SYSTEM;\n+\t\tdie $@ if $@;\n+\t}\n \tif (-e $GITWEB_CONFIG) {\n \t\tdo $GITWEB_CONFIG;\n \t\tdie $@ if $@;\n-\t} elsif (-e $GITWEB_CONFIG_SYSTEM) {\n-\t\tdo $GITWEB_CONFIG_SYSTEM;\n-\t\tdie $@ if $@;\n \t}\n }\n \n-- \n1.7.5\n"},{"id":"167865","messageId":"20110514210603.GA11502@elie","threadId":"27353","inReplyTo":"201105142137.16541.jnareb@gmail.com","subject":"Re: [PATCH] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-05-14T21:06:30Z","receivedAt":"2011-05-14T21:06:30Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jakub Narebski wrote:\n\n> If per-instance configuration file exists, then system-wide\n> configuration was _not used at all_.  This is quite untypical and\n> suprising behavior.\n\nI agree.  How to avoid breaking existing installations, though?  (I'm\nespecially worried because distro packages tend to ship their own\n/etc/gitweb.conf, so the admin might not even know about what's\nthere.)  For example, depending on the content of /etc/gitweb.conf,\nthis has the potential to break \"git instaweb\".\n\nIt could be simpler to document that users should put\n\n\tdo $GITWEB_CONFIG_SYSTEM;\n\nat the start of gitweb_config.conf to reuse options from the system\nconfiguration file and override them.  But that's not very satisfying,\nsince I don't see a nice way to move to a better behavior after that\nwithout breaking some existing installations.  (It would be possible\nto check for a new ./gitweb-config-in-addition-to-what-was-in-etc.conf\nfile but that doesn't seem so nice.)\n\nIf this were a command-line tool, I would be happy as long as there is\nsome way to prevent reading /etc/gitweb.conf through the environment.\nFor a webapp I don't know how easy it is to set environment variables\ntypically.  So thoughts from people in that corner of the world would\nbe interesting.\n"},{"id":"167883","messageId":"201105151153.08826.jnareb@gmail.com","threadId":"27353","inReplyTo":"20110514210603.GA11502@elie","subject":"Re: [PATCH] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-05-15T09:53:07Z","receivedAt":"2011-05-15T09:53:07Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Sat, 14 May 2011, Jonathan Nieder wrote:\n> Jakub Narebski wrote:\n> \n> > If per-instance configuration file exists, then system-wide\n> > configuration was _not used at all_.  This is quite untypical and\n> > suprising behavior.\n> \n> I agree.  How to avoid breaking existing installations, though?  (I'm\n> especially worried because distro packages tend to ship their own\n> /etc/gitweb.conf, so the admin might not even know about what's\n> there.)  For example, depending on the content of /etc/gitweb.conf,\n> this has the potential to break \"git instaweb\".\n\nI don't think that this change has potential to break \"git instaweb\",\nbecause \"git instaweb\" creates its own gitweb_conf.perl - settings\nthere would override distro's /etc/gitweb.conf.  But I have not checked\nif it doesn't rely on some values being default; it shouldn't though.\n\nIt is a PITA to have to retain backward compatibility with our bugs\nand mistakes.  Perhaps this change is for 1.8.0 version boundary, then?\n\n> \n> It could be simpler to document that users should put\n> \n> \tdo $GITWEB_CONFIG_SYSTEM;\n\nWell, you need to check if file exists, and die if there were any bugs\nparsing this file (otherwise you can get strange errors which are really\nhard to debug, to notice that they stem from broken configuration file;\nI am speaking here from my bitter experience ;-)).\n\n> \n> at the start of gitweb_config.conf to reuse options from the system\n> configuration file and override them.  But that's not very satisfying,\n> since I don't see a nice way to move to a better behavior after that\n> without breaking some existing installations.  (It would be possible\n> to check for a new ./gitweb-config-in-addition-to-what-was-in-etc.conf\n> file but that doesn't seem so nice.)\n\nRight.\n\n> \n> If this were a command-line tool, I would be happy as long as there is\n> some way to prevent reading /etc/gitweb.conf through the environment.\n> For a webapp I don't know how easy it is to set environment variables\n> typically.  So thoughts from people in that corner of the world would\n> be interesting.\n\nFor Apache it is as simple as using\n\n  SetEnv\tGITWEB_CONFIG_SYSTEM\t/dev/null\n\n(Sidenote: I just noticed that if $GITWEB_CONFIG_SYSTEM eq $GITWEB_CONFIG,\nthen we don't need and should not re-read config file).\n\nFor Lighttpd it would be\n\n  setenv.add-environment = ( \"GITWEB_CONFIG_SYSTEM\" => \"/dev/null\" )\n\nFor Mongoose it would be\n\n  cgi_env\tGITWEB_CONFIG_SYSTEM=/dev/null\n\nFor nginx it would be\n\n  env\t\tGITWEB_CONFIG_SYSTEM=/dev/null;\n\nFor IIS... is anyone running gitweb under IIS?\n\n\nAll examples taken from either gitweb/README, gitweb/INSTALL, or\ngit-instaweb.sh.  Instead of /dev/null it can be anything that\ndoes not exist, but is not a false value (so \"\" won't work).\n\nNot tested!\n-- \nJakub Narebski\nPoland\n"},{"id":"167978","messageId":"201105161153.24382.jnareb@gmail.com","threadId":"27353","inReplyTo":"201105151153.08826.jnareb@gmail.com","subject":"[PATCHv2] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-05-16T09:53:23Z","receivedAt":"2011-05-16T09:53:23Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"gitweb obtains configuration from the following sources:\n\n  1. per-instance configuration file (default: gitweb_conf.perl)\n  2. system-wide configuration file (default: /etc/gitweb.conf)\n\nIf per-instance configuration file exists, then system-wide\nconfiguration is _not used at all_.  This is quite untypical and\nsuprising behavior.\n\nThis commit changes gitweb behavior so that configuration in\nper-instance configuration file can _override_ settings from\nsystem-wide configuration file.\n\nNote that strictly speaking it is backwards incompatible change.\nCheck your resulting gitweb configuration, please.\n\nSuggested-by: Drew Northup <drew.northup@maine.edu>\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nJakub Narebski wrote:\n\n> (Sidenote: I just noticed that if $GITWEB_CONFIG_SYSTEM eq $GITWEB_CONFIG,\n> then we don't need and should not re-read config file).\n\nThis version addresses this issue.\n\n gitweb/INSTALL     |    8 +++++---\n gitweb/README      |    2 +-\n gitweb/gitweb.perl |   10 ++++++----\n 3 files changed, 12 insertions(+), 8 deletions(-)\n\ndiff --git a/gitweb/INSTALL b/gitweb/INSTALL\nindex 4964a67..0584919 100644\n--- a/gitweb/INSTALL\n+++ b/gitweb/INSTALL\n@@ -98,15 +98,17 @@ Gitweb config file\n See also \"Runtime gitweb configuration\" section in README file\n for gitweb (in gitweb/README).\n \n-- You can configure gitweb further using the gitweb configuration file;\n+- You can configure gitweb further using the per-instance gitweb configuration file;\n   by default this is a file named gitweb_config.perl in the same place as\n   gitweb.cgi script. You can control the default place for the config file\n   using the GITWEB_CONFIG build configuration variable, and you can set it\n-  using the GITWEB_CONFIG environment variable. If this file does not\n-  exist, gitweb looks for a system-wide configuration file, normally\n+  using the GITWEB_CONFIG environment variable.\n+  gitweb also looks for a system-wide configuration file, normally\n   /etc/gitweb.conf. You can change the default using the\n   GITWEB_CONFIG_SYSTEM build configuration variable, and override it\n   through the GITWEB_CONFIG_SYSTEM environment variable.\n+  Settings from per-instance configuration file override those from\n+  system-wide configuration file.\n \n - The gitweb config file is a fragment of perl code. You can set variables\n   using \"our $variable = value\"; text from \"#\" character until the end\ndiff --git a/gitweb/README b/gitweb/README\nindex a92bde7..334f13e 100644\n--- a/gitweb/README\n+++ b/gitweb/README\n@@ -126,7 +126,7 @@ Runtime gitweb configuration\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+`GITWEB_CONFIG_SYSTEM` (defaults to /etc/gitweb.conf), in that order.\n The most notable thing that is not configurable at compile time are the\n optional features, stored in the '%features' variable.\n \ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex e4ede13..0a23cb6 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -640,13 +640,15 @@ sub evaluate_gitweb_config {\n \tour $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || \"++GITWEB_CONFIG++\";\n \tour $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'} || \"++GITWEB_CONFIG_SYSTEM++\";\n \t# die if there are errors parsing config file\n-\tif (-e $GITWEB_CONFIG) {\n-\t\tdo $GITWEB_CONFIG;\n-\t\tdie $@ if $@;\n-\t} elsif (-e $GITWEB_CONFIG_SYSTEM) {\n+\tif (-e $GITWEB_CONFIG_SYSTEM) {\n \t\tdo $GITWEB_CONFIG_SYSTEM;\n \t\tdie $@ if $@;\n \t}\n+\tif ($GITWEB_CONFIG ne $GITWEB_CONFIG_SYSTEM &&\n+\t    -e $GITWEB_CONFIG) {\n+\t\tdo $GITWEB_CONFIG;\n+\t\tdie $@ if $@;\n+\t}\n }\n \n # Get loadavg of system, to compare against $maxload.\n-- \n1.7.5\n"},{"id":"167987","messageId":"1305547838.3396.4.camel@drew-northup.unet.maine.edu","threadId":"27353","inReplyTo":"201105151153.08826.jnareb@gmail.com","subject":"Re: [PATCH] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist","fromName":"Drew Northup","fromEmail":"drew.northup@maine.edu","sentAt":"2011-05-16T12:10:38Z","receivedAt":"2011-05-16T12:10:38Z","isPatch":true,"sender":{"key":"drew.northup@maine.edu","avatar":"https://avatars.githubusercontent.com/u/18331571?v=4"},"body":"\nOn Sun, 2011-05-15 at 11:53 +0200, Jakub Narebski wrote:\n> On Sat, 14 May 2011, Jonathan Nieder wrote:\n> > Jakub Narebski wrote:\n> > \n> > > If per-instance configuration file exists, then system-wide\n> > > configuration was _not used at all_.  This is quite untypical and\n> > > suprising behavior.\n> > \n> > I agree.  How to avoid breaking existing installations, though?  (I'm\n> > especially worried because distro packages tend to ship their own\n> > /etc/gitweb.conf, so the admin might not even know about what's\n> > there.)  For example, depending on the content of /etc/gitweb.conf,\n> > this has the potential to break \"git instaweb\".\n> \n> I don't think that this change has potential to break \"git instaweb\",\n> because \"git instaweb\" creates its own gitweb_conf.perl - settings\n> there would override distro's /etc/gitweb.conf.  But I have not checked\n> if it doesn't rely on some values being default; it shouldn't though.\n> \n> It is a PITA to have to retain backward compatibility with our bugs\n> and mistakes.  Perhaps this change is for 1.8.0 version boundary, then?\n\nI'm comfortable putting this at the 1.8.0 boundary. Frankly, I think\nthat the default /etc/gitweb.conf should be a file full of commented-out\nexamples anyway. I do believe that at least one distro is doing that\nalready. Doing so decreases the potential pain for those still expecting\nthe old behavior.\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":"168043","messageId":"7v39kdj3hw.fsf@alter.siamese.dyndns.org","threadId":"27353","inReplyTo":"201105161153.24382.jnareb@gmail.com","subject":"Re: [PATCHv2] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-17T05:32:59Z","receivedAt":"2011-05-17T05:32:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> This commit changes gitweb behavior so that configuration in\n> per-instance configuration file can _override_ settings from\n> system-wide configuration file.\n>\n> Note that strictly speaking it is backwards incompatible change.\n\nI am not sure if we gain enough from this change.  As the system-wide one\ncan be arbitrarily overriden by per-instance one, the goal of this change\ncannot be to make sure that the system administrator can enforce the\nsystem wide policy over all the gitweb instances.\n\nI think the goal is to let per-instance configuration have an easy way to\ninherit from a common sane default, but if that is the case, wouldn't it\nbe a lot safer and more backward compatible way to just instruct people to\ninclude that common default configuration at the beginning of per-instance\nconfiguration file instead?  After all, you would need to give some advice\nlike this ...\n\n> Check your resulting gitweb configuration, please.\n\n... either way.\n"},{"id":"168061","messageId":"1305645589.11864.20.camel@drew-northup.unet.maine.edu","threadId":"27353","inReplyTo":"7v39kdj3hw.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCHv2] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist","fromName":"Drew Northup","fromEmail":"drew.northup@maine.edu","sentAt":"2011-05-17T15:19:49Z","receivedAt":"2011-05-17T15:19:49Z","isPatch":false,"sender":{"key":"drew.northup@maine.edu","avatar":"https://avatars.githubusercontent.com/u/18331571?v=4"},"body":"\nOn Mon, 2011-05-16 at 22:32 -0700, Junio C Hamano wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > This commit changes gitweb behavior so that configuration in\n> > per-instance configuration file can _override_ settings from\n> > system-wide configuration file.\n> >\n> > Note that strictly speaking it is backwards incompatible change.\n> \n> I am not sure if we gain enough from this change.  As the system-wide one\n> can be arbitrarily overriden by per-instance one, the goal of this change\n> cannot be to make sure that the system administrator can enforce the\n> system wide policy over all the gitweb instances.\n\nCurrently if there is a local configuration file\n_there_is_no_system-wide_policy_. That's the problem.\n\n> I think the goal is to let per-instance configuration have an easy way to\n> inherit from a common sane default, but if that is the case, wouldn't it\n> be a lot safer and more backward compatible way to just instruct people to\n> include that common default configuration at the beginning of per-instance\n> configuration file instead?  After all, you would need to give some advice\n> like this ...\n\nIf that's currently being done anywhere this change will not cause any\npain. If the default /etc/gitweb.conf contains a set of commented-out\nsample entries, as it should in the case of something like this, then\nthere will be no problems. As the local configurations will override the\nsystem configuration items one by one, instead of wholesale and\noutright, those items most likely to be a problem will be set correctly\nin my estimation.\n\n>From my day job I happen to know that asking the user to please respect\nthe existing policy by including it in their local configuration policy\ndoesn't work out very well. What usually happens is the user removes\nwhatever is there and replaces it with whatever the tutorial they are\ncurrently looking at has in it. I highly doubt we'll change all of the\ntutorials out on the Internet, or all of the mere mortals using them. We\ncan change Gitweb.\n\nThe difference between the current situation and the resultant one can\nbe summed up thusly:\n\nCurrently\n/etc/gitweb.conf only: System policy\ngitweb_config.perl only: Local policy\nboth: Local policy ONLY\n\nNew\n/etc/gitweb.conf only: System policy\ngitweb_config.perl only: Local policy\nboth: Local policy overrides System policy on a per-configurable item\nbasis\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":"168073","messageId":"7v4o4tgrtr.fsf@alter.siamese.dyndns.org","threadId":"27353","inReplyTo":"1305645589.11864.20.camel@drew-northup.unet.maine.edu","subject":"Re: [PATCHv2] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-17T17:28:00Z","receivedAt":"2011-05-17T17:28:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Drew Northup <drew.northup@maine.edu> writes:\n\n> On Mon, 2011-05-16 at 22:32 -0700, Junio C Hamano wrote:\n>> Jakub Narebski <jnareb@gmail.com> writes:\n>> \n>> > This commit changes gitweb behavior so that configuration in\n>> > per-instance configuration file can _override_ settings from\n>> > system-wide configuration file.\n>> >\n>> > Note that strictly speaking it is backwards incompatible change.\n>> \n>> I am not sure if we gain enough from this change.  As the system-wide one\n>> can be arbitrarily overriden by per-instance one, the goal of this change\n>> cannot be to make sure that the system administrator can enforce the\n>> system wide policy over all the gitweb instances.\n>\n> Currently if there is a local configuration file\n> _there_is_no_system-wide_policy_. That's the problem.\n\nAs I said, the patch does not solve \"system-wide policy\" problem at all,\nas the per-instance one can override anything. You _could_ sell this as a\nconvenience feature to me, and I already agreed it would be one possible\nway to make things convienent.\n\n>> I think the goal is to let per-instance configuration have an easy way to\n>> inherit from a common sane default, but if that is the case, wouldn't it\n>> be a lot safer and more backward compatible way to just instruct people to\n>> include that common default configuration at the beginning of per-instance\n>> configuration file instead?  After all, you would need to give some advice\n>> like this ...\n>\n> If that's currently being done anywhere this change will not cause any\n> pain. If the default /etc/gitweb.conf contains a set of commented-out\n> sample entries, as it should in the case of something like this, then\n> there will be no problems.\n\nI could easily imagine a site whose primary objective of it is to support\na specific project. It would be natural for the sysadm group to decide to\nuse /etc/gitweb.conf to customize its primary gitweb instance to suite the\nthe need of serving that project.\n\nThe sysadm group may allow its users who have their own side projects run\ntheir own instances using per-instance configuration. These users would\nhave been happily using their gitweb instances, with the knowledge that\nanything specific to the primary project of the site in /etc/gitweb.conf\nwould not affect their instances.\n\nThese are broken with this change, no? The users of instaweb is also\naffected the same way.\n\nAlthough I am sympathetic to the wish to have a common configuration that\nis shared by all instances by default (or even make it mandatory), I am\njust pointing out that there is a downside if you use /etc/gitweb.conf as\nthe common configuration that is read by all instances.\n\nWould it be a workable solution to make any instance read a new file, say,\n/etc/gitweb-shared.conf, if it exists at the beginning, and to leave\n/etc/gitweb.conf as the fallback default that is only used when\nper-instance configuration does not exist?\n\nIf somebody can come up with a mechanism to mark configuration variables\nthat are set in the common configuration file as \"not overridable\", a\nbetter name of the common file would be gitweb-policy.conf, as it does\nmore than \"shared\" whose purpose is to give common sane default.\n\nI can go either way.\n"}]}