From:  Gervase Markham <gerv@mozilla.org>
Date:  19 Aug 2015 01:01:15 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.apps.bugzilla
Subject:  

.htaccess problems

NNTP-Posting-Host:  94.173.170.136

Hi everyone,

What do we do about the mess that is .htaccess files?

Way back when, it was decided that we should autogenerate these rather
than just ship them, because some of them lived in directories which
were also auto-created rather than shipped.
https://bugzilla.mozilla.org/show_bug.cgi?id=76154

Now we have a problem because they need to be upgraded due to an Apache
permissions syntax change, otherwise things stop working with a
hard-to-diagnose error when someone upgrades their Apache (or moves an
installation from one machine to another, or upgrades their OS, or
something else).

Ideally, we would do this automatically. However, it's not easy, for a
number of reasons. Firstly, we don't ship the files in our repo. And we
can't move to doing so because AIUI, any "git pull" which contained
.htaccess files, run on a current Bugzilla, would die with a "you have
files in the way" problem. Secondly, the user may have edited the
.htaccess files, perhaps because their access control setup is complex.

My proposal is to get checksetup.pl to check the Apache version and
whether the person is using mod_perl and if so, which version, and any
other variables which might be relevant. If their .htaccess files are
unchanged and they are using the wrong permissions syntax, replace the
files with the right ones. If they have changed the files and are using
the wrong permissions syntax, output a warning so they can fix it
themselves.

Does that sound OK?

LpSolit doesn't like this idea because it requires checksetup.pl to know
all the previous standard contents of .htaccess files, so it knows if
they have been changed or not. That's only one set of contents now, but
I suppose it could be more later.	

Gerv