-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Bugfix: Only use git for build info if the repository is actually the right one #7522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… right one Also adds ability to disable check with BITCOIN_GENBUILD_NO_GIT=1 in the environment
@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. |
Reopen, as asked for by luke on irc. |
Updated to actually fix the issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
@@ -101,6 +101,7 @@ script: | | |||
export PATH=${WRAP_DIR}:${PATH} | |||
|
|||
# Create the release tarball using (arbitrarily) the first host | |||
export GIT_DIR="$PWD/.git" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
… actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
4452829 gitian: quick hack to fix version string in releases (Cory Fields) Pull request description: Credit: @luke-jr Release version strings were broken in Gitian by #7522. This is a minimal fix suitable for 0.15. After this, we should fix up version handling for good so that gitian packages the correct string in the release tarball, so that git is not required to get the tag name. Tree-SHA512: fa609a744c46306b0809f08fed6e96eff41b13e82f3e213711e4abef370558b64a68972f283a038330882cb6c40b32547fbb0f89b8058cc2c6025bff134473c3
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…ases 4452829 gitian: quick hack to fix version string in releases (Cory Fields) Pull request description: Credit: @luke-jr Release version strings were broken in Gitian by bitcoin#7522. This is a minimal fix suitable for 0.15. After this, we should fix up version handling for good so that gitian packages the correct string in the release tarball, so that git is not required to get the tag name. Tree-SHA512: fa609a744c46306b0809f08fed6e96eff41b13e82f3e213711e4abef370558b64a68972f283a038330882cb6c40b32547fbb0f89b8058cc2c6025bff134473c3
…ases 4452829 gitian: quick hack to fix version string in releases (Cory Fields) Pull request description: Credit: @luke-jr Release version strings were broken in Gitian by bitcoin#7522. This is a minimal fix suitable for 0.15. After this, we should fix up version handling for good so that gitian packages the correct string in the release tarball, so that git is not required to get the tag name. Tree-SHA512: fa609a744c46306b0809f08fed6e96eff41b13e82f3e213711e4abef370558b64a68972f283a038330882cb6c40b32547fbb0f89b8058cc2c6025bff134473c3
…ases 4452829 gitian: quick hack to fix version string in releases (Cory Fields) Pull request description: Credit: @luke-jr Release version strings were broken in Gitian by bitcoin#7522. This is a minimal fix suitable for 0.15. After this, we should fix up version handling for good so that gitian packages the correct string in the release tarball, so that git is not required to get the tag name. Tree-SHA512: fa609a744c46306b0809f08fed6e96eff41b13e82f3e213711e4abef370558b64a68972f283a038330882cb6c40b32547fbb0f89b8058cc2c6025bff134473c3
…ases 4452829 gitian: quick hack to fix version string in releases (Cory Fields) Pull request description: Credit: @luke-jr Release version strings were broken in Gitian by bitcoin#7522. This is a minimal fix suitable for 0.15. After this, we should fix up version handling for good so that gitian packages the correct string in the release tarball, so that git is not required to get the tag name. Tree-SHA512: fa609a744c46306b0809f08fed6e96eff41b13e82f3e213711e4abef370558b64a68972f283a038330882cb6c40b32547fbb0f89b8058cc2c6025bff134473c3
…tory is actually the right one ed1fcdc Bugfix: Detect genbuild.sh in repo correctly (Luke Dashjr) e98e3dd Bugfix: Only use git for build info if the repository is actually the right one (Luke Dashjr) Tree-SHA512: 510d7ec8cfeff4e8e0c7ac53631eb32c7acaada7017e7f8cc2e6f60d86afe1cd131870582e01022f961c85a783a130bcb8fef971f8b110070c9c02afda020726
…ases 4452829 gitian: quick hack to fix version string in releases (Cory Fields) Pull request description: Credit: @luke-jr Release version strings were broken in Gitian by bitcoin#7522. This is a minimal fix suitable for 0.15. After this, we should fix up version handling for good so that gitian packages the correct string in the release tarball, so that git is not required to get the tag name. Tree-SHA512: fa609a744c46306b0809f08fed6e96eff41b13e82f3e213711e4abef370558b64a68972f283a038330882cb6c40b32547fbb0f89b8058cc2c6025bff134473c3
… right one Original-Github-Pull: bitcoin#7522 Rebased-From: e98e3dd e98e3dd
… right one Original-Github-Pull: bitcoin#7522 Rebased-From: e98e3dd e98e3dd
… right one Original-Github-Pull: bitcoin#7522 Rebased-From: e98e3dd e98e3dd Github-Pull: bitcoin#18902 Rebased-From: d9505bb
… right one Original-Github-Pull: bitcoin#7522 Rebased-From: e98e3dd e98e3dd Github-Pull: bitcoin#18902 Rebased-From: d9505bb
… right one Original-Github-Pull: bitcoin#7522 Rebased-From: e98e3dd e98e3dd Github-Pull: bitcoin#18902 Rebased-From: d9505bb
… right one Original-Github-Pull: bitcoin#7522 Rebased-From: e98e3dd e98e3dd
… right one Original-Github-Pull: bitcoin#7522 Rebased-From: e98e3dd e98e3dd
… right one Original-Github-Pull: bitcoin#7522 Rebased-From: e98e3dd e98e3dd
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.)