pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/podman



Module Name:    pkgsrc
Committed By:   tnn
Date:           Mon Feb 20 15:35:46 UTC 2023

Modified Files:
        pkgsrc/sysutils/podman: Makefile distinfo
Added Files:
        pkgsrc/sysutils/podman/patches:
            patch-pkg_machine_qemu_options__netbsd__arm64.go

Log Message:
podman: support NetBSD on aarch64

Uses TCG as NVMM is not available. Although podman is useless in practice
without hardware virtualization in QEMU, at least it will not clutter
bulk build reports any more.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/podman/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/sysutils/podman/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/podman/patches/patch-pkg_machine_qemu_options__netbsd__arm64.go

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/podman/Makefile
diff -u pkgsrc/sysutils/podman/Makefile:1.6 pkgsrc/sysutils/podman/Makefile:1.7
--- pkgsrc/sysutils/podman/Makefile:1.6 Tue Feb 14 00:33:12 2023
+++ pkgsrc/sysutils/podman/Makefile     Mon Feb 20 15:35:46 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2023/02/14 00:33:12 tnn Exp $
+# $NetBSD: Makefile,v 1.7 2023/02/20 15:35:46 tnn Exp $
 
 DISTNAME=      podman-4.4.1
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -20,6 +20,7 @@ DEPENDS+=     qemu-[0-9]*:../../emulators/qe
 DEPENDS+=      gvproxy-[0-9]*:../../net/gvproxy
 
 SUBST_CLASSES+=                prefix
+SUBST_FILES.prefix+=   pkg/machine/qemu/options_netbsd_arm64.go
 SUBST_FILES.prefix+=   vendor/github.com/containers/common/pkg/config/config_darwin.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

Index: pkgsrc/sysutils/podman/distinfo
diff -u pkgsrc/sysutils/podman/distinfo:1.8 pkgsrc/sysutils/podman/distinfo:1.9
--- pkgsrc/sysutils/podman/distinfo:1.8 Mon Feb 20 09:58:02 2023
+++ pkgsrc/sysutils/podman/distinfo     Mon Feb 20 15:35:46 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2023/02/20 09:58:02 tnn Exp $
+$NetBSD: distinfo,v 1.9 2023/02/20 15:35:46 tnn Exp $
 
 BLAKE2s (podman-4.4.1.tar.gz) = 6ea927ab6855095064f5d915e407d424ca54a738d4d2a378b522d4eedef7ae37
 SHA512 (podman-4.4.1.tar.gz) = 33a22b7941f4f6715baa1cd2d5b29a4e2e95264c5239877122448f71e1408d8c393bcd2cdaef9516a580eede911c84f1cfea9d7b4c9d287a2737986fdc604e2c
@@ -10,6 +10,7 @@ SHA1 (patch-pkg_machine_ignition__netbsd
 SHA1 (patch-pkg_machine_qemu_machine.go) = 8b0957edb19a70333b19db27a54b02cedf968696
 SHA1 (patch-pkg_machine_qemu_options__netbsd.go) = a256dcafceb70f29b4f7a1ed013b52b5d6b0f4ba
 SHA1 (patch-pkg_machine_qemu_options__netbsd__amd64.go) = 7f5e4fe206e6e1d8f8e2cd33c8ac18b614c2dd61
+SHA1 (patch-pkg_machine_qemu_options__netbsd__arm64.go) = 0aa8256147bf0b984e27625ab21368ed4652dca7
 SHA1 (patch-pkg_util_utils__netbsd.go) = dcda52540148e5c77034322198a8ecedcd8c07e7
 SHA1 (patch-utils_utils__supported.go) = 44938037e4e0a4cd9468b2d37e480b78d404099b
 SHA1 (patch-vendor_github.com_containers_buildah_define_mount__unsupported.go) = 75d1a3dfce7806476f04d4a6d67a7858583838ee

Added files:

Index: pkgsrc/sysutils/podman/patches/patch-pkg_machine_qemu_options__netbsd__arm64.go
diff -u /dev/null pkgsrc/sysutils/podman/patches/patch-pkg_machine_qemu_options__netbsd__arm64.go:1.1
--- /dev/null   Mon Feb 20 15:35:46 2023
+++ pkgsrc/sysutils/podman/patches/patch-pkg_machine_qemu_options__netbsd__arm64.go     Mon Feb 20 15:35:46 2023
@@ -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      2023-02-20 15:25:44.049225824 +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 *MachineVM) addArchOptions() []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 *MachineVM) 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 *MachineVM) 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{
++              "@PREFIX@/share/qemu",
++      }
++      for _, dir := range dirs {
++              fullpath := filepath.Join(dir, name)
++              if _, err := os.Stat(fullpath); err == nil {
++                      return fullpath
++              }
++      }
++      return name
++}



Home | Main Index | Thread Index | Old Index