Public bug reported:

## [Impact]

Noble 24.04 and Jammy 22.04 currently provide golang toolchains only up
to and including `golang-1.24` (version `1.24.4`). Unfortunately as
`1.26` isn't available yet we're blocked on building/maintaining pkgs
that require a `go >= 1.26` toolchain

Two new source pkgs will be required (as golang can only be built by a previous 
golang release):
* `golang-1.25` (1.25.7-2): for bootstraping
* `golang-1.26` (1.26.0-1): the actual pkg we want in noble and jammy

### [Why is 1.25 needed as well?]

`golang-1.26` upstream hardcodes a minimum bootstrap toolchain:

```
src/cmd/dist/buildtool.go: const minBootstrap = "go1.24.6"
```

Fortunately though, `golang-1.25` version `1.25.7-2` build-depends on
`golang-1.24-go:native` and only requires `minBootstrap = go1.22.6`, so
it builds directly against the `1.24.4` version of `golang-1.24` already
published in jammy and noble

## [Proposed versions]

Both packages can be backported with no new Ubuntu delta as the source
is identical to what is already published in resolute (just needs a d/ch
entry)

## [Test Plan]

* Enable `-proposed` on a jammy and noble system
* Install the new toolchain version with `sudo apt install golang-1.26`
* Chech that the compiler reports the expected version with 
`/usr/lib/go-1.26/bin/go version` (should return `go version go1.26.0 
linux/amd64` for amd64)
* Build and run an easy script that pulls in the standard library:
```
mkdir /tmp/gotest
cd /tmp/gotest
printf 'module hello\n\ngo 1.26\n' > go.mod
cat > main.go <<'EOF'
package main
import ("fmt"; "net/http"; "runtime")
func main() { _ = http.DefaultClient; fmt.Println(runtime.Version()) }
EOF
/usr/lib/go-1.26/bin/go build -o hello .
./hello
```

* Check that cross-compilation still works:
```
GOOS=linux GOARCH=arm64 /usr/lib/go-1.26/bin/go build -o hello-arm64 .
file hello-arm64
```
* Verify that the suite's default golang didn't also change (i.e. `go version` 
should still report the orginal `golang-defaults` version for the release)

## [Where problems could occur]

Golang toolchains tend to be big and slow to build, so the practical
risk is build failures on slower or rarer architectures rather than any
runtime regressions. These will be new source pkgs for jammy and noble
(i.e. nothing in either release build-depends on `golang-1.25` or
`golang-1.26` today, so there aren't any reverse dependencies to
accidentally regress). The risk is contained to users who explicitly
install `golang-1.26`. We're also not touching `golang-defaults` so any
pkgs that use the default golang won't be changed.

## [Extra info]

As neither `golang-1.25` or `golang-1.26` currently exist in jammy or
noble, these uploads will land in the NEW queue (and I think require an
AA review as well as the usual SRU team review?)

** Affects: golang-1.26 (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: golang-1.26 (Ubuntu Jammy)
     Importance: Undecided
         Status: New

** Affects: golang-1.26 (Ubuntu Noble)
     Importance: Undecided
         Status: New

** Also affects: golang-1.26 (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: golang-1.26 (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Description changed:

  ## [Impact]
  
  Noble 24.04 and Jammy 22.04 currently provide golang toolchains only up
  to and including `golang-1.24` (version `1.24.4`). Unfortunately as
  `1.26` isn't available yet we're blocked on building/maintaining pkgs
  that require a `go >= 1.26` toolchain
  
  Two new source pkgs will be required (as golang can only be built by a 
previous golang release):
  * `golang-1.25` (1.25.7-2): for bootstraping
  * `golang-1.26` (1.26.0-1): the actual pkg we want in noble and jammy
  
  ### [Why is 1.25 needed as well?]
  
  `golang-1.26` upstream hardcodes a minimum bootstrap toolchain:
  
  ```
  src/cmd/dist/buildtool.go: const minBootstrap = "go1.24.6"
  ```
  
  Fortunately though, `golang-1.25` version `1.25.7-2` build-depends on
  `golang-1.24-go:native` and only requires `minBootstrap = go1.22.6`, so
  it builds directly against the `1.24.4` version of `golang-1.24` already
  published in jammy and noble
  
- 
  ## [Proposed versions]
  
  Both packages can be backported with no new Ubuntu delta as the source
  is identical to what is already published in resolute (just needs a d/ch
  entry)
- 
  
  ## [Test Plan]
  
  * Enable `-proposed` on a jammy and noble system
  * Install the new toolchain version with `sudo apt install golang-1.26`
  * Chech that the compiler reports the expected version with 
`/usr/lib/go-1.26/bin/go version` (should return `go version go1.26.0 
linux/amd64` for amd64)
  * Build and run an easy script that pulls in the standard library:
  ```
  mkdir /tmp/gotest
  cd /tmp/gotest
  printf 'module hello\n\ngo 1.26\n' > go.mod
  cat > main.go <<'EOF'
  package main
  import ("fmt"; "net/http"; "runtime")
  func main() { _ = http.DefaultClient; fmt.Println(runtime.Version()) }
  EOF
  /usr/lib/go-1.26/bin/go build -o hello .
  ./hello
  ```
  
  * Check that cross-compilation still works:
  ```
  GOOS=linux GOARCH=arm64 /usr/lib/go-1.26/bin/go build -o hello-arm64 .
  file hello-arm64
  ```
  * Verify that the suite's default golang didn't also change (i.e. `go 
version` should still report the orginal `golang-defaults` version for the 
release)
  
- 
  ## [Where problems could occur]
  
  Golang toolchains tend to be big and slow to build, so the practical
  risk is build failures on slower or rarer architectures rather than any
  runtime regressions. These will be new source pkgs for jammy and noble
  (i.e. nothing in either release build-depends on `golang-1.25` or
  `golang-1.26` today, so there aren't any reverse dependencies to
  accidentally regress). The risk is contained to users who explicitly
  install `golang-1.26`. We're also not touching `golang-defaults` so any
  pkgs that use the default golang won't be changed.
+ 
+ ## [Extra info]
+ 
+ As neither `golang-1.25` or `golang-1.26` currently exist in jammy or
+ noble, these uploads will land in the NEW queue (and I think require an
+ AA review as well as the usual SRU team review?)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2166409

Title:
  [SRU] Please backport golang-1.25 and 1.26 to noble and jammy

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/golang-1.26/+bug/2166409/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to