From b6230c092f64dfc7926a27cba34bec98fe18bd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= Date: Fri, 13 Dec 2024 19:18:59 +0100 Subject: [PATCH 1/6] go 1.24 --- Aliases/{go@1.23 => go@1.24} | 0 Formula/g/go.rb | 16 ++++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) rename Aliases/{go@1.23 => go@1.24} (100%) diff --git a/Aliases/go@1.23 b/Aliases/go@1.24 similarity index 100% rename from Aliases/go@1.23 rename to Aliases/go@1.24 diff --git a/Formula/g/go.rb b/Formula/g/go.rb index fbb5271fb40e1..f9dcab436f038 100644 --- a/Formula/g/go.rb +++ b/Formula/g/go.rb @@ -1,9 +1,9 @@ class Go < Formula desc "Open source programming language to build simple/reliable/efficient software" homepage "https://go.dev/" - url "https://go.dev/dl/go1.23.6.src.tar.gz" - mirror "https://fossies.org/linux/misc/go1.23.6.src.tar.gz" - sha256 "039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222" + url "https://go.dev/dl/go1.24.0.src.tar.gz" + mirror "https://fossies.org/linux/misc/go1.24.0.src.tar.gz" + sha256 "d14120614acb29d12bcab72bd689f257eb4be9e0b6f88a8fb7e41ac65f8556e5" license "BSD-3-Clause" head "https://go.googlesource.com/go.git", branch: "master" @@ -32,13 +32,13 @@ class Go < Formula # Don't update this unless this version cannot bootstrap the new version. resource "gobootstrap" do checksums = { - "darwin-arm64" => "6da3f76164b215053daf730a9b8f1d673dbbaa4c61031374a6744b75cb728641", - "darwin-amd64" => "754363489e2244e72cb49b4ec6ddfd6a2c60b0700f8c4876e11befb1913b11c5", - "linux-arm64" => "2096507509a98782850d1f0669786c09727053e9fe3c92b03c0d96f48700282b", - "linux-amd64" => "ff445e48af27f93f66bd949ae060d97991c83e11289009d311f25426258f9c44", + "darwin-arm64" => "416c35218edb9d20990b5d8fc87be655d8b39926f15524ea35c66ee70273050d", + "darwin-amd64" => "e7bbe07e96f0bd3df04225090fe1e7852ed33af37c43a23e16edbbb3b90a5b7c", + "linux-arm64" => "fd017e647ec28525e86ae8203236e0653242722a7436929b1f775744e26278e7", + "linux-amd64" => "4fa4f869b0f7fc6bb1eb2660e74657fbf04cdd290b5aef905585c86051b34d43", } - version "1.20.14" + version "1.22.12" on_arm do on_macos do From 931c73761a76112816083c17d0cfd3d6b95f5954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= Date: Thu, 9 Jan 2025 19:23:28 +0100 Subject: [PATCH 2/6] go@1.23 1.23.6 (new formula) --- Formula/g/go@1.23.rb | 86 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Formula/g/go@1.23.rb diff --git a/Formula/g/go@1.23.rb b/Formula/g/go@1.23.rb new file mode 100644 index 0000000000000..fcf2473a18c44 --- /dev/null +++ b/Formula/g/go@1.23.rb @@ -0,0 +1,86 @@ +class GoAT123 < Formula + desc "Open source programming language to build simple/reliable/efficient software" + homepage "https://go.dev/" + url "https://go.dev/dl/go1.23.6.src.tar.gz" + mirror "https://fossies.org/linux/misc/go1.23.6.src.tar.gz" + sha256 "039c5b04e65279daceee8a6f71e70bd05cf5b801782b6f77c6e19e2ed0511222" + license "BSD-3-Clause" + + livecheck do + url "https://go.dev/dl/?mode=json" + regex(/^go[._-]?v?(1\.23(?:\.\d+)*)[._-]src\.t.+$/i) + strategy :json do |json, regex| + json.map do |release| + next if release["stable"] != true + next if release["files"].none? { |file| file["filename"].match?(regex) } + + release["version"][/(\d+(?:\.\d+)+)/, 1] + end + end + end + + keg_only :versioned_formula + + depends_on "go" => :build + + def install + cd "src" do + ENV["GOROOT_FINAL"] = libexec + # Set portable defaults for CC/CXX to be used by cgo + with_env(CC: "cc", CXX: "c++") { system "./make.bash" } + end + + libexec.install Dir["*"] + bin.install_symlink Dir[libexec/"bin/go*"] + + system bin/"go", "install", "std", "cmd" + + # Remove useless files. + # Breaks patchelf because folder contains weird debug/test files + rm_r(libexec/"src/debug/elf/testdata") + # Binaries built for an incompatible architecture + rm_r(libexec/"src/runtime/pprof/testdata") + end + + test do + (testpath/"hello.go").write <<~GO + package main + + import "fmt" + + func main() { + fmt.Println("Hello World") + } + GO + + # Run go fmt check for no errors then run the program. + # This is a a bare minimum of go working as it uses fmt, build, and run. + system bin/"go", "fmt", "hello.go" + assert_equal "Hello World\n", shell_output("#{bin}/go run hello.go") + + with_env(GOOS: "freebsd", GOARCH: "amd64") do + system bin/"go", "build", "hello.go" + end + + (testpath/"hello_cgo.go").write <<~GO + package main + + /* + #include + #include + void hello() { printf("%s\\n", "Hello from cgo!"); fflush(stdout); } + */ + import "C" + + func main() { + C.hello() + } + GO + + # Try running a sample using cgo without CC or CXX set to ensure that the + # toolchain's default choice of compilers work + with_env(CC: nil, CXX: nil) do + assert_equal "Hello from cgo!\n", shell_output("#{bin}/go run hello_cgo.go") + end + end +end From b608fac48421199aaea21081e8ff453c583df642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= Date: Mon, 16 Dec 2024 19:32:27 +0100 Subject: [PATCH 3/6] govulncheck: revision bump (go 1.24) --- Formula/g/govulncheck.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/g/govulncheck.rb b/Formula/g/govulncheck.rb index e74a9eb6a8812..e0d9fcbb468ef 100644 --- a/Formula/g/govulncheck.rb +++ b/Formula/g/govulncheck.rb @@ -4,6 +4,7 @@ class Govulncheck < Formula url "https://github.com/golang/vuln/archive/refs/tags/v1.1.4.tar.gz" sha256 "da1a7f3224cf874325814dd198eaa42897143fc871226a04944583cb121a15c9" license "BSD-3-Clause" + revision 1 bottle do sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde" From e5746191c34fd9b83fc2c405e2bd370301215903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= <319826+stefanb@users.noreply.github.com> Date: Thu, 13 Feb 2025 04:01:40 +0000 Subject: [PATCH 4/6] go: update 1.24.0 bottle. --- Formula/g/go.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Formula/g/go.rb b/Formula/g/go.rb index f9dcab436f038..8ea19c7532ea9 100644 --- a/Formula/g/go.rb +++ b/Formula/g/go.rb @@ -21,12 +21,12 @@ class Go < Formula end bottle do - sha256 arm64_sequoia: "66a94e6e1f02bd1da32f2afd76ff4315ee975ec30d0eb8101dbfa42b5ebc7302" - sha256 arm64_sonoma: "66a94e6e1f02bd1da32f2afd76ff4315ee975ec30d0eb8101dbfa42b5ebc7302" - sha256 arm64_ventura: "66a94e6e1f02bd1da32f2afd76ff4315ee975ec30d0eb8101dbfa42b5ebc7302" - sha256 sonoma: "ad9ea614e83e59837464dbf47816048277b1a645e8e9dc725089cde1c7fcecc8" - sha256 ventura: "ad9ea614e83e59837464dbf47816048277b1a645e8e9dc725089cde1c7fcecc8" - sha256 x86_64_linux: "beffea5cede9e3cc1489383a1ae1c7cb535a20d7195895c71bbfaf67b58fbaaa" + sha256 arm64_sequoia: "2d1bd81e5d943da29b015e6a2f3eaa1077580fd35c7398486c247bc87ff95434" + sha256 arm64_sonoma: "2d1bd81e5d943da29b015e6a2f3eaa1077580fd35c7398486c247bc87ff95434" + sha256 arm64_ventura: "2d1bd81e5d943da29b015e6a2f3eaa1077580fd35c7398486c247bc87ff95434" + sha256 sonoma: "ffc7437814387a60cef12cd31a6b2a14ea16d639f9dc63fccbb488ef9b071be5" + sha256 ventura: "ffc7437814387a60cef12cd31a6b2a14ea16d639f9dc63fccbb488ef9b071be5" + sha256 x86_64_linux: "a0496363bcd151513e4f7a303e83144a6c8353ab5bae79f7a1744c0b25b7d898" end # Don't update this unless this version cannot bootstrap the new version. From 6e7904d8582f2508370e86dcb37cbbc3496eb088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= <319826+stefanb@users.noreply.github.com> Date: Thu, 13 Feb 2025 04:01:40 +0000 Subject: [PATCH 5/6] go@1.23: add 1.23.6 bottle. --- Formula/g/go@1.23.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/g/go@1.23.rb b/Formula/g/go@1.23.rb index fcf2473a18c44..04600461b5058 100644 --- a/Formula/g/go@1.23.rb +++ b/Formula/g/go@1.23.rb @@ -19,6 +19,15 @@ class GoAT123 < Formula end end + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "cf4db4579df6a906f27611a27613a8d6583292a50534470d101e276e5c4ee31b" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "cf4db4579df6a906f27611a27613a8d6583292a50534470d101e276e5c4ee31b" + sha256 cellar: :any_skip_relocation, arm64_ventura: "cf4db4579df6a906f27611a27613a8d6583292a50534470d101e276e5c4ee31b" + sha256 cellar: :any_skip_relocation, sonoma: "4654e00aa7967d9c8cf325253d1f82896f2a6ea40de389879cdfffa235e374af" + sha256 cellar: :any_skip_relocation, ventura: "4654e00aa7967d9c8cf325253d1f82896f2a6ea40de389879cdfffa235e374af" + sha256 cellar: :any_skip_relocation, x86_64_linux: "00ba9579754a0e0a4e6a6840dff51ad36c78cd8e4a3e820631083f09d32cc12b" + end + keg_only :versioned_formula depends_on "go" => :build From bcef014b31920db0732468347cb5336566b7c16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0tefan=20Baebler?= <319826+stefanb@users.noreply.github.com> Date: Thu, 13 Feb 2025 04:01:40 +0000 Subject: [PATCH 6/6] govulncheck: update 1.1.4_1 bottle. --- Formula/g/govulncheck.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Formula/g/govulncheck.rb b/Formula/g/govulncheck.rb index e0d9fcbb468ef..097af7db22ce4 100644 --- a/Formula/g/govulncheck.rb +++ b/Formula/g/govulncheck.rb @@ -7,12 +7,12 @@ class Govulncheck < Formula revision 1 bottle do - sha256 cellar: :any_skip_relocation, arm64_sequoia: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde" - sha256 cellar: :any_skip_relocation, arm64_sonoma: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde" - sha256 cellar: :any_skip_relocation, arm64_ventura: "e0c40fec06a95ecdd66dd1fe57b32c2bba8eff75b47d93450185495307313dde" - sha256 cellar: :any_skip_relocation, sonoma: "5c0b6b71f712a526b08d5454b56ed3df896e585a98fc564f6380c25501729bb4" - sha256 cellar: :any_skip_relocation, ventura: "5c0b6b71f712a526b08d5454b56ed3df896e585a98fc564f6380c25501729bb4" - sha256 cellar: :any_skip_relocation, x86_64_linux: "6b81782bbd9ea51aa7469409a35d6b9641f52f2ba492bdde3caa760673d1ecbd" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "ab516a4d8e06b264e4056cc7b2559a6283d3b22837bd1f6fb0aa793ab26f86c6" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "ab516a4d8e06b264e4056cc7b2559a6283d3b22837bd1f6fb0aa793ab26f86c6" + sha256 cellar: :any_skip_relocation, arm64_ventura: "ab516a4d8e06b264e4056cc7b2559a6283d3b22837bd1f6fb0aa793ab26f86c6" + sha256 cellar: :any_skip_relocation, sonoma: "543b6dac71b6b63135bd0ceefb1486ab3fdc7c105963403f933352acc08fb885" + sha256 cellar: :any_skip_relocation, ventura: "543b6dac71b6b63135bd0ceefb1486ab3fdc7c105963403f933352acc08fb885" + sha256 cellar: :any_skip_relocation, x86_64_linux: "d8a7b7d79a6746784346ee9aaf519587f724a363cea87200c4c0b10ad04d316c" end depends_on "go" => [:build, :test]