Skip to content

Support FreeBSD#173

Merged
estesp merged 6 commits intocontainerd:masterfrom
samuelkarp:freebsd
Dec 8, 2020
Merged

Support FreeBSD#173
estesp merged 6 commits intocontainerd:masterfrom
samuelkarp:freebsd

Conversation

@samuelkarp
Copy link
Copy Markdown
Member

This series of commits adds support for FreeBSD. Aside from TestUsage failing on ZFS (see #172), all the tests are passing.

Some of the files are pretty awkwardly-named; if you have suggestions for changing them I'm happy to do so.

I recognize that there's no CI coverage for FreeBSD today (though adding at least cross-compiling to CI would be reasonably straightforward) and that there may not be interest in maintaining the code. If that's the case and you prefer not to merge this, I can maintain my own usage of it on my fork.

@samuelkarp samuelkarp force-pushed the freebsd branch 3 times, most recently from fdcd9a7 to f92a56d Compare December 7, 2020 07:45
Copy link
Copy Markdown
Member

@mxpv mxpv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a suggestion on file naming, but otherwise LGTM

Comment thread devices/mknod_linuxdarwinsolaris.go
@cpuguy83
Copy link
Copy Markdown
Member

cpuguy83 commented Dec 8, 2020

I think making sure it compiles is at least important, and maybe a callout in the readme that freebsd support is untested.

FreeBSD 12 added support for 64-bit inodes, introducing an ABI change.
golang.org/x/sys/unix was updated for this change, and the function
signature for unix.Mknod changed on FreeBSD.  See
golang/sys@5535b4e

Signed-off-by: Samuel Karp <[email protected]>
The utimes syscall follows symlinks and changes the times on the link
target, rather than the link itself.  The lutimes syscall can be used to
modify times on a symlink, though both syscalls are deprecated in favor
of utimensat.  utimensat can be called with the AF_SYMLINK_NOFOLLOW flag
to change the times on a symlink.

Signed-off-by: Samuel Karp <[email protected]>
The FreeBSD du(1) command accepts block size argument via an environment
variable (BLOCKSIZE) rather than the --block-size argument used in the
GNU coreutils version of du(1).

Signed-off-by: Samuel Karp <[email protected]>
Signed-off-by: Samuel Karp <[email protected]>
@samuelkarp
Copy link
Copy Markdown
Member Author

@cpuguy83

I think making sure it compiles is at least important

Added to ci.yml

and maybe a callout in the readme that freebsd support is untested.

I took a stab at wording, but I'm happy to change it if there are any other opinions.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@estesp estesp merged commit 1805252 into containerd:master Dec 8, 2020
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.

4 participants