Hello community, here is the log from the commit of package go for openSUSE:Factory checked in at 2012-01-25 11:07:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-01-19 09:41:45.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.go.new/go.changes 2012-01-25 11:08:01.000000000 +0100 @@ -1,0 +2,29 @@ +Tue Jan 24 17:28:14 UTC 2012 - gra...@andtech.eu + +- Add %goinstall() macro for new go tool +- Update godoc path locations patch +- Update go install patch (fixes building packages with "go install") + +- Update to weekly.2012-01-20 +- The image package's Tiled type has been renamed to Repeated. +- The encoding/xml package has been changed to make more idiomatic + use of struct tags, among other things. If you use the xml package + please read the change description to see if your code is affected: + http://code.google.com/p/go/source/detail?r=70e914beb409 +- exp/sql package to database/sql +- Package net's SetTimeout methods were changed to SetDeadline. +- Many functions in package os now take a os.FileMode argument instead + of a plain uint32. An os.ModeSticky constant is also now defined. +- The meaning of the first buffer element for image.YCbCr has changed to + match the semantics of the other image types like image.RGBA. +- The NewMD5, NewSHA1 and NewSHA256 functions in crypto/hmac have been + deprecated. Use New instead, explicitly passing the hash function. + +------------------------------------------------------------------- +Fri Dec 30 06:12:26 UTC 2011 - gra...@andtech.eu + +- Patch new "go install" to allow -s option + This prevents rebuild/reinstall of std libs and allows packages + to be installed into a users $GOPATH + +------------------------------------------------------------------- Old: ---- go-0.0.r60.3+hg20111222.tar.bz2 New: ---- go-0.0.r60.3+hg20120120.tar.bz2 go-install-dont-rebuild-std-packages.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ go.spec ++++++ --- /var/tmp/diff_new_pack.aZUs6O/_old 2012-01-25 11:08:03.000000000 +0100 +++ /var/tmp/diff_new_pack.aZUs6O/_new 2012-01-25 11:08:03.000000000 +0100 @@ -16,8 +16,10 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: go -Version: 0.0.r60.3+hg20111222 +Version: 0.0.r60.3+hg20120120 Release: 0 Summary: A compiled, garbage-collected, concurrent programming language License: BSD-3-Clause @@ -36,6 +38,8 @@ Patch2: gdb-printer.patch # PATCH-FIX-OPENSUSE set correct install path (GOBIN) for Make.cmd Patch3: go-set-make-cmd-install-path-to-gobin.patch +# PATCH-FIX-OPENSUSE add -s flag to 'go install' (don't rebuild std libs) +Patch4: go-install-dont-rebuild-std-packages.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison BuildRequires: ed @@ -91,9 +95,11 @@ %prep %setup -q -n %{name} +echo %{url} %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 cp %{SOURCE4} . # setup go_arch (BSD-like scheme) @@ -156,6 +162,8 @@ for ext in *.{go,c,h}; do find src -name ${ext} -exec install -Dm644 \{\} %{buildroot}%{_datadir}/go/\{\} \; done +ln -s /usr/share/go/src/pkg $GOROOT/src/pkg +ln -s /usr/share/go/src/cmd $GOROOT/src/cmd # replace $GOROOT in several scripts sed -i 's|GOROOT=.*$|GOROOT=%{_libdir}/go|g' %{buildroot}%{_bindir}/gomake ++++++ VERSION ++++++ --- /var/tmp/diff_new_pack.aZUs6O/_old 2012-01-25 11:08:03.000000000 +0100 +++ /var/tmp/diff_new_pack.aZUs6O/_new 2012-01-25 11:08:03.000000000 +0100 @@ -1 +1 @@ -weekly.2011-12-22 10879 +weekly.2012-01-15 f690897afe60 ++++++ go-0.0.r60.3+hg20111222.tar.bz2 -> go-0.0.r60.3+hg20120120.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/go/go-0.0.r60.3+hg20111222.tar.bz2 /work/SRC/openSUSE:Factory/.go.new/go-0.0.r60.3+hg20120120.tar.bz2 differ: char 11, line 1 ++++++ go-godoc-path-locations.patch ++++++ --- /var/tmp/diff_new_pack.aZUs6O/_old 2012-01-25 11:08:03.000000000 +0100 +++ /var/tmp/diff_new_pack.aZUs6O/_new 2012-01-25 11:08:03.000000000 +0100 @@ -1,10 +1,11 @@ -diff -ru a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go ---- a/src/cmd/godoc/godoc.go 2011-09-22 10:15:24.000000000 +0200 -+++ b/src/cmd/godoc/godoc.go 2011-09-22 10:25:35.697267470 +0200 -@@ -80,6 +80,11 @@ +diff --git a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go +--- a/src/cmd/godoc/godoc.go ++++ b/src/cmd/godoc/godoc.go +@@ -88,6 +88,12 @@ pkgHandler httpHandler ) ++// OPENSUSE-PATCHFIX-GODOC-LOCATIONS +const ( + docroot = "/usr/share/doc/packages/go-doc/doc" + srcroot = "/usr/share/go/" @@ -13,7 +14,7 @@ func initHandlers() { paths := filepath.SplitList(*pkgPath) for _, t := range build.Path { -@@ -90,9 +95,9 @@ +@@ -98,9 +104,9 @@ } fsMap.Init(paths) @@ -26,7 +27,7 @@ } func registerPublicHandlers(mux *http.ServeMux) { -@@ -531,7 +536,7 @@ +@@ -603,7 +609,7 @@ } func readTemplate(name string) *template.Template { @@ -35,24 +36,38 @@ if *templateDir != "" { defaultpath := path path = filepath.Join(*templateDir, name) -@@ -702,13 +707,18 @@ +@@ -780,6 +786,16 @@ } func serveFile(w http.ResponseWriter, r *http.Request) { -+ // openSUSE: serv docs from root of go-doc package install location ++ // openSUSE: serv docs from root of go-doc package install location + if strings.HasPrefix(r.URL.Path, "/doc/") { + http.Redirect(w, r, "/"+ r.URL.Path[len("/doc"):], http.StatusMovedPermanently) + return + } - relpath := r.URL.Path[1:] // serveFile URL paths start with '/' ++ if r.URL.Path == "/" { ++ serveHTMLDoc(w, r, filepath.Join(docroot, "root.html"), "root.html") ++ return ++ } ++ + relpath := r.URL.Path + + // Check to see if we need to redirect or serve another file. +@@ -794,7 +810,7 @@ + } + + relpath = relpath[1:] // strip leading slash - abspath := absolutePath(relpath, *goroot) + abspath := absolutePath(relpath, docroot) - // pick off special cases and hand the rest to the standard file server - switch r.URL.Path { - case "/": -- serveHTMLDoc(w, r, filepath.Join(*goroot, "doc", "root.html"), "doc/root.html") -+ serveHTMLDoc(w, r, filepath.Join(docroot, "doc", "root.html"), "root.html") - return + switch path.Ext(relpath) { + case ".html": +@@ -1368,7 +1384,7 @@ + metadata[meta.filePath] = &meta + } + } +- scan(filepath.Join(*goroot, "doc")) ++ scan(filepath.Join(docroot, "")) + docMetadata.set(metadata) + } - case "/doc/root.html": ++++++ go-install-dont-rebuild-std-packages.patch ++++++ diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go --- a/src/cmd/go/build.go +++ b/src/cmd/go/build.go @@ -68,6 +68,7 @@ var buildP = runtime.NumCPU() // -p flag var buildV bool // -v flag var buildX bool // -x flag +var buildS bool // OPENSUSE -s (for packaging only) var buildO = cmdBuild.Flag.String("o", "", "output file") @@ -78,6 +79,8 @@ cmd.Flag.IntVar(&buildP, "p", buildP, "") cmd.Flag.BoolVar(&buildV, "v", false, "") cmd.Flag.BoolVar(&buildX, "x", false, "") + // OPENSUSE + cmd.Flag.BoolVar(&buildS, "s", false, "") } func runBuild(cmd *Command, args []string) { @@ -315,6 +318,9 @@ } if p.Standard { + if buildS { + return a + } switch p.ImportPath { case "builtin", "unsafe": // Fake packages - nothing to build. diff --git a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go++++++ go.sh ++++++ --- /var/tmp/diff_new_pack.aZUs6O/_old 2012-01-25 11:08:03.000000000 +0100 +++ /var/tmp/diff_new_pack.aZUs6O/_new 2012-01-25 11:08:03.000000000 +0100 @@ -12,5 +12,5 @@ export GOBIN=/usr/bin if [ `id -u` != 0 ]; then -export GOPATH=$HOME/go:$GOROOT +export GOPATH=$HOME/go fi \ No newline at end of file ++++++ macros.go ++++++ --- /var/tmp/diff_new_pack.aZUs6O/_old 2012-01-25 11:08:03.000000000 +0100 +++ /var/tmp/diff_new_pack.aZUs6O/_new 2012-01-25 11:08:03.000000000 +0100 @@ -24,3 +24,37 @@ HOST_EXTRA_CFLAGS="%{optflags}" TARGDIR=%{buildroot}%{go_sitearch} GOBIN=%{buildroot}%{_bindir} gomake %go_make_install %{go_make} install %go_make_test %{go_make} test + +# "go install/build" expects valid $GOROOT for std library packages and potentially +# a valid $GOPATH with the expected GOPATH structure. Third party librarys need +# to be built with their "importpath" option exactly matching the expected import +# statement. This is important because the importpath will be baked into the library's +# type definitions at compile time. This means the package source must exist either +# inside a valid GOPATH or a relative path to the source must match the 'importpath' +# option when 'go install' is called. +# +# See "go help install/importpath/gopath" + +%goinstall() \ +mkdir -p %{_builddir}/src/%1 && rmdir %{_builddir}/src/%1 \ +ln -s %{_builddir}/%(basename %1) %{_builddir}/src/%1 \ +install -d %{buildroot}%{go_sitearch} \ +install -d %{buildroot}%{_bindir} \ +if [ %# -gt 1 ]; then \ + GOIMPORT=%1/%2 \ +else \ + GOIMPORT=%1 \ +fi \ +GCFLAGS=-l GOPATH=%{go_dir}:%{_builddir} GOBIN=%{buildroot}%{_bindir} go install -s -v -p 4 $GOIMPORT \ +cp -arv %{_builddir}/pkg/linux_%{go_arch}/* %{buildroot}%{go_sitearch} \ +%{nil} + +%gotest() \ +if [ %# -gt 1 ]; then \ + GOIMPORT=%1/%2 \ +else \ + GOIMPORT=%1 \ +fi \ +GOPATH=%{go_dir}:%{_builddir} \ +go test $GOIMPORT \ +%{nil} -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org