devrandom / gitian-builder

Build packages in a secure deterministic fashion inside a VM
https://gitian.org/
Other
402 stars 226 forks source link

Allow for using docker with macOS #252

Open cculianu opened 3 years ago

cculianu commented 3 years ago

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.

devrandom commented 3 years ago

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

cculianu commented 3 years ago

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?

devrandom commented 3 years ago

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 3 years ago

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

devrandom commented 3 years ago

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.