From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/3] t/lib-httpd: dynamically detect httpd and modules path
Date: Wed, 08 Nov 2023 16:59:46 +0900 [thread overview]
Message-ID: <xmqqcywk7k0d.fsf@gitster.g> (raw)
In-Reply-To: <ac059db8fedc6493c64f703814c7db11adb4385e.1699428122.git.ps@pks.im> (Patrick Steinhardt's message of "Wed, 8 Nov 2023 08:29:56 +0100")
Patrick Steinhardt <ps@pks.im> writes:
> In order to set up the Apache httpd server, we need to locate both the
> httpd binary and its default module path. This is done with a hardcoded
> list of locations that we scan. While this works okayish with distros
> that more-or-less follow the Filesystem Hierarchy Standard, it falls
> apart on others like NixOS that don't.
>
> While it is possible to specify these paths via `LIB_HTTPD_PATH` and
> `LIB_HTTPD_MODULE_PATH`, it is not a nice experience for the developer
> to figure out how to set those up. And in fact we can do better by
> dynamically detecting both httpd and its module path at runtime:
>
> - The httpd binary can be located via PATH.
>
> - The module directory can (in many cases) be derived via the
> `HTTPD_ROOT` compile-time variable.
>
> Refactor the code to do so. If runtime detection of the paths fails we
> continue to fall back to the hardcoded list of paths.
Hmph.
I do not think we would want to punish the distros that follow the
FHS that was created explicitly to help developers by standardizing
locations of various things, with an approach this patch takes that
throws everthing with bathwater and rely on $PATH first.
Would it be sufficient to please NixOS if we simply append $(command
-v apache) or whatever after the well known candidate locations?
I know "command -v" is in POSIX, and on both bash and dash (the two
shells most distros use), it works as this patch expects, but its
portability is also a bit worrysome, especially because the whole
point of this patch is to support a platform that is, eh, on the
fringe.
So, I dunno.
next prev parent reply other threads:[~2023-11-08 7:59 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 7:29 [PATCH 0/3] t: improve compatibility with NixOS Patrick Steinhardt
2023-11-08 7:29 ` [PATCH 1/3] t/lib-httpd: dynamically detect httpd and modules path Patrick Steinhardt
2023-11-08 7:59 ` Junio C Hamano [this message]
2023-11-08 10:42 ` Patrick Steinhardt
2023-11-08 16:44 ` Jeff King
2023-11-08 7:30 ` [PATCH 2/3] t/lib-httpd: stop using legacy crypt(3) for authentication Patrick Steinhardt
2023-11-08 8:01 ` Junio C Hamano
2023-11-08 7:30 ` [PATCH 3/3] t9164: fix inability to find basename(1) in hooks Patrick Steinhardt
2023-11-08 14:57 ` [PATCH v2 0/3] t: improve compatibility with NixOS Patrick Steinhardt
2023-11-08 14:57 ` [PATCH v2 1/3] t/lib-httpd: dynamically detect httpd and modules path Patrick Steinhardt
2023-11-08 16:54 ` Jeff King
2023-11-09 0:30 ` Junio C Hamano
2023-11-09 6:30 ` Patrick Steinhardt
2023-11-08 14:57 ` [PATCH v2 2/3] t/lib-httpd: stop using legacy crypt(3) for authentication Patrick Steinhardt
2023-11-08 17:02 ` Jeff King
2023-11-08 14:57 ` [PATCH v2 3/3] t9164: fix inability to find basename(1) in hooks Patrick Steinhardt
2023-11-08 17:21 ` Jeff King
2023-11-08 17:43 ` Junio C Hamano
2023-11-09 6:30 ` Patrick Steinhardt
2023-11-09 7:02 ` Patrick Steinhardt
2023-11-09 7:09 ` [PATCH v3 0/3] t: improve compatibility with NixOS Patrick Steinhardt
2023-11-09 7:09 ` [PATCH v3 1/3] t/lib-httpd: dynamically detect httpd and modules path Patrick Steinhardt
2023-11-09 7:32 ` Jeff King
2023-11-09 7:36 ` Patrick Steinhardt
2023-11-09 7:46 ` Junio C Hamano
2023-11-09 7:57 ` Patrick Steinhardt
2023-11-09 7:48 ` Jeff King
2023-11-09 7:09 ` [PATCH v3 2/3] t/lib-httpd: stop using legacy crypt(3) for authentication Patrick Steinhardt
2023-11-09 7:10 ` [PATCH v3 3/3] t9164: fix inability to find basename(1) in Subversion hooks Patrick Steinhardt
2023-11-09 7:35 ` Jeff King
2023-11-09 7:36 ` [PATCH v3 0/3] t: improve compatibility with NixOS Jeff King
2023-11-10 8:16 ` [PATCH v4 " Patrick Steinhardt
2023-11-10 8:17 ` [PATCH v4 1/3] t/lib-httpd: dynamically detect httpd and modules path Patrick Steinhardt
2023-11-11 0:00 ` Junio C Hamano
2023-11-13 7:15 ` Patrick Steinhardt
2023-11-10 8:17 ` [PATCH v4 2/3] t/lib-httpd: stop using legacy crypt(3) for authentication Patrick Steinhardt
2023-11-10 8:17 ` [PATCH v4 3/3] t9164: fix inability to find basename(1) in Subversion hooks Patrick Steinhardt
2023-11-10 21:41 ` [PATCH v4 0/3] t: improve compatibility with NixOS Jeff King
2023-11-11 0:10 ` Junio C Hamano
2023-11-13 7:15 ` Patrick Steinhardt
2023-11-13 23:42 ` 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=xmqqcywk7k0d.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/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).