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

pull luke-jr wants to merge 3 commits into bitcoin:master from luke-jr:bugfix_gitdir changing 4 files +8 −1
  1. luke-jr commented at 5:41 am on February 12, 2016: member

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

  2. 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
    e98e3dde6a
  3. laanwj added the label Build system on Feb 12, 2016
  4. laanwj commented at 3:44 pm on April 14, 2016: member
    @theuni can you take a look here?
  5. theuni commented at 11:32 pm on April 15, 2016: member

    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.

  6. luke-jr commented at 11:51 pm on April 15, 2016: member

    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.

  7. laanwj commented at 5:49 am on April 16, 2016: member

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

    Huray :)

  8. laanwj commented at 5:50 am on May 26, 2016: member

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

    Anything left to do here?

  9. sipa commented at 7:00 pm on June 1, 2016: member
    @theuni So all good to merge now?
  10. theuni commented at 11:41 pm on June 1, 2016: member
    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.
  11. luke-jr commented at 0:20 am on June 2, 2016: member
    @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…?
  12. laanwj commented at 8:42 am on June 17, 2016: member
    #8113 went in. What is the status of this now?
  13. luke-jr commented at 5:28 pm on June 17, 2016: member
    Current status is that #8133 (comment) suggests this PR doesn’t fix the problem in practice, so I will need to review why.
  14. Merge tag 'branch-0.13' into bugfix_gitdir df634908ba
  15. laanwj commented at 7:20 am on September 29, 2016: member
    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.
  16. laanwj closed this on Sep 29, 2016

  17. Bugfix: Detect genbuild.sh in repo correctly ed1fcdcac0
  18. MarcoFalke commented at 3:49 pm on December 30, 2016: member
    Reopen, as asked for by luke on irc.
  19. MarcoFalke reopened this on Dec 30, 2016

  20. luke-jr commented at 5:29 pm on December 30, 2016: member
    Updated to actually fix the issue.
  21. in contrib/gitian-descriptors/gitian-osx.yml:104 in ed1fcdcac0
    100@@ -101,6 +101,7 @@ script: |
    101   export PATH=${WRAP_DIR}:${PATH}
    102 
    103   # Create the release tarball using (arbitrarily) the first host
    104+  export GIT_DIR="$PWD/.git"
    


    sipa commented at 2:39 pm on April 9, 2017:
    Is this needed?

    luke-jr commented at 5:16 pm on April 9, 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.
  22. sipa commented at 2:39 pm on April 9, 2017: member
    Concept ACK
  23. laanwj commented at 1:10 pm on May 2, 2017: member
    @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.
  24. theuni commented at 7:28 pm on May 2, 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.

    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.

  25. laanwj merged this on May 17, 2017
  26. laanwj closed this on May 17, 2017

  27. laanwj referenced this in commit d25449f858 on May 17, 2017
  28. laanwj referenced this in commit 7ee6c434ce on Aug 21, 2017
  29. PastaPastaPasta referenced this in commit d7e8a1062c on Jun 10, 2019
  30. PastaPastaPasta referenced this in commit f7f75e11ce on Jun 11, 2019
  31. PastaPastaPasta referenced this in commit c01ff334c7 on Jun 11, 2019
  32. PastaPastaPasta referenced this in commit e95926a8f0 on Jun 15, 2019
  33. PastaPastaPasta referenced this in commit c73550f6e7 on Jun 19, 2019
  34. PastaPastaPasta referenced this in commit b485307280 on Jun 19, 2019
  35. PastaPastaPasta referenced this in commit 2ac79d4490 on Jun 19, 2019
  36. PastaPastaPasta referenced this in commit 6661b8ab3b on Jun 19, 2019
  37. PastaPastaPasta referenced this in commit 979f6501e9 on Jun 19, 2019
  38. PastaPastaPasta referenced this in commit d8a8ab176a on Jun 20, 2019
  39. PastaPastaPasta referenced this in commit da3184ffeb on Jun 22, 2019
  40. PastaPastaPasta referenced this in commit efe010892c on Jun 22, 2019
  41. PastaPastaPasta referenced this in commit 715e94d4fa on Jun 22, 2019
  42. PastaPastaPasta referenced this in commit 6f386fee90 on Jun 22, 2019
  43. PastaPastaPasta referenced this in commit fc3e2bee46 on Jun 22, 2019
  44. PastaPastaPasta referenced this in commit d84660729e on Jun 24, 2019
  45. PastaPastaPasta referenced this in commit f866bc7953 on Sep 19, 2019
  46. codablock referenced this in commit e217cd8388 on Sep 20, 2019
  47. codablock referenced this in commit e12938e12c on Sep 22, 2019
  48. codablock referenced this in commit 7e8d1fcc1b on Sep 23, 2019
  49. barrystyle referenced this in commit aa1274a69a on Jan 22, 2020
  50. barrystyle referenced this in commit f758d4a558 on Jan 22, 2020
  51. luke-jr referenced this in commit ba23e5a7ca on May 6, 2020
  52. luke-jr referenced this in commit d9505bb8f8 on May 7, 2020
  53. luke-jr referenced this in commit c17428643f on May 7, 2020
  54. luke-jr referenced this in commit 1c525e91b3 on May 7, 2020
  55. luke-jr referenced this in commit eee88e3356 on May 14, 2020
  56. luke-jr referenced this in commit c8dc161156 on Oct 12, 2020
  57. luke-jr referenced this in commit 4ea29f2e88 on Nov 13, 2020
  58. luke-jr referenced this in commit 9b67f3f945 on Nov 13, 2020
  59. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me