Re: [PATCHv2] gitweb: Use GITWEB_CONFIG_SYSTEM even if GITWEB_CONFIG does exist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Drew Northup <drew.northup@xxxxxxxxx> writes:

> On Mon, 2011-05-16 at 22:32 -0700, Junio C Hamano wrote:
>> Jakub Narebski <jnareb@xxxxxxxxx> writes:
>> 
>> > This commit changes gitweb behavior so that configuration in
>> > per-instance configuration file can _override_ settings from
>> > system-wide configuration file.
>> >
>> > Note that strictly speaking it is backwards incompatible change.
>> 
>> I am not sure if we gain enough from this change.  As the system-wide one
>> can be arbitrarily overriden by per-instance one, the goal of this change
>> cannot be to make sure that the system administrator can enforce the
>> system wide policy over all the gitweb instances.
>
> Currently if there is a local configuration file
> _there_is_no_system-wide_policy_. That's the problem.

As I said, the patch does not solve "system-wide policy" problem at all,
as the per-instance one can override anything. You _could_ sell this as a
convenience feature to me, and I already agreed it would be one possible
way to make things convienent.

>> I think the goal is to let per-instance configuration have an easy way to
>> inherit from a common sane default, but if that is the case, wouldn't it
>> be a lot safer and more backward compatible way to just instruct people to
>> include that common default configuration at the beginning of per-instance
>> configuration file instead?  After all, you would need to give some advice
>> like this ...
>
> If that's currently being done anywhere this change will not cause any
> pain. If the default /etc/gitweb.conf contains a set of commented-out
> sample entries, as it should in the case of something like this, then
> there will be no problems.

I could easily imagine a site whose primary objective of it is to support
a specific project. It would be natural for the sysadm group to decide to
use /etc/gitweb.conf to customize its primary gitweb instance to suite the
the need of serving that project.

The sysadm group may allow its users who have their own side projects run
their own instances using per-instance configuration. These users would
have been happily using their gitweb instances, with the knowledge that
anything specific to the primary project of the site in /etc/gitweb.conf
would not affect their instances.

These are broken with this change, no? The users of instaweb is also
affected the same way.

Although I am sympathetic to the wish to have a common configuration that
is shared by all instances by default (or even make it mandatory), I am
just pointing out that there is a downside if you use /etc/gitweb.conf as
the common configuration that is read by all instances.

Would it be a workable solution to make any instance read a new file, say,
/etc/gitweb-shared.conf, if it exists at the beginning, and to leave
/etc/gitweb.conf as the fallback default that is only used when
per-instance configuration does not exist?

If somebody can come up with a mechanism to mark configuration variables
that are set in the common configuration file as "not overridable", a
better name of the common file would be gitweb-policy.conf, as it does
more than "shared" whose purpose is to give common sane default.

I can go either way.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]