commit go for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package go for openSUSE:Factory checked in at 2014-10-05 20:31:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/go (Old) and /work/SRC/openSUSE:Factory/.go.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "go" Changes: -------- --- /work/SRC/openSUSE:Factory/go/go.changes 2014-09-17 17:25:40.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.go.new/go.changes 2014-10-05 20:33:26.000000000 +0200 @@ -1,0 +2,31 @@ +Fri Sep 26 13:14:55 UTC 2014 - cbosdonnat@suse.com + +- Revert the /usr/share/go/contrib symlink as it caused problems + during update. Moved all go sources to /usr/share/go/contrib/src + instead of /usr/share/go/contrib/src/pkg and created pkg and src + symlinks in contrib to add it to GOPATH + +------------------------------------------------------------------- +Thu Sep 25 12:31:43 UTC 2014 - cbosdonnat@suse.com + +- Fixed %go_contribsrcdir value +- Copy temporary macros.go as go.macros to avoid it to be built + +------------------------------------------------------------------- +Mon Sep 22 19:45:17 UTC 2014 - jengelh@inai.de + +- Do not modify Source: files, because that makes the .src.rpm + being tied to one specific arch. + +------------------------------------------------------------------- +Tue Sep 16 15:15:20 UTC 2014 - cbosdonnat@suse.com + +- Removed extra src folder in /usr/share/go/contrib: the goal is to + transform this folder into a proper entry for GOPATH. This folder + is now linked to %{_libdir}/go/contrib +- go requires gcc to build sources using cgo +- tools-packaging.patch: Allow building cover and vet tools in + $GOROOT_TARGET/pkg/tool instead of $GOROOT/pkg/tool. This will + allow building go tools as a separate package + +------------------------------------------------------------------- New: ---- tools-packaging.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ go.spec ++++++ --- /var/tmp/diff_new_pack.1hTE88/_old 2014-10-05 20:33:27.000000000 +0200 +++ /var/tmp/diff_new_pack.1hTE88/_new 2014-10-05 20:33:27.000000000 +0200 @@ -28,7 +28,7 @@ Source1: go-rpmlintrc Source2: go.sh Source3: macros.go -Source6: go-wiki-gadget.xml +Source4: go-wiki-gadget.xml Source5: README-openSUSE # PATCH-FIX-OPENSUSE add -s flag to 'go install' (don't rebuild/install std libs) Patch1: go-build-dont-reinstall-stdlibs.patch @@ -39,6 +39,8 @@ Patch3: verbose-build.patch # PATCH-FIX-OPENSUSE BNC#776058 Patch4: go-install-dont-reinstall-stdlibs.patch +# PATCH-FIX-OPENSUSE enable writing tools outside $GOROOT/pkg/tool for packaging +Patch5: tools-packaging.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: rpm %if 0%{?suse_version} >= 1210 @@ -53,6 +55,7 @@ BuildRequires: rpm >= 4.11.1 %endif %endif +Requires: gcc Provides: go-devel = %{name}%{version} Provides: go-devel-static = %{name}%{version} Obsoletes: go-devel < %{name}%{version} @@ -95,19 +98,21 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 cp %{SOURCE5} . # setup go_arch (BSD-like scheme) +cp %{SOURCE3} go.macros %ifarch %ix86 -sed -i 's|GOARCH|386|' %{SOURCE3} +sed -i 's|GOARCH|386|' go.macros %define go_arch 386 %endif %ifarch x86_64 -sed -i 's|GOARCH|amd64|' %{SOURCE3} +sed -i 's|GOARCH|amd64|' go.macros %define go_arch amd64 %endif %ifarch %arm -sed -i 's|GOARCH|arm|' %{SOURCE3} +sed -i 's|GOARCH|arm|' go.macros %define go_arch arm %endif @@ -145,10 +150,12 @@ install -Dm644 misc/vim/ftdetect/gofiletype.vim %{buildroot}%{_datadir}/vim/site/ftdetect/gofiletype.vim # locations for third party libraries, see README-openSUSE for info about locations. -install -d %{buildroot}%{_libdir}/go/contrib/pkg/linux_%{go_arch} -install -d %{buildroot}%{_datadir}/go/contrib/src/pkg -install -d %{buildroot}%{_datadir}/go/contrib/src/cmd -install -Dm644 README-openSUSE %{buildroot}%{_libdir}/go/contrib/ +install -d %{buildroot}%{_datadir}/go/contrib +install -d $GOROOT/contrib/pkg/linux_%{go_arch} +ln -s %{_libdir}/%{name}/contrib/pkg/ %{buildroot}%{_datadir}/go/contrib/pkg +install -d %{buildroot}%{_datadir}/go/contrib/cmd +install -d %{buildroot}%{_datadir}/go/contrib/src +install -Dm644 README-openSUSE $GOROOT/contrib/ ln -s %{_libdir}/go/contrib/README-openSUSE %{buildroot}%{_datadir}/go/contrib/README-openSUSE # source files for go install, godoc, etc @@ -180,7 +187,7 @@ rm -f misc/kate/go.xml # install RPM macros ($GOARCH prepared in %%prep section) -install -Dm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.go +install -Dm644 go.macros %{buildroot}%{_sysconfdir}/rpm/macros.go # break hard links rm %{buildroot}%{_libdir}/go/pkg/linux_%{go_arch}/{cgocall,runtime}.h ++++++ go.sh ++++++ --- /var/tmp/diff_new_pack.1hTE88/_old 2014-10-05 20:33:28.000000000 +0200 +++ /var/tmp/diff_new_pack.1hTE88/_new 2014-10-05 20:33:28.000000000 +0200 @@ -14,9 +14,9 @@ esac export GOROOT=/usr/$libdir/go export GOBIN=/usr/bin -export GOPATH=$GOROOT/contrib +export GOPATH=/usr/share/go/contrib if [ `id -u` != 0 ]; then - export GOPATH=$HOME/go:$GOROOT/contrib + export GOPATH=$HOME/go:/usr/share/go/contrib export GOBIN=$HOME/go/bin fi ++++++ macros.go ++++++ --- /var/tmp/diff_new_pack.1hTE88/_old 2014-10-05 20:33:28.000000000 +0200 +++ /var/tmp/diff_new_pack.1hTE88/_new 2014-10-05 20:33:28.000000000 +0200 @@ -13,7 +13,7 @@ %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/pkg +%go_contribsrcdir %{_datadir}/go/contrib/src/ %go_tooldir %{_datadir}/go/pkg/tool/linux_%{go_arch} %go_exclusivearch \ @@ -181,4 +181,4 @@ %{-r:Requires: %{-r*}} \ %description %{-n:-n %{-n*}-}doc \ This package provides API, examples and documentation \ -for package %{name}. \ No newline at end of file +for package %{name}. ++++++ tools-packaging.patch ++++++ Index: go/src/cmd/go/pkg.go =================================================================== --- go.orig/src/cmd/go/pkg.go +++ go/src/cmd/go/pkg.go @@ -398,7 +398,13 @@ func (p *Package) load(stk *importStack, if goTools[p.ImportPath] == toTool { // This is for 'go tool'. // Override all the usual logic and force it into the tool directory. - p.target = filepath.Join(gorootPkg, "tool", full) + // If GOROOT_TARGET is set, then write to it for packaging purpose + gorootTarget := os.Getenv("GOROOT_TARGET") + if gorootTarget == "" { + p.target = filepath.Join(gorootPkg, "tool", full) + } else { + p.target = filepath.Join(gorootTarget, "pkg/tool", full) + } } if p.target != "" && buildContext.GOOS == "windows" { p.target += ".exe" -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de