- Update to 2011/08/10 mercurial version (post r58 and

weekly.2011-07-07):
  * Package exec has been redesigned with a more convenient and 
    succinct API.
  * Package os/signal's Signal and UnixSignal types have been moved 
    to the os package.
  * Package image/draw is the new name for exp/draw. The GUI-related
    code from exp/draw is now located in the exp/gui package.
  More at http://golang.org/doc/devel/release.html#r58

OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=79
This commit is contained in:
Sascha Peilicke 2011-07-10 15:54:26 +00:00 committed by Git OBS Bridge
parent ca0c8580cd
commit 2bfa629adb
5 changed files with 48 additions and 29 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dae2241b0c3e46450413bdf30a0fb6e23d63275e7e664263b7e41b9681cdd58d
size 8819385

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9bf0509cbd1db19e1994e2f8c0403d865211d6d380f64b40c986fe9118c41a5c
size 8849507

View File

@ -1,43 +1,48 @@
--- a/src/cmd/godoc/godoc.go 2011-03-08 18:46:40.906386884 +0100
+++ b/src/cmd/godoc/godoc.go 2011-03-08 19:10:03.880387209 +0100
@@ -78,12 +78,15 @@
diff -u a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go
--- a/src/cmd/godoc/godoc.go 2011-07-10 15:41:31.346160562 +0200
+++ b/src/cmd/godoc/godoc.go 2011-07-10 16:08:22.579780989 +0200
@@ -82,6 +82,10 @@
pkgHandler httpHandler
)
+// for openSUSE packaging of godoc
+const docroot = "/usr/share/doc/packages/go-doc/doc"
+const srcroot = "/usr/share/go/"
+const (
+ docroot = "/usr/share/doc/packages/go-doc/doc"
+ srcroot = "/usr/share/go/"
+)
func initHandlers() {
fsMap.Init(*pkgPath)
- fileServer = http.FileServer(*goroot, "")
paths := filepath.SplitList(*pkgPath)
@@ -93,9 +97,9 @@
}
fsMap.Init(paths)
- fileServer = http.FileServer(http.Dir(*goroot))
- cmdHandler = httpHandler{"/cmd/", filepath.Join(*goroot, "src", "cmd"), false}
- pkgHandler = httpHandler{"/pkg/", filepath.Join(*goroot, "src", "pkg"), true}
+ fileServer = http.FileServer(docroot, "")
+ fileServer = http.FileServer(http.Dir(docroot))
+ cmdHandler = httpHandler{"/cmd/", filepath.Join(srcroot, "src/cmd"), false}
+ pkgHandler = httpHandler{"/pkg/", filepath.Join(srcroot, "src/pkg"), true}
}
@@ -634,7 +637,7 @@
@@ -646,7 +650,7 @@
func readTemplate(name string) *template.Template {
- path := filepath.Join(*goroot, "lib", "godoc", name)
+ path := filepath.Join(*goroot, "lib/"+name)
if *templateDir != "" {
defaultpath := path
path = filepath.Join(*templateDir, name)
@@ -819,13 +822,19 @@
+ path := filepath.Join(*goroot, "lib/"+name)
if *templateDir != "" {
defaultpath := path
path = filepath.Join(*templateDir, name)
@@ -835,13 +839,18 @@
func serveFile(w http.ResponseWriter, r *http.Request) {
+ // 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
+ }
+
+ // 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 '/'
- abspath := absolutePath(relpath, *goroot)
+ abspath := absolutePath(relpath, docroot)
@ -46,7 +51,7 @@
switch r.URL.Path {
case "/":
- serveHTMLDoc(w, r, filepath.Join(*goroot, "doc", "root.html"), "doc/root.html")
+ serveHTMLDoc(w, r, filepath.Join(docroot, "root.html"), "root.html")
+ serveHTMLDoc(w, r, filepath.Join(docroot, "doc", "root.html"), "doc/root.html")
return
case "/doc/root.html":

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Sun Jul 10 14:09:02 UTC 2011 - saschpe@gmx.de
- Update to 2011/08/10 mercurial version (post r58 and
weekly.2011-07-07):
* Package exec has been redesigned with a more convenient and
succinct API.
* Package os/signal's Signal and UnixSignal types have been moved
to the os package.
* Package image/draw is the new name for exp/draw. The GUI-related
code from exp/draw is now located in the exp/gui package.
More at http://golang.org/doc/devel/release.html#r58
-------------------------------------------------------------------
Fri Jun 24 21:41:27 UTC 2011 - saschpe@gmx.de

View File

@ -11,23 +11,24 @@
# published by the Open Source Initiative.
Name: go
Version: 0.0.r57.1+hg20110624
Version: 0.0.r58+hg20110810
Release: 0
Summary: A compiled, garbage-collected, concurrent programming language
Group: Development/Languages/Other
License: BSD3c
URL: http://golang.org/
URL: http://golang.org
Source0: go-%{version}.tar.bz2
Source1: rpmlintrc
Source2: go.sh
Source3: macros.go
# PATCH-FIX-OPENSUSE adjust documentation paths
Patch1: go-godoc-path-locations.patch
## PATCH-FIX-UPSTREAM fix various compiler warnings
# PATCH-FIX-UPSTREAM fix various compiler warnings
#Patch2: go-fix-werrors.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ed
BuildRequires: bison
BuildRequires: mercurial
%if 0%{?suse_version} > 1020
BuildRequires: fdupes
Recommends: go-doc
@ -154,7 +155,7 @@ install -Dm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.go
rm %{buildroot}%{_libdir}/go/pkg/linux_%{go_arch}/{cgocall,runtime}.h
ln -s %{_datadir}/go/src/pkg/runtime/{cgocall,runtime}.h %{buildroot}%{_libdir}/go/pkg/linux_%{go_arch}/
# issue #1242
# issue #1242, issue #2022
# Go binaries are supposedly DWARF compliant but brp_strip_debug breaks them
export NO_BRP_STRIP_DEBUG=true
# Disable brp-strip-static-archive on Fedora, breaks build