Bring OpenBSD support#4865
Conversation
|
Hi @yukiisbored. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Build succeeded.
|
d15208c to
5d5693e
Compare
|
Build succeeded.
|
Signed-off-by: Muhammad Kaisar Arkhan <[email protected]>
5d5693e to
380b526
Compare
|
Build succeeded.
|
|
@yukiisbored are the patches in this directory the only patches needed for openbsd? http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/sysutils/docker-cli/patches/ ? Will you be upstreaming those patches to the continuity repo as well? (looks like they're mostly small changes, so could probably be accepted) |
@thaJeztah For v20.10.1, the patch set is entirely different and the continuity changes aren't needed anymore, if memories served correctly, I think those patches are from someone else's effort to make docker/cli working in OpenBSD which was merged in but Docker 19.03.13 vendored libraries was a bit outdated. You can see the list of patches that are needed to make v20.10.1 working in my personal OpenBSD ports tree: https://git.yukiisbo.red/yuki/ports/-/tree/trunk/sysutils/docker-cli/patches |
|
Ah, thanks! I recall I made some changes in moby/sys for openbsd (moby/sys@cb807b1), but I see you have some additional changes in your patches; feel free to open pull requests to upstream those changes if they are needed (also for the other repositories) |
|
@thaJeztah I already made a PR for moby/sys here: moby/sys#59 |
| @@ -0,0 +1,45 @@ | |||
| // +build openbsd | |||
There was a problem hiding this comment.
Just posting here because at a glance this file looked the same as the _unix.go variant, but it's the name of the properties not having the spec suffix;
--- a/sys/stat_unix.go
+++ b/sys/stat_bsd.go
@@ -1,4 +1,4 @@
-// +build linux solaris
+// +build darwin freebsd netbsd
/*
Copyright The containerd Authors.
@@ -23,22 +23,22 @@ import (
"time"
)
-// StatAtime returns the Atim
+// StatAtime returns the access time from a stat struct
func StatAtime(st *syscall.Stat_t) syscall.Timespec {
- return st.Atim
+ return st.Atimespec
}
-// StatCtime returns the Ctim
+// StatCtime returns the created time from a stat struct
func StatCtime(st *syscall.Stat_t) syscall.Timespec {
- return st.Ctim
+ return st.Ctimespec
}
-// StatMtime returns the Mtim
+// StatMtime returns the modified time from a stat struct
func StatMtime(st *syscall.Stat_t) syscall.Timespec {
- return st.Mtim
+ return st.Mtimespec
}
-// StatATimeAsTime returns st.Atim as a time.Time
+// StatATimeAsTime returns the access time as a time.Time
func StatATimeAsTime(st *syscall.Stat_t) time.Time {
- return time.Unix(int64(st.Atim.Sec), int64(st.Atim.Nsec)) // nolint: unconvert
+ return time.Unix(int64(st.Atimespec.Sec), int64(st.Atimespec.Nsec)) // nolint: unconvert
}
Hello, these are some small changes which are made to have docker/cli buildable and run on OpenBSD (I'm the maintainer of the sysutils/docker-cli port).
Thanks!