From: Junio C Hamano <gitster@pobox.com>
To: nathan spindel <nathans@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] instaweb: make it compatible with Mac OS X 10.5's apache installation.
Date: Sat, 10 May 2008 23:58:44 -0700 [thread overview]
Message-ID: <7vhcd572e3.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1210483565-12415-2-git-send-email-nathans@gmail.com> (nathan spindel's message of "Sat, 10 May 2008 22:26:04 -0700")
nathan spindel <nathans@gmail.com> writes:
> When in apache2 mode if there isn't an apache2 binary on the system but
> there is a httpd command in /usr/sbin/ (like there is on Mac OS X)
> use that instead.
How would you ensure that httpd is actually Apache and not something else?
> When in apache2 mode and there isn't a module_path specified, look for
> module paths in /usr/lib/apache2/modules _and_ /usr/libexec/apache2,
> in that order.
This one sounds Ok.
> apache2_conf () {
> - test -z "$module_path" && module_path=/usr/lib/apache2/modules
> + # if there isn't an apache2 command on the system but there is a httpd
> + # command in /usr/sbin/ use that instead for Mac OS X compatibility.
> + httpd_only="`echo $httpd | cut -f1 -d' '`"
> + type $httpd_only > /dev/null 2>&1;
> + test $? != 0 && test -x /usr/sbin/httpd && httpd=${httpd/apache2/httpd}
I see the same "type" issue as I mentioned, but I see that we use them in
mergetool and web--browse and we haven't heard breakages so perhaps this
is portable enough ;-)
Please avoid ${parameter/pattern/string} expansion, which is not even in
POSIX. It is bashism and unportable.
> + if test -z "$module_path"
> + then
> + for path in /usr/lib/apache2/modules /usr/libexec/apache2; do
Hmm. If you do discovery like this, maybe you would want to do discovery
for "httpd" the same way? After all, why look for it only in /usr/sbin?
> @@ -190,6 +206,7 @@ ServerName "git-instaweb"
> ServerRoot "$fqgitdir/gitweb"
> DocumentRoot "$fqgitdir/gitweb"
> PidFile "$fqgitdir/pid"
> +LockFile "$fqgitdir/gitweb/logs/accept.lock"
> Listen $bind$port
We've seen this elsewhere and this part should be Ok.
next prev parent reply other threads:[~2008-05-11 7:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-11 5:26 [PATCH] instaweb: if no httpd is specified and lighttpd doesn't exist, fall back on apache2 nathan spindel
2008-05-11 5:26 ` [PATCH] instaweb: make it compatible with Mac OS X 10.5's apache installation nathan spindel
2008-05-11 5:26 ` [PATCH] Documentation/git-instaweb.txt: Updated defaults to match my last two git-instaweb.sh changes nathan spindel
2008-05-11 6:58 ` Junio C Hamano [this message]
2008-05-11 17:11 ` [PATCH] instaweb: make it compatible with Mac OS X 10.5's apache installation nathan spindel
2008-05-11 6:44 ` [PATCH] instaweb: if no httpd is specified and lighttpd doesn't exist, fall back on apache2 Junio C Hamano
2008-05-11 17:00 ` nathan spindel
2008-05-11 18:26 ` nathan spindel
2008-05-11 11:58 ` David Symonds
2008-05-11 17:03 ` nathan spindel
2008-05-11 17:46 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vhcd572e3.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=nathans@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).