Accepting request 497906 from home:jordimassaguerpla:branch:d:l:g:fix_update_alternatives
update golang-packaging to use the latest fixes for update-alternatives in the go packages OBS-URL: https://build.opensuse.org/request/show/497906 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/golang-packaging?expand=0&rev=46
This commit is contained in:
committed by
Git OBS Bridge
parent
f742ac4105
commit
5e6e0f1073
@@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 23 13:28:43 UTC 2017 - thipp@suse.de
|
||||
|
||||
- fix GOPATH issue
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun May 21 15:07:29 UTC 2017 - jmassaguerpla@suse.com
|
||||
|
||||
- fix gopath after updating go to 1.8. With go 1.8, there is no more
|
||||
/usr/share/go/contrib but /usr/share/go/1.8/contrib
|
||||
gopath.patch: contains the fix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 29 12:33:36 UTC 2017 - thipp@suse.de
|
||||
|
||||
|
@@ -24,6 +24,7 @@ License: GPL-3.0
|
||||
Group: Development/Languages/Golang
|
||||
Url: https://github.com/openSUSE/%{name}
|
||||
Source: %{name}-%{version}.tar.xz
|
||||
Patch0: gopath.patch
|
||||
|
||||
BuildRequires: rpm
|
||||
BuildRequires: xz
|
||||
@@ -36,6 +37,7 @@ A toolchain to help packaging golang, written in bash.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
|
||||
|
63
gopath.patch
Normal file
63
gopath.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
diff --git a/golang.prov b/golang.prov
|
||||
index f373246..08aca8e 100755
|
||||
--- a/golang.prov
|
||||
+++ b/golang.prov
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
-export GOPATH=${RPM_BUILD_ROOT}/usr/share/go/contrib
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
|
||||
IMPORT="$(cat /tmp/importpath.txt)"
|
||||
diff --git a/golang.req b/golang.req
|
||||
index 41029a6..6000f27 100755
|
||||
--- a/golang.req
|
||||
+++ b/golang.req
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
-export GOPATH=${RPM_BUILD_ROOT}/usr/share/go/contrib
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
|
||||
IMPORT="$(cat /tmp/importpath.txt)"
|
||||
diff --git a/golang.sh b/golang.sh
|
||||
index b5fa364..2509e62 100755
|
||||
--- a/golang.sh
|
||||
+++ b/golang.sh
|
||||
@@ -30,7 +30,7 @@ get_gobin_path() {
|
||||
}
|
||||
|
||||
get_gocontrib_path() {
|
||||
- echo "$(rpm --eval %{_datadir})/go/contrib"
|
||||
+ echo "$(rpm --eval %{_datadir})/go/$(rpm --eval '%{go_api_ver}')/contrib"
|
||||
}
|
||||
|
||||
get_contrib_path() {
|
||||
diff --git a/macros.go b/macros.go
|
||||
index c6d200e..a27a28d 100644
|
||||
--- a/macros.go
|
||||
+++ b/macros.go
|
||||
@@ -6,18 +6,17 @@
|
||||
#
|
||||
|
||||
|
||||
-%go_ver %(LC_ALL=C rpm -q --qf '%%{epoch}:%%{version}\\n' go | sed -e 's/(none)://' -e 's/ 0:/ /' | grep -v "is not")
|
||||
-%go_arch %(%{_prefix}/lib/rpm/golang.sh arch)
|
||||
-%go_build_ver %(go version | sed 's/^go version //' | sed 's:\/::g' | tr -d ' ' | cut -c 1-7 )
|
||||
-%go_api_ver %(echo %{go_ver} | sed 's/\.[0-9]$//')
|
||||
+%go_arch %(%{_prefix}/lib/rpm/golang.sh arch)
|
||||
+%go_ver %(go version | awk '{print $3}' | sed 's/go//')
|
||||
+%go_api_ver %(echo %{go_ver} | grep -Eo '[[:digit:]]+\.[[:digit:]]+')
|
||||
|
||||
%go_dir %{_libdir}/go
|
||||
%go_bindir %{_libdir}/go/bin
|
||||
%go_srcdir %{_libdir}/go/src
|
||||
%go_sitedir %{_libdir}/go/pkg
|
||||
%go_sitearch %{_libdir}/go/pkg/linux_%{go_arch}
|
||||
-%go_contribdir %{_libdir}/go/contrib/pkg/linux_%{go_arch}
|
||||
-%go_contribsrcdir %{_datadir}/go/contrib/src/
|
||||
+%go_contribdir %{_libdir}/go/%{go_api_ver}/contrib/pkg/linux_%{go_arch}
|
||||
+%go_contribsrcdir %{_datadir}/go/%{go_api_ver}/contrib/src/
|
||||
%go_tooldir %{_datadir}/go/pkg/tool/linux_%{go_arch}
|
||||
|
||||
%go_nostrip \
|
Reference in New Issue
Block a user