scripts and tools: Make –setup command independent #15236

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:20190123-gitian-build-setup changing 1 files +23 −21
  1. hebasto commented at 9:34 am on January 23, 2019: member

    This PR allows a user to run:

    0./gitian-build.py --setup
    

    without unused signer and version options.

    In master the signer and version options are mandatory. This implies the following code is dead: https://github.com/bitcoin/bitcoin/blob/387eb5b34307448f16d3769ac0245c4e3d996a38/contrib/gitian-build.py#L192-L200 This PR fixes those lines of code.

    Also this PR has a nice side effect: there is no more warnings about macOS build during processing --setup command. Ref: #13998 (comment)

    Note: https://github.com/bitcoin-core/docs/blob/master/gitian-building.md will be updated when this PR is merged.

  2. fanquake added the label Scripts and tools on Jan 23, 2019
  3. in contrib/gitian-build.py:44 in 42f4604696 outdated
    40@@ -41,7 +41,6 @@ def setup():
    41     if args.is_bionic and not args.kvm and not args.docker:
    42         subprocess.check_call(['sudo', 'sed', '-i', 's/lxcbr0/br0/', '/etc/default/lxc-net'])
    43         print('Reboot is required')
    44-        exit(0)
    


    laanwj commented at 10:38 am on January 23, 2019:
    Why remove this line?

    hebasto commented at 10:49 am on January 23, 2019:

    Why remove this line?

    See my comment below.

  4. laanwj commented at 10:39 am on January 23, 2019: member
    I think this breaks the functionality of using --setup together with other options?
  5. hebasto commented at 10:47 am on January 23, 2019: member

    @laanwj

    I think this breaks the functionality of using --setup together with other options?

    Yes. This was made intended.

    Currently, the script can stop regardless of other options ( --build, --sign etc): https://github.com/bitcoin/bitcoin/blob/03b8596dd665d2f70c917794295911adb8680bcc/contrib/gitian-build.py#L41-L44

  6. DrahtBot commented at 11:59 am on January 23, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #13998 (Scripts and tools: gitian-build.py improvements and corrections by hebasto)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  7. in contrib/gitian-build.py:182 in 42f4604696 outdated
    176@@ -184,6 +177,16 @@ def main():
    177         if not 'LXC_GUEST_IP' in os.environ.keys():
    178             os.environ['LXC_GUEST_IP'] = '10.0.3.5'
    179 
    180+    if args.setup:
    181+        setup()
    182+        exit(0)
    


    practicalswift commented at 12:09 pm on January 23, 2019:

    Should be sys.exit(0) :-)

    Surprised that flake8 didn’t complain about that!


    hebasto commented at 12:28 pm on January 23, 2019:
    Fixed all occurrences in the script.

    practicalswift commented at 12:51 pm on January 23, 2019:
    Thanks!
  8. hebasto force-pushed on Jan 23, 2019
  9. laanwj commented at 12:34 pm on January 23, 2019: member

    Currently, the script will stop regardless of other options ( –build, –sign etc):

    It should because a reboot is intended in those specific cases, not always!

  10. hebasto commented at 12:39 pm on January 23, 2019: member

    @laanwj

    You are right. I mean “can stop”, not “will stop”.

    It will stop while using LXC on Bionic.

  11. hebasto commented at 12:56 pm on January 23, 2019: member

    @laanwj

    I think this breaks the functionality of using --setup together with other options?

    Usually, --setup command is used only once at the first time. With this PR a user still able to run:

    0./gitian-build.py --setup && ./gitian-build.py --build ${SIGNER} ${VERSION}
    
  12. hebasto commented at 6:11 pm on January 23, 2019: member
    Also, a user do not want to run --setup together with other commands because after --setup they usually want to copy MacOSX10.11.sdk.tar.gz to gitian-builder/inputs directory before --build.
  13. laanwj commented at 2:27 pm on January 24, 2019: member
    @ken2812221 you mostly wrote this code, can you take a look please?
  14. ken2812221 commented at 11:34 pm on January 24, 2019: contributor
    utACK 195054096aa33051153c35ee0fc16353e0f649aa
  15. MarcoFalke commented at 0:05 am on January 25, 2019: member
    utACk 195054096aa33051153c35ee0fc16353e0f649aa
  16. hebasto commented at 5:45 am on April 24, 2019: member
    @practicalswift would you mind re-reviewing this PR?
  17. hebasto renamed this:
    scripts and tools: Make --setup command independent
    [WIP] scripts and tools: Make --setup command independent
    on May 18, 2019
  18. hebasto force-pushed on May 18, 2019
  19. hebasto commented at 10:04 pm on May 18, 2019: member

    @laanwj

    I think this breaks the functionality of using --setup together with other options?

    After reconsidering your words, I believe you are right. Fixed. No breaking changes now. It is possible to run:

    0./gitian-build.py --setup --build ${SIGNER} ${VERSION}
    

    or

    0./gitian-build.py --setup
    
  20. hebasto commented at 10:11 pm on May 18, 2019: member
    PR description updated.
  21. hebasto renamed this:
    [WIP] scripts and tools: Make --setup command independent
    scripts and tools: Make --setup command independent
    on May 18, 2019
  22. DrahtBot added the label Needs rebase on May 20, 2019
  23. Make --setup command independent
    A user can run 'gitian-build.py --setup' ignoring signer
    and version options.
    Get rid of warning about macOS build during setup for free.
    e0eae1b4a4
  24. hebasto force-pushed on May 20, 2019
  25. hebasto commented at 6:05 pm on May 20, 2019: member
    Rebased.
  26. DrahtBot removed the label Needs rebase on May 20, 2019
  27. MarcoFalke merged this on May 20, 2019
  28. MarcoFalke closed this on May 20, 2019

  29. MarcoFalke referenced this in commit 2d1583ee6a on May 20, 2019
  30. hebasto deleted the branch on May 20, 2019
  31. MarcoFalke referenced this in commit 9bfdb76b1f on Sep 8, 2019
  32. kittywhiskers referenced this in commit 09c063a353 on Jul 15, 2021
  33. kittywhiskers referenced this in commit c79a6b5156 on Jul 15, 2021
  34. kittywhiskers referenced this in commit e2451d3085 on Jul 20, 2021
  35. kittywhiskers referenced this in commit 2b6eba4155 on Jul 20, 2021
  36. kittywhiskers referenced this in commit 94eb5d3b03 on Jul 20, 2021
  37. kittywhiskers referenced this in commit c388468344 on Jul 20, 2021
  38. kittywhiskers referenced this in commit 3fd62e36ca on Aug 1, 2021
  39. kittywhiskers referenced this in commit 87c532526c on Aug 24, 2021
  40. kittywhiskers referenced this in commit 59b4ffbfa7 on Aug 24, 2021
  41. kittywhiskers referenced this in commit a98bf45538 on Aug 25, 2021
  42. kittywhiskers referenced this in commit 94bc4d5a96 on Aug 26, 2021
  43. kittywhiskers referenced this in commit 21fcb1af8d on Aug 26, 2021
  44. kittywhiskers referenced this in commit d62ac3f91a on Aug 26, 2021
  45. kittywhiskers referenced this in commit 3c514eaa3e on Aug 27, 2021
  46. kittywhiskers referenced this in commit 5a90948ff9 on Aug 27, 2021
  47. kittywhiskers referenced this in commit 3567740ccc on Aug 30, 2021
  48. kittywhiskers referenced this in commit 1e288e2a08 on Aug 31, 2021
  49. kittywhiskers referenced this in commit a8e8a3d585 on Sep 1, 2021
  50. ftrader referenced this in commit b9edb72b06 on Nov 21, 2021
  51. MarcoFalke locked this on Dec 16, 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 15:12 UTC

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