Backport golang 1.16 to Bionic

Bug #1967425 reported by Lucas Kanashiro
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
golang-1.16 (Ubuntu)
Invalid
Undecided
Unassigned
Bionic
Fix Released
Undecided
Matthieu Clemenceau

Bug Description

[Impact]

To enable packages that are backported wholesale to all releases of Ubuntu (i.e. runc and docker.io) to stop depending on what is now a fairly ancient version of Go (some of them require at least Go 1.16), we are going to upload 1.16 to bionic (this version is in focal already). This is an unusual "SRU" but the plan has been concocted with the approval of the Ubuntu security team (who I will ask to comment here to confirm their acceptance of the plan).

[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 that runc/1.1.0-0ubuntu1~20.04.1 from Focal (in unapproved queue at the moment) builds in Bionic with the golang-1.16 in proposed, take the runc package (https://github.com/tianon/debian-runc/tree/focal), add the following line to debian/rules:

+export GO111MODULE := off
+export GOCACHE := $(CURDIR)/.cache

Also add a new changelog entry with something like this:

$ dch -v 1.1.0-0ubuntu1~18.04.1 -D bionic -b "Backport to Bionic."

and upload that to a PPA that has bionic-proposed enabled and check it builds on all architectures.

[Where problems could occur]

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.16 is already co-installable with other golang versions in other releases.

Changed in golang-1.16 (Ubuntu):
status: New → Invalid
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote (last edit ):

golang-1.16-go from Focal has Breaks: dh-golang (<< 1.43~) which is unsatisfiable in Bionic, where we have dh-golang/1.34.2. This made runc version 1.1.0-0ubuntu1 FTBFS with golang 1.16.

According to the discussion on the commit message (https://salsa.debian.org/go-team/compiler/golang/-/commit/daea28cbf7eb6397e7), version 1.40 of dh-golang is actually needed. After checking the diff between version 1.34.2 and 1.40, I noticed that the main changes needed are:

* Set GO111MODULE to off
* Set GOCACHE directory

After applying those changes directly to runc, it built with golang 1.16 and dh-golang 1.34.2. This might help others trying to make some package build with golang 1.16 in bionic once it lands.

So the required changes to backport golang-1.16/1.16.2-0ubuntu1~20.04 from Focal to Bionic are:

* Downgrade debhelper compatibility level to 11. Compat 12 is not available in Bionic.
* Remove Breaks: dh-golang (<< 1.43~) from d/control{,.in}.

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

The attached debdiff backport golang-1.16/1.16.2-0ubuntu1~20.04 from Focal to Bionic.

Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Lucas,

The changelog entry is a bit terse, but comment #1 gives a perfect explanation of the Breaks change and in better detail than could be done in a changelog entry.

I wondered if the debhelper-compat -> debhelper change could take more explanation, but it seems obvious enough. Is the reason for making it >= 11 rather than = 11 because we have debhelper 13 in bionic-backports?

Anyway, the packaging changes LGTM, +1.

For the SRU text, it might be helpful to express the runc rebuild in a cut-and-paste style as you did for the main test case. For the [where problems might occur], you could further point out that golang-1.13 and golang-1.16 are already co-installable without conflict on focal and impish.

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

Thanks for the review Bryce. I added some more bits to the changelog to make it more clear about the needed changes. I also updated the bug description with your suggestions. The package was already uploaded.

Changed in golang-1.16 (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Lucas Kanashiro (lucaskanashiro)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi, trying to summarize...

Michael asked Lucas to look for it (that is how he got assigned).
Out of that and based on the old cases this is ready.

But it is for quite a while blocked in bionic-new [1].
It needs to be accepted from there to make progress.

By pre-coordination of Lucas this needs a AA+SRU team member to do things at once which AFIK is only Steve + Lukasz.

Unassigning Lucas to reflect that this is waiting on others.
@Matt could you get one of your people to look at it or have an alternative?

P.S. This blocks stable updates of the container stack to Bionic which makes this more urgent that it might seem

[1]: https://launchpad.net/ubuntu/bionic/+queue?queue_state=0&queue_text=

Changed in golang-1.16 (Ubuntu Bionic):
assignee: Lucas Kanashiro (lucaskanashiro) → Matthieu Clemenceau (mclemenceau)
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Lucas, or anyone else affected,

Accepted golang-1.16 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/golang-1.16/1.16.2-0ubuntu1~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.

Changed in golang-1.16 (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

golang-1.16 is FTBFSing on i386, which has been blocking this SRU.

I spent some time investigating the issue and found a corresponding upstream bug (https://github.com/golang/go/issues/44500). I took the liberty to file another bug for this FTBFS (see bug #1983742), which I will use to perform an SRU and fix the FTBFS.

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

golang-1.16 has been blocked in bionic-proposed because it FTBFS in i386, this issue has been tracked in this other bug:

https://bugs.launchpad.net/ubuntu/+source/golang-1.16/+bug/1983742

We were waiting the fix to get accepted to actually move on with the other SRU steps.

Anyway, the validation was done below:

root@golang-116-verification:~# dpkg -l golang-1.16-go
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============================================-============================-============================-==================================================================================================
ii golang-1.16-go 1.16.2-0ubuntu1~18.04.1 amd64 Go programming language compiler, linker, compiled stdlib
root@golang-116-verification:~# PATH=/usr/lib/go-1.16/bin:$PATH
root@golang-116-verification:~# go version
go version go1.16.2 linux/amd64
root@golang-116-verification:~# cat <<EOF >trivial.go
> package main
> func main() {}
> EOF
root@golang-116-verification:~# go run trivial.go
root@golang-116-verification:~# echo $?
0
root@golang-116-verification:~# cat <<EOF >trivialcgo.go
> package main
> import "C"
> func main() {}
> EOF
root@golang-116-verification:~# go run trivialcgo.go
root@golang-116-verification:~# echo $?
0

The runc build log is attached.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Robie Basak (racb)
description: updated
Revision history for this message
Robie Basak (racb) wrote :

Hello Lucas, or anyone else affected,

Accepted golang-1.16 into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/golang-1.16/1.16.2-0ubuntu1~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.

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

# Verification in a Bionic container with -proposed enabled

root@golang116-verification:~# dpkg -l | grep golang-1.16
ii golang-1.16-go 1.16.2-0ubuntu1~18.04.2 amd64 Go programming language compiler, linker, compiled stdlib
ii golang-1.16-src 1.16.2-0ubuntu1~18.04.2 amd64 Go programming language - source files
root@golang116-verification:~# PATH=/usr/lib/go-1.16/bin:$PATH
root@golang116-verification:~# go version
go version go1.16.2 linux/amd64
root@golang116-verification:~# cat <<EOF >trivial.go
> package main
> func main() {}
> EOF
root@golang116-verification:~# go run trivial.go
root@golang116-verification:~# echo $?
0
root@golang116-verification:~# cat <<EOF >trivialcgo.go
> package main
> import "C"
> func main() {}
> EOF
root@golang116-verification:~# go run trivialcgo.go
root@golang116-verification:~# echo $?
0

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

# Runc build in a PPA with bionic-proposed enabled

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

The package built fine in all architectures (including i386) but ppc64el. In ppc64el, there is a segfault in the go-md2man call which is a different source package (src:go-md2man) and requires further investigation. I'd not consider this a blocker for the golang-1.16 backport.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

hmmm, this is interesting. Why does runc in the PPA fail consistently on ppc64el even though it didn't fail in -proposed? If the failure is related to a different source package, I'd expect this to fail on both?

Can you shine some more light on the situation?

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

Ah! I see the new go-md2man in -proposed, fixing this issue. Nevermind then!

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

This bug was fixed in the package golang-1.16 - 1.16.2-0ubuntu1~18.04.2

---------------
golang-1.16 (1.16.2-0ubuntu1~18.04.2) bionic; urgency=medium

  * d/helpers/goenv.sh: Don't set GO386 when building on i386.
    (LP: #1983742)
  * d/control{,.in}: Make golang-X.Y-go depend on sse2-support on
    i386.

golang-1.16 (1.16.2-0ubuntu1~18.04.1) bionic; urgency=medium

  * Backport to Bionic (LP: #1967425, #1960449).
    - Downgrade debhelper to compat level 11.
    - 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.

 -- Sergio Durigan Junior <email address hidden> Fri, 05 Aug 2022 23:26:55 -0400

Changed in golang-1.16 (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for golang-1.16 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.

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.