Web lists-archives.com

Re: Git 2.18: RUNTIME_PREFIX... is it working?


Jeff King wrote:

> My point is that aside from RUNTIME_PREFIX, we don't need /proc. So
> somebody who currently builds Git with a static path like
> "/usr/libexec/git-core" and runs it inside a chroot will be just fine as
> long as /usr/libexec/git-core is available at that name inside the
> chroot. But if the build starts relying on RUNTIME_PREFIX, it's going to
> regress their case.
> I'm not sure how hypothetical this is. A lot of Debian tools use chroots
> to build packages for specific releases by basically installing the
> distro inside the chroot. I don't know whether /proc is available in
> those chroots or not. If not, then I suspect builds that rely on
> installing Git inside the chroot are going to break.
> +cc Jonathan, who maintains the Git package for Debian, and can probably
> say immediately whether I am way off base. ;)

The chroots typically have /proc.

Various libc features also count on /proc being mounted, though in
general libc tries to handle the case when it isn't mounted
gracefully.  Similarly, various features of other tools (like bash's
support for <(echo hi)) also rely on /proc.

If this is the main obstacle to enabling RUNTIME_PREFIX by default,
one option would be to make RUNTIME_PREFIX fall back to a hard-coded
path when and only when git is not able to find the path from which it
was run.  That would increase complexity, though, so I am not thrilled
with the idea.

I might try enabling RUNTIME_PREFIX in Debian experimental's git and
seeing what breaks. ;-)