pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
podman: add package at version 5.0.3
Module Name: pkgsrc-wip
Committed By: Maya Rashish <maya%NetBSD.org@localhost>
Pushed By: coypu
Date: Thu May 30 20:33:29 2024 -0400
Changeset: 22feccf2634be1b0ec91145a9038d233a0a70bcb
Modified Files:
Makefile
Added Files:
podman/DESCR
podman/MESSAGE.NetBSD
podman/Makefile
podman/PLIST
podman/distinfo
podman/files/config_netbsd.go
podman/files/default_netbsd.go
podman/files/ignition_netbsd.go
podman/files/options_netbsd.go
podman/patches/patch-cmd_podman_registry_config.go
podman/patches/patch-pkg_machine_ignition__netbsd.go
podman/patches/patch-pkg_machine_qemu_machine.go
podman/patches/patch-pkg_machine_qemu_options__netbsd.go
podman/patches/patch-pkg_machine_qemu_options__netbsd__amd64.go
podman/patches/patch-pkg_machine_qemu_options__netbsd__arm64.go
podman/patches/patch-pkg_machine_qemu_stubber.go
podman/patches/patch-pkg_machine_vmconfigs_config__common.go
podman/patches/patch-pkg_util_utils__netbsd.go
podman/patches/patch-vendor_github.com_containers_buildah_copier_hardlink__uint64.go
podman/patches/patch-vendor_github.com_containers_buildah_copier_hardlink__unix.go
podman/patches/patch-vendor_github.com_containers_buildah_define_mount__unsupported.go
podman/patches/patch-vendor_github.com_containers_buildah_util_util__unix.go
podman/patches/patch-vendor_github.com_containers_common_pkg_password_password__supported.go
podman/patches/patch-vendor_github.com_containers_storage_drivers_chroot__unix.go
podman/patches/patch-vendor_github.com_containers_storage_pkg_archive_archive__bsd.go
podman/patches/patch-vendor_github.com_containers_storage_pkg_directory_directory__unix.go
podman/patches/patch-vendor_github.com_containers_storage_pkg_homedir_homedir__others.go
podman/patches/patch-vendor_github.com_containers_storage_pkg_lockfile_lockfile__unix.go
podman/patches/patch-vendor_github.com_containers_storage_pkg_system_stat__netbsd.go
podman/patches/patch-vendor_github.com_containers_storage_pkg_system_syscall__unix.go
Log Message:
podman: add package at version 5.0.3
I'm halfway through an update for pkgsrc proper, but it might take a
while, and it already works on my machine. Let's put it here so others
can use it.
Signed-off-by: Maya Rashish <maya%NetBSD.org@localhost>
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=22feccf2634be1b0ec91145a9038d233a0a70bcb
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
podman/DESCR | 9 ++++
podman/MESSAGE.NetBSD | 6 +++
podman/Makefile | 49 +++++++++++++++++++
podman/PLIST | 2 +
podman/distinfo | 26 ++++++++++
podman/files/config_netbsd.go | 18 +++++++
podman/files/default_netbsd.go | 31 ++++++++++++
podman/files/ignition_netbsd.go | 7 +++
podman/files/options_netbsd.go | 21 ++++++++
podman/patches/patch-cmd_podman_registry_config.go | 15 ++++++
.../patches/patch-pkg_machine_ignition__netbsd.go | 24 +++++++++
podman/patches/patch-pkg_machine_qemu_machine.go | 10 ++++
.../patch-pkg_machine_qemu_options__netbsd.go | 20 ++++++++
...atch-pkg_machine_qemu_options__netbsd__amd64.go | 19 ++++++++
...atch-pkg_machine_qemu_options__netbsd__arm64.go | 57 ++++++++++++++++++++++
podman/patches/patch-pkg_machine_qemu_stubber.go | 10 ++++
.../patch-pkg_machine_vmconfigs_config__common.go | 10 ++++
podman/patches/patch-pkg_util_utils__netbsd.go | 16 ++++++
...m_containers_buildah_copier_hardlink__uint64.go | 12 +++++
...com_containers_buildah_copier_hardlink__unix.go | 12 +++++
...containers_buildah_define_mount__unsupported.go | 14 ++++++
...ithub.com_containers_buildah_util_util__unix.go | 14 ++++++
...ners_common_pkg_password_password__supported.go | 10 ++++
....com_containers_storage_drivers_chroot__unix.go | 14 ++++++
..._containers_storage_pkg_archive_archive__bsd.go | 14 ++++++
...ainers_storage_pkg_directory_directory__unix.go | 14 ++++++
...ntainers_storage_pkg_homedir_homedir__others.go | 12 +++++
...ntainers_storage_pkg_lockfile_lockfile__unix.go | 25 ++++++++++
...m_containers_storage_pkg_system_stat__netbsd.go | 20 ++++++++
..._containers_storage_pkg_system_syscall__unix.go | 14 ++++++
31 files changed, 526 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 8a2972b0b0..41d1eebb85 100644
--- a/Makefile
+++ b/Makefile
@@ -3134,6 +3134,7 @@ SUBDIR+= pmk
SUBDIR+= png2ico
SUBDIR+= pngnq
SUBDIR+= pnmcurve
+SUBDIR+= podman
SUBDIR+= pointtools-git
SUBDIR+= poke-git
SUBDIR+= polarssl11
diff --git a/podman/DESCR b/podman/DESCR
new file mode 100644
index 0000000000..edb8bd6c67
--- /dev/null
+++ b/podman/DESCR
@@ -0,0 +1,9 @@
+Podman (the POD MANager) is a tool for managing containers and
+images, volumes mounted into those containers, and pods made from
+groups of containers. Podman is based on libpod, a library for
+container lifecycle management that is also contained in this
+repository. The libpod library provides APIs for managing containers,
+pods, container images, and volumes.
+
+On operating systems other than Linux, it can spawn and talk to a
+Linux virtual machine.
diff --git a/podman/MESSAGE.NetBSD b/podman/MESSAGE.NetBSD
new file mode 100644
index 0000000000..9311a94b07
--- /dev/null
+++ b/podman/MESSAGE.NetBSD
@@ -0,0 +1,6 @@
+===========================================================================
+$NetBSD: MESSAGE.NetBSD,v 1.1 2021/09/04 20:28:42 maya Exp $
+
+You will need to build a kernel with options HZ=1000, or edit the created
+VM to append "noapic" to the Grub command line.
+===========================================================================
diff --git a/podman/Makefile b/podman/Makefile
new file mode 100644
index 0000000000..6bbfd25a1c
--- /dev/null
+++ b/podman/Makefile
@@ -0,0 +1,49 @@
+# $NetBSD: Makefile,v 1.18 2024/04/05 19:14:11 bsiegert Exp $
+
+DISTNAME= podman-5.0.3
+GITHUB_TAG= v${PKGVERSION_NOREV}
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_GITHUB:=containers/}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/containers/podman/
+COMMENT= Tool for managing OCI containers and pods
+LICENSE= apache-2.0
+
+USE_TOOLS+= gmake gsed
+
+MKPIE_SUPPORTED= no
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../lang/go/version.mk"
+
+TOOL_DEPENDS+= ${GO_PACKAGE_DEP}
+DEPENDS+= qemu-[0-9]*:../../emulators/qemu
+DEPENDS+= gvproxy-[0-9]*:../../net/gvproxy
+
+post-extract:
+ ${CP} ${FILESDIR}/options_netbsd.go ${WRKSRC}/vendor/github.com/containers/storage/types/
+ ${CP} ${FILESDIR}/config_netbsd.go ${WRKSRC}/vendor/github.com/containers/common/pkg/config/
+ ${CP} ${FILESDIR}/default_netbsd.go ${WRKSRC}/vendor/github.com/containers/common/pkg/config/
+ ${CP} ${FILESDIR}/ignition_netbsd.go ${WRKSRC}/pkg/machine/ignition/
+ ${MV} ${WRKSRC}/pkg/machine/env/dir_freebsd.go ${WRKSRC}/pkg/machine/env/dir_bsd.go
+
+SUBST_CLASSES+= prefix
+SUBST_FILES.prefix+= vendor/github.com/containers/common/pkg/config/default_netbsd.go
+SUBST_FILES.prefix+= vendor/github.com/containers/common/pkg/config/config_netbsd.go
+SUBST_FILES.prefix+= vendor/github.com/containers/storage/types/options_netbsd.go
+SUBST_STAGE.prefix= pre-configure
+SUBST_MESSAGE.prefix= fix PREFIX inside patch
+SUBST_VARS.prefix= PREFIX VARBASE PKG_SYSCONFDIR
+
+CHECK_PORTABILITY_SKIP+= vendor/github.com/containers/buildah/release.sh
+
+.if ${OPSYS} != "Linux"
+BUILD_TARGET= podman-remote
+
+INSTALLATION_DIRS+= bin
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/podman-remote ${DESTDIR}${PREFIX}/bin/podman
+.endif
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/podman/PLIST b/podman/PLIST
new file mode 100644
index 0000000000..8342aa0d52
--- /dev/null
+++ b/podman/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2021/09/04 20:28:42 maya Exp $
+bin/podman
diff --git a/podman/distinfo b/podman/distinfo
new file mode 100644
index 0000000000..d4316822cf
--- /dev/null
+++ b/podman/distinfo
@@ -0,0 +1,26 @@
+$NetBSD: distinfo,v 1.9 2023/02/20 15:35:46 tnn Exp $
+
+BLAKE2s (podman-5.0.3.tar.gz) = 7afdfd82acc64c7308fbc92294dbcea42d12a92f082dda12d8579195827cfb53
+SHA512 (podman-5.0.3.tar.gz) = c605a52cc5aba43d485796c4986f2d1be704e5c931473bf5ba1cf77f703cdb3d16f41d33da0b25287e8d001077f77caf117d3ea5dbd7c56a744274025d9ab07d
+Size (podman-5.0.3.tar.gz) = 23814179 bytes
+SHA1 (patch-cmd_podman_registry_config.go) = 80b0f940c59f0c0f258c2240bac30af6a0cb21dd
+SHA1 (patch-pkg_machine_ignition__netbsd.go) = f5b4640d77c6152aa51c0c0e68de47fded340869
+SHA1 (patch-pkg_machine_qemu_machine.go) = 2a38d35a29c67960311d8cd154637a22163c423d
+SHA1 (patch-pkg_machine_qemu_options__netbsd.go) = a256dcafceb70f29b4f7a1ed013b52b5d6b0f4ba
+SHA1 (patch-pkg_machine_qemu_options__netbsd__amd64.go) = 012b2416bb6dceb81450a53d9a7bc771fcb6a1e4
+SHA1 (patch-pkg_machine_qemu_options__netbsd__arm64.go) = 1273821aaa1b1fcfa45c16a07d7d3819a660e1e0
+SHA1 (patch-pkg_machine_qemu_stubber.go) = 8060e5e323a7b0115bb7b0812ae03489c2282175
+SHA1 (patch-pkg_machine_vmconfigs_config__common.go) = 3e25fe9b6cce69c67ceed809837ae4e650e2b9a8
+SHA1 (patch-pkg_util_utils__netbsd.go) = dcda52540148e5c77034322198a8ecedcd8c07e7
+SHA1 (patch-vendor_github.com_containers_buildah_copier_hardlink__uint64.go) = 81317fae0c5596960d3b17b7a1724734e3f100ca
+SHA1 (patch-vendor_github.com_containers_buildah_copier_hardlink__unix.go) = 54f1ecacf342c1f61a6a5e63294057add3016e66
+SHA1 (patch-vendor_github.com_containers_buildah_define_mount__unsupported.go) = 75d1a3dfce7806476f04d4a6d67a7858583838ee
+SHA1 (patch-vendor_github.com_containers_buildah_util_util__unix.go) = baf41542f16a9b73cd52a6162fb021a1259d73c6
+SHA1 (patch-vendor_github.com_containers_common_pkg_password_password__supported.go) = 2110467de202a02e428f71761b2261e578744c81
+SHA1 (patch-vendor_github.com_containers_storage_drivers_chroot__unix.go) = 7edf512a4a6c0e0c7cd67b195b53a2d86ac76b14
+SHA1 (patch-vendor_github.com_containers_storage_pkg_archive_archive__bsd.go) = f93fc181d327d2d462068126abb1a17cce969ae9
+SHA1 (patch-vendor_github.com_containers_storage_pkg_directory_directory__unix.go) = a21e2a4053600702e9524a33472e1d8140cd926f
+SHA1 (patch-vendor_github.com_containers_storage_pkg_homedir_homedir__others.go) = 0b8ce4bf45e11dabf97282a755d6f8e692fffb29
+SHA1 (patch-vendor_github.com_containers_storage_pkg_lockfile_lockfile__unix.go) = d8e194149118d62fce9b50183356854b7c10678f
+SHA1 (patch-vendor_github.com_containers_storage_pkg_system_stat__netbsd.go) = 37bae90c1b3d97f8b4166fca2c59d144c41f81f8
+SHA1 (patch-vendor_github.com_containers_storage_pkg_system_syscall__unix.go) = 7acfc6076d0704557e2e1f2c2b7f3467eb2de629
diff --git a/podman/files/config_netbsd.go b/podman/files/config_netbsd.go
new file mode 100644
index 0000000000..89b289456f
--- /dev/null
+++ b/podman/files/config_netbsd.go
@@ -0,0 +1,18 @@
+package config
+
+const (
+ // OverrideContainersConfig holds the default config path overridden by the root user
+ OverrideContainersConfig = "@PKG_SYSCONFDIR@" + _configPath
+
+ // DefaultContainersConfig holds the default containers config path
+ DefaultContainersConfig = "@PREFIX@/share/" + _configPath
+
+ // DefaultSignaturePolicyPath is the default value for the
+ // policy.json file.
+ DefaultSignaturePolicyPath = "@PKG_SYSCONFDIR@/containers/policy.json"
+)
+
+var defaultHelperBinariesDir = []string{
+ // pkgsrc paths
+ "@PREFIX@/bin",
+}
diff --git a/podman/files/default_netbsd.go b/podman/files/default_netbsd.go
new file mode 100644
index 0000000000..b400368f64
--- /dev/null
+++ b/podman/files/default_netbsd.go
@@ -0,0 +1,31 @@
+package config
+
+func getDefaultCgroupsMode() string {
+ return "enabled"
+}
+
+// In theory, FreeBSD should be able to use shm locks but in practice,
+// this causes cryptic error messages from the kernel that look like:
+//
+// comm podman pid 90813: handling rb error 22
+//
+// These seem to be related to fork/exec code paths. Fall back to
+// file-based locks.
+func getDefaultLockType() string {
+ return "file"
+}
+
+func getLibpodTmpDir() string {
+ return "@VARBASE@/run/libpod"
+}
+
+// getDefaultMachineVolumes returns default mounted volumes (possibly with env vars, which will be expanded)
+func getDefaultMachineVolumes() []string {
+ /* XXXTNN this doesn't work yet. Needs virtio-9p in QEMU */
+// return []string{"$HOME:$HOME"}
+ return []string{}
+}
+
+func getDefaultComposeProviders() []string {
+ return defaultUnixComposeProviders
+}
diff --git a/podman/files/ignition_netbsd.go b/podman/files/ignition_netbsd.go
new file mode 100644
index 0000000000..e54dd0f0f9
--- /dev/null
+++ b/podman/files/ignition_netbsd.go
@@ -0,0 +1,7 @@
+//go:build netbsd
+
+package ignition
+
+func getLocalTimeZone() (string, error) {
+ return "", nil
+}
diff --git a/podman/files/options_netbsd.go b/podman/files/options_netbsd.go
new file mode 100644
index 0000000000..f49d69e9e3
--- /dev/null
+++ b/podman/files/options_netbsd.go
@@ -0,0 +1,21 @@
+//go:build netbsd
+
+package types
+
+const (
+ // these are default path for run and graph root for rootful users
+ // for rootless path is constructed via getRootlessStorageOpts
+ defaultRunRoot string = "@VARBASE@/run/containers/storage"
+ defaultGraphRoot string = "@VARBASE@/db/containers/storage"
+ SystemConfigFile = "@PREFIX@/share/containers/storage.conf"
+)
+
+// defaultConfigFile path to the system wide storage.conf file
+var (
+ defaultOverrideConfigFile = "@PKG_SYSCONFDIR@/containers/storage.conf"
+)
+
+// canUseRootlessOverlay returns true if the overlay driver can be used for rootless containers
+func canUseRootlessOverlay(home, runhome string) bool {
+ return false
+}
diff --git a/podman/patches/patch-cmd_podman_registry_config.go b/podman/patches/patch-cmd_podman_registry_config.go
new file mode 100644
index 0000000000..47519e9ac6
--- /dev/null
+++ b/podman/patches/patch-cmd_podman_registry_config.go
@@ -0,0 +1,15 @@
+$NetBSD: patch-cmd_podman_registry_config.go,v 1.2 2023/02/14 00:33:13 tnn Exp $
+
+Add netbsd support
+
+--- cmd/podman/registry/config.go.orig 2023-02-08 19:03:18.000000000 +0000
++++ cmd/podman/registry/config.go
+@@ -59,7 +59,7 @@ func newPodmanConfig() {
+
+ var mode entities.EngineMode
+ switch runtime.GOOS {
+- case "darwin", "windows":
++ case "darwin", "netbsd", "windows":
+ mode = entities.TunnelMode
+ case "linux", "freebsd":
+ // Some linux clients might only be compiled without ABI
diff --git a/podman/patches/patch-pkg_machine_ignition__netbsd.go b/podman/patches/patch-pkg_machine_ignition__netbsd.go
new file mode 100644
index 0000000000..c4b122126d
--- /dev/null
+++ b/podman/patches/patch-pkg_machine_ignition__netbsd.go
@@ -0,0 +1,24 @@
+$NetBSD: patch-pkg_machine_ignition__netbsd.go,v 1.1 2023/02/14 00:33:13 tnn Exp $
+
+add netbsd support
+
+--- pkg/machine/ignition_netbsd.go.orig 2023-02-13 23:37:08.090532081 +0000
++++ pkg/machine/ignition_netbsd.go
+@@ -0,0 +1,17 @@
++//go:build netbsd
++// +build netbsd
++
++package machine
++
++import (
++ "os"
++ "strings"
++)
++
++func getLocalTimeZone() (string, error) {
++ tzPath, err := os.Readlink("/etc/localtime")
++ if err != nil {
++ return "", err
++ }
++ return strings.TrimPrefix(tzPath, "/usr/share/zoneinfo/"), nil
++}
diff --git a/podman/patches/patch-pkg_machine_qemu_machine.go b/podman/patches/patch-pkg_machine_qemu_machine.go
new file mode 100644
index 0000000000..927fe86787
--- /dev/null
+++ b/podman/patches/patch-pkg_machine_qemu_machine.go
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- pkg/machine/qemu/machine.go.orig 2024-05-29 00:08:32.713658134 +0000
++++ pkg/machine/qemu/machine.go
+@@ -1,4 +1,4 @@
+-//go:build linux || freebsd
++//go:build linux || freebsd || netbsd
+
+ package qemu
+
diff --git a/podman/patches/patch-pkg_machine_qemu_options__netbsd.go b/podman/patches/patch-pkg_machine_qemu_options__netbsd.go
new file mode 100644
index 0000000000..4991f32bfe
--- /dev/null
+++ b/podman/patches/patch-pkg_machine_qemu_options__netbsd.go
@@ -0,0 +1,20 @@
+$NetBSD: patch-pkg_machine_qemu_options__netbsd.go,v 1.1 2021/09/04 20:28:42 maya Exp $
+
+Add netbsd support
+
+--- pkg/machine/qemu/options_netbsd.go.orig 2021-09-04 13:34:34.955121865 +0000
++++ pkg/machine/qemu/options_netbsd.go
+@@ -0,0 +1,13 @@
++package qemu
++
++import (
++ "os"
++)
++
++func getRuntimeDir() (string, error) {
++ tmpDir, ok := os.LookupEnv("TMPDIR")
++ if !ok {
++ tmpDir = "/tmp"
++ }
++ return tmpDir, nil
++}
diff --git a/podman/patches/patch-pkg_machine_qemu_options__netbsd__amd64.go b/podman/patches/patch-pkg_machine_qemu_options__netbsd__amd64.go
new file mode 100644
index 0000000000..cdd9dd9348
--- /dev/null
+++ b/podman/patches/patch-pkg_machine_qemu_options__netbsd__amd64.go
@@ -0,0 +1,19 @@
+$NetBSD: patch-pkg_machine_qemu_options__netbsd__amd64.go,v 1.1 2021/09/04 20:28:42 maya Exp $
+
+Add netbsd/amd64 support - uses nvmm
+
+--- pkg/machine/qemu/options_netbsd_amd64.go.orig 2024-05-28 23:58:18.698452676 +0000
++++ pkg/machine/qemu/options_netbsd_amd64.go
+@@ -0,0 +1,12 @@
++package qemu
++
++var (
++ QemuCommand = "qemu-system-x86_64"
++)
++
++func (v *QEMUStubber) addArchOptions(_ *setNewMachineCMDOpts) []string {
++ opts := []string{
++ "-accel", "nvmm",
++ }
++ return opts
++}
diff --git a/podman/patches/patch-pkg_machine_qemu_options__netbsd__arm64.go b/podman/patches/patch-pkg_machine_qemu_options__netbsd__arm64.go
new file mode 100644
index 0000000000..a20d6a87a6
--- /dev/null
+++ b/podman/patches/patch-pkg_machine_qemu_options__netbsd__arm64.go
@@ -0,0 +1,57 @@
+$NetBSD: patch-pkg_machine_qemu_options__netbsd__arm64.go,v 1.1 2023/02/20 15:35:46 tnn Exp $
+
+NetBSD support.
+
+--- pkg/machine/qemu/options_netbsd_arm64.go.orig 2024-05-28 23:58:18.721596493 +0000
++++ pkg/machine/qemu/options_netbsd_arm64.go
+@@ -0,0 +1,50 @@
++package qemu
++
++import (
++ "os"
++ "os/exec"
++ "path/filepath"
++)
++
++var (
++ QemuCommand = "qemu-system-aarch64"
++)
++
++func (v *QEMUStubber) addArchOptions(_ *setNewMachineCMDOpts) []string {
++ ovmfDir := getOvmfDir(v.ImagePath.GetPath(), v.Name)
++ opts := []string{
++ "-accel", "tcg",
++ "-cpu", "cortex-a57",
++ "-M", "virt",
++ "-drive", "file=" + getEdk2CodeFd("edk2-aarch64-code.fd") + ",if=pflash,format=raw,readonly=on",
++ "-drive", "file=" + ovmfDir + ",if=pflash,format=raw"}
++ return opts
++}
++
++func (v *QEMUStubber) prepare() error {
++ ovmfDir := getOvmfDir(v.ImagePath.GetPath(), v.Name)
++ cmd := []string{"/bin/dd", "if=/dev/zero", "conv=sync", "bs=1m", "count=64", "of=" + ovmfDir}
++ return exec.Command(cmd[0], cmd[1:]...).Run()
++}
++
++func (v *QEMUStubber) archRemovalFiles() []string {
++ ovmDir := getOvmfDir(v.ImagePath.GetPath(), v.Name)
++ return []string{ovmDir}
++}
++
++func getOvmfDir(imagePath, vmName string) string {
++ return filepath.Join(filepath.Dir(imagePath), vmName+"_ovmf_vars.fd")
++}
++
++func getEdk2CodeFd(name string) string {
++ dirs := []string{
++ "/usr/pkg/share/qemu",
++ }
++ for _, dir := range dirs {
++ fullpath := filepath.Join(dir, name)
++ if _, err := os.Stat(fullpath); err == nil {
++ return fullpath
++ }
++ }
++ return name
++}
diff --git a/podman/patches/patch-pkg_machine_qemu_stubber.go b/podman/patches/patch-pkg_machine_qemu_stubber.go
new file mode 100644
index 0000000000..6f722d3adb
--- /dev/null
+++ b/podman/patches/patch-pkg_machine_qemu_stubber.go
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- pkg/machine/qemu/stubber.go.orig 2024-05-29 00:07:05.307241824 +0000
++++ pkg/machine/qemu/stubber.go
+@@ -1,4 +1,4 @@
+-//go:build linux || freebsd
++//go:build linux || freebsd || netbsd
+
+ package qemu
+
diff --git a/podman/patches/patch-pkg_machine_vmconfigs_config__common.go b/podman/patches/patch-pkg_machine_vmconfigs_config__common.go
new file mode 100644
index 0000000000..a56b2af4b2
--- /dev/null
+++ b/podman/patches/patch-pkg_machine_vmconfigs_config__common.go
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- pkg/machine/vmconfigs/config_common.go.orig 2024-05-29 00:05:33.264766331 +0000
++++ pkg/machine/vmconfigs/config_common.go
+@@ -1,4 +1,4 @@
+-//go:build linux || freebsd
++//go:build linux || freebsd || netbsd
+
+ package vmconfigs
+
diff --git a/podman/patches/patch-pkg_util_utils__netbsd.go b/podman/patches/patch-pkg_util_utils__netbsd.go
new file mode 100644
index 0000000000..87a15dcd04
--- /dev/null
+++ b/podman/patches/patch-pkg_util_utils__netbsd.go
@@ -0,0 +1,16 @@
+$NetBSD: patch-pkg_util_utils__netbsd.go,v 1.2 2023/02/14 00:33:13 tnn Exp $
+
+Add netbsd support
+
+--- pkg/util/utils_netbsd.go.orig 2021-09-04 12:43:04.032001543 +0000
++++ pkg/util/utils_netbsd.go
+@@ -0,0 +1,9 @@
++package util
++
++import (
++ "github.com/pkg/errors"
++)
++
++func GetContainerPidInformationDescriptors() ([]string, error) {
++ return []string{}, errors.New("this function is not supported on NetBSD")
++}
diff --git a/podman/patches/patch-vendor_github.com_containers_buildah_copier_hardlink__uint64.go b/podman/patches/patch-vendor_github.com_containers_buildah_copier_hardlink__uint64.go
new file mode 100644
index 0000000000..f2640b7742
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_buildah_copier_hardlink__uint64.go
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- vendor/github.com/containers/buildah/copier/hardlink_uint64.go.orig 2024-05-28 23:57:05.911122335 +0000
++++ vendor/github.com/containers/buildah/copier/hardlink_uint64.go
+@@ -1,5 +1,5 @@
+-//go:build (linux && !mips && !mipsle && !mips64 && !mips64le) || freebsd
+-// +build linux,!mips,!mipsle,!mips64,!mips64le freebsd
++//go:build (linux && !mips && !mipsle && !mips64 && !mips64le) || freebsd || netbsd
++// +build linux,!mips,!mipsle,!mips64,!mips64le freebsd netbsd
+
+ package copier
+
diff --git a/podman/patches/patch-vendor_github.com_containers_buildah_copier_hardlink__unix.go b/podman/patches/patch-vendor_github.com_containers_buildah_copier_hardlink__unix.go
new file mode 100644
index 0000000000..867fe162ed
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_buildah_copier_hardlink__unix.go
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- vendor/github.com/containers/buildah/copier/hardlink_unix.go.orig 2024-05-28 22:30:37.796669657 +0000
++++ vendor/github.com/containers/buildah/copier/hardlink_unix.go
+@@ -1,5 +1,5 @@
+-//go:build linux || darwin || freebsd
+-// +build linux darwin freebsd
++//go:build linux || darwin || freebsd || netbsd
++// +build linux darwin freebsd netbsd
+
+ package copier
+
diff --git a/podman/patches/patch-vendor_github.com_containers_buildah_define_mount__unsupported.go b/podman/patches/patch-vendor_github.com_containers_buildah_define_mount__unsupported.go
new file mode 100644
index 0000000000..1a2fcf6b2d
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_buildah_define_mount__unsupported.go
@@ -0,0 +1,14 @@
+$NetBSD: patch-vendor_github.com_containers_buildah_define_mount__unsupported.go,v 1.1 2023/02/14 00:33:13 tnn Exp $
+
+Add NetBSD support (vendor code)
+
+--- vendor/github.com/containers/buildah/define/mount_unsupported.go.orig 2023-02-08 19:03:18.000000000 +0000
++++ vendor/github.com/containers/buildah/define/mount_unsupported.go
+@@ -1,5 +1,5 @@
+-//go:build darwin || windows
+-// +build darwin windows
++//go:build darwin || windows || netbsd
++// +build darwin windows netbsd
+
+ package define
+
diff --git a/podman/patches/patch-vendor_github.com_containers_buildah_util_util__unix.go b/podman/patches/patch-vendor_github.com_containers_buildah_util_util__unix.go
new file mode 100644
index 0000000000..f29208abd0
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_buildah_util_util__unix.go
@@ -0,0 +1,14 @@
+$NetBSD: patch-vendor_github.com_containers_buildah_util_util__unix.go,v 1.2 2023/02/14 00:33:13 tnn Exp $
+
+Add netbsd support (vendor code)
+
+--- vendor/github.com/containers/buildah/util/util_unix.go.orig 2023-02-08 19:03:18.000000000 +0000
++++ vendor/github.com/containers/buildah/util/util_unix.go
+@@ -1,5 +1,5 @@
+-//go:build linux || darwin || freebsd
+-// +build linux darwin freebsd
++//go:build linux || darwin || freebsd || netbsd
++// +build linux darwin freebsd netbsd
+
+ package util
+
diff --git a/podman/patches/patch-vendor_github.com_containers_common_pkg_password_password__supported.go b/podman/patches/patch-vendor_github.com_containers_common_pkg_password_password__supported.go
new file mode 100644
index 0000000000..4e6480f51a
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_common_pkg_password_password__supported.go
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- vendor/github.com/containers/common/pkg/password/password_supported.go.orig 2024-05-28 22:06:36.037026351 +0000
++++ vendor/github.com/containers/common/pkg/password/password_supported.go
+@@ -1,4 +1,4 @@
+-//go:build linux || darwin || freebsd
++//go:build linux || darwin || freebsd || netbsd
+
+ package password
+
diff --git a/podman/patches/patch-vendor_github.com_containers_storage_drivers_chroot__unix.go b/podman/patches/patch-vendor_github.com_containers_storage_drivers_chroot__unix.go
new file mode 100644
index 0000000000..a6738ef77a
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_storage_drivers_chroot__unix.go
@@ -0,0 +1,14 @@
+$NetBSD: patch-vendor_github.com_containers_storage_drivers_chroot__unix.go,v 1.2 2023/02/14 00:33:13 tnn Exp $
+
+Add netbsd support (vendor code)
+
+--- vendor/github.com/containers/storage/drivers/chroot_unix.go.orig 2023-02-08 19:03:18.000000000 +0000
++++ vendor/github.com/containers/storage/drivers/chroot_unix.go
+@@ -1,5 +1,5 @@
+-//go:build linux || darwin || freebsd || solaris
+-// +build linux darwin freebsd solaris
++//go:build linux || darwin || freebsd || solaris || netbsd
++// +build !windows
+
+ package graphdriver
+
diff --git a/podman/patches/patch-vendor_github.com_containers_storage_pkg_archive_archive__bsd.go b/podman/patches/patch-vendor_github.com_containers_storage_pkg_archive_archive__bsd.go
new file mode 100644
index 0000000000..830f99ab5c
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_storage_pkg_archive_archive__bsd.go
@@ -0,0 +1,14 @@
+$NetBSD: patch-vendor_github.com_containers_storage_pkg_archive_archive__bsd.go,v 1.1 2023/02/14 00:33:13 tnn Exp $
+
+Add NetBSD support (vendor code)
+
+--- vendor/github.com/containers/storage/pkg/archive/archive_bsd.go.orig 2023-02-08 19:03:18.000000000 +0000
++++ vendor/github.com/containers/storage/pkg/archive/archive_bsd.go
+@@ -1,5 +1,5 @@
+-//go:build freebsd || darwin
+-// +build freebsd darwin
++//go:build freebsd || darwin || netbsd
++// +build freebsd darwin netbsd
+
+ package archive
+
diff --git a/podman/patches/patch-vendor_github.com_containers_storage_pkg_directory_directory__unix.go b/podman/patches/patch-vendor_github.com_containers_storage_pkg_directory_directory__unix.go
new file mode 100644
index 0000000000..015c084507
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_storage_pkg_directory_directory__unix.go
@@ -0,0 +1,14 @@
+$NetBSD: patch-vendor_github.com_containers_storage_pkg_directory_directory__unix.go,v 1.2 2023/02/14 00:33:13 tnn Exp $
+
+Add netbsd support (vendor code)
+
+--- vendor/github.com/containers/storage/pkg/directory/directory_unix.go.orig 2023-02-08 19:03:18.000000000 +0000
++++ vendor/github.com/containers/storage/pkg/directory/directory_unix.go
+@@ -1,5 +1,5 @@
+-//go:build linux || darwin || freebsd || solaris
+-// +build linux darwin freebsd solaris
++//go:build linux || darwin || freebsd || solaris || netbsd
++// +build !windows
+
+ package directory
+
diff --git a/podman/patches/patch-vendor_github.com_containers_storage_pkg_homedir_homedir__others.go b/podman/patches/patch-vendor_github.com_containers_storage_pkg_homedir_homedir__others.go
new file mode 100644
index 0000000000..ff75bc6e48
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_storage_pkg_homedir_homedir__others.go
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- vendor/github.com/containers/storage/pkg/homedir/homedir_others.go.orig 2024-05-28 22:08:53.504670587 +0000
++++ vendor/github.com/containers/storage/pkg/homedir/homedir_others.go
+@@ -1,5 +1,5 @@
+-//go:build !linux && !darwin && !freebsd && !windows
+-// +build !linux,!darwin,!freebsd,!windows
++//go:build !linux && !darwin && !freebsd && !netbsd && !windows
++// +build !linux,!darwin,!freebsd,!netbsd,!windows
+
+ package homedir
+
diff --git a/podman/patches/patch-vendor_github.com_containers_storage_pkg_lockfile_lockfile__unix.go b/podman/patches/patch-vendor_github.com_containers_storage_pkg_lockfile_lockfile__unix.go
new file mode 100644
index 0000000000..029bfeb12c
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_storage_pkg_lockfile_lockfile__unix.go
@@ -0,0 +1,25 @@
+$NetBSD$
+
+Add netbsd support (vendor code)
+For some reason unix.SEEK_SET is not defined in the NetBSD runtime code.
+But SEEK_SET is 0 on every platform, so just use that for now.
+
+--- vendor/github.com/containers/storage/pkg/lockfile/lockfile_unix.go.orig 2024-05-10 15:37:14.000000000 +0000
++++ vendor/github.com/containers/storage/pkg/lockfile/lockfile_unix.go
+@@ -1,5 +1,5 @@
+-//go:build linux || solaris || darwin || freebsd
+-// +build linux solaris darwin freebsd
++//go:build linux || solaris || darwin || freebsd || netbsd
++// +build linux solaris darwin freebsd netbsd
+
+ package lockfile
+
+@@ -81,7 +81,7 @@ func lockHandle(fd fileHandle, lType loc
+ }
+ lk := unix.Flock_t{
+ Type: int16(fType),
+- Whence: int16(unix.SEEK_SET),
++ Whence: int16(0),
+ Start: 0,
+ Len: 0,
+ }
diff --git a/podman/patches/patch-vendor_github.com_containers_storage_pkg_system_stat__netbsd.go b/podman/patches/patch-vendor_github.com_containers_storage_pkg_system_stat__netbsd.go
new file mode 100644
index 0000000000..fc605b9eb8
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_storage_pkg_system_stat__netbsd.go
@@ -0,0 +1,20 @@
+$NetBSD: patch-vendor_github.com_containers_storage_pkg_system_stat__netbsd.go,v 1.1 2021/09/04 20:28:42 maya Exp $
+
+Add netbsd support (vendor code)
+
+--- vendor/github.com/containers/storage/pkg/system/stat_netbsd.go.orig 2021-09-04 12:43:05.852178601 +0000
++++ vendor/github.com/containers/storage/pkg/system/stat_netbsd.go
+@@ -0,0 +1,13 @@
++package system
++
++import "syscall"
++
++// fromStatT converts a syscall.Stat_t type to a system.Stat_t type
++func fromStatT(s *syscall.Stat_t) (*StatT, error) {
++ return &StatT{size: s.Size,
++ mode: uint32(s.Mode),
++ uid: s.Uid,
++ gid: s.Gid,
++ rdev: uint64(s.Rdev),
++ mtim: s.Mtimespec}, nil
++}
diff --git a/podman/patches/patch-vendor_github.com_containers_storage_pkg_system_syscall__unix.go b/podman/patches/patch-vendor_github.com_containers_storage_pkg_system_syscall__unix.go
new file mode 100644
index 0000000000..6fb8190e3f
--- /dev/null
+++ b/podman/patches/patch-vendor_github.com_containers_storage_pkg_system_syscall__unix.go
@@ -0,0 +1,14 @@
+$NetBSD: patch-vendor_github.com_containers_storage_pkg_system_syscall__unix.go,v 1.2 2023/02/14 00:33:13 tnn Exp $
+
+Add NetBSD support.
+
+--- vendor/github.com/containers/storage/pkg/system/syscall_unix.go.orig 2023-02-08 19:03:18.000000000 +0000
++++ vendor/github.com/containers/storage/pkg/system/syscall_unix.go
+@@ -1,5 +1,5 @@
+-//go:build linux || freebsd || darwin
+-// +build linux freebsd darwin
++//go:build linux || freebsd || darwin || netbsd
++// +build linux freebsd darwin netbsd
+
+ package system
+
Home |
Main Index |
Thread Index |
Old Index