From bdba6e662e31de57730f1abcf39e93fe4ebcef77 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Tue, 5 Nov 2024 09:02:52 +0100 Subject: [PATCH 1/2] fixes for netbsd Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- copy/{copy_openbsd.go => copy_otherbsd.go} | 4 ++-- copy/copy_unix.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename copy/{copy_openbsd.go => copy_otherbsd.go} (92%) diff --git a/copy/copy_openbsd.go b/copy/copy_otherbsd.go similarity index 92% rename from copy/copy_openbsd.go rename to copy/copy_otherbsd.go index 18cd438..8e71292 100644 --- a/copy/copy_openbsd.go +++ b/copy/copy_otherbsd.go @@ -1,5 +1,5 @@ -//go:build openbsd -// +build openbsd +//go:build openbsd || netbsd +// +build openbsd netbsd package fs diff --git a/copy/copy_unix.go b/copy/copy_unix.go index cb41247..df1cdd0 100644 --- a/copy/copy_unix.go +++ b/copy/copy_unix.go @@ -1,5 +1,5 @@ -//go:build solaris || darwin || freebsd || openbsd -// +build solaris darwin freebsd openbsd +//go:build solaris || darwin || freebsd || openbsd || netbsd +// +build solaris darwin freebsd openbsd netbsd package fs From a5af7e432bd733ce3958e099277e3887cb454638 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Tue, 5 Nov 2024 08:57:57 +0100 Subject: [PATCH 2/2] build and test netbsd Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/ci.yml | 1 + docker-bake.hcl | 2 ++ hack/Vagrantfile.netbsd | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 hack/Vagrantfile.netbsd diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8999423..5a193eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,6 +135,7 @@ jobs: matrix: os: - freebsd + - netbsd - openbsd steps: - diff --git a/docker-bake.hcl b/docker-bake.hcl index b06550a..9b30706 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -18,6 +18,8 @@ target "_platforms" { "linux/arm64", "linux/ppc64le", "linux/s390x", + "netbsd/amd64", + "netbsd/arm64", "openbsd/amd64", "openbsd/arm64", "windows/amd64", diff --git a/hack/Vagrantfile.netbsd b/hack/Vagrantfile.netbsd new file mode 100644 index 0000000..e0f2194 --- /dev/null +++ b/hack/Vagrantfile.netbsd @@ -0,0 +1,21 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/netbsd9" + config.vm.boot_timeout = 900 + config.vm.synced_folder ".", "/vagrant", type: "rsync" + config.ssh.keep_alive = true + + config.vm.provision "init", type: "shell", run: "once" do |sh| + sh.inline = <<~SHELL + # update CA certs + pkgin -y install mozilla-rootcerts + mozilla-rootcerts install + + ftp https://go.dev/dl/go1.23.2.netbsd-amd64.tar.gz + tar -C /tmp -xzf go1.23.2.netbsd-amd64.tar.gz + ln -s /tmp/go/bin/go /usr/bin/go + SHELL + end +end