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

feat: Add support for compiling NetBSD & OpenBSD #851

Draft
wants to merge 2 commits into
base: staging
Choose a base branch
from

Conversation

craciunoiuc
Copy link
Member

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran make fmt on your commit series before opening this PR;
  • Updated relevant documentation.

Description of changes

Similar to the FreeBSD PR #603 this adds support for OpenBSD and NetBSD.

Unfortunately, right now, because of a dependency bug in containerd this fails to compile. The fix seems simple, but it is up to them to fix right now. The errors are like following.

For OpenBSD:

# github.com/containerd/containerd/archive
/go/pkg/mod/github.com/containerd/containerd@v1.7.2/archive/tar_mostunix.go:35:14: undefined: unix.Lsetxattr
/go/pkg/mod/github.com/containerd/containerd@v1.7.2/archive/tar_mostunix.go:35:47: undefined: unix.XATTR_CREATE
/go/pkg/mod/github.com/containerd/containerd@v1.7.2/archive/tar_mostunix.go:36:40: undefined: unix.ENODATA
/go/pkg/mod/github.com/containerd/containerd@v1.7.2/archive/tar_unix.go:139:14: undefined: unix.Lsetxattr

For NetBSD:

# github.com/containerd/containerd/archive
/go/pkg/mod/github.com/containerd/containerd@v1.7.2/archive/tar_mostunix.go:35:47: undefined: unix.XATTR_CREATE
# github.com/containerd/containerd/mount
/go/pkg/mod/github.com/containerd/containerd@v1.7.2/mount/mount.go:62:13: undefined: UnmountAll
/go/pkg/mod/github.com/containerd/containerd@v1.7.2/mount/mount.go:88:11: m.mount undefined (type *Mount has no field or method mount, but does have Mount)
/go/pkg/mod/github.com/containerd/containerd@v1.7.2/mount/mount_unix.go:54:13: undefined: UnmountAll
/go/pkg/mod/github.com/containerd/containerd@v1.7.2/mount/temp_unix.go:53:13: undefined: UnmountAll

As such, we mark this as Draft until it is ready.

@craciunoiuc craciunoiuc added kind/enhancement New feature or request area/machine Issue or PR is related to KraftKit's machine instance subsystem labels Oct 2, 2023
@craciunoiuc craciunoiuc marked this pull request as draft October 2, 2023 14:56
@antoineco antoineco removed their assignment Feb 29, 2024
Signed-off-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
Signed-off-by: Cezar Craciunoiu <cezar.craciunoiu@unikraft.io>
@craciunoiuc
Copy link
Member Author

Update: I think NetBSD works now but I would keep this PR together

../go/pkg/mod/github.com/containerd/containerd@v1.7.17/archive/tar_mostunix.go:35:14: undefined: unix.Lsetxattr
../go/pkg/mod/github.com/containerd/containerd@v1.7.17/archive/tar_mostunix.go:35:47: undefined: unix.XATTR_CREATE
../go/pkg/mod/github.com/containerd/containerd@v1.7.17/archive/tar_mostunix.go:36:40: undefined: unix.ENODATA
../go/pkg/mod/github.com/containerd/containerd@v1.7.17/archive/tar_unix.go:139:14: undefined: unix.Lsetxattr
# github.com/containers/storage/pkg/system
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/system/rm.go:85:7: undefined: IsEBUSY
# github.com/containers/storage/pkg/lockfile
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:87:5: undefined: fileHandle
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:108:9: cannot use GetLockFile(path) (value of type *LockFile) as Locker value in return statement: *LockFile does not implement Locker (missing method TouchedSince)
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:124:9: cannot use GetROLockFile(path) (value of type *LockFile) as Locker value in return statement: *LockFile does not implement Locker (missing method TouchedSince)
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:163:3: undefined: unlockAndCloseHandle
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:224:22: l.GetLastWrite undefined (type *LockFile has no field or method GetLastWrite)
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:259:15: l.RecordWrite undefined (type *LockFile has no field or method RecordWrite)
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:334:2: undefined: unlockAndCloseHandle
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:359:41: undefined: fileHandle
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:366:12: undefined: openHandle
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:404:3: undefined: lockHandle
../go/pkg/mod/github.com/containers/storage@v1.53.0/pkg/lockfile/lockfile.go:404:3: too many errors
# github.com/tonistiigi/fsutil
../go/pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20240424095704-91a3fc46842c/diskwriter.go:126:63: undefined: syscall.EBADMSG
../go/pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20240424095704-91a3fc46842c/filter.go:321:67: undefined: syscall.EBADMSG
../go/pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20240424095704-91a3fc46842c/filter.go:349:69: undefined: syscall.EBADMSG
../go/pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20240424095704-91a3fc46842c/followlinks.go:125:68: undefined: syscall.EBADMSG
../go/pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20240424095704-91a3fc46842c/fs.go:147:75: undefined: syscall.EBADMSG
../go/pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20240424095704-91a3fc46842c/hardlinks.go:35:63: undefined: syscall.EBADMSG
../go/pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20240424095704-91a3fc46842c/hardlinks.go:83:67: undefined: syscall.EBADMSG
../go/pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20240424095704-91a3fc46842c/send.go:161:67: undefined: syscall.EBADMSG
../go/pkg/mod/github.com/tonistiigi/fsutil@v0.0.0-20240424095704-91a3fc46842c/tarwriter.go:29:67: undefined: syscall.EBADMSG
# kraftkit.sh/machine/network
machine/network/service.go:31:9: undefined: defaultStrategyName

@craciunoiuc craciunoiuc removed the request for review from antoineco May 27, 2024 09:52
@craciunoiuc craciunoiuc force-pushed the craciunoiuc/add-openbsd-netbsd branch from 0706fa8 to 580d3a0 Compare May 27, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/machine Issue or PR is related to KraftKit's machine instance subsystem kind/enhancement New feature or request
Projects
Status: 🧊 Icebox
Development

Successfully merging this pull request may close these issues.

None yet

2 participants