Good morning ladies and gentlemen,
is there any documentation on how to exactly require a specific version of go1.X (use go1.10, not any later version? Use go1.12 or later?)?
I am (once again) new to packaging golang packages, and have some that seem to require newer versions, e.g. go1.12 or go.14. Others like git-lfs seem to not build correctly unless I tell them to build with go1.10. Not sure if this really fixes the build problems, and as I am not a go expert I cannot tell if this idea is complete bogus. Nevertheless, I'd like to try out... ;-)
This seems to work: BuildRequire: go < 1.13 BuildRequire: go >= 1.12
This does not: BuildRequire: go1.12
Nope: BuildRequire: go = 1.12 (as the available version is 1.12.9 or something like that)
Seems like this would be a useful information to add to https://en.opensuse.org/openSUSE:Packaging_Go (which I will update once I find out how to do that).
Kind Regards, Johannes
Hello Johannes
Am Donnerstag, 27. Februar 2020, 08:05:02 CET schrieb Johannes Kastl:
Good morning ladies and gentlemen,
is there any documentation on how to exactly require a specific version of go1.X (use go1.10, not any later version? Use go1.12 or later?)?
I am (once again) new to packaging golang packages, and have some that seem to require newer versions, e.g. go1.12 or go.14. Others like git-lfs seem to not build correctly unless I tell them to build with go1.10. Not sure if this really fixes the build problems, and as I am not a go expert I cannot tell if this idea is complete bogus. Nevertheless, I'd like to try out... ;-)
This seems to work: BuildRequire: go < 1.13 BuildRequire: go >= 1.12
Whats wrong with this solution?
This does not: BuildRequire: go1.12
Nope: BuildRequire: go = 1.12 (as the available version is 1.12.9 or something like that)
BuildRequire: go == 1.12 maybe?
Ahoi Axel
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 27/02/2020 08:05, Johannes Kastl wrote:
This seems to work: BuildRequire: go < 1.13 BuildRequire: go >= 1.12
Normally the solution that I use in my packages would look like somethin g:
BuildRequires: go >= 1.12 BuildConflics: go >= 1.13
At least for me this kind of statement helps me to give an interval of java versions that can be used in different java packages.
Cheers
F.
Am 2020-02-27 08:05, schrieb Johannes Kastl:
Good morning ladies and gentlemen,
is there any documentation on how to exactly require a specific version of go1.X (use go1.10, not any later version? Use go1.12 or later?)?
I am (once again) new to packaging golang packages, and have some that seem to require newer versions, e.g. go1.12 or go.14. Others like git-lfs seem to not build correctly unless I tell them to build with go1.10. Not sure if this really fixes the build problems, and as I am not a go expert I cannot tell if this idea is complete bogus. Nevertheless, I'd like to try out... ;-)
This seems to work: BuildRequire: go < 1.13 BuildRequire: go >= 1.12
Should be done.
This does not: BuildRequire: go1.12
Why should this not run? Package go1.12-1.12.17-1.1.x86_64.rpm provides go1.12
Perhaps. This is what i use:
BuildRequires: config(go1.12)
On Thu, Feb 27, 2020 at 2:05 AM Johannes Kastl kastl@b1-systems.de wrote:
Good morning ladies and gentlemen,
is there any documentation on how to exactly require a specific version of go1.X (use go1.10, not any later version? Use go1.12 or later?)?
I am (once again) new to packaging golang packages, and have some that seem to require newer versions, e.g. go1.12 or go.14. Others like git-lfs seem to not build correctly unless I tell them to build with go1.10. Not sure if this really fixes the build problems, and as I am not a go expert I cannot tell if this idea is complete bogus. Nevertheless, I'd like to try out... ;-)
This seems to work: BuildRequire: go < 1.13 BuildRequire: go >= 1.12
This does not: BuildRequire: go1.12
Nope: BuildRequire: go = 1.12 (as the available version is 1.12.9 or something like that)
This would be the correct cross-distro dependency:
BuildRequires: (golang >= 1.12 with golang < 1.13)
(The openSUSE specific variant would be just using "go" instead of "golang")
This ensures that the dependency resolver looks for exactly one package that satisfies both terms.
Am 27.02.20 um 11:26 schrieb Eric Schirra:
This does not: BuildRequire: go1.12
Why should this not run? Package go1.12-1.12.17-1.1.x86_64.rpm provides go1.12
Because go1.10 was still installed and used.
Johannes
Am 27.02.20 um 09:04 schrieb Fridrich Strba:
Normally the solution that I use in my packages would look like somethin g:
BuildRequires: go >= 1.12 BuildConflics: go >= 1.13
At least for me this kind of statement helps me to give an interval of java versions that can be used in different java packages.
Thanks, will try that.
Johannes
Hi Axel,
Am 27.02.20 um 08:33 schrieb Axel Braun:
This seems to work: BuildRequire: go < 1.13 BuildRequire: go >= 1.12
Whats wrong with this solution?
Nothing. But normally there is a oneliner for these kind of things, so I was wondering how the oneline would look for go.
BuildRequire: go == 1.12 maybe?
Sorry, the single "=" was a typo, actually that was what I tried.
I just tried again and now it works. Funny.
Johannes
Am 27.02.20 um 13:00 schrieb Neal Gompa:
This would be the correct cross-distro dependency:
BuildRequires: (golang >= 1.12 with golang < 1.13)
(The openSUSE specific variant would be just using "go" instead of "golang")
This ensures that the dependency resolver looks for exactly one package that satisfies both terms.
Thanks, Neal!
Johannes
On 27.02.20 at 08:05 Johannes Kastl wrote:
Good morning ladies and gentlemen,
is there any documentation on how to exactly require a specific version of go1.X (use go1.10, not any later version? Use go1.12 or later?)?
Hmm, something is fishy. Why does Tumbleweed install go1.14 but keeps using go1.12?
https://build.opensuse.org/project/monitor/home:ojkastl_buildservice:Branch_...
spec contains this line: BuildRequires: (go >= 1.14 with go < 1.15)
buildlog for openSUSE Tumbleweed:
######
[ 1s] Building git-lfs for project 'home:ojkastl_buildservice:Branch_git-lfs' repository 'openSUSE_Tumbleweed' arch 'x86_64' srcmd5 '9a07baba2f28c7b5b116610dfb35af98'
...
[ 14s] [162/171] cumulate go1.14-1.14-4.1
...
[ 60s] go1.14-1.14-4.1 ######################################## [ 60s] update-alternatives: using /usr/lib64/go/1.14/bin/go to provide /usr/bin/go (go) in auto mode
...
[ 73s] Copying deps to /home/abuild/rpmbuild/BUILD/contrib [ 73s] ++ get_gocontrib_path [ 73s] +++ rpm --eval '%{_datadir}' [ 73s] +++ rpm --eval %go_api_ver [ 73s] ++ echo /usr/share/go/1.12/contrib [ 73s] ++ get_buildcontrib_path [ 73s] ++ echo /home/abuild/rpmbuild/BUILD/contrib [ 73s] + cp -rT /usr/share/go/1.12/contrib/src /home/abuild/rpmbuild/BUILD/contrib/src [ 73s] cp: cannot stat '/usr/share/go/1.12/contrib/src': No such file or directory [ 73s] error: Bad exit status from /var/tmp/rpm-tmp.Pf7TbL (%build)
######
openSUSE Leap 15.1 correctly uses go1.14 (but fails later due to missing dependencies, but that is another topic).
######
[ 0s] Building git-lfs for project 'home:ojkastl_buildservice:Branch_git-lfs' repository 'openSUSE_Leap_15.1' arch 'x86_64' srcmd5 '9a07baba2f28c7b5b116610dfb35af98'
...
[ 11s] [140/154] cumulate go1.14-1.14-lp151.4.1
...
[ 45s] go1.14-1.14-lp151.4.1 ######################################## [ 46s] update-alternatives: using /usr/lib64/go/1.14/bin/go to provide /usr/bin/go (go) in auto mode
...
[ 61s] Copying deps to /home/abuild/rpmbuild/BUILD/contrib [ 61s] ++ get_gocontrib_path [ 61s] +++ rpm --eval '%{_datadir}' [ 61s] +++ rpm --eval %go_api_ver [ 61s] ++ echo /usr/share/go/1.14/contrib
...######
On 27.02.20 at 08:05 Johannes Kastl wrote:
Good morning ladies and gentlemen,
is there any documentation on how to exactly require a specific version of go1.X (use go1.10, not any later version? Use go1.12 or later?)?
On Leap 15.2 something is strange, as can be seen here: https://build.opensuse.org/package/show/home:donvipre:influxdb/influxdb
(I cannot reproduce this due to all packages being "blocked" at the moment")
####
[ 18s] [127/142] cumulate go1.11-1.11.5-lp152.2.48
...
[ 18s] [131/142] cumulate go-1.12-lp152.1.2
...
[ 98s] go1.11-1.11.5-lp152.2.48 ######################################## [ 99s] update-alternatives: using /usr/lib64/go/1.11/bin/go to provide /usr/bin/go (go) in auto mode
...
[ 105s] go-1.12-lp152.1.2 ########################################
...
[ 143s] Copying deps to /home/abuild/rpmbuild/BUILD/contrib [ 143s] ++ get_gocontrib_path [ 143s] +++ rpm --eval '%{_datadir}' [ 143s] +++ rpm --eval %go_api_ver [ 143s] ++ echo /usr/share/go/1.11/contrib
####
Why is go1.12 installed but not being used as alternative for /usr/bin/go? What is this strange go1.11 package and how to get rid of it?
I know Leap 15.2 is not yet released, but wanted to mention this in case this needs fixing...
Kind Regards, Johannes
On 10.03.20 at 08:49 Johannes Kastl wrote:
Hmm, something is fishy. Why does Tumbleweed install go1.14 but keeps using go1.12?
spec contains this line: BuildRequires: (go >= 1.14 with go < 1.15)
Hmm, apparently this does not work as intended.
Martin fixed the package by using "BuildRequires: go1.14" (which I had already tried, but which did not work).
Now it seems to correctly use go1.14:
[ 67s] + GO_CONTRIBSRCDIR=/usr/share/go/1.14/contrib/src/
Strange... Johannes
Looping in Jeff Kowalczyk, our go maintainer.
On Tue, 2020-03-10 at 09:07 +0100, Johannes Kastl wrote:
On 27.02.20 at 08:05 Johannes Kastl wrote:
Good morning ladies and gentlemen,
is there any documentation on how to exactly require a specific version of go1.X (use go1.10, not any later version? Use go1.12 or later?)?
On Leap 15.2 something is strange, as can be seen here: https://build.opensuse.org/package/show/home:donvipre:influxdb/influxdb
(I cannot reproduce this due to all packages being "blocked" at the moment")
####
[ 18s] [127/142] cumulate go1.11-1.11.5-lp152.2.48
...
[ 18s] [131/142] cumulate go-1.12-lp152.1.2
...
[ 98s] go1.11-1.11.5- lp152.2.48 ######################################## [ 99s] update-alternatives: using /usr/lib64/go/1.11/bin/go to provide /usr/bin/go (go) in auto mode
...
[ 105s] go-1.12- lp152.1.2 ##################################### ###
...
[ 143s] Copying deps to /home/abuild/rpmbuild/BUILD/contrib [ 143s] ++ get_gocontrib_path [ 143s] +++ rpm --eval '%{_datadir}' [ 143s] +++ rpm --eval %go_api_ver [ 143s] ++ echo /usr/share/go/1.11/contrib
####
Why is go1.12 installed but not being used as alternative for /usr/bin/go? What is this strange go1.11 package and how to get rid of it?
I know Leap 15.2 is not yet released, but wanted to mention this in case this needs fixing...
Kind Regards, Johannes
I say it again. Use BuildRequires: config(go1.11) This runs well in Leap and Tumbleweed.
Regards Eric
Am 31. März 2020 10:15:13 MESZ schrieb Lubos Kocman lubos.kocman@suse.com:
Looping in Jeff Kowalczyk, our go maintainer.
On Tue, 2020-03-10 at 09:07 +0100, Johannes Kastl wrote:
On 27.02.20 at 08:05 Johannes Kastl wrote:
Good morning ladies and gentlemen,
is there any documentation on how to exactly require a specific version of go1.X (use go1.10, not any later version? Use go1.12 or later?)?
On Leap 15.2 something is strange, as can be seen here:
https://build.opensuse.org/package/show/home:donvipre:influxdb/influxdb
(I cannot reproduce this due to all packages being "blocked" at the moment")
####
[ 18s] [127/142] cumulate go1.11-1.11.5-lp152.2.48
...
[ 18s] [131/142] cumulate go-1.12-lp152.1.2
...
[ 98s] go1.11-1.11.5- lp152.2.48 ######################################## [ 99s] update-alternatives: using /usr/lib64/go/1.11/bin/go to provide /usr/bin/go (go) in auto mode
...
[ 105s] go-1.12- lp152.1.2 ##################################### ###
...
[ 143s] Copying deps to /home/abuild/rpmbuild/BUILD/contrib [ 143s] ++ get_gocontrib_path [ 143s] +++ rpm --eval '%{_datadir}' [ 143s] +++ rpm --eval %go_api_ver [ 143s] ++ echo /usr/share/go/1.11/contrib
####
Why is go1.12 installed but not being used as alternative for /usr/bin/go? What is this strange go1.11 package and how to get rid of it?
I know Leap 15.2 is not yet released, but wanted to mention this in case this needs fixing...
Kind Regards, Johannes