Skip to content

Conversation

luke-jr
Copy link
Member

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

… right one

Also adds ability to disable check with BITCOIN_GENBUILD_NO_GIT=1 in the environment
@laanwj
Copy link
Member

laanwj commented Apr 14, 2016

@theuni can you take a look here?

@theuni
Copy link
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
Copy link
Member Author

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
Copy link
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
Copy link
Member

laanwj commented May 26, 2016

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

Anything left to do here?

@sipa
Copy link
Member

sipa commented Jun 1, 2016

@theuni So all good to merge now?

@theuni
Copy link
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
Copy link
Member Author

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
Copy link
Member

laanwj commented Jun 17, 2016

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

@luke-jr
Copy link
Member Author

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
Copy link
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
@maflcko
Copy link
Member

maflcko commented Dec 30, 2016

Reopen, as asked for by luke on irc.

@maflcko maflcko reopened this Dec 30, 2016
@luke-jr
Copy link
Member Author

luke-jr commented Dec 30, 2016

Updated to actually fix the issue.

Copy link
Member

@sipa sipa left a 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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link
Member Author

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.

@laanwj
Copy link
Member

laanwj commented May 2, 2017

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

@theuni
Copy link
Member

theuni commented May 2, 2017

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.

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.

@laanwj laanwj merged commit ed1fcdc into bitcoin:master May 17, 2017
laanwj added a commit that referenced this pull request May 17, 2017
… 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
laanwj added a commit that referenced this pull request Aug 21, 2017
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 10, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 11, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 11, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 15, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 19, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 20, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 22, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 24, 2019
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 19, 2019
…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
codablock pushed a commit to codablock/dash that referenced this pull request Sep 20, 2019
…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
codablock pushed a commit to codablock/dash that referenced this pull request Sep 22, 2019
…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
codablock pushed a commit to codablock/dash that referenced this pull request Sep 23, 2019
…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
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
…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
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
…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
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request May 6, 2020
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request May 7, 2020
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request May 7, 2020
… right one

Original-Github-Pull: bitcoin#7522
Rebased-From: e98e3dd e98e3dd

Github-Pull: bitcoin#18902
Rebased-From: d9505bb
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request May 7, 2020
… right one

Original-Github-Pull: bitcoin#7522
Rebased-From: e98e3dd e98e3dd

Github-Pull: bitcoin#18902
Rebased-From: d9505bb
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request May 14, 2020
… right one

Original-Github-Pull: bitcoin#7522
Rebased-From: e98e3dd e98e3dd

Github-Pull: bitcoin#18902
Rebased-From: d9505bb
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Oct 12, 2020
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Nov 13, 2020
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Nov 13, 2020
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants