Bug 1119634 - go: multi-version installation is broken on version switch
go: multi-version installation is broken on version switch
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Aleksa Sarai
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-15 12:41 UTC by Aleksa Sarai
Modified: 2022-02-15 21:55 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksa Sarai 2018-12-15 12:41:47 UTC
The way that multi-version Go works on openSUSE is through update-alternatives. One aspect of this is a profile.d script that sets GOROOT= to the current version. This means that changing the Go version will make GOROOT incorrect in the current login session -- which results in broken builds and other fun problems.

Zygmunt Krynicki pointed out that this is completely unnecessary -- each Go compiler binary contains a correct GOROOT. So this explicit setting is the only reason upgrades are broken. Removing it will fix the problem entirely.
Comment 1 Aleksa Sarai 2018-12-15 20:57:12 UTC
https://build.opensuse.org/request/show/658681 is the d:l:g submit request. I've tested it, and it works well.

  % cat test.go
  package main
  
  import (
          "fmt"
          "runtime"
  )
  
  func main() {
          fmt.Printf("Hello, %s!\n", runtime.Version())
  }
  % update-alternatives --set go /usr/lib64/go1.4/bin/go ; go run test.go
  update-alternatives: using /usr/lib64/go1.4/bin/go to provide /usr/bin/go (go) in manual mode
  Hello, go1.4.3!
  % update-alternatives --set go /usr/lib64/go/1.6/bin/go ; go run test.go
  update-alternatives: using /usr/lib64/go/1.6/bin/go to provide /usr/bin/go (go) in manual mode
  Hello, go1.6.4!
  % update-alternatives --set go /usr/lib64/go/1.7/bin/go ; go run test.go
  update-alternatives: using /usr/lib64/go/1.7/bin/go to provide /usr/bin/go (go) in manual mode
  Hello, go1.7.5!
  % update-alternatives --set go /usr/lib64/go/1.8/bin/go ; go run test.go
  update-alternatives: using /usr/lib64/go/1.8/bin/go to provide /usr/bin/go (go) in manual mode
  Hello, go1.8.7!
  % update-alternatives --set go /usr/lib64/go/1.9/bin/go ; go run test.go
  update-alternatives: using /usr/lib64/go/1.9/bin/go to provide /usr/bin/go (go) in manual mode
  Hello, go1.9.7!
  % update-alternatives --set go /usr/lib64/go/1.10/bin/go ; go run test.go
  update-alternatives: using /usr/lib64/go/1.10/bin/go to provide /usr/bin/go (go) in manual mode
  Hello, go1.10.7!
  % update-alternatives --set go /usr/lib64/go/1.11/bin/go ; go run test.go
  update-alternatives: using /usr/lib64/go/1.11/bin/go to provide /usr/bin/go (go) in manual mode
  Hello, go1.11.4!
Comment 2 Swamp Workflow Management 2018-12-17 02:50:06 UTC
This is an autogenerated message for OBS integration:
This bug (1119634) was mentioned in
https://build.opensuse.org/request/show/658802 Factory / go1.4
https://build.opensuse.org/request/show/658803 Factory / go1.6
https://build.opensuse.org/request/show/658804 Factory / go1.7
https://build.opensuse.org/request/show/658805 Factory / go1.8
https://build.opensuse.org/request/show/658806 Factory / go1.9
https://build.opensuse.org/request/show/658807 Factory / go1.10
https://build.opensuse.org/request/show/658808 Factory / go1.11
Comment 4 Swamp Workflow Management 2018-12-17 13:40:27 UTC
This is an autogenerated message for OBS integration:
This bug (1119634) was mentioned in
https://build.opensuse.org/request/show/658900 Factory / go1.10
https://build.opensuse.org/request/show/658901 Factory / go1.11
Comment 6 Swamp Workflow Management 2018-12-17 15:42:59 UTC
This is an autogenerated message for OBS integration:
This bug (1119634) was mentioned in
https://build.opensuse.org/request/show/658934 15.0+42.3 / go1.11
Comment 9 Swamp Workflow Management 2018-12-19 11:09:53 UTC
openSUSE-SU-2018:4181-1: An update that solves three vulnerabilities and has four fixes is now available.

Category: security (important)
Bug References: 1098017,1113978,1118897,1118898,1118899,1119634,1119706
CVE References: CVE-2018-16873,CVE-2018-16874,CVE-2018-16875
Sources used:
openSUSE Leap 42.3 (src):    go1.11-1.11.4-2.1
openSUSE Leap 15.0 (src):    go1.11-1.11.4-lp150.2.1
Comment 10 Aleksa Sarai 2018-12-21 19:40:05 UTC
This has been fixed in Factory as well as Leap and SLE.
Comment 11 Swamp Workflow Management 2018-12-22 23:09:44 UTC
openSUSE-SU-2018:4255-1: An update that solves three vulnerabilities and has 5 fixes is now available.

Category: security (important)
Bug References: 1082409,1098017,1113978,1118897,1118898,1118899,1119634,1119706
CVE References: CVE-2018-16873,CVE-2018-16874,CVE-2018-16875
Sources used:
openSUSE Leap 42.3 (src):    go1.10-1.10.7-5.1
Comment 12 Swamp Workflow Management 2018-12-28 23:14:46 UTC
SUSE-SU-2018:4297-1: An update that solves four vulnerabilities and has 17 fixes is now available.

Category: security (important)
Bug References: 1047218,1074971,1080978,1081495,1084533,1086185,1094680,1095817,1098017,1102522,1104821,1105000,1108038,1113313,1113978,1114209,1118897,1118898,1118899,1119634,1119706
CVE References: CVE-2018-16873,CVE-2018-16874,CVE-2018-16875,CVE-2018-7187
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    containerd-1.1.2-5.3.4, docker-18.06.1_ce-6.8.2, docker-runc-1.0.0rc5+gitr3562_69663f0bd4b6-6.3.4, go-1.10.4-3.6.2, go1.10-1.10.7-1.5.3, golang-github-docker-libnetwork-0.7.0.1+gitr2664_3ac297bc7fd0-4.3.5, golang-packaging-15.0.11-3.3.2
SUSE Linux Enterprise Module for Containers 15 (src):    containerd-1.1.2-5.3.4, docker-18.06.1_ce-6.8.2, docker-runc-1.0.0rc5+gitr3562_69663f0bd4b6-6.3.4, golang-github-docker-libnetwork-0.7.0.1+gitr2664_3ac297bc7fd0-4.3.5
Comment 13 Swamp Workflow Management 2018-12-29 14:09:33 UTC
openSUSE-SU-2018:4302-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (important)
Bug References: 1081495,1119634,1119706
CVE References: CVE-2018-7187
Sources used:
openSUSE Backports SLE-15 (src):    go-1.10.4-bp150.2.3.1, go1.10-1.10.7-bp150.2.1, golang-packaging-15.0.11-bp150.3.3.1
Comment 14 Swamp Workflow Management 2018-12-29 14:16:59 UTC
openSUSE-SU-2018:4306-1: An update that solves four vulnerabilities and has 17 fixes is now available.

Category: security (important)
Bug References: 1047218,1074971,1080978,1081495,1084533,1086185,1094680,1095817,1098017,1102522,1104821,1105000,1108038,1113313,1113978,1114209,1118897,1118898,1118899,1119634,1119706
CVE References: CVE-2018-16873,CVE-2018-16874,CVE-2018-16875,CVE-2018-7187
Sources used:
openSUSE Leap 15.0 (src):    containerd-1.1.2-lp150.4.3.1, containerd-kubic-1.1.2-lp150.4.3.1, docker-18.06.1_ce-lp150.5.6.1, docker-kubic-18.06.1_ce-lp150.5.6.1, docker-runc-1.0.0rc5+gitr3562_69663f0bd4b6-lp150.5.3.1, docker-runc-kubic-1.0.0rc5+gitr3562_69663f0bd4b6-lp150.5.3.1, go-1.10.4-lp150.2.7.1, go1.10-1.10.7-lp150.2.1, golang-github-docker-libnetwork-0.7.0.1+gitr2664_3ac297bc7fd0-lp150.3.3.1, golang-github-docker-libnetwork-kubic-0.7.0.1+gitr2664_3ac297bc7fd0-lp150.3.3.1, golang-packaging-15.0.11-lp150.2.3.1
Comment 16 Swamp Workflow Management 2019-01-10 23:18:50 UTC
SUSE-RU-2019:0070-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1119634
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Containers 12 (src):    docker-18.06.1_ce-98.24.1
OpenStack Cloud Magnum Orchestration 7 (src):    docker-18.06.1_ce-98.24.1
Comment 17 Swamp Workflow Management 2019-01-11 17:10:46 UTC
SUSE-RU-2019:0077-1: An update that has two recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1119634,1119706
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    go1.11-1.11.4-1.6.2
Comment 18 Swamp Workflow Management 2019-01-22 20:12:27 UTC
openSUSE-RU-2019:0070-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1119634
CVE References: 
Sources used:
openSUSE Leap 42.3 (src):    docker-18.06.1_ce-51.1, docker-kubic-18.06.1_ce-51.1
Comment 19 Swamp Workflow Management 2019-02-27 11:01:42 UTC
This is an autogenerated message for OBS integration:
This bug (1119634) was mentioned in
https://build.opensuse.org/request/show/679777 Factory / go1.11
Comment 20 Swamp Workflow Management 2019-03-25 11:11:23 UTC
This is an autogenerated message for OBS integration:
This bug (1119634) was mentioned in
https://build.opensuse.org/request/show/688187 Factory / go1.12
Comment 27 Swamp Workflow Management 2020-05-19 16:19:23 UTC
SUSE-RU-2020:1341-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1082409,1119634,1121397,974800
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15-SP1 (src):    go1.9-1.9.7-3.6.2

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 28 Swamp Workflow Management 2020-05-26 13:20:43 UTC
openSUSE-RU-2020:0718-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1082409,1119634,1121397,974800
CVE References: 
Sources used:
openSUSE Leap 15.1 (src):    go1.9-1.9.7-lp151.2.3.1
Comment 29 Swamp Workflow Management 2020-06-04 01:14:16 UTC
openSUSE-RU-2020:0768-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1082409,1119634,1121397,974800
CVE References: 
Sources used:
openSUSE Backports SLE-15-SP1 (src):    go1.9-1.9.7-bp151.2.3.1