Skip to content
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

Support building only the image download and manipulation subcommands for MacOS #1191

Open
sacundim opened this issue May 23, 2023 · 0 comments

Comments

@sacundim
Copy link

cargo install coreos-installer fails to compile on MacOS with an assortment of errors that can be summarized by the first one: it just relies on features only available in Linux.

error[E0433]: failed to resolve: could not find `linux` in `os`
  --> /Users/sacundim/.cargo/registry/src/github.com-1ecc6299db9ec823/coreos-installer-0.17.0/src/blockdev.rs:28:14
   |
28 | use std::os::linux::fs::MetadataExt;
   |              ^^^^^ could not find `linux` in `os`

An 2021 ticket about a compilation failure in MacOS was closed citing that there was no use case for building or running the tool in MacOS:

coreos-installer isn't expected to build or run on macOS. What's the use case you have in mind?

I don't know what the situation was back then, but I just came across this compilation feature simply because I want to use the coreos-installer download and coreos-installer iso subcommands to build a custom ISO in a Mac.

If the Linux-specific bits can be isolated to just the coreos-installer install subcommand, maybe it is possible to either (a) not build that part of the codebase when targeting a platform that doesn't have the requisite support, or (b) split those other subcommands into a separate tool?

Workaround (which documentation mentions and I've used successfully): run the tool from a Docker image:

docker run --pull=always --privileged --rm \
    -v /dev:/dev -v /run/udev:/run/udev -v "$(pwd)":/data -w /data \
    quay.io/coreos/coreos-installer:release [ARGS ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant