Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Bugfix: Only use git for build info if the repository is actually the right one #7522
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.
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.