Bugfix: Only use git for build info if the repository is actually the right one #7522

Open
wants to merge 3 commits into
from

Projects

None yet

5 participants

@luke-jr
Member
luke-jr commented Feb 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.)

@luke-jr luke-jr Bugfix: Only use git for build info if the repository is actually the…
… right one

Also adds ability to disable check with BITCOIN_GENBUILD_NO_GIT=1 in the environment
e98e3dd
@laanwj laanwj added the Build system label Feb 12, 2016
@laanwj
Member
laanwj commented Apr 14, 2016

@theuni can you take a look here?

@theuni
Member
theuni commented Apr 15, 2016

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.

@luke-jr
Member
luke-jr commented Apr 15, 2016

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.

@laanwj
Member
laanwj commented Apr 16, 2016

So.. ACK, but I would very much prefer to get the out-of-tree build changes merged first,

Huray :)

@laanwj
Member
laanwj commented May 26, 2016

The out-of-tree build changes have been merged a while ago.

Anything left to do here?

@sipa
Member
sipa commented Jun 1, 2016

@theuni So all good to merge now?

@theuni
Member
theuni commented Jun 1, 2016

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.

@luke-jr
Member
luke-jr commented Jun 2, 2016

@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...?

@laanwj
Member
laanwj commented Jun 17, 2016

#8113 went in.
What is the status of this now?

@luke-jr
Member
luke-jr commented Jun 17, 2016

Current status is that #8133 (comment) suggests this PR doesn't fix the problem in practice, so I will need to review why.

@laanwj
Member
laanwj commented Sep 29, 2016

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 laanwj closed this Sep 29, 2016
@MarcoFalke
Member

Reopen, as asked for by luke on irc.

@MarcoFalke MarcoFalke reopened this Dec 30, 2016
@luke-jr
Member
luke-jr commented Dec 30, 2016

Updated to actually fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment