Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package go1.23 for openSUSE:Factory checked 
in at 2026-06-09 14:21:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/go1.23 (Old)
 and      /work/SRC/openSUSE:Factory/.go1.23.new.2375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "go1.23"

Tue Jun  9 14:21:31 2026 rev:17 rq:1358041 version:1.23.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/go1.23/go1.23.changes    2025-08-15 
21:51:33.810880427 +0200
+++ /work/SRC/openSUSE:Factory/.go1.23.new.2375/go1.23.changes  2026-06-09 
14:25:38.941826061 +0200
@@ -1,0 +2,7 @@
+Thu Jun  4 11:32:39 UTC 2026 - Jeff Kowalczyk <[email protected]>
+
+- Packaging: Enable libalternatives for SLE16.1 and Tumbleweed
+  Refs boo#1245878
+  * Drop go1.23 dependency on update-alternatives fixes bsc#1264392
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ go1.23.spec ++++++
--- /var/tmp/diff_new_pack.sYeUQM/_old  2026-06-09 14:25:43.033995205 +0200
+++ /var/tmp/diff_new_pack.sYeUQM/_new  2026-06-09 14:25:43.045995701 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package go1.23
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -51,6 +51,26 @@
 # go_api or go_api-foo
 %define go_label %{go_api}
 
+# go_libalternatives is the name for the libalternatives configuration file
+# which denotes its priority and numbered as go_api sans dot separator
+%define go_libalternatives 123
+
+# with_libalternatives denotes whether or not libalternatives should be used
+# if it is not used, then update-alternatives is used instead
+%define with_libalternatives 0
+# Enable libalternatives for SLE16.1+ and Tumbleweed
+%if 0%{suse_version} >= 1610
+%define with_libalternatives 1
+%endif
+
+# with_update_alternatives is automatically defined, based on the
+# value of with_libalternatives
+%if %{with_libalternatives}
+%define with_update_alternatives 0
+%else
+%define with_update_alternatives 1
+%endif
+
 # shared library support
 %if "%{rpm_vercmp %{go_api} 1.5}" > "0"
 %ifarch %ix86 %arm x86_64 aarch64
@@ -124,8 +144,6 @@
 %endif
 #BNC#818502 debug edit tool of rpm fails on i586 builds
 BuildRequires:  rpm >= 4.11.1
-Requires(post): update-alternatives
-Requires(postun): update-alternatives
 Requires:       gcc
 Provides:       go = %{version}
 Provides:       go-devel = go%{version}
@@ -136,6 +154,13 @@
 Obsoletes:      go-emacs <= 1.3.3
 Obsoletes:      go-vim <= 1.3.3
 ExclusiveArch:  %ix86 x86_64 %arm aarch64 ppc64 ppc64le s390x riscv64 
loongarch64
+Requires(post): update-alternatives
+%if %{with_libalternatives}
+BuildRequires:  alts
+Requires:       alts
+%else
+Requires(postun): update-alternatives
+%endif
 
 %description
 Go is an expressive, concurrent, garbage collected systems programming language
@@ -348,16 +373,38 @@
 sed -i "s/lib/lib64/" $GOROOT/bin/gdbinit.d/go.gdb
 sed -i "s/\$go_label/%{go_label}/" $GOROOT/bin/gdbinit.d/go.gdb
 %endif
+mkdir -p %{buildroot}%{_sysconfdir}/gdbinit.d
 
 # update-alternatives
+%if %{with_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
+%endif
+
+# libalternatives
+%if %{with_libalternatives}
+ln -s %{_libdir}/go/%{go_label}/bin/gdbinit.d/go.gdb 
%{buildroot}%{_sysconfdir}/gdbinit.d/go%{go_label}.gdb
+
+mkdir -p %{buildroot}%{_bindir}
+
+ln -s %{_bindir}/alts %{buildroot}%{_bindir}/go
+ln -s %{_bindir}/alts %{buildroot}%{_bindir}/gofmt
+# create 'go' configuration file
+mkdir -p %{buildroot}%{_datadir}/libalternatives/go
+cat > %{buildroot}%{_datadir}/libalternatives/go/%{go_libalternatives}.conf 
<<EOF
+binary=%{_libdir}/go/%{go_label}/bin/go
+EOF
+# create 'gofmt' configuration file
+mkdir -p %{buildroot}%{_datadir}/libalternatives/gofmt
+cat > %{buildroot}%{_datadir}/libalternatives/gofmt/%{go_libalternatives}.conf 
<<EOF
+binary=%{_libdir}/go/%{go_label}/bin/gofmt
+EOF
+%endif
 
 # documentation and examples
 # fix documetation permissions (rpmlint warning)
@@ -375,16 +422,28 @@
 %fdupes -s %{buildroot}%{_prefix}
 
 %post
-
+%if %{with_update_alternatives}
 update-alternatives \
   --install %{_bindir}/go go %{_libdir}/go/%{go_label}/bin/go $((20+$(echo 
%{go_label} | cut -d. -f2))) \
   --slave %{_bindir}/gofmt gofmt %{_libdir}/go/%{go_label}/bin/gofmt \
   --slave %{_sysconfdir}/gdbinit.d/go.gdb go.gdb 
%{_libdir}/go/%{go_label}/bin/gdbinit.d/go.gdb
+%endif
+
+# this is invoked when a user is migrating from update-alternatives to
+# libalternatives, hence why we always require update-alternatives
+# during %post
+%if %{with_libalternatives}
+if [ $1 -eq 0 ] ; then
+       update-alternatives --remove go %{_libdir}/go/%{go_label}/bin/go
+fi
+%endif
 
 %postun
+%if %{with_update_alternatives}
 if [ $1 -eq 0 ] ; then
        update-alternatives --remove go %{_libdir}/go/%{go_label}/bin/go
 fi
+%endif
 
 %files
 %{_bindir}/go
@@ -394,10 +453,6 @@
 %dir %{_datadir}/go
 %{_datadir}/go/%{go_label}
 %dir %{_sysconfdir}/gdbinit.d/
-%config %{_sysconfdir}/gdbinit.d/go.gdb
-%ghost %{_sysconfdir}/alternatives/go
-%ghost %{_sysconfdir}/alternatives/gofmt
-%ghost %{_sysconfdir}/alternatives/go.gdb
 %dir %{_docdir}/go
 %dir %{_docdir}/go/%{go_label}
 %doc %{_docdir}/go/%{go_label}/CONTRIBUTING.md
@@ -409,6 +464,19 @@
 %else
 %license %{_docdir}/go/%{go_label}/LICENSE
 %endif
+%if %{with_libalternatives}
+%config %{_sysconfdir}/gdbinit.d/go%{go_label}.gdb
+%dir %{_datadir}/libalternatives/go
+%{_datadir}/libalternatives/go/%{go_libalternatives}.conf
+%dir %{_datadir}/libalternatives/gofmt
+%{_datadir}/libalternatives/gofmt/%{go_libalternatives}.conf
+%endif
+%if %{with_update_alternatives}
+%config %{_sysconfdir}/gdbinit.d/go.gdb
+%ghost %{_sysconfdir}/alternatives/go
+%ghost %{_sysconfdir}/alternatives/gofmt
+%ghost %{_sysconfdir}/alternatives/go.gdb
+%endif
 
 # We don't include TSAN in the main Go package.
 %ifarch %{tsan_arch}

Reply via email to