diff --git a/go1.17.changes b/go1.17.changes index ed5bb15..ee2952b 100644 --- a/go1.17.changes +++ b/go1.17.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Aug 22 20:44:19 UTC 2022 - Jeff Kowalczyk + +- Define go_bootstrap_version go1.16 without suse_version checks +- Simplify conditional gcc_go_version 12 on Tumbleweed, 11 elsewhere + +------------------------------------------------------------------- +Thu Aug 18 08:36:32 UTC 2022 - Dirk Müller + +- Bootstrap using go1.16 on SLE-15 and newer. go1.16 is + bootstrapped using gcc-go 11 or 12. This allows dropping older + versions of Go from Factory. + ------------------------------------------------------------------- Mon Aug 1 15:40:03 UTC 2022 - Jeff Kowalczyk diff --git a/go1.17.spec b/go1.17.spec index c353f24..88b30b9 100644 --- a/go1.17.spec +++ b/go1.17.spec @@ -24,34 +24,23 @@ %undefine _build_create_debug %define __arch_install_post export NO_BRP_STRIP_DEBUG=true NO_BRP_AR=true -%if 0%{?suse_version} == 1315 -%define gcc_go_version 8 -%define go_bootstrap_version go1.4 +# Used to bootstrap go toolchain with specific existing package +%define go_bootstrap_version go1.16 + +# Used to bootstrap go toolchain using specific version of gcc-go +%if 0%{?suse_version} > 1500 +# openSUSE Tumbleweed +%define gcc_go_version 12 %else -%ifarch riscv64 -%define go_bootstrap_version go1.14 -%else -%define go_bootstrap_version go1.9 -%endif -%if 0%{?sle_version} == 150000 -# SLE15 or Leap 15.x -%define gcc_go_version 7 -%else -%define gcc_go_version 9 -%endif +%define gcc_go_version 11 %endif -# By default use go and not gccgo -%bcond_with gccgo +# Bootstrap go toolchain using existing go package go_bootstrap_version +# To bootstrap using gccgo use '--with gccgo' +%bcond_with gccgo -# The fallback boostrap method via %%{go_bootstrap_version} would work for Leap -# but we don't have %%{go_bootstrap_version} in there. Same for SLE15+ -#if ( 0%{?suse_version} < 1550 && 0%{?is_opensuse} ) || ( 0%{?suse_version} >= 1500 && ! 0%{?is_opensuse} ) -#bcond_without gccgo -#endif - -# The fallback bootstrap method via go1.4 doesn't work -# for aarch64 nor ppc64le because go 1.4 did not support that architecture. +# Boostrapping using existing go package can fail on certain SLE-12 architectures +# Override here as needed %if 0%{?suse_version} == 1315 %ifarch aarch64 ppc64le ppc64 s390x %bcond_without gccgo @@ -343,14 +332,14 @@ sed -i "s/\$go_label/%{go_label}/" $GOROOT/bin/gdbinit.d/go.gdb %endif # update-alternatives - mkdir -p %{buildroot}%{_sysconfdir}/alternatives - mkdir -p %{buildroot}%{_bindir} - mkdir -p %{buildroot}%{_sysconfdir}/profile.d - mkdir -p %{buildroot}%{_sysconfdir}/gdbinit.d - touch %{buildroot}%{_sysconfdir}/alternatives/{go,gofmt,go.gdb} - ln -sf %{_sysconfdir}/alternatives/go %{buildroot}%{_bindir}/go - ln -sf %{_sysconfdir}/alternatives/gofmt %{buildroot}%{_bindir}/gofmt - ln -sf %{_sysconfdir}/alternatives/go.gdb %{buildroot}%{_sysconfdir}/gdbinit.d/go.gdb +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_sysconfdir}/profile.d +mkdir -p %{buildroot}%{_sysconfdir}/gdbinit.d +touch %{buildroot}%{_sysconfdir}/alternatives/{go,gofmt,go.gdb} +ln -sf %{_sysconfdir}/alternatives/go %{buildroot}%{_bindir}/go +ln -sf %{_sysconfdir}/alternatives/gofmt %{buildroot}%{_bindir}/gofmt +ln -sf %{_sysconfdir}/alternatives/go.gdb %{buildroot}%{_sysconfdir}/gdbinit.d/go.gdb # documentation and examples # fix documetation permissions (rpmlint warning)