Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Bugfix: Only use git for build info if the repository is actually the right one #7522
Conversation
laanwj
added
the
Build system
label
Feb 12, 2016
|
@theuni can you take a look here? |
|
To save others the digging: This verifies that share/genbuild.sh exists at the git root. If it exists at a path that isn't at the git root, the check fails. For out-of-tree builds, that's fine because share/genbuild.sh would only exist in the source, not in the build dir. However, this breaks for nested builds where the source is copied into a subdir, because share/genbuild.sh does end up existing there. We currently build that way for Gitian and Travis because out-of-tree builds don't work. Which is why the Gitian descriptors needed to be changed. So.. ACK, but I would very much prefer to get the out-of-tree build changes merged first, and Gitian/Travis fixed up accordingly. |
|
Well, specifically it makes sure the script itself (genbuild.sh) is part of the git repository it's about to get information from. If the source is simply copied into a subdir, it shouldn't be using git (by default), so the "breaks" @theuni mentions is in fact a bug fix. The Gitian descriptor change tells git to basically use the git repo even for the differing source dir. |
Huray :) |
|
The out-of-tree build changes have been merged a while ago. Anything left to do here? |
|
@theuni So all good to merge now? |
|
I just fixed up the rest of the out-of-tree stuff, and switched Travis to use it. After that, the changes here don't play nice with VPATH builds. @luke-jr Mind having a look? I'll PR those changes now. |
|
@theuni What is a "VPATH build"? If the changes here break it, then "VPATH builds" are already buggy and should probably be fixed before merging anyway...? |
|
#8113 went in. |
|
Current status is that #8133 (comment) suggests this PR doesn't fix the problem in practice, so I will need to review why. |
|
Closing for now as the changes apparently don't solve the problem. Ask me to reopen or open a new pull when there is progress on this. |
laanwj
closed this
Sep 29, 2016
|
Reopen, as asked for by luke on irc. |
MarcoFalke
reopened this
Dec 30, 2016
|
Updated to actually fix the issue. |
| @@ -101,6 +101,7 @@ script: | | ||
| export PATH=${WRAP_DIR}:${PATH} | ||
| # Create the release tarball using (arbitrarily) the first host | ||
| + export GIT_DIR="$PWD/.git" |
luke-jr
Apr 9, 2017
Member
Since we build from the exported tarball, this is needed if we want the build system to use git to create the versioninfo. Otherwise, it will detect it is built from the tarball and not from git.
|
@theuni can you please take a look at this again? Seems to be the oldest open PR now, we should either merge it or close it. |
This seems backwards. Though since it's strictly an improvement, utACK for now. I think we should strive to make sure that building from the tarball results in the correct version string with no need for git, but I'll work on that separately. |
luke-jr commentedFeb 12, 2016
Also adds ability to disable check with BITCOIN_GENBUILD_NO_GIT=1 in the environment
@theuni @Flowdalic @laanwj
I believe this addresses all the possible use cases correctly.
(This commit is based on branch-0.10, so should merge cleanly into 0.10, 0.11, 0.12, and master branches.)