All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tarmigan <tarmigan+git@gmail.com>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: git@vger.kernel.org, peff@peff.net, drizzd@aon.at,
	gitster@pobox.com, spearce@spearce.org
Subject: Re: [PATCH 1/2] t/lib-http.sh: Restructure finding of default httpd  location
Date: Thu, 19 Nov 2009 19:30:34 -0800	[thread overview]
Message-ID: <905315640911191930rc33cabdr290b534ffbe85690@mail.gmail.com> (raw)
In-Reply-To: <76718490911191914n23d067b8teb17907de9ec83d5@mail.gmail.com>

On Thu, Nov 19, 2009 at 7:14 PM, Jay Soffian <jaysoffian@gmail.com> wrote:
> On Thu, Nov 19, 2009 at 8:22 PM, Tarmigan Casebolt
> <tarmigan+git@gmail.com> wrote:
>> uname might not be the best way to determine the default location for
>> httpd since different Linux distributions apparently put httpd in
>> different places, so we test a couple different locations for httpd,
>> and use the first one that we come across.  We do the same for the
>> modules directory.
>
> Perhaps testing the distribution and looking in the known location for
> that distribution then? That said, going through a list of well known
> locations should work too.

Is there a nice way to test the distribution?  Seems to me like doing
that might be more complicated and also more fragile.

>> +for DEFAULT_HTTPD_PATH in '/usr/sbin/httpd' '/usr/sbin/apache2'
>> +do
>> +       test -x "$DEFAULT_HTTPD_PATH" && break
>> +done
>
> Unfortunately this leaves DEFAULT_HTTPD_PATH as the last item in the
> list even if the test does not pass. You can add an empty item to the
> end of the list if you want to do this way.

Yes.  I think this is how it was before though too, and it is caught
later in the script with the LIB_HTTPD_PATH setting and testing.

>> +for DEFAULT_HTTPD_MODULE_PATH in '/usr/libexec/apache2' \
>> +                                 '/usr/lib/apache2/modules' \
>> +                                 '/usr/lib64/httpd/modules' \
>> +                                 '/usr/lib/httpd/modules'
>> +do
>> +       test -d "$DEFAULT_HTTPD_MODULE_PATH" && break
>> +done
>
> Ditto.

Yes.  Again, this is still more thorough than before, but in this case
the script does not check later.  Perhaps the script should test this
value and test_done if it's not a directory?

Thanks,
Tarmigan

  reply	other threads:[~2009-11-20  3:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20  1:22 [PATCH 1/2] t/lib-http.sh: Restructure finding of default httpd location Tarmigan Casebolt
2009-11-20  1:22 ` [PATCH 2/2] t/lib-http.sh: Enable httpd tests by default Tarmigan Casebolt
2009-11-20  8:03   ` Junio C Hamano
2009-11-20 19:03     ` Tarmigan
2009-11-20 20:11       ` Clemens Buchacher
2009-11-20 20:56         ` Junio C Hamano
2009-11-20 20:54       ` Junio C Hamano
2009-11-20  3:14 ` [PATCH 1/2] t/lib-http.sh: Restructure finding of default httpd location Jay Soffian
2009-11-20  3:30   ` Tarmigan [this message]
2010-01-02 22:04     ` [PATCH v2] " Tarmigan Casebolt

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=905315640911191930rc33cabdr290b534ffbe85690@mail.gmail.com \
    --to=tarmigan+git@gmail.com \
    --cc=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    --cc=peff@peff.net \
    --cc=spearce@spearce.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.