Backport 1.18.1 to 18.04, 20.04 and 22.04 LTS

Bug #1977860 reported by Didier Roche-Tolomelli
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
golang-1.18 (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Lucas Kanashiro
Focal
Fix Released
Undecided
Lucas Kanashiro
Jammy
Incomplete
Undecided
Unassigned

Bug Description

[Rationale for update in 22.04]
As requested by sil2100, we don’t want upgrade from 20.04 LTS downgrading the Golang 1.18 version. Hence updating this package too to 1.18.3 which includes multile security fixes compared to 1.18.1:

- go1.18.2 (released 2022-05-10) includes security fixes to the syscall package, as well as bug fixes to the compiler, runtime, the go command, and the crypto/x509, go/types, net/http/httptest, reflect, and sync/atomic packages. See the Go 1.18.2 milestone on our issue tracker for details.

- go1.18.3 (released 2022-06-01) includes security fixes to the crypto/rand, crypto/tls, os/exec, and path/filepath packages, as well as bug fixes to the compiler, and the crypto/tls and text/template/parse packages. See the Go 1.18.3 milestone on our issue tracker for details.

[Rationale for new package in 20.04]

As part of our entreprise desktop offering, we need to backport a recent version of ADSys to 20.04 LTS.
This version depends on a recent Go version for embedding and more (golang 1.18), thus we need to backport Go 1.18 as a new separate binary package, as it’s already the case for current adsys and the backport of 1.16.

The latest docker.io version in Lunar requires Golang 1.18 to be backported to Focal.

[Rationale for new package in 18.04]

The latest docker.io version in Lunar requires Golang 1.18 to be backported to Bionic.

[Test Plan]

A smoke test, like this:

$ apt install golang-1.16-go
$ PATH=/usr/lib/go-1.16/bin:$PATH
$ go version
< check it's 1.16 >
$ cat > trivial.go
package main
func main() {}
$ go run trivial.go
$ cat > trivialcgo.go
package main
import "C"
func main() {}
$ go run trivialcgo.go

Then we should verify if docker.io/20.10.21-0ubuntu1 from Lunar builds in Focal/Bionic with the golang-1.18 from -proposed. In order to do that, edit d/control to b-d on golang-1.18-go instead of golang-go, and also add the path containing the new binaries to the $PATH in d/rules (export PATH := $(PATH):/usr/lib/go-1.16/bin/). Uploaded it to a PPA with -proposed enabled and check if it builds on all architectures.

[Where problems could occur]
 * Package depending on this Go version would not be able to compile.
 * As this is a separate, versionned, new package, no impact on existing ones.
 * FYI, we already built ADSys against this Go version in our ppa: https://launchpad.net/~didrocks/+archive/ubuntu/ppa

It's a new package so should not impact any existing behavior. I'm not at all proposing to update the default version of Go in a stable release. FWIW golang-1.18 is already co-installable with other golang versions in other releases.

Changed in golang-1.18 (Ubuntu):
status: New → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Didier, or anyone else affected,

Accepted golang-1.18 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/golang-1.18/1.18.3-1ubuntu1~20.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in golang-1.18 (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Re: Backport to 20.04 LTS

Okay, this is fine, accepted into focal-proposed. That being said, we need to make sure that the backported version (1.18.3) is also available in jammy, as jammy is stuck with an older version right now - 1.18.1. So I'm putting a block-proposed tag on this one until someone uploads (with proper SRU test plan) the .3 version of golang-1.18 to jammy-proposed.

tags: added: block-proposed-focal
summary: - Backport to 20.04 LTS
+ Backport 1.18.3 to 20.04 and 22.04 LTS
description: updated
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote : Re: Backport 1.18.3 to 20.04 and 22.04 LTS

Here we go, golang-1.18 1.18.3-1ubuntu1~22.04 uploaded to jammy.

Revision history for this message
Steve Langasek (vorlon) wrote :

I'm concerned that the test plan here is inadequate. In jammy, golang-1.18 is the default golang implementation (depended on by golang-go). There appear to be over 2000 packages in jammy which build-depend on golang-defaults. Could we get a test rebuild of the reverse dependencies to check for regressions?

Changed in golang-1.18 (Ubuntu Jammy):
status: New → Incomplete
Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote (last edit ):

Can't find a document on how golang maintain the stable branch yet. (Like if they keep API stable)

Besides, per https://go.dev/doc/devel/release#go1.18.5, those 1.8.x contains several security fixes that seem better to upgrade.

Not sure if there is a reference for a good plan previously we did on other languages like python or something else, and how to contribute one?

If I do a local build and upload the build result, is that a good enough one?

Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

Quick check the deb snapd that use golang, it does not build-dep existing golang library, but just build-dep on golang-go (>= 1.7). All library it uses goes to vendor directory. Need to check more.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@Steve: this doesn’t change golang-defaults though, does it?

This is similar to the same process that happened in the past when snapd or any other tool needed a new golang version: add a new source package, don’t change the default for existing source that will still rebuild with the exact same version.

So, basically, no impact on the 2000 packages in jammy which build-depend on golang-defaults. Only new packages, that explicitely build-dep on golang-1.18 will use it.

Do you mind considering a rereview?

@Yuan-Chen: this brings the version in line with the one we have in jammy, for the ubuntu upgrade policy being respected.

Changed in golang-1.18 (Ubuntu Jammy):
status: Incomplete → Fix Committed
status: Fix Committed → New
Revision history for this message
Steve Langasek (vorlon) wrote :

No, this doesn't change golang-defaults, but golang-defaults in jammy *points to* golang-1.18. So this impacts the behavior of the default go compiler in jammy.

Changed in golang-1.18 (Ubuntu Jammy):
status: New → Incomplete
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@Steve: Sorry, I read focal. You are indeed correct about Jammy and I will withdraw my upload as I think this task is more a fondation team one.

I'm surprised that security fix release are not followed/updated: https://go.dev/doc/devel/release#go1.18.minor

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

I see we still have an issue with the version between focal and jammy:

 golang-1.18 | 1.18.1-1ubuntu1 | jammy | source, all
 golang-1.18 | 1.18.3-1ubuntu1~20.04 | focal-proposed/universe | source, all

Can we remove golang-1.18 from focal-proposed, backport the version in Jammy and release any security fix needed via the security pocket? I am asking this because I am also in need of golang-1.18 in Focal to be able to backport docker.io.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks for bringing this up, that will indeed not work out as-is.
Discussed with the SRU team (as this is their territory) and agreed that it should be removed (as also acknowledged by Didier in comment #9) from focal-proposed for a new upload to be provided by Lucas (thanks for volunteering).

Also good on a second check, all golang 1.18 are only in focal-proposed nothing reached focal-updates yet.
 golang-1.18-src | 1.18.3-1ubuntu1~20.04 | focal-proposed/universe | all
 golang-1.18-go | 1.18.3-1ubuntu1~20.04 | focal-proposed/universe | amd64, arm64, armhf, ppc64el, riscv64, s390x
 golang-1.18-doc | 1.18.3-1ubuntu1~20.04 | focal-proposed/universe | all
 golang-1.18 | 1.18.3-1ubuntu1~20.04 | focal-proposed/universe | source, all

Therefore it was now removed.

Removing packages from focal-proposed:
 golang-1.18 1.18.3-1ubuntu1~20.04 in focal
  golang-1.18 1.18.3-1ubuntu1~20.04 in focal amd64
  golang-1.18 1.18.3-1ubuntu1~20.04 in focal arm64
  golang-1.18 1.18.3-1ubuntu1~20.04 in focal armhf
  golang-1.18 1.18.3-1ubuntu1~20.04 in focal i386
  golang-1.18 1.18.3-1ubuntu1~20.04 in focal ppc64el
  golang-1.18 1.18.3-1ubuntu1~20.04 in focal riscv64
  golang-1.18 1.18.3-1ubuntu1~20.04 in focal s390x
  golang-1.18-doc 1.18.3-1ubuntu1~20.04 in focal amd64
  golang-1.18-doc 1.18.3-1ubuntu1~20.04 in focal arm64
  golang-1.18-doc 1.18.3-1ubuntu1~20.04 in focal armhf
  golang-1.18-doc 1.18.3-1ubuntu1~20.04 in focal i386
  golang-1.18-doc 1.18.3-1ubuntu1~20.04 in focal ppc64el
  golang-1.18-doc 1.18.3-1ubuntu1~20.04 in focal riscv64
  golang-1.18-doc 1.18.3-1ubuntu1~20.04 in focal s390x
  golang-1.18-go 1.18.3-1ubuntu1~20.04 in focal amd64
  golang-1.18-go 1.18.3-1ubuntu1~20.04 in focal arm64
  golang-1.18-go 1.18.3-1ubuntu1~20.04 in focal armhf
  golang-1.18-go 1.18.3-1ubuntu1~20.04 in focal ppc64el
  golang-1.18-go 1.18.3-1ubuntu1~20.04 in focal riscv64
  golang-1.18-go 1.18.3-1ubuntu1~20.04 in focal s390x
  golang-1.18-src 1.18.3-1ubuntu1~20.04 in focal amd64
  golang-1.18-src 1.18.3-1ubuntu1~20.04 in focal arm64
  golang-1.18-src 1.18.3-1ubuntu1~20.04 in focal armhf
  golang-1.18-src 1.18.3-1ubuntu1~20.04 in focal i386
  golang-1.18-src 1.18.3-1ubuntu1~20.04 in focal ppc64el
  golang-1.18-src 1.18.3-1ubuntu1~20.04 in focal riscv64
  golang-1.18-src 1.18.3-1ubuntu1~20.04 in focal s390x

@Lucas - assigning you now to prep a valid backport of the one in jammy

Changed in golang-1.18 (Ubuntu Focal):
assignee: nobody → Lucas Kanashiro (lucaskanashiro)
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Adding a task to also backport Golang 1.18 to Bionic.

summary: - Backport 1.18.3 to 20.04 and 22.04 LTS
+ Backport 1.18.1 to 18.04, 20.04 and 22.04 LTS
Changed in golang-1.18 (Ubuntu Bionic):
assignee: nobody → Lucas Kanashiro (lucaskanashiro)
description: updated
Changed in golang-1.18 (Ubuntu Bionic):
status: New → In Progress
Changed in golang-1.18 (Ubuntu Focal):
status: Fix Committed → In Progress
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

I uploaded golang-1.18 to Focal and Bionic, both are in the NEW queue now. FWIW both built fine on all supported architectures in my PPA:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/container-backports

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Didier, or anyone else affected,

Accepted golang-1.18 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/golang-1.18/1.18.1-1ubuntu1~20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in golang-1.18 (Ubuntu Focal):
status: In Progress → Fix Committed
Changed in golang-1.18 (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Didier, or anyone else affected,

Accepted golang-1.18 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/golang-1.18/1.18.1-1ubuntu1~18.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

## Focal verification

root@golang-118-focal:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
# Enable focal-proposed
root@golang-118-focal:~# apt install golang-1.18-go -y
[...]
root@golang-118-focal:~# export PATH=/usr/lib/go-1.18/bin:$PATH
root@golang-118-focal:~# go version
go version go1.18.1 linux/amd64
root@golang-118-focal:~# cat <<EOF >trivial.go
> package main
> func main() {}
> EOF
root@golang-118-focal:~# go run trivial.go
root@golang-118-focal:~# echo $?
0
root@golang-118-focal:~# cat <<EOF >trivialcgo.go
> package main
> import "C"
> func main() {}
> EOF
root@golang-118-focal:~# go run trivialcgo.go
root@golang-118-focal:~# echo $?
0

docker.io from Lunar built fine in this PPA with -proposed enabled:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/golang-1.18-verification

tags: added: verification-done-focal
removed: block-proposed-focal verification-needed-focal
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

golang-1.18 version 1.18.1-1ubuntu1~18.04.1 accepted into bionic-proposed is incorrect. The installation process went wrong during the build because of the downgrade of the debhelper compat level. Therefore, the verification following the test plan did not work as expected.

I uploaded version 1.18.1-1ubuntu1~18.04.2 fixing that issue, it is waiting for the SRU team approval.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Didier, or anyone else affected,

Accepted golang-1.18 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/golang-1.18/1.18.1-1ubuntu1~18.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote (last edit ):

Sorry but I found another issue with golang-1.18/1.18.1-ubuntu1~18.04.2. It has a Breaks: dh-golang (<< 1.43~) in d/control which does not allow building any package in bionic depending on dh-golang since we have version 1.34.2 , which is the case of docker.io (part of the test plan).

As we did with golang-1.16 when backporting it to Bionic, we can simply remove this Breaks statement [1] and let users know that they might need to do some tweaks by themselves to make it build with Go 1.18, that there is no dh-golang to do all the magic for you.

I'll be preparing a new upload doing what was mentioned above.

[1] Check golang-1.16/1.16.2-0ubuntu1~18.04.1 and LP #1967425.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello Didier, or anyone else affected,

Accepted golang-1.18 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/golang-1.18/1.18.1-1ubuntu1~18.04.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I feel like we should give up on the jammy task for this bug. If there is still a need for 1.18.3 (or higher) in jammy, it should be a different bug, as the backport of 1.18.1 seems to be enough for now for the older releases which have a task here.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

## Bionic verification

root@golang-118-bionic:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
# Enable bionic-proposed
root@golang-118-bionic:~# apt install golang-1.18-go -y
[...]
root@golang-118-bionic:~# dpkg -l | grep golang
ii golang-1.18-go 1.18.1-1ubuntu1~18.04.3 amd64 Go programming language compiler, linker, compiled stdlib
ii golang-1.18-src 1.18.1-1ubuntu1~18.04.3 all Go programming language - source files
root@golang-118-bionic:~# export PATH=/usr/lib/go-1.18/bin:$PATH
root@golang-118-bionic:~# go version
go version go1.18.1 linux/amd64
root@golang-118-bionic:~# cat <<EOF >trivial.go
> package main
> func main() {}
> EOF
root@golang-118-bionic:~# go run trivial.go
root@golang-118-bionic:~# echo $?
0
root@golang-118-bionic:~# cat <<EOF >trivialcgo.go
> package main
> import "C"
> func main() {}
> EOF
root@golang-118-bionic:~# go run trivialcgo.go
root@golang-118-bionic:~# echo $?
0

docker.io from Lunar built fine in this PPA with -proposed enabled:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/golang-1.18-verification

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for golang-1.18 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

docker.io/20.10.21-0ubuntu1~18.04.1~ppa1 was uploaded to this PPA

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/golang-1.18-verification/+packages

and it is waiting to build on amd64 and i386 for a while. I'd like to state that I built it locally (amd64) and it built fine.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package golang-1.18 - 1.18.1-1ubuntu1~20.04.1

---------------
golang-1.18 (1.18.1-1ubuntu1~20.04.1) focal; urgency=medium

  * Backport to Focal (LP: #1977860).
    - Downgrade debhelper compat level to 12.

 -- Lucas Kanashiro <email address hidden> Tue, 22 Nov 2022 16:55:16 -0300

Changed in golang-1.18 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package golang-1.18 - 1.18.1-1ubuntu1~18.04.3

---------------
golang-1.18 (1.18.1-1ubuntu1~18.04.3) bionic; urgency=medium

  * d/control: remove Breaks: dh-golang (<< 1.43~).
    dh-golang/1.34.2 is available in Bionic. If you need any feature from
    newer dh-golang please try to implement it directly in the affected
    package. As reference take a look at LP #1967425.

golang-1.18 (1.18.1-1ubuntu1~18.04.2) bionic; urgency=medium

  * d/rules: stop using debhelper 12/13 execute_{after,before}_ overrides.

golang-1.18 (1.18.1-1ubuntu1~18.04.1) bionic; urgency=medium

  * Backport to Bionic (LP: #1977860).
    - Downgrade debhelper compat level to 11.

 -- Lucas Kanashiro <email address hidden> Thu, 08 Dec 2022 11:41:22 -0300

Changed in golang-1.18 (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.