-
Notifications
You must be signed in to change notification settings - Fork 37.8k
scripts and tools: Make --setup command independent #15236
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
I think this breaks the functionality of using |
Yes. This was made intended. Currently, the script can stop regardless of other options ( bitcoin/contrib/gitian-build.py Lines 41 to 44 in 03b8596
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
contrib/gitian-build.py
Outdated
@@ -184,6 +177,16 @@ def main(): | |||
if not 'LXC_GUEST_IP' in os.environ.keys(): | |||
os.environ['LXC_GUEST_IP'] = '10.0.3.5' | |||
|
|||
if args.setup: | |||
setup() | |||
exit(0) |
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.
Should be sys.exit(0)
:-)
Surprised that flake8
didn't complain about that!
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.
Fixed all occurrences in the script.
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.
Thanks!
42f4604
to
1950540
Compare
It should because a reboot is intended in those specific cases, not always! |
You are right. I mean "can stop", not "will stop". It will stop while using LXC on Bionic. |
Usually,
|
Also, a user do not want to run |
@ken2812221 you mostly wrote this code, can you take a look please? |
utACK 1950540 |
utACk 1950540 |
@practicalswift would you mind re-reviewing this PR? |
1950540
to
416baac
Compare
After reconsidering your words, I believe you are right. ./gitian-build.py --setup --build ${SIGNER} ${VERSION} or ./gitian-build.py --setup |
PR description updated. |
A user can run 'gitian-build.py --setup' ignoring signer and version options. Get rid of warning about macOS build during setup for free.
416baac
to
e0eae1b
Compare
Rebased. |
e0eae1b Make --setup command independent (Hennadii Stepanov) Pull request description: This PR allows a user to run: ```sh ./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. ACKs for commit e0eae1: Tree-SHA512: df851fe461e402229c57b410f30f1d8bc816e8a2600ece4249aa39c763566de5b661e7aa0af171d484727eb463a6d0e10cfcf459aa60ae1a5d4e12974a8615c6
a20bf24 Make --setup command simpler (Hennadii Stepanov) Pull request description: After merging bitcoin/bitcoin#15236, the [`gitian-build.py`](https://github.com/bitcoin/bitcoin/blob/master/contrib/gitian-build.py) script allows to run `--setup` command ignoring `signer` and `version` options. Also my text editor is set to remove trailing spaces before saving. So, they are removed as well. Top commit has no ACKs. Tree-SHA512: 38d9418a977cac0ff8d322a030d5602aab4b16ef81ef388a7200a934c86300e2932e16cec536381d57102d3dd26454321206789c8644bcfbe33cb279f5cfc6db
…dependent Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
…dependent Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
…dependent Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
…dependent Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
…and docs Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> This adds a new streamlined Gitian setup guide tailored for Ubuntu/Debian users with Docker: doc/gitian-building/gitian-building-docker.md Included are some improvements to the build system itself: - A backport from Core simplifying `gitian-build.py --setup` calls such that the signer and version parameters are no longer required, as they are not used during setup. - Fixed the base VM automatically generated by `gitian-build.py` to Debian Buster. This seems to have been accidentally left as Ubuntu Bionic, which results in superfluous Bionic VMs being created. And some related documentation improvements: - Removed documentation about the old, currently unused build signing mechanism and updated it to point people to [Gitian signing](doc/gitian-signing.md) instead. - Added a link to the new Gitian on Docker setup document in the main [Gitian building](doc/gitian-building.md) guide. ## Ported PRs - bitcoin/bitcoin#15236 ## Test Plan - Run the Gitian builds by following the new guide (doc/gitian-building/gitian-building-docker.md), ideally on various different versions of Debian and Ubuntu. Make sure to use my fork/branch instead of the main repo in a couple places, though: 1. Instead of the instruction here: https://gitlab.com/andrew-128/bitcoin-cash-node/-/blob/gitian-docker-setup/doc/gitian-building/gitian-building-docker.md#L19, instead, do: `git clone https://gitlab.com/andrew-128/bitcoin-cash-node.git` 2. Instead of the instruction here: https://gitlab.com/andrew-128/bitcoin-cash-node/-/blob/gitian-docker-setup/doc/gitian-building/gitian-building-docker.md#L39, instead, do (replacing satoshi with your GitLab username): `./gitian-build.py --docker --detach-sign --no-commit --url https://gitlab.com/andrew-128/bitcoin-cash-node.git -b -c "satoshi" gitian-docker-setup` - Check that `gitian-build.py` still works as normal in other contexts. - `ninja check-lint`. - Review the updated documentation.
This PR allows a user to run:
without unused
signer
andversion
options.In master the
signer
andversion
options are mandatory. This implies the following code is dead:bitcoin/contrib/gitian-build.py
Lines 192 to 200 in 387eb5b
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.