Hello community, here is the log from the commit of package go for openSUSE:Factory checked in at 2012-05-10 14:31:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/go (Old) and /work/SRC/openSUSE:Factory/.go.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "go", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/go/go.changes 2012-04-02 19:53:03.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.go.new/go.changes 2012-05-10 14:31:56.000000000 +0200 @@ -1,0 +2,24 @@ +Wed May 9 09:32:23 UTC 2012 - gra...@andtech.eu + +- Update to version 1.0.1 +- fix escape analysis bug that could cause memory corruption +- other minor updates see: + http://code.google.com/p/go/source/list?name=release-branch.go1 +- go.spec: remove arch dependent conditionals from %files section + we don't have to select these anymore. + +------------------------------------------------------------------- +Thu Apr 5 16:54:27 UTC 2012 - gra...@andtech.eu + +- spec/go.sh/macros + change install location of third party libs to $GOROOT/contrib + add $GOROOT/contrib as the last location in users $GOPATH +- re-add sachape's typo and version check fixes +- Update godoc patch and add contrib src dir + +------------------------------------------------------------------- +Mon Apr 2 18:29:35 UTC 2012 - gra...@andtech.eu + +- Add %godoc macro to help with packaging API docs + +------------------------------------------------------------------- Old: ---- go-1.0.tar.bz2 New: ---- README-openSUSE go-1.0.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ go.spec ++++++ --- /var/tmp/diff_new_pack.prxLns/_old 2012-05-10 14:31:59.000000000 +0200 +++ /var/tmp/diff_new_pack.prxLns/_new 2012-05-10 14:31:59.000000000 +0200 @@ -18,7 +18,7 @@ Name: go -Version: 1.0 +Version: 1.0.1 Release: 0 Summary: A compiled, garbage-collected, concurrent programming language License: BSD-3-Clause @@ -32,6 +32,7 @@ # stripped from the tarball to save space. TODO: Update contents after version update! Source4: VERSION Source5: godoc.service +Source6: README-openSUSE # PATCH-FIX-OPENSUSE adjust documentation paths for API/doc server Patch1: godoc-path-locations.patch # PATCH-FIX-OPENSUSE add -s flag to 'go install' (don't rebuild/install std libs) @@ -51,9 +52,8 @@ # with this package will have the release string specified by the VERSION file # in this source tarball baked into it, libs compiled with a different version # cannot be linked anyway so all library packages will depend on this version string. -# the version string is pulled into the %godepends macro using the "go version" command. -%define goversion go1 -Provides: go = %{goversion} +# the version string is pulled into the %%godepends macro using the "go version" command. +%define goversion go1.0.1 Provides: go-devel = %{goversion} Provides: go-devel-static = %{goversion} Obsoletes: go-devel < %{goversion} @@ -110,6 +110,7 @@ %patch4 -p1 cp %{SOURCE4} . cp %{SOURCE5} . +cp %{SOURCE6} . # setup go_arch (BSD-like scheme) %ifarch %ix86 @@ -150,6 +151,13 @@ install -Dm644 misc/vim/ftdetect/gofiletype.vim %{buildroot}%{_datadir}/vim/site/ftdetect/gofiletype.vim install -Dm644 misc/kate/go.xml %{buildroot}%{_datadir}/kde4/apps/katepart/syntax/go.xml +# 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/ +ln -s %{_libdir}/go/contrib/README-openSUSE %{buildroot}%{_datadir}/go/contrib/README-openSUSE + # godoc service mkdir -p %{buildroot}%{_unitdir} install -Dm644 godoc.service %{buildroot}%{_unitdir}/godoc.service @@ -217,16 +225,7 @@ %files %defattr(-,root,root,-) -%doc AUTHORS CONTRIBUTORS LICENSE PATENTS README -%ifarch %ix86 %arm -%{_libdir}/go/pkg/tool/linux_%{go_arch}/8* -%endif -%ifarch x86_64 -%{_libdir}/go/pkg/tool/linux_%{go_arch}/6* -%endif -%ifarch %arm -%{_libdir}/go/pkg/tool/linux_%{go_arch}/5* -%endif +%doc AUTHORS CONTRIBUTORS LICENSE PATENTS README README-openSUSE %{_bindir}/go* %{_libdir}/go/ %{_datadir}/go/ ++++++ README-openSUSE ++++++ Updated: 05.05.2012 Authors: Graham Anderson, <gra...@andtech.eu> PROJECT DETAILS --------------- OBS: https://build.opensuse.org/project/show?project=devel:languages:go Maintainers: Sascha Peilicke (saschpe), Graham Anderson (andtecheu) Wiki: http://en.opensuse.org/Go http://en.opensuse.org/openSUSE:Packaging_Go GENERAL NOTES ------------- Go toolchain environmental variables are configured via go.sh, which is installed to /etc/profile.d/go.sh Packaging guidelines and an RPM spec file recipe for packaging third party Go libraries can be found on the openSUSE wiki: http://en.opensuse.org/openSUSE:Packaging_Go The openSUSE go package uses the standard Go distribution toolchain, with a a small patchset to modify a few of the toolchain commands to suit our environment and packaging needs. This means that many of the standard go toolchain commands are not inside a users PATH, but rather are invoked and used via the "go" command. Should you wish to script or manually use the commands, the install location on a 64 bit system is /usr/lib64/go/pkg/tool/linux_amd64 The "go" tool, the "godoc" document server are inside a users PATH. We currently don't support the gccgo implementation, this is not for any other reason than contributer and maintainer time constraints. GO DOCUMENTATION ---------------- As of yet, there are no man pages for the standard Go distribution toolchain, please see the documentation provided by the "godoc" command. Man pages are slated to be included in the release in future. One of the diffs from the maintained patchset adds the distro specific doc and source file locations of the *-doc RPM packages to the virtual filesystem of the "godoc" documentation server. That is to say, as long as packages follow the Go packaging guidelines, API and other documentation should always be available via the godoc server if the packages "doc" RPM is installed. PACKAGE INSTALL LOCATIONS ------------------------- Go standard library packages are installed to a location in $GOROOT, which is defined as /usr/lib64/go on 64bit systems. Third party package binaries are installed to the default system wide $GOPATH entry. On 64bit systems the location /usr/lib64/go/contrib is used. This is specified in the macros.go RPM macro definition file that is part of the main Go package and is used for packaging most third party Go libraries. The reasons binary packages are installed to a GOPATH entry instead of GOROOT are mainly to do with how the Go toolchain prioritises and behaves with packages installed to the same location as the Go std library. By installing third party packages to a system-wide GOPATH entry location, we can ensure that no packages clobber the standard library namespace or file tree. Additionally we can support binary only packages, which as of Go 1.1 will only be supported outside of the $GOROOT. There are additional benefits to this location; such as allowing users and developers to prioritise linking from their own user defined GOPATH, which defaults to $HOME/go configured via /etc/profile.d/go.sh config. This has particular benefit for development workflows. For Go 1.1 and beyond, building and linking with binary only pacakges will only be supported with the following caveat. Package source code must not exist in the same GOPATH segment as the binary package .a archive file. If both the binary archive (.a) and the package source are installed to the same GOPATH segment, then the "go build" or "go install" command will prioritise building the software using package sources before using package binary archives. A side effect of this is that is actually possible to have source code only third party packages. To summarise the priority of binary package linking and building: 1. Any source files or binary packages in $GOROOT are considered first. Any binary packages in $GOROOT that are considered "stale" by the build tools are ignored in favour of the package source. 2. $GOPATH is considered next for import statements. GOPATH is a colon delimited list of paths. GOPATH segments are examined by the build tools in a FIFO manner, left to right. Both a system wide and a user GOPATH segment are configured by default, the user GOPATH segment takes priority over the system segment to allow flexibility for development workflows. The default user GOPATH is: GOPATH=$HOME/go:$GOROOT/contrib The default root user GOPATH is: GOPATH=$GOROOT/contrib 3. For Go < 1.1, If both the source and binary archive is available for a package import in the same GOPATH segment, the binary archive will take precedence and will be linked during compilation. For Go >= 1.1 If the package source is avaiable in the GOPATH segment, it will always be used in preference to the binary ++++++ VERSION ++++++ --- /var/tmp/diff_new_pack.prxLns/_old 2012-05-10 14:31:59.000000000 +0200 +++ /var/tmp/diff_new_pack.prxLns/_new 2012-05-10 14:31:59.000000000 +0200 @@ -1 +1 @@ -go1 \ No newline at end of file +go1.0.1 \ No newline at end of file ++++++ go-1.0.tar.bz2 -> go-1.0.1.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/go/go-1.0.tar.bz2 /work/SRC/openSUSE:Factory/.go.new/go-1.0.1.tar.bz2 differ: char 11, line 1 ++++++ go.sh ++++++ --- /var/tmp/diff_new_pack.prxLns/_old 2012-05-10 14:31:59.000000000 +0200 +++ /var/tmp/diff_new_pack.prxLns/_new 2012-05-10 14:31:59.000000000 +0200 @@ -1,17 +1,18 @@ # go toolchain env paths -gopath=lib +libdir=lib arch=386 if [ -x /usr/lib64/go ] ; then - gopath=lib64 + libdir=lib64 arch=amd64 fi export GOOS="linux" export GOARCH=$arch -export GOROOT=/usr/$gopath/go +export GOROOT=/usr/$libdir/go export GOBIN=/usr/bin +export GOPATH=$GOROOT/contrib if [ `id -u` != 0 ]; then -export GOPATH=$HOME/go -export GOBIN=$GOPATH/bin -fi \ No newline at end of file + export GOPATH=$HOME/go:$GOROOT/contrib + export GOBIN=$HOME/go/bin +fi ++++++ godoc-path-locations.patch ++++++ --- /var/tmp/diff_new_pack.prxLns/_old 2012-05-10 14:31:59.000000000 +0200 +++ /var/tmp/diff_new_pack.prxLns/_new 2012-05-10 14:31:59.000000000 +0200 @@ -1,21 +1,40 @@ diff --git a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go -index f6dc678..3579dc7 100644 +index f6dc678..0fa85bc 100644 --- a/src/cmd/godoc/godoc.go +++ b/src/cmd/godoc/godoc.go -@@ -81,8 +81,16 @@ var ( - cmdHandler docServer +@@ -82,7 +82,35 @@ var ( pkgHandler docServer ) + +const ( + SUSE_DOC_DIR = "/usr/share/doc/packages/go-doc/" -+ SUSE_SRC_DIR = "/usr/share/go/" ++ SUSE_SRC_DIR = "/usr/share/go" ++ SUSE_CONTRIB_SRC_DIR = "/usr/share/go/contrib/src/pkg/" +) - ++ func initHandlers() { + // OPENSUSE: Bind godoc & source location + fs.Bind("/doc", OS(SUSE_DOC_DIR), "/doc", bindReplace) + fs.Bind("/src", OS(SUSE_SRC_DIR), "/src", bindBefore) + ++ d, err := os.Open(SUSE_CONTRIB_SRC_DIR) ++ if err != nil { ++ log.Fatalf("cannot read Go contrib source dir:", err) ++ } ++ if files, err := d.Readdir(0); err == nil { ++ for _, file := range files { ++ if file.IsDir() { ++ path := SUSE_CONTRIB_SRC_DIR + file.Name() ++ if *pkgPath != "" { ++ *pkgPath += ":" ++ } ++ *pkgPath += path ++ } ++ } ++ } else { ++ log.Fatal(err) ++ } ++ // Add named directories in -path argument as // subdirectories of src/pkg. for _, p := range filepath.SplitList(*pkgPath) { ++++++ macros.go ++++++ --- /var/tmp/diff_new_pack.prxLns/_old 2012-05-10 14:31:59.000000000 +0200 +++ /var/tmp/diff_new_pack.prxLns/_new 2012-05-10 14:31:59.000000000 +0200 @@ -8,9 +8,11 @@ %go_arch GOARCH %go_build_ver %(go version | sed 's/^go version //' | tr -d ' ') -%go_dir %{_libdir}/go -%go_sitedir %{_libdir}/go/pkg -%go_sitearch %{_libdir}/go/pkg/linux_%{go_arch} +%go_dir %{_libdir}/go +%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_requires Requires: go-devel = %go_build_ver @@ -39,7 +41,7 @@ cd %{_builddir} && rmdir %{_builddir}/%(basename %1) \ ln -s $GOPATH/src/$IMPORTPATH %{_builddir}/%(basename %1) \ # we'll be installing packages/binaries, make the targ dirs \ -install -d %{buildroot}%{go_sitearch} \ +install -d %{buildroot}%{go_contribdir} \ install -d %{buildroot}%{_bindir} \ %{nil} @@ -93,6 +95,7 @@ # See: go help install, go help packages %gobuild() \ export BUILDFLAGS="-s -v -p 4" \ +export GOPATH=%{_builddir}/go:%{go_contribdir} \ export GOBIN=%{_builddir}/go/bin \ MOD="" \ if [ %# -gt 0 ]; then \ @@ -114,9 +117,10 @@ # Install all compiled packages and binaries to the buildroot %goinstall() \ export GOPATH=%{_builddir}/go \ +install -d %{buildroot}%{go_contribdir} \ TMPPKG=%{_builddir}/go/pkg \ if [ "$(ls -A $TMPPKG)" ]; then \ - cp -ar %{_builddir}/go/pkg/linux_%{go_arch}/* %{buildroot}%{go_sitearch} \ + cp -ar %{_builddir}/go/pkg/linux_%{go_arch}/* %{buildroot}%{go_contribdir} \ fi \ TMPBIN=%{_builddir}/go/bin \ if [ "$(ls -A $TMPBIN)" ]; then \ @@ -143,3 +147,10 @@ go test %1... \ fi \ %{nil} + +%godoc() \ +install -d %{buildroot}%{go_contribsrcdir} \ +cd %{_builddir}/go/src \ +find . -name *.go -exec install -Dm644 \{\} %{buildroot}%{go_contribsrcdir}/\{\} \\; \ +%{nil} + -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org