git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Daniel Jacques <dnj@google.com>
Date
Jul 6, 2018, 13:18 UTC
Message-ID
<CAD1RUU-4a_jV_JjozjXOR4bi+_7rFW_AjmHbbrw6NHJ77=oGkw@mail.gmail.com>
In-Reply-To
<nycvar.QRO.7.76.6.1807061059260.75@tvgsbejvaqbjf.bet>

Apologies for the delayed response - I've been out of town - and It looks like Paul is already on the right track.

Johannes: I believe the GIT_EXEC_PATH snipped that you listed is not
incorrect. It's defined to "gitexecdir_SQ", and RUNTIME_PREFIX expects
(and enforces, as you snipped) that this is a relative path in
Makefile.

On non-RUNTIME_PREFIX builds, it should still be the absolute path, as this is how Git self-locates, so using "gitexecdir_SQ" there makes sense to me.

So: RUNTIME_PREFIX=No, gitexecdir_SQ is absolute, GIT_EXEC_PATH is absolute, used to find Git: https://github.com/git/git/blob/ccdcbd54c4475c2238b310f7113ab3075b5abc9c/exec-cmd.c#L281 RUNTIME_PREFIX=YesPlease, gitexecdir_SQ is relative, GIT_EXEC_PATH is relative and used to identify the search root of the Git installation: https://github.com/git/git/blob/ccdcbd54c4475c2238b310f7113ab3075b5abc9c/exec-cmd.c#L40

The dual-use is confusing, and it took me a few to walk back through how it is employed in each scenario. For clarity's sake, it may be worth defining two variables and making one explicitly relative, but I think it is functional as-is.

Paul: I used "config.mak" to configure RUNTIME_PREFIX when I used it
to the same effect:
https://chromium.googlesource.com/infra/infra/+/ca729b99c1f82665b634ef2ff69d93c97dfcda99/recipes/recipe_modules/third_party_packages/git.py#78

I forewent autoconf because I was concerned that the option was too obscure and the configuration too nuanced to be worth adding via flag, as RUNTIME_PREFIX requires some degree of path alignment and is fairly special-case. If you prefer autoconf, though, it sounds like a good thing to add, and I'm happy that you are finding the feature useful!

Cheers, -Dan

On Fri, Jul 6, 2018 at 5:00 AM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 40 quoted lines
>
> Hi Paul,
>
> On Thu, 5 Jul 2018, Paul Smith wrote:
>
> > On Wed, 2018-07-04 at 13:22 +0200, Johannes Schindelin wrote:
> > > > Basically what happens is that I run configure with
> > > > --prefix=/my/install/path --with-gitconfig=etc/gitconfig
> > > > --with-gitattributes=etc/gitattributes.
> > > >
> > > > Then I run make with RUNTIME_PREFIX=YesPlease.
> > >
> > > Ah. In Git for Windows, we do not use configure. I *think* this
> > > points to an incompatibility of the RUNTIME_PREFIX feature with our
> > > autoconf support, and this is a grand opportunity for you to step in
> > > and help.
> > >
> > > Essentially, what you will want to do is to implement a new configure
> > > option --with-runtime-prefix that then prevents the autoconf script
> > > from munging the relative paths in the way it does.
> >
> > FYI I was able to get this to work by overriding variables on the make
> > command line, like this:
> >
> >   make ... RUNTIME_PREFIX=YesPlease \
> >       gitexecdir=libexec/git-core \
> >       template_dir=share/git-core/templates \
> >       sysconfdir=etc
> >
> > I agree a new autoconf option would be much simpler to use.  I'll think
> > about it as I happen to have some some experience in these areas ;) ...
>
> I look forward to reviewing this...
>
> > but time is limited of course :).
>
> Yep. Same here ;-)
>
> Ciao,
> Johannes
Previous: Johannes SchindelinNext: Paul Smith
Message 5 of 24 in “Git 2.18: RUNTIME_PREFIX... is it working?”
  1. Paul SmithJul 4, 2018
  2. Johannes SchindelinJul 4, 2018
  3. Paul SmithJul 5, 2018
  4. Johannes SchindelinJul 6, 2018
  5. Daniel JacquesJul 6, 2018
  6. Paul SmithJul 8, 2018
  7. Johannes SchindelinJul 8, 2018
  8. Jeff KingJul 9, 2018
  9. Johannes SchindelinJul 9, 2018
  10. Jeff KingJul 10, 2018
  11. Johannes SchindelinJul 10, 2018
  12. Daniel JacquesJul 10, 2018
  13. Junio C HamanoJul 10, 2018
  14. Junio C HamanoJul 9, 2018
  15. Jeff KingJul 10, 2018
  16. Perry HutchisonJul 10, 2018
  17. Jeff KingJul 10, 2018
  18. Jonathan NiederJul 10, 2018
  19. Jonathan NiederJul 10, 2018
  20. Johannes SchindelinJul 17, 2018
  21. brian m. carlsonJul 14, 2018
  22. Johannes SchindelinJul 18, 2018
  23. brian m. carlsonJul 19, 2018
  24. Jeff HostetlerJul 20, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.