From: Kirill A. Korinsky Subject: Re: sysutils/docker-cli: update to 25.0.3 To: "Kirill A. Korinsky" , ports@openbsd.org Date: Thu, 08 Feb 2024 15:40:08 +0100 On Thu, 08 Feb 2024 10:27:05 +0100, Kirill A. Korinsky wrote: > > I'd like a share that future patch is required for docker. > > Right now any use of docker cli plugin produces (and not removed!) unix socker > with name @docker_clo_[UUID]. > Here the updated diff which updated docker-cli and introduces docker-compose and docker-buildx. Probably the last one should be dependency for the docker-cli. An updated includes a ptach to cleanup @docker_cli_[UUID] files which was backported to upstream [1]. Thus, I've made some digging and seems that patch with replacing syscall.EBADMSG to syscall.Errno(0x5c) doesn't required anymore [2], it simple exists inside vendor.mod and vendor.sum, but I haven't found any trace of it's using. But this patches are required in docker-buildx and docker-compose. Shall it be simple included into go port to avoid patching almost each go application which uses fsutils? Footnotes: [1] https://github.com/docker/cli/pull/4862 [2] https://github.com/search?q=repo%3Amoby%2Fmoby+github.com%2Ftonistiigi%2Ffsutil&type=code -- wbr, Kirill Index: Makefile =================================================================== RCS file: /cvs/ports/sysutils/Makefile,v retrieving revision 1.699 diff -u -p -r1.699 Makefile --- Makefile 16 Sep 2023 18:50:24 -0000 1.699 +++ Makefile 8 Feb 2024 14:21:45 -0000 @@ -76,7 +76,9 @@ SUBDIR += diskrescue SUBDIR += dmassage SUBDIR += dmidecode + SUBDIR += docker-buildx SUBDIR += docker-cli + SUBDIR += docker-compose SUBDIR += dosfstools SUBDIR += downtimed SUBDIR += dsh Index: docker-buildx/Makefile =================================================================== RCS file: docker-buildx/Makefile diff -N docker-buildx/Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/Makefile 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,34 @@ +COMMENT = Docker CLI plugin for extended build capabilities + +V = 0.12.1 +GH_ACCOUNT = docker +GH_PROJECT = buildx +GH_TAGNAME = v${V} +PKGNAME = docker-${DISTNAME} + +CATEGORIES = sysutils + +HOMEPAGE = https://github.com/docker/buildx + +DISTFILES = docker-buildx-${V}.tar.gz + +# Apache 2.0 +PERMIT_PACKAGE = Yes + +WANTLIB += c pthread + +USE_GMAKE = Yes + +MODULES = lang/go +MODGO_GOPATH = ${MODGO_WORKSPACE} + +GO_PKGNAME = github.com/docker/buildx +WRKSRC = ${MODGO_WORKSPACE}/src/${GO_PKGNAME} +ALL_TARGET = github.com/docker/buildx/cmd/buildx + +do-install: + ${INSTALL_PROGRAM_DIR} ${PREFIX}/libexec/docker/cli-plugins + ${INSTALL_PROGRAM} ${MODGO_WORKSPACE}/bin/buildx \ + ${PREFIX}/libexec/docker/cli-plugins/docker-buildx + +.include Index: docker-buildx/distinfo =================================================================== RCS file: docker-buildx/distinfo diff -N docker-buildx/distinfo --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/distinfo 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,2 @@ +SHA256 (docker-buildx-0.12.1.tar.gz) = nMF27VXnxCPCPeNb0x3ztEkmHxuQdlwX8AO9TehqaqQ= +SIZE (docker-buildx-0.12.1.tar.gz) = 10509403 Index: docker-buildx/patches/patch-vendor_github_com_moby_buildkit_cmd_buildkitd_config_gcpolicy_unix_go =================================================================== RCS file: docker-buildx/patches/patch-vendor_github_com_moby_buildkit_cmd_buildkitd_config_gcpolicy_unix_go diff -N docker-buildx/patches/patch-vendor_github_com_moby_buildkit_cmd_buildkitd_config_gcpolicy_unix_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/patches/patch-vendor_github_com_moby_buildkit_cmd_buildkitd_config_gcpolicy_unix_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/moby/buildkit/cmd/buildkitd/config/gcpolicy_unix.go +--- vendor/github.com/moby/buildkit/cmd/buildkitd/config/gcpolicy_unix.go.orig ++++ vendor/github.com/moby/buildkit/cmd/buildkitd/config/gcpolicy_unix.go +@@ -23,7 +23,7 @@ func (d DiskSpace) AsBytes(root string) int64 { + if err := syscall.Statfs(root, &st); err != nil { + return defaultCap + } +- diskSize := int64(st.Bsize) * int64(st.Blocks) ++ diskSize := int64(st.F_bsize) * int64(st.F_blocks) + avail := diskSize * d.Percentage / 100 + return (avail/(1<<30) + 1) * 1e9 // round up + } Index: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go =================================================================== RCS file: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go diff -N docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/diskwriter.go +--- vendor/github.com/tonistiigi/fsutil/diskwriter.go.orig ++++ vendor/github.com/tonistiigi/fsutil/diskwriter.go +@@ -121,7 +121,7 @@ func (dw *DiskWriter) HandleChange(kind ChangeKind, p + + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: p, Err: syscall.EBADMSG, Op: "change without stat info"}) ++ return errors.WithStack(&os.PathError{Path: p, Err: syscall.Errno(0x5c), Op: "change without stat info"}) + } + + statCopy := *stat Index: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go =================================================================== RCS file: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go diff -N docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/fs.go +--- vendor/github.com/tonistiigi/fsutil/fs.go.orig ++++ vendor/github.com/tonistiigi/fsutil/fs.go +@@ -79,7 +79,7 @@ func (fs *subDirFS) Walk(ctx context.Context, fn filep + if err := d.FS.Walk(ctx, func(p string, fi os.FileInfo, err error) error { + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: d.Stat.Path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) ++ return errors.WithStack(&os.PathError{Path: d.Stat.Path, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"}) + } + stat.Path = path.Join(d.Stat.Path, stat.Path) + if stat.Linkname != "" { Index: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go =================================================================== RCS file: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go diff -N docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/hardlinks.go +--- vendor/github.com/tonistiigi/fsutil/hardlinks.go.orig ++++ vendor/github.com/tonistiigi/fsutil/hardlinks.go +@@ -29,7 +29,7 @@ func (v *Hardlinks) HandleChange(kind ChangeKind, p st + + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: p, Err: syscall.EBADMSG, Op: "change without stat info"}) ++ return errors.WithStack(&os.PathError{Path: p, Err: syscall.Errno(0x5c), Op: "change without stat info"}) + } + + if fi.IsDir() || fi.Mode()&os.ModeSymlink != 0 { Index: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go =================================================================== RCS file: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go diff -N docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/send.go +--- vendor/github.com/tonistiigi/fsutil/send.go.orig ++++ vendor/github.com/tonistiigi/fsutil/send.go +@@ -150,7 +150,7 @@ func (s *sender) walk(ctx context.Context) error { + } + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) ++ return errors.WithStack(&os.PathError{Path: path, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"}) + } + + p := &types.Packet{ Index: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go =================================================================== RCS file: docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go diff -N docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/tarwriter.go +--- vendor/github.com/tonistiigi/fsutil/tarwriter.go.orig ++++ vendor/github.com/tonistiigi/fsutil/tarwriter.go +@@ -21,7 +21,7 @@ func WriteTar(ctx context.Context, fs FS, w io.Writer) + } + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) ++ return errors.WithStack(&os.PathError{Path: path, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"}) + } + hdr, err := tar.FileInfoHeader(fi, stat.Linkname) + if err != nil { Index: docker-buildx/pkg/DESCR =================================================================== RCS file: docker-buildx/pkg/DESCR diff -N docker-buildx/pkg/DESCR --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/pkg/DESCR 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,2 @@ +buildx is a Docker CLI plugin for extended build capabilities +with BuildKit. Index: docker-buildx/pkg/PLIST =================================================================== RCS file: docker-buildx/pkg/PLIST diff -N docker-buildx/pkg/PLIST --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-buildx/pkg/PLIST 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1 @@ +@bin libexec/docker/cli-plugins/docker-buildx Index: docker-cli/Makefile =================================================================== RCS file: /cvs/ports/sysutils/docker-cli/Makefile,v retrieving revision 1.9 diff -u -p -r1.9 Makefile --- docker-cli/Makefile 20 Nov 2022 16:14:43 -0000 1.9 +++ docker-cli/Makefile 8 Feb 2024 14:21:45 -0000 @@ -1,6 +1,6 @@ COMMENT = command-line tool for controlling Docker -V = 20.10.21 +V = 25.0.3 GH_ACCOUNT = docker GH_PROJECT = cli Index: docker-cli/distinfo =================================================================== RCS file: /cvs/ports/sysutils/docker-cli/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- docker-cli/distinfo 20 Nov 2022 16:14:43 -0000 1.5 +++ docker-cli/distinfo 8 Feb 2024 14:21:45 -0000 @@ -1,2 +1,2 @@ -SHA256 (cli-20.10.21.tar.gz) = 8PYsocgOj9W54UDKZO8+ddx896KAQLPRCyYDBxKJRug= -SIZE (cli-20.10.21.tar.gz) = 7633967 +SHA256 (cli-25.0.3.tar.gz) = BK0M6pkqZdsgyxsNv20c4yxwXOh53lGyIJX+jSgDCBU= +SIZE (cli-25.0.3.tar.gz) = 6864551 Index: docker-cli/patches/patch-cli-plugins_socket_socket_nodarwin_go =================================================================== RCS file: docker-cli/patches/patch-cli-plugins_socket_socket_nodarwin_go diff -N docker-cli/patches/patch-cli-plugins_socket_socket_nodarwin_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-cli/patches/patch-cli-plugins_socket_socket_nodarwin_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,17 @@ +Index: cli-plugins/socket/socket_nodarwin.go +--- cli-plugins/socket/socket_nodarwin.go.orig ++++ cli-plugins/socket/socket_nodarwin.go +@@ -1,4 +1,4 @@ +-//go:build !darwin ++//go:build !darwin && !openbsd + + package socket + +@@ -15,5 +15,6 @@ func listen(socketname string) (*net.UnixListener, err + + func onAccept(conn *net.UnixConn, listener *net.UnixListener) { + // do nothing +- // while on darwin we would unlink here; on non-darwin the socket is abstract and not present on the filesystem ++ // while on darwin and OpenBSD we would unlink here; ++ // on non-darwin the socket is abstract and not present on the filesystem + } Index: docker-cli/patches/patch-cli-plugins_socket_socket_openbsd_go =================================================================== RCS file: docker-cli/patches/patch-cli-plugins_socket_socket_openbsd_go diff -N docker-cli/patches/patch-cli-plugins_socket_socket_openbsd_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-cli/patches/patch-cli-plugins_socket_socket_openbsd_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,23 @@ +Index: cli-plugins/socket/socket_openbsd.go +--- cli-plugins/socket/socket_openbsd.go.orig ++++ cli-plugins/socket/socket_openbsd.go +@@ -0,0 +1,19 @@ ++//go:build openbsd ++ ++package socket ++ ++import ( ++ "net" ++ "syscall" ++) ++ ++func listen(socketname string) (*net.UnixListener, error) { ++ return net.ListenUnix("unix", &net.UnixAddr{ ++ Name: "@" + socketname, ++ Net: "unix", ++ }) ++} ++ ++func onAccept(conn *net.UnixConn, listener *net.UnixListener) { ++ syscall.Unlink(listener.Addr().String()) ++} Index: docker-cli/patches/patch-vendor_github_com_containerd_containerd_content_local_store_unix_go =================================================================== RCS file: docker-cli/patches/patch-vendor_github_com_containerd_containerd_content_local_store_unix_go diff -N docker-cli/patches/patch-vendor_github_com_containerd_containerd_content_local_store_unix_go --- docker-cli/patches/patch-vendor_github_com_containerd_containerd_content_local_store_unix_go 11 Mar 2022 19:57:21 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,9 +0,0 @@ -Index: vendor/github.com/containerd/containerd/content/local/store_unix.go ---- vendor/github.com/containerd/containerd/content/local/store_unix.go.orig -+++ vendor/github.com/containerd/containerd/content/local/store_unix.go -@@ -1,4 +1,4 @@ --// +build linux solaris darwin freebsd netbsd -+// +build linux solaris darwin freebsd netbsd openbsd - - /* - Copyright The containerd Authors. Index: docker-cli/patches/patch-vendor_github_com_containerd_continuity_fs_stat_openbsd_go =================================================================== RCS file: docker-cli/patches/patch-vendor_github_com_containerd_continuity_fs_stat_openbsd_go diff -N docker-cli/patches/patch-vendor_github_com_containerd_continuity_fs_stat_openbsd_go --- docker-cli/patches/patch-vendor_github_com_containerd_continuity_fs_stat_openbsd_go 11 Mar 2022 19:57:21 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,48 +0,0 @@ -Index: vendor/github.com/containerd/containerd/sys/stat_openbsd.go ---- vendor/github.com/containerd/containerd/sys/stat_openbsd.go.orig -+++ vendor/github.com/containerd/containerd/sys/stat_openbsd.go -@@ -0,0 +1,44 @@ -+// +build openbsd -+/* -+ Copyright The containerd Authors. -+ -+ Licensed under the Apache License, Version 2.0 (the "License"); -+ you may not use this file except in compliance with the License. -+ You may obtain a copy of the License at -+ -+ http://www.apache.org/licenses/LICENSE-2.0 -+ -+ Unless required by applicable law or agreed to in writing, software -+ distributed under the License is distributed on an "AS IS" BASIS, -+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ See the License for the specific language governing permissions and -+ limitations under the License. -+*/ -+ -+package sys -+ -+import ( -+ "syscall" -+ "time" -+) -+ -+// StatAtime returns the Atim -+func StatAtime(st *syscall.Stat_t) syscall.Timespec { -+ return st.Atim -+} -+ -+// StatCtime returns the Ctim -+func StatCtime(st *syscall.Stat_t) syscall.Timespec { -+ return st.Ctim -+} -+ -+// StatMtime returns the Mtim -+func StatMtime(st *syscall.Stat_t) syscall.Timespec { -+ return st.Mtim -+} -+ -+// StatATimeAsTime returns st.Atim as a time.Time -+func StatATimeAsTime(st *syscall.Stat_t) time.Time { -+ // The int64 conversions ensure the line compiles for 32-bit systems as well. -+ return time.Unix(int64(st.Atim.Sec), int64(st.Atim.Nsec)) // nolint: unconvert -+} Index: docker-cli/patches/patch-vendor_github_com_moby_sys_mount_mounter_bsd_go =================================================================== RCS file: docker-cli/patches/patch-vendor_github_com_moby_sys_mount_mounter_bsd_go diff -N docker-cli/patches/patch-vendor_github_com_moby_sys_mount_mounter_bsd_go --- docker-cli/patches/patch-vendor_github_com_moby_sys_mount_mounter_bsd_go 11 Mar 2022 19:57:21 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,9 +0,0 @@ -Index: vendor/github.com/moby/sys/mount/mounter_bsd.go ---- vendor/github.com/moby/sys/mount/mounter_bsd.go.orig -+++ vendor/github.com/moby/sys/mount/mounter_bsd.go -@@ -1,4 +1,4 @@ --// +build freebsd,cgo openbsd,cgo -+// +build freebsd,cgo - - package mount - Index: docker-cli/patches/patch-vendor_github_com_moby_sys_mount_mounter_openbsd_go =================================================================== RCS file: docker-cli/patches/patch-vendor_github_com_moby_sys_mount_mounter_openbsd_go diff -N docker-cli/patches/patch-vendor_github_com_moby_sys_mount_mounter_openbsd_go --- docker-cli/patches/patch-vendor_github_com_moby_sys_mount_mounter_openbsd_go 11 Mar 2022 19:57:21 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,69 +0,0 @@ -Index: vendor/github.com/moby/sys/mount/mounter_openbsd.go ---- vendor/github.com/moby/sys/mount/mounter_openbsd.go.orig -+++ vendor/github.com/moby/sys/mount/mounter_openbsd.go -@@ -0,0 +1,65 @@ -+// +build openbsd,cgo -+ -+package mount -+ -+/* -+#include -+#include -+*/ -+import "C" -+ -+import ( -+ "fmt" -+ "syscall" -+ "unsafe" -+) -+ -+func createExportInfo(readOnly bool) C.struct_export_args { -+ exportFlags := C.int(0) -+ if readOnly { -+ exportFlags = C.MNT_EXRDONLY -+ } -+ out := C.struct_export_args{ -+ ex_root: 0, -+ ex_flags: exportFlags, -+ } -+ return out -+} -+ -+func createUfsArgs(device string, readOnly bool) unsafe.Pointer { -+ out := &C.struct_ufs_args{ -+ fspec: C.CString(device), -+ export_info: createExportInfo(readOnly), -+ } -+ return unsafe.Pointer(out) -+} -+ -+func mount(device, target, mType string, flag uintptr, data string) error { -+ readOnly := flag&RDONLY == 1 -+ -+ var fsArgs unsafe.Pointer -+ -+ if mType == "ffs" { -+ fsArgs = createUfsArgs(device, readOnly) -+ } else { -+ return &mountError{ -+ op: "mount", -+ source: device, -+ target: target, -+ flags: flag, -+ err: fmt.Errorf("unsupported type"), -+ } -+ } -+ -+ if errno := C.mount(C.CString(mType), C.CString(target), C.int(flag), fsArgs); errno != 0 { -+ return &mountError{ -+ op: "mount", -+ source: device, -+ target: target, -+ flags: flag, -+ err: syscall.Errno(errno), -+ } -+ } -+ -+ return nil -+} Index: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go =================================================================== RCS file: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go diff -N docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go --- docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go 11 Mar 2022 19:57:21 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: vendor/github.com/tonistiigi/fsutil/diskwriter.go ---- vendor/github.com/tonistiigi/fsutil/diskwriter.go.orig -+++ vendor/github.com/tonistiigi/fsutil/diskwriter.go -@@ -104,7 +104,7 @@ func (dw *DiskWriter) HandleChange(kind ChangeKind, p - - stat, ok := fi.Sys().(*types.Stat) - if !ok { -- return errors.WithStack(&os.PathError{Path: p, Err: syscall.EBADMSG, Op: "change without stat info"}) -+ return errors.WithStack(&os.PathError{Path: p, Err: syscall.Errno(0x5c), Op: "change without stat info"}) - } - - statCopy := *stat Index: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go =================================================================== RCS file: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go diff -N docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go --- docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go 11 Mar 2022 19:57:21 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: vendor/github.com/tonistiigi/fsutil/fs.go ---- vendor/github.com/tonistiigi/fsutil/fs.go.orig -+++ vendor/github.com/tonistiigi/fsutil/fs.go -@@ -80,7 +80,7 @@ func (fs *subDirFS) Walk(ctx context.Context, fn filep - if err := d.FS.Walk(ctx, func(p string, fi os.FileInfo, err error) error { - stat, ok := fi.Sys().(*types.Stat) - if !ok { -- return errors.WithStack(&os.PathError{Path: d.Stat.Path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) -+ return errors.WithStack(&os.PathError{Path: d.Stat.Path, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"}) - } - stat.Path = path.Join(d.Stat.Path, stat.Path) - if stat.Linkname != "" { Index: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go =================================================================== RCS file: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go diff -N docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go --- docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go 11 Mar 2022 19:57:21 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: vendor/github.com/tonistiigi/fsutil/hardlinks.go ---- vendor/github.com/tonistiigi/fsutil/hardlinks.go.orig -+++ vendor/github.com/tonistiigi/fsutil/hardlinks.go -@@ -29,7 +29,7 @@ func (v *Hardlinks) HandleChange(kind ChangeKind, p st - - stat, ok := fi.Sys().(*types.Stat) - if !ok { -- return errors.WithStack(&os.PathError{Path: p, Err: syscall.EBADMSG, Op: "change without stat info"}) -+ return errors.WithStack(&os.PathError{Path: p, Err: syscall.Errno(0x5c), Op: "change without stat info"}) - } - - if fi.IsDir() || fi.Mode()&os.ModeSymlink != 0 { Index: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go =================================================================== RCS file: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go diff -N docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go --- docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go 11 Mar 2022 19:57:21 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: vendor/github.com/tonistiigi/fsutil/send.go ---- vendor/github.com/tonistiigi/fsutil/send.go.orig -+++ vendor/github.com/tonistiigi/fsutil/send.go -@@ -150,7 +150,7 @@ func (s *sender) walk(ctx context.Context) error { - } - stat, ok := fi.Sys().(*types.Stat) - if !ok { -- return errors.WithStack(&os.PathError{Path: path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) -+ return errors.WithStack(&os.PathError{Path: path, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"}) - } - - p := &types.Packet{ Index: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go =================================================================== RCS file: docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go diff -N docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go --- docker-cli/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go 11 Mar 2022 19:57:21 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -Index: vendor/github.com/tonistiigi/fsutil/tarwriter.go ---- vendor/github.com/tonistiigi/fsutil/tarwriter.go.orig -+++ vendor/github.com/tonistiigi/fsutil/tarwriter.go -@@ -21,7 +21,7 @@ func WriteTar(ctx context.Context, fs FS, w io.Writer) - } - stat, ok := fi.Sys().(*types.Stat) - if !ok { -- return errors.WithStack(&os.PathError{Path: path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) -+ return errors.WithStack(&os.PathError{Path: path, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"}) - } - hdr, err := tar.FileInfoHeader(fi, stat.Linkname) - if err != nil { Index: docker-cli/pkg/PLIST =================================================================== RCS file: /cvs/ports/sysutils/docker-cli/pkg/PLIST,v retrieving revision 1.5 diff -u -p -r1.5 PLIST --- docker-cli/pkg/PLIST 11 Mar 2022 19:57:21 -0000 1.5 +++ docker-cli/pkg/PLIST 8 Feb 2024 14:21:45 -0000 @@ -1,2 +1 @@ -@conflict docker-* @bin bin/docker Index: docker-compose/Makefile =================================================================== RCS file: docker-compose/Makefile diff -N docker-compose/Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/Makefile 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,49 @@ +COMMENT = Define and run multi-container applications with Docker + +V = 2.24.5 +GH_ACCOUNT = docker +GH_PROJECT = compose +GH_TAGNAME = v${V} +PKGNAME = docker-${DISTNAME} + +CATEGORIES = sysutils + +HOMEPAGE = https://docs.docker.com/compose/ + +DISTFILES = docker-compose-${V}.tar.gz +DISTFILES.a = docker-compose-vendor-${V}.tar.gz + +SITES.a = https://kirill.korins.ky/pub/distfiles/ + +# Apache 2.0 +PERMIT_PACKAGE = Yes + +WANTLIB += c pthread + +USE_GMAKE = Yes + +MODULES = lang/go +MODGO_GOPATH = ${MODGO_WORKSPACE} +MODGO_LDFLAGS = -X github.com/docker/compose/v2/internal.Version=v${V} + +# avoid using docker buildx +do-build: + cd ${WRKSRC} && \ + ${MAKE_ENV} GOMAXPROCS=${MAKE_JOBS} PREFIX=${PREFIX} \ + ${MAKE_PROGRAM} build + +do-install: + ln -s ${TRUEPREFIX}/libexec/docker/cli-plugins/docker-compose \ + ${PREFIX}/bin/docker-compose + ${INSTALL_PROGRAM_DIR} ${PREFIX}/libexec/docker/cli-plugins + ${INSTALL_PROGRAM} ${WRKSRC}/bin/build/docker-compose \ + ${PREFIX}/libexec/docker/cli-plugins + +vendor: patch + cd ${WRKDIR}/compose-$V; \ + go mod tidy; \ + go mod vendor; \ + cd ..; \ + tar czf docker-compose-vendor-${V}.tar.gz compose-$V/vendor + +.include Index: docker-compose/distinfo =================================================================== RCS file: docker-compose/distinfo diff -N docker-compose/distinfo --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/distinfo 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,4 @@ +SHA256 (docker-compose-2.24.5.tar.gz) = FgxXVljN1lg26jE4u2M391h332y62OLUv03c+FDO44I= +SHA256 (docker-compose-vendor-2.24.5.tar.gz) = nJHZBoh4ziYIHYpvUBAjCektpRGVZHogahnNIpYlVXo= +SIZE (docker-compose-2.24.5.tar.gz) = 344937 +SIZE (docker-compose-vendor-2.24.5.tar.gz) = 10428955 Index: docker-compose/patches/patch-internal_locker_runtime_unix_go =================================================================== RCS file: docker-compose/patches/patch-internal_locker_runtime_unix_go diff -N docker-compose/patches/patch-internal_locker_runtime_unix_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/patches/patch-internal_locker_runtime_unix_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,9 @@ +Index: internal/locker/runtime_unix.go +--- internal/locker/runtime_unix.go.orig ++++ internal/locker/runtime_unix.go +@@ -1,4 +1,4 @@ +-//go:build linux ++//go:build linux || openbsd + + /* + Copyright 2020 Docker Compose CLI authors Index: docker-compose/patches/patch-pkg_remote_cache_unix_go =================================================================== RCS file: docker-compose/patches/patch-pkg_remote_cache_unix_go diff -N docker-compose/patches/patch-pkg_remote_cache_unix_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/patches/patch-pkg_remote_cache_unix_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,9 @@ +Index: pkg/remote/cache_unix.go +--- pkg/remote/cache_unix.go.orig ++++ pkg/remote/cache_unix.go +@@ -1,4 +1,4 @@ +-//go:build linux ++//go:build linux || openbsd + + /* + Copyright 2020 Docker Compose CLI authors Index: docker-compose/patches/patch-vendor_github_com_moby_buildkit_cmd_buildkitd_config_gcpolicy_unix_go =================================================================== RCS file: docker-compose/patches/patch-vendor_github_com_moby_buildkit_cmd_buildkitd_config_gcpolicy_unix_go diff -N docker-compose/patches/patch-vendor_github_com_moby_buildkit_cmd_buildkitd_config_gcpolicy_unix_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/patches/patch-vendor_github_com_moby_buildkit_cmd_buildkitd_config_gcpolicy_unix_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/moby/buildkit/cmd/buildkitd/config/gcpolicy_unix.go +--- vendor/github.com/moby/buildkit/cmd/buildkitd/config/gcpolicy_unix.go.orig ++++ vendor/github.com/moby/buildkit/cmd/buildkitd/config/gcpolicy_unix.go +@@ -23,7 +23,7 @@ func (d DiskSpace) AsBytes(root string) int64 { + if err := syscall.Statfs(root, &st); err != nil { + return defaultCap + } +- diskSize := int64(st.Bsize) * int64(st.Blocks) ++ diskSize := int64(st.F_bsize) * int64(st.F_blocks) + avail := diskSize * d.Percentage / 100 + return (avail/(1<<30) + 1) * 1e9 // round up + } Index: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go =================================================================== RCS file: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go diff -N docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/diskwriter.go +--- vendor/github.com/tonistiigi/fsutil/diskwriter.go.orig ++++ vendor/github.com/tonistiigi/fsutil/diskwriter.go +@@ -121,7 +121,7 @@ func (dw *DiskWriter) HandleChange(kind ChangeKind, p + + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: p, Err: syscall.EBADMSG, Op: "change without stat info"}) ++ return errors.WithStack(&os.PathError{Path: p, Err: syscall.Errno(0x5c), Op: "change without stat info"}) + } + + statCopy := *stat Index: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go =================================================================== RCS file: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go diff -N docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/fs.go +--- vendor/github.com/tonistiigi/fsutil/fs.go.orig ++++ vendor/github.com/tonistiigi/fsutil/fs.go +@@ -79,7 +79,7 @@ func (fs *subDirFS) Walk(ctx context.Context, fn filep + if err := d.FS.Walk(ctx, func(p string, fi os.FileInfo, err error) error { + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: d.Stat.Path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) ++ return errors.WithStack(&os.PathError{Path: d.Stat.Path, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"}) + } + stat.Path = path.Join(d.Stat.Path, stat.Path) + if stat.Linkname != "" { Index: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go =================================================================== RCS file: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go diff -N docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/hardlinks.go +--- vendor/github.com/tonistiigi/fsutil/hardlinks.go.orig ++++ vendor/github.com/tonistiigi/fsutil/hardlinks.go +@@ -29,7 +29,7 @@ func (v *Hardlinks) HandleChange(kind ChangeKind, p st + + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: p, Err: syscall.EBADMSG, Op: "change without stat info"}) ++ return errors.WithStack(&os.PathError{Path: p, Err: syscall.Errno(0x5c), Op: "change without stat info"}) + } + + if fi.IsDir() || fi.Mode()&os.ModeSymlink != 0 { Index: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go =================================================================== RCS file: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go diff -N docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/send.go +--- vendor/github.com/tonistiigi/fsutil/send.go.orig ++++ vendor/github.com/tonistiigi/fsutil/send.go +@@ -150,7 +150,7 @@ func (s *sender) walk(ctx context.Context) error { + } + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) ++ return errors.WithStack(&os.PathError{Path: path, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"}) + } + + p := &types.Packet{ Index: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go =================================================================== RCS file: docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go diff -N docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,12 @@ +Index: vendor/github.com/tonistiigi/fsutil/tarwriter.go +--- vendor/github.com/tonistiigi/fsutil/tarwriter.go.orig ++++ vendor/github.com/tonistiigi/fsutil/tarwriter.go +@@ -21,7 +21,7 @@ func WriteTar(ctx context.Context, fs FS, w io.Writer) + } + stat, ok := fi.Sys().(*types.Stat) + if !ok { +- return errors.WithStack(&os.PathError{Path: path, Err: syscall.EBADMSG, Op: "fileinfo without stat info"}) ++ return errors.WithStack(&os.PathError{Path: path, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"}) + } + hdr, err := tar.FileInfoHeader(fi, stat.Linkname) + if err != nil { Index: docker-compose/pkg/DESCR =================================================================== RCS file: docker-compose/pkg/DESCR diff -N docker-compose/pkg/DESCR --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/pkg/DESCR 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,5 @@ +Docker Compose is a tool for running multi-container applications on +Docker defined using the Compose file format. A Compose file is used to +define how one or more containers that make up your application are +configured. Once you have a Compose file, you can create and start your +application with a single command: docker compose up. Index: docker-compose/pkg/PLIST =================================================================== RCS file: docker-compose/pkg/PLIST diff -N docker-compose/pkg/PLIST --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docker-compose/pkg/PLIST 8 Feb 2024 14:21:45 -0000 @@ -0,0 +1,2 @@ +@bin bin/docker-compose +@bin libexec/docker/cli-plugins/docker-compose