Open
Conversation
We remove the local debian cache stuff since it doesn't work on a docker container running on a macOS host.
959966e to
ff8d247
Compare
Owner
|
I would prefer if this (or #249) would disable the caching based on a command line flag. |
Contributor
Author
Hmm.. ok. Does it ever make sense to use the caching when on macOS host? |
Owner
|
Well, the ideal solution for non-Debian OSes would be to run the apt-cache in a VM or a docker and point the gitian builder at that. |
Contributor
Author
|
Ah I see true. Well perfect is the enemy of good enough. As it stands now gitian-builder just won't work at all on macOS as a docker host.. so .. until someone does implement a CLI arg.. this PR at least makes it work. shrug |
Owner
|
Maintaining per-OS conditionals is not ideal from a maintenance burden point of view. And a command line flag isn't that much additional effort. |
ftrader
pushed a commit
to bitcoin-cash-node/bitcoin-cash-node
that referenced
this pull request
Nov 21, 2021
Co-authored-by: Andrew#128 <andrew-128-github@protonmail.com>
Summary
-------
As a follow-up to !1248, it turns out with some minor modifications,
it's possible to build using gitian on Docker for macOS! This may save
time for people that run macOS natively (such as me).
In short: This MR allows the `--docker` options to work on macOS without failing.
In a future MR I will also compose some documentation about how to get
it working on macOS 100%.
For now it also needs you to use a fork of gitian-builder from here:
https://github.com/cculianu/gitian-builder.git
BRANCH: macos_support_no_debian_cache
There is a PR for this change that I submitted to the main
gitian-builder repo: devrandom/gitian-builder#252
Test Plan
---------
- Run gitian builder on Linux as normal to ensure that nothing broke.
**Optional:**
- If you are on a **macOS** host, get docker installed and running, check-out
this branch, and also check-out: https://github.com/cculianu/gitian-builder.git
branch: `macos_support_no_debian_cache` into your `gitian-builder`
directory.
- Put the modified script from this MR on the top-level, next to your
`bitcoin-cash-node` directory.
- Run: `./gitian-build.py --setup --docker`
- Run: `./gitian-build.py --docker -b -D -n -c -o lwm "satoshi" master`
- After a great deal of time waiting for it to rebuild the universe, you
should have some static binaries built!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, I have been using gitian builder on macOS with some success. It only works with the docker vm mechanism, obviously. I found I needed to modify the script that generates the
Dockerfilethough, to not use a local debian cache in the'Darwin'case. This MR is my modification. With this modification it 100% works on docker.This is by no means an exhaustive set of changes -- perhaps some usage patterns will still fail on macos -- but with this at least it works for 1 path -- building the container and running the builder.