Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow for using docker with macOS#252

Open
cculianu wants to merge 1 commit into
devrandom:master from
cculianu:macos_support_no_debian_cache
Open

Allow for using docker with macOS #252
cculianu wants to merge 1 commit into
devrandom:master from
cculianu:macos_support_no_debian_cache

Conversation

@cculianu

@cculianu cculianu commented Aug 26, 2021

Copy link
Copy Markdown
Contributor

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 Dockerfile though, 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.

We remove the local debian cache stuff since it doesn't work on a docker
container running on a macOS host.

Copy link
Copy Markdown
Owner

I would prefer if this (or #249) would disable the caching based on a command line flag.

cculianu commented Sep 6, 2021

Copy link
Copy Markdown
Contributor Author

I would prefer if this (or #249) would disable the caching based on a command line flag.

Hmm.. ok. Does it ever make sense to use the caching when on macOS host?

Copy link
Copy Markdown
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.

cculianu commented Sep 6, 2021
edited
Loading

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

Copy link
Copy Markdown
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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@devrandom devrandom Awaiting requested review from devrandom devrandom is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /