From 5161fc24ec425a8e3c28158a431383e48353d143 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 10 Jul 2026 15:51:57 +0900 Subject: [PATCH] internal/rosa/package/go: 1.26.4 to 1.26.5 Signed-off-by: Ophestra --- internal/rosa/package/go/746640.patch | 29 ++++ internal/rosa/package/go/799064.patch | 135 ++++++++++++++++++ .../rosa/package/{go.az => go/package.az} | 14 +- 3 files changed, 173 insertions(+), 5 deletions(-) create mode 100644 internal/rosa/package/go/746640.patch create mode 100644 internal/rosa/package/go/799064.patch rename internal/rosa/package/{go.az => go/package.az} (81%) diff --git a/internal/rosa/package/go/746640.patch b/internal/rosa/package/go/746640.patch new file mode 100644 index 00000000..be1e732d --- /dev/null +++ b/internal/rosa/package/go/746640.patch @@ -0,0 +1,29 @@ +From 45929774c3d5c084cc478afba63c77cf67a68bd7 Mon Sep 17 00:00:00 2001 +From: khr@golang.org +Date: Wed, 18 Feb 2026 09:09:57 -0800 +Subject: [PATCH] internal/runtime/gc/scan: require popcnt for x86 + +The GOAMD64=v1 test disables popcnt instructions, which is a feature +this package's amd64 assembly uses. + +Fixes #77674 + +Change-Id: I7be9bb665838f5da50275f96ef3df398412bb44a +Reviewed-on: https://go-review.googlesource.com/c/go/+/746640 +LUCI-TryBot-Result: Go LUCI +Reviewed-by: Michael Knyszek +Reviewed-by: Keith Randall +Auto-Submit: Keith Randall +--- + +diff --git a/src/internal/runtime/gc/scan/scan_amd64.go b/src/internal/runtime/gc/scan/scan_amd64.go +index c03021c7d4..544b237770 100644 +--- a/src/internal/runtime/gc/scan/scan_amd64.go ++++ b/src/internal/runtime/gc/scan/scan_amd64.go +@@ -39,4 +39,5 @@ var avx512ScanPackedReqsMet = cpu.X86.HasAVX512VL && + cpu.X86.HasGFNI && + cpu.X86.HasAVX512BITALG && + cpu.X86.HasAVX512DQ && // for kmovb, see #79871 +- cpu.X86.HasAVX512VBMI ++ cpu.X86.HasAVX512VBMI && ++ cpu.X86.HasPOPCNT diff --git a/internal/rosa/package/go/799064.patch b/internal/rosa/package/go/799064.patch new file mode 100644 index 00000000..cc1cc16f --- /dev/null +++ b/internal/rosa/package/go/799064.patch @@ -0,0 +1,135 @@ +From 06f90ebfa6f3e0a744584513e2786988b26569da Mon Sep 17 00:00:00 2001 +From: Damien Neil +Date: Wed, 08 Jul 2026 11:11:48 -0700 +Subject: [PATCH] os: properly handle trailing / in Root.MkdirAll + +MkdirAll("dir/") should create "dir", not return an error. + +Fixes #80308 + +Change-Id: I75458c30b6cb94be3a3d368f6024caef6a6a6964 +--- + +diff --git a/src/os/root_noopenat.go b/src/os/root_noopenat.go +index 228b580..a84e952 100644 +--- a/src/os/root_noopenat.go ++++ b/src/os/root_noopenat.go +@@ -158,6 +158,9 @@ + if err := checkPathEscapes(r, name); err == errPathEscapes { + return &PathError{Op: "mkdirat", Path: name, Err: err} + } ++ if name == "" { ++ return &PathError{Op: "mkdirat", Path: name, Err: syscall.ENOENT} ++ } + prefix := r.root.name + string(PathSeparator) + if err := MkdirAll(prefix+name, perm); err != nil { + if pe, ok := err.(*PathError); ok { +diff --git a/src/os/root_openat.go b/src/os/root_openat.go +index d7c9334..92865e4 100644 +--- a/src/os/root_openat.go ++++ b/src/os/root_openat.go +@@ -167,6 +167,12 @@ + fi, e := r.Stat(fullname) + if e == nil && fi.Mode().IsDir() { + err = nil ++ } else if e == nil { ++ err = syscall.ENOTDIR ++ } else if !IsNotExist(e) { ++ // EPERM, ELOOP, etc., ++ // probably more useful than EEXIST. ++ err = e + } + } + } +@@ -177,7 +183,12 @@ + } + return struct{}{}, &PathError{Op: "mkdirat", Err: err} + } +- _, err := doInRoot(r, fullname, 0, openDirFunc, openLastComponentFunc) ++ flags := uint(doInRootCreatingDirectory) ++ switch runtime.GOOS { ++ case "linux", "windows": ++ flags = doInRootNoHandleTerminalSlash // see rootMkdir ++ } ++ _, err := doInRoot(r, fullname, flags, openDirFunc, openLastComponentFunc) + if err != nil { + if _, ok := err.(*PathError); !ok { + err = &PathError{Op: "mkdirat", Path: fullname, Err: err} +diff --git a/src/os/root_test.go b/src/os/root_test.go +index 5e0acf9..33a2f33 100644 +--- a/src/os/root_test.go ++++ b/src/os/root_test.go +@@ -585,6 +585,11 @@ + + func TestRootMkdirAll(t *testing.T) { + for _, test := range rootTestCases { ++ if test.name == "directory does not exist" { ++ // Test expects error, mkdirall creates the missing directory. ++ // TestRootMultiMkdirAll covers this case better anyway, just skip. ++ continue ++ } + test.run(t, func(t *testing.T, target string, root *os.Root) { + wantError := test.wantError + if test.ltarget != "" { +@@ -593,7 +598,7 @@ + wantError = true + } + +- err := root.Mkdir(test.open, 0o777) ++ err := root.MkdirAll(test.open, 0o777) + if errEndsTest(t, err, wantError, "root.MkdirAll(%q)", test.open) { + return + } +@@ -3133,6 +3138,52 @@ + }) + } + ++func TestRootMultiMkdirAllShallow(t *testing.T) { ++ runRootMultiTest(t, func(t *testing.T, test *rootMultiTest) (string, error) { ++ return testRootMultiMkdirAll(t, test, test.targetPath) ++ }) ++} ++ ++func TestRootMultiMkdirAllDeep(t *testing.T) { ++ runRootMultiTest(t, func(t *testing.T, test *rootMultiTest) (string, error) { ++ targetPath := test.targetPath ++ if len(targetPath) > 0 && os.IsPathSeparator(targetPath[len(targetPath)-1]) { ++ targetPath += "a/b/" ++ } else { ++ targetPath += "/a/b" ++ } ++ return testRootMultiMkdirAll(t, test, targetPath) ++ }) ++} ++ ++func testRootMultiMkdirAll(t *testing.T, test *rootMultiTest, targetPath string) (string, error) { ++ var mkdirAll = os.MkdirAll ++ if test.root != nil { ++ mkdirAll = test.root.MkdirAll ++ } ++ ++ test.setOp("MkdirAll(%q, 0o777)", targetPath) ++ gotErr := mkdirAll(targetPath, 0o777) ++ ++ switch { ++ case test.root != nil && test.target.lescapes(): ++ // "mkdir ../target", or equivalent escaping path. ++ test.wantError(t, gotErr, os.ErrPathEscapes) ++ case test.root != nil && test.target.escapes(): ++ // "mkdir ../target", or equivalent escaping path. ++ test.wantError(t, gotErr, errAny) ++ return "", errSkipRootConsistencyCheck ++ case test.root != nil && test.target.kind == testFileSymlink && test.target.target.kind == testFileAbsent && targetPath != test.targetPath: ++ // A minor inconsistency between Root.MkdirAll and os.MkdirAll: ++ // When an intermediate component of the tree being constructed is a ++ // dangling symlink, Root.MkdirAll will follow the symlink and create ++ // its target directory, while os.MkdirAll will fail with an error. ++ return "", errSkipRootConsistencyCheck ++ default: ++ } ++ return "", gotErr ++} ++ + func TestRootMultiRename(t *testing.T) { + if runtime.GOOS == "wasip1" { + switch os.Getenv("GOWASIRUNTIME") { diff --git a/internal/rosa/package/go.az b/internal/rosa/package/go/package.az similarity index 81% rename from internal/rosa/package/go.az rename to internal/rosa/package/go/package.az index 63ff6832..d2ab4f9d 100644 --- a/internal/rosa/package/go.az +++ b/internal/rosa/package/go/package.az @@ -3,13 +3,20 @@ package go { website = "https://go.dev"; anitya = 1227; - version# = "1.26.4"; + version# = "1.26.5"; source = remoteTar { url = "https://go.dev/dl/go"+version+".src.tar.gz"; - checksum = "fpqJlxa41wKRtbnviYNLk9VxgcL-5oIEDxsriF8svU6kNwQW70oRRA9gTz_ImVoB"; + checksum = "13yt1u_NGOd62LO-WZ8W6CUXodOrEF5CdkiTTiH9E635IHn1luvlXYjsHpBXNFSw"; compress = gzip; }; + patches = [ + // https://go.dev/issue/77674 + "746640.patch", + // https://go.dev/issue/80308 + "799064.patch", + ]; + env = [ "CC=cc", "GOCACHE=/tmp/gocache", @@ -30,9 +37,6 @@ chmod -R +w .. sed -i \ 's,/lib/ld-musl-`+linuxArch+`.so.1,/system/bin/linker,' \ cmd/link/internal/`+arch+`/obj.go -sed -i \ - 's/cpu.X86.HasAVX512VBMI/& \&\& cpu.X86.HasPOPCNT/' \ - internal/runtime/gc/scan/scan_amd64.go rm \ os/root_unix_test.go \