Download raw body.
lang/go: add syscall.EBADMSG on all arch
+jsing
On Fri, May 24, 2024 at 06:49:00PM +0100, Kirill A. Korinsky wrote:
> This is reminder about this diff.
A few things:
- If a port has a MAINTAINER, Cc them as they may not be subscribed to
the ports list.
- If a diff isn't urgent because of security, please wait at least a
full week before pinging.
- If you ping, please include the diff again so people don't have to go
dig in their inboxes for it.
Here's the original mail:
Date: Mon, 20 May 2024 10:42:46 +0100
From: "Kirill A. Korinsky" <kirill@korins.ky>
To: OpenBSD ports <ports@openbsd.org>
Subject: lang/go: add syscall.EBADMSG on all arch
ports@,
Here I've added missed syscall.EBADMSG on 386, amd64 and arm which allows to
remove dozen of patches from docker-* ports.
diff --git lang/go/Makefile lang/go/Makefile
index 87e960b38a5..4afc7b49fc5 100644
--- lang/go/Makefile
+++ lang/go/Makefile
@@ -8,6 +8,7 @@ COMMENT = Go programming language
# increment _MODGO_SYSTEM_VERSION in go.port.mk after updating to a new
# version, to trigger updates of go-compiled ports
VERSION = 1.22.3
+REVISION = 0
DISTNAME = go${VERSION}.src
PKGNAME = go-${VERSION}
PKGSPEC = ${FULLPKGNAME:S/go-/go-=/}
diff --git lang/go/patches/patch-src_syscall_zerrors_openbsd_386_go lang/go/patches/patch-src_syscall_zerrors_openbsd_386_go
new file mode 100644
index 00000000000..58d7b282dc6
--- /dev/null
+++ lang/go/patches/patch-src_syscall_zerrors_openbsd_386_go
@@ -0,0 +1,11 @@
+Index: src/syscall/zerrors_openbsd_386.go
+--- src/syscall/zerrors_openbsd_386.go.orig
++++ src/syscall/zerrors_openbsd_386.go
+@@ -1330,6 +1330,7 @@ const (
+ EALREADY = Errno(0x25)
+ EAUTH = Errno(0x50)
+ EBADF = Errno(0x9)
++ EBADMSG = Errno(0x5c)
+ EBADRPC = Errno(0x48)
+ EBUSY = Errno(0x10)
+ ECANCELED = Errno(0x58)
diff --git lang/go/patches/patch-src_syscall_zerrors_openbsd_amd64_go lang/go/patches/patch-src_syscall_zerrors_openbsd_amd64_go
new file mode 100644
index 00000000000..3027cd91787
--- /dev/null
+++ lang/go/patches/patch-src_syscall_zerrors_openbsd_amd64_go
@@ -0,0 +1,11 @@
+Index: src/syscall/zerrors_openbsd_amd64.go
+--- src/syscall/zerrors_openbsd_amd64.go.orig
++++ src/syscall/zerrors_openbsd_amd64.go
+@@ -1329,6 +1329,7 @@ const (
+ EALREADY = Errno(0x25)
+ EAUTH = Errno(0x50)
+ EBADF = Errno(0x9)
++ EBADMSG = Errno(0x5c)
+ EBADRPC = Errno(0x48)
+ EBUSY = Errno(0x10)
+ ECANCELED = Errno(0x58)
diff --git lang/go/patches/patch-src_syscall_zerrors_openbsd_arm_go lang/go/patches/patch-src_syscall_zerrors_openbsd_arm_go
new file mode 100644
index 00000000000..f0ffcb34cbc
--- /dev/null
+++ lang/go/patches/patch-src_syscall_zerrors_openbsd_arm_go
@@ -0,0 +1,11 @@
+Index: src/syscall/zerrors_openbsd_arm.go
+--- src/syscall/zerrors_openbsd_arm.go.orig
++++ src/syscall/zerrors_openbsd_arm.go
+@@ -1329,6 +1329,7 @@ const (
+ EALREADY = Errno(0x25)
+ EAUTH = Errno(0x50)
+ EBADF = Errno(0x9)
++ EBADMSG = Errno(0x5c)
+ EBADRPC = Errno(0x48)
+ EBUSY = Errno(0x10)
+ ECANCELED = Errno(0x58)
diff --git sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go
deleted file mode 100644
index 8ee8cf660ad..00000000000
--- sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go
+++ /dev/null
@@ -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
-@@ -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
diff --git sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_filter_go sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_filter_go
deleted file mode 100644
index 03b8cdf9446..00000000000
--- sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_filter_go
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: vendor/github.com/tonistiigi/fsutil/filter.go
---- vendor/github.com/tonistiigi/fsutil/filter.go.orig
-+++ vendor/github.com/tonistiigi/fsutil/filter.go
-@@ -318,7 +318,7 @@ func (fs *filterFS) Walk(ctx context.Context, target s
- }
- 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"})
- }
-
- select {
-@@ -346,7 +346,7 @@ func (fs *filterFS) Walk(ctx context.Context, target s
- }
- parentStat, ok := parentFi.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"})
- }
-
- select {
diff --git sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_followlinks_go sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_followlinks_go
deleted file mode 100644
index e85c7f5e8eb..00000000000
--- sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_followlinks_go
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: vendor/github.com/tonistiigi/fsutil/followlinks.go
---- vendor/github.com/tonistiigi/fsutil/followlinks.go.orig
-+++ vendor/github.com/tonistiigi/fsutil/followlinks.go
-@@ -122,7 +122,7 @@ func (r *symlinkResolver) readSymlink(p string, allowW
- }
- stat, ok := fi.Sys().(*types.Stat)
- if !ok {
-- return nil, errors.WithStack(&os.PathError{Path: p, Err: syscall.EBADMSG, Op: "fileinfo without stat info"})
-+ return nil, errors.WithStack(&os.PathError{Path: p, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"})
- }
-
- link := filepath.Clean(stat.Linkname)
diff --git sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go
deleted file mode 100644
index d3b230d1e7b..00000000000
--- sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go
+++ /dev/null
@@ -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
-@@ -144,7 +144,7 @@ func (fs *subDirFS) Walk(ctx context.Context, target s
- }
- 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 != "" {
diff --git sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go
deleted file mode 100644
index 75a98417263..00000000000
--- sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go
+++ /dev/null
@@ -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 {
diff --git sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go
deleted file mode 100644
index f9950f1f938..00000000000
--- sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go
+++ /dev/null
@@ -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
-@@ -158,7 +158,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"})
- }
- stat.Path = filepath.ToSlash(stat.Path)
- p := &types.Packet{
diff --git sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go
deleted file mode 100644
index 233d5667289..00000000000
--- sysutils/docker-buildx/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go
+++ /dev/null
@@ -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
-@@ -26,7 +26,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 {
diff --git sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go
deleted file mode 100644
index 8ee8cf660ad..00000000000
--- sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_diskwriter_go
+++ /dev/null
@@ -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
-@@ -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
diff --git sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_filter_go sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_filter_go
deleted file mode 100644
index 03b8cdf9446..00000000000
--- sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_filter_go
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: vendor/github.com/tonistiigi/fsutil/filter.go
---- vendor/github.com/tonistiigi/fsutil/filter.go.orig
-+++ vendor/github.com/tonistiigi/fsutil/filter.go
-@@ -318,7 +318,7 @@ func (fs *filterFS) Walk(ctx context.Context, target s
- }
- 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"})
- }
-
- select {
-@@ -346,7 +346,7 @@ func (fs *filterFS) Walk(ctx context.Context, target s
- }
- parentStat, ok := parentFi.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"})
- }
-
- select {
diff --git sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_followlinks_go sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_followlinks_go
deleted file mode 100644
index e85c7f5e8eb..00000000000
--- sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_followlinks_go
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: vendor/github.com/tonistiigi/fsutil/followlinks.go
---- vendor/github.com/tonistiigi/fsutil/followlinks.go.orig
-+++ vendor/github.com/tonistiigi/fsutil/followlinks.go
-@@ -122,7 +122,7 @@ func (r *symlinkResolver) readSymlink(p string, allowW
- }
- stat, ok := fi.Sys().(*types.Stat)
- if !ok {
-- return nil, errors.WithStack(&os.PathError{Path: p, Err: syscall.EBADMSG, Op: "fileinfo without stat info"})
-+ return nil, errors.WithStack(&os.PathError{Path: p, Err: syscall.Errno(0x5c), Op: "fileinfo without stat info"})
- }
-
- link := filepath.Clean(stat.Linkname)
diff --git sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go
deleted file mode 100644
index d3b230d1e7b..00000000000
--- sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_fs_go
+++ /dev/null
@@ -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
-@@ -144,7 +144,7 @@ func (fs *subDirFS) Walk(ctx context.Context, target s
- }
- 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 != "" {
diff --git sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go
deleted file mode 100644
index 75a98417263..00000000000
--- sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_hardlinks_go
+++ /dev/null
@@ -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 {
diff --git sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go
deleted file mode 100644
index f9950f1f938..00000000000
--- sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_send_go
+++ /dev/null
@@ -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
-@@ -158,7 +158,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"})
- }
- stat.Path = filepath.ToSlash(stat.Path)
- p := &types.Packet{
diff --git sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go
deleted file mode 100644
index 233d5667289..00000000000
--- sysutils/docker-compose/patches/patch-vendor_github_com_tonistiigi_fsutil_tarwriter_go
+++ /dev/null
@@ -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
-@@ -26,7 +26,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 {
--
wbr, Kirill
lang/go: add syscall.EBADMSG on all arch