Skip to content

*: get MacOS build working#318

Merged
cyphar merged 3 commits intoopencontainers:masterfrom
cyphar:build-macos
Jun 22, 2020
Merged

*: get MacOS build working#318
cyphar merged 3 commits intoopencontainers:masterfrom
cyphar:build-macos

Conversation

@cyphar
Copy link
Member

@cyphar cyphar commented May 26, 2020

I don't have a MacOS machine (nor can we currently run the tests on
MacOS) but we can at least do a sanity-check by trying to build the
project on MacOS.

Fixes #98
Signed-off-by: Aleksa Sarai asarai@suse.de

@cyphar cyphar marked this pull request as draft May 26, 2020 23:20
@cyphar cyphar mentioned this pull request May 27, 2020
@cyphar cyphar force-pushed the build-macos branch 11 times, most recently from 21a812d to 8dc24e4 Compare June 20, 2020 14:14
@cyphar
Copy link
Member Author

cyphar commented Jun 20, 2020

Unit tests are working fine under MacOS now. I am a little worried how we'll deal with libpathrs in the future, but we'll cross that bridge when we come to it. Integration tests might take some more work to do (though I think most should be fine, the only major issue is there are a probably a fair few Linux-isms that we'll need to work around).

@cyphar cyphar force-pushed the build-macos branch 4 times, most recently from bb6fe03 to 961ca0f Compare June 20, 2020 18:43
@cyphar cyphar marked this pull request as ready for review June 20, 2020 18:43
@cyphar
Copy link
Member Author

cyphar commented Jun 20, 2020

You can let me know if this works @IronCore864, @huntc.

cyphar added 3 commits June 22, 2020 00:34
I don't have a MacOS machine (nor can we currently run the tests on
MacOS) but we can at least do a sanity-check by trying to build the
project on MacOS.

Most of the code changes move Linux-only functions (and tests) to
foo_linux{,_test}.go files, while code that was already usable on "unix"
platforms is moved to foo_unix{,_test}.go files. There was also a mild
refactor of some repeated test code, with it all being moved into
testutils. With these minor changes, umoci now builds.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
This requires a little bit of working around MacOS-specific weirdnesses
(which are fine under POSIX but don't match Linux). The most obvious one
is the lack of 'readlink -f', but there's also the lack of sub-second
granularity of filesystem timesamps, and the default-follow behaviour of
link(2) when trying to hardlink a symlink.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Signed-off-by: Aleksa Sarai <asarai@suse.de>
@cyphar
Copy link
Member Author

cyphar commented Jun 22, 2020

LGTM.

/cc @tych0 @vbatts

@tych0
Copy link
Member

tych0 commented Jun 22, 2020

LGTM.

@cyphar cyphar merged commit 30d1160 into opencontainers:master Jun 22, 2020
@cyphar cyphar deleted the build-macos branch June 22, 2020 13:51
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

Successfully merging this pull request may close these issues.

OS X Support

2 participants