From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org, Steffen Nurpmeso <steffen@sdaoden.eu>
Subject: Re: meson build: datadir missing?
Date: Tue, 04 Mar 2025 19:16:36 +0100 [thread overview]
Message-ID: <20250304181636.CEUTB9ed@steffen%sdaoden.eu> (raw)
In-Reply-To: <Z8am0ZmkJ7QD13_g@pks.im>
Hello Patrick Steinhardt,
Patrick Steinhardt wrote in
<Z8am0ZmkJ7QD13_g@pks.im>:
|On Mon, Mar 03, 2025 at 09:33:20PM +0100, Steffen Nurpmeso wrote:
|> I opened
|>
|> https://git.crux.nu/ports/opt/issues/18
|>
|> at my linux distro ([ports/opt] git: creates incomplete repos),
|> because hook etc directories were missing:
|>
|> warning: templates not found in /share/git-core/templates
|
|Okay.
|
|> hi. thanks, i see now (after looking around). it is a fallout of \
|> switching to meson, that build system seems incomplete
...
|> but that "datadir" does not happen to be set at all it seems; is \
...
|"datadir" is set, as it is a default option provided by Meson itself,
|and can be configured with `meson setup --datadir`. I've also
|double-checked the logic how we set the template directory path, but it
|does seem to be correct: our Makefile sets up a path relative to the
|prefix, and we do the exact same here. Double-checking on my machine
|also confirmed that this works as expected:
|
| $ meson setup /tmp/build --prefix=/tmp/prefix
| $ meson install -C /tmp/build
| $ touch /tmp/prefix/share/git-core/templates/foobar
| $ /tmp/prefix/bin/git git init /tmp/repo
| $ ls /tmp/repo/.git
| config description foobar HEAD hooks info objects refs reftable
Thanks for all the effort!
|So I had a closer look at the recipe that Crux uses for building Git
|[1]. As it turns out, the issue isn't the prefix or datadir, but that
|Crux enables `-Druntime_prefix=true`:
|
| $ meson setup /tmp/build --prefix=/tmp/prefix -Druntime_prefix=true
| $ meson install -C /tmp/build
| $ /tmp/prefix/bin/git git init /tmp/repo
| warning: templates not found in /share/git-core/templates
|
|This is a bug that has already been fixed via bd262d07b65 (meson: fix
|exec path with enabled runtime prefix, 2025-02-26). I'd recommend to
|backport this fix or disable the runtime prefix.
I will pass this information through, thank you.
|> Only wondering why this happens at all, and is not covered by its \
|> tests, really.
|
|Things like this are somewhat hard to test for as they require a proper
|installation.
Sure. I just did not know about the meson stuff until this issue
arose, lots of things seem to happen this year regarding it, there
is a massive flux etc etc. I did not want to piss somewhere,
sorry.
|[1]: https://git.crux.nu/ports/opt/src/branch/3.7/git/Pkgfile
|
|Patrick
--End of <Z8am0ZmkJ7QD13_g@pks.im>
Thanks for git!
Ciao, and greetings,
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
next prev parent reply other threads:[~2025-03-04 18:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 20:33 meson build: datadir missing? Steffen Nurpmeso
2025-03-04 7:08 ` Patrick Steinhardt
2025-03-04 18:16 ` Steffen Nurpmeso [this message]
2025-03-05 7:19 ` Patrick Steinhardt
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=20250304181636.CEUTB9ed@steffen%sdaoden.eu \
--to=steffen@sdaoden.eu \
--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).