Hello community, here is the log from the commit of package go for openSUSE:Factory checked in at 2012-03-08 19:42:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-02-14 11:24:13.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.go.new/go.changes 2012-03-08 19:42:56.000000000 +0100 @@ -1,0 +2,48 @@ +Wed Mar 7 06:12:58 UTC 2012 - gra...@andtech.eu + +- update gotest/gofix macro + +------------------------------------------------------------------- +Tue Mar 6 04:20:18 UTC 2012 - gra...@andtech.eu + +- Update godoc & go build patches +- removed dwarf pretty printer patch +- add godoc systemd service file + +------------------------------------------------------------------- +Mon Mar 5 05:34:19 UTC 2012 - gra...@andtech.eu + +- Update to weekly.2012-03-04 +- Changes to go/build required code refactoring + see: http://weekly.golang.org/doc/devel/weekly.html#2012-03-04 + +------------------------------------------------------------------- +Fri Feb 24 01:03:28 UTC 2012 - gra...@andtech.eu + +- Wpdate to weekly.2012-02-22 +- Some BC breaks and language changes, too many details to list + see release announcement: + http://weekly.golang.org/doc/devel/weekly.html#2012-02-22 + +------------------------------------------------------------------- +Fri Feb 17 14:30:55 UTC 2012 - gra...@andtech.eu + +- cmd/gc: fix comparison of struct with _ field + fixes build of go-go-gtk and other packages that use cgo + +------------------------------------------------------------------- +Fri Feb 17 12:54:32 UTC 2012 - gra...@andtech.eu + +- Update to tip @ 2012.02017 +- sync: say that Cond.Wait can not return spuriously +- runtime: Permit default behaviour of SIGTSTP, SIGTTIN, SIGTTOU +- cmd/gc: correctly typecheck expression lists in returns +- syscall: fix bounds check in Error + +------------------------------------------------------------------- +Thu Feb 16 14:54:41 UTC 2012 - gra...@andtech.eu + +- Update to weekly.2012-02-12 + http://weekly.golang.org/doc/devel/weekly.html#2012-02-12 + +------------------------------------------------------------------- Old: ---- gdb-printer.patch go-0.0.r60.3+hg20120207.tar.bz2 go-godoc-path-locations.patch go-install-dont-rebuild-std-packages.patch New: ---- go-0.0.r60.3+hg20120304.tar.bz2 go-build-dont-reinstall-stdlibs.patch godoc-path-locations.patch godoc.service ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ go.spec ++++++ --- /var/tmp/diff_new_pack.oqD00U/_old 2012-03-08 19:42:59.000000000 +0100 +++ /var/tmp/diff_new_pack.oqD00U/_new 2012-03-08 19:42:59.000000000 +0100 @@ -19,7 +19,7 @@ Name: go -Version: 0.0.r60.3+hg20120207 +Version: 0.0.r60.3+hg20120304 Release: 0 Summary: A compiled, garbage-collected, concurrent programming language License: BSD-3-Clause @@ -32,16 +32,17 @@ # This file is otherwise generated at build-time from the .hg directory, which was # stripped from the tarball to save space. TODO: Update contents after version update! Source4: VERSION -# PATCH-FIX-OPENSUSE adjust documentation paths -Patch1: go-godoc-path-locations.patch -# PATCH-FIX-OPENSUSE set correct location of gdb pretty printer -Patch2: gdb-printer.patch +Source5: godoc.service +# 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) -Patch3: go-install-dont-rebuild-std-packages.patch +Patch3: go-build-dont-reinstall-stdlibs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison BuildRequires: ed -BuildRequires: mercurial +%if 0%{?suse_version} >= 1210 +BuildRequires: systemd +%endif %if 0%{?suse_version} > 1020 BuildRequires: fdupes Recommends: go-doc @@ -51,6 +52,10 @@ Provides: go-devel = %{version} Obsoletes: go-devel < %{version} ExclusiveArch: %ix86 x86_64 %arm +# For godoc service +%if 0%{?suse_version} >= 1210 +%systemd_requires +%endif %description Go is an expressive, concurrent, garbage collected systems programming language @@ -93,11 +98,10 @@ %prep %setup -q -n %{name} -echo %{url} %patch1 -p1 -#%%patch2 -p1 %patch3 -p1 cp %{SOURCE4} . +cp %{SOURCE5} . # setup go_arch (BSD-like scheme) %ifarch %ix86 @@ -113,19 +117,14 @@ %define go_arch arm %endif -# let the DWARF emitter add correct path to the go pretty printer -%define gdb_printer %{_libdir}/go/pkg/linux_%{go_arch}/runtime/runtime-gdb.py - %build - export GOROOT="`pwd`" +export GOROOT_FINAL=%{_libdir}/go export GOBIN="$GOROOT/bin" mkdir -p "$GOBIN" cd src export GDB_PRINTER="%{gdb_printer}" -# enable compiler inlining -#export GCFLAGS=-l -HOST_EXTRA_CFLAGS="%{optflags} -Wno-error -D GDB_PRINTER='\"$GDB_PRINTER\"'" ./make.bash +HOST_EXTRA_CFLAGS="%{optflags} -Wno-error" ./make.bash %install export GOROOT="%{buildroot}%{_libdir}/%{name}" @@ -136,33 +135,32 @@ install -Dm644 misc/vim/syntax/go.vim %{buildroot}%{_datadir}/vim/site/syntax/go.vim 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 + +# godoc service +mkdir -p %{buildroot}%{_unitdir} +install -Dm644 godoc.service %{buildroot}%{_unitdir}/godoc.service + +# copy document templates, packages, obj libs and command utilities mkdir -p %{buildroot}%{_bindir} -mkdir -p %{buildroot}%{_sbindir} -mkdir -p $GOROOT/bin/tool -mv bin/tool $GOROOT/bin +mkdir -p $GOROOT/lib +cp -ar lib/godoc $GOROOT/lib +mv pkg $GOROOT mv bin/* %{buildroot}%{_bindir} - rm -f %{buildroot}%{_bindir}/{hgpatch,quietgcc} -mkdir -p $GOROOT/src -# source files for goinstall, godoc, etc +# source files for go install, godoc, etc install -d %{buildroot}%{_datadir}/go -for ext in *.{go,c,h,s,S}; do +for ext in *.{go,c,h,s,S,py}; do find src -name ${ext} -exec install -Dm644 \{\} %{buildroot}%{_datadir}/go/\{\} \; done +mkdir -p $GOROOT/src ln -s /usr/share/go/src/pkg $GOROOT/src/pkg ln -s /usr/share/go/src/cmd $GOROOT/src/cmd -mkdir -p $GOROOT/pkg/obj -install -Dm644 pkg/obj/{libgc.a,libcc.a,lib9.a,libbio.a,libmach.a} $GOROOT/pkg/obj -cp -r lib/godoc $GOROOT/lib -cp -r pkg $GOROOT - # documentation and examples # fix documetation permissions (rpmlint warning) find doc/ misc/ -type f -exec chmod 0644 '{}' \; # remove unwanted arch-dependant binaries (rpmlint warning) -#rm doc/codelab/wiki/{htmlify.bin,srcextract.bin} rm -rf misc/cgo/test/{_*,*.o,*.out,*.6,*.8} rm -f misc/dashboard/builder/{gobuilder,*6,*.8} rm -f misc/goplay/{goplay,*.6,*.8} @@ -174,9 +172,6 @@ # install RPM macros ($GOARCH prepared in %%prep section) install -Dm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.go -# install go specific gdb pretty printer and functions -install -Dm644 src/pkg/runtime/runtime-gdb.py %{buildroot}%{_libdir}/go/pkg/linux_%{go_arch}/runtime - # break hard links 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}/ @@ -188,17 +183,36 @@ %fdupes %{buildroot}%{_prefix} %endif + +%pre +%if 0%{?suse_version} >= 1210 +%service_add_pre godoc.service +%endif +%post +%if 0%{?suse_version} >= 1210 +%service_add_pre godoc.service +%endif +%preun +%if 0%{?suse_version} >= 1210 +%service_add_pre godoc.service +%endif +%postun +%if 0%{?suse_version} >= 1210 +%service_add_pre godoc.service +%endif + + %files %defattr(-,root,root,-) %doc AUTHORS CONTRIBUTORS LICENSE PATENTS README %ifarch %ix86 %arm -%{_libdir}/go/bin/tool/8* +%{_libdir}/go/pkg/tool/linux_%{go_arch}/8* %endif %ifarch x86_64 -%{_libdir}/go/bin/tool/6* +%{_libdir}/go/pkg/tool/linux_%{go_arch}/6* %endif %ifarch %arm -%{_libdir}/go/bin/tool/5* +%{_libdir}/go/pkg/tool/linux_%{go_arch}/5* %endif %{_bindir}/go* %{_libdir}/go/ @@ -206,6 +220,9 @@ %config %{_sysconfdir}/bash_completion.d/go %config %{_sysconfdir}/profile.d/go.sh %config %{_sysconfdir}/rpm/macros.go +%if 0%{?suse_version} >= 1210 +%{_unitdir}/godoc.service +%endif %files doc %defattr(-,root,root,-) ++++++ VERSION ++++++ --- /var/tmp/diff_new_pack.oqD00U/_old 2012-03-08 19:42:59.000000000 +0100 +++ /var/tmp/diff_new_pack.oqD00U/_new 2012-03-08 19:42:59.000000000 +0100 @@ -1 +1 @@ -weekly.2012-02-08 5690c7e8 +weekly.2012-03-04 +f4470a54e6db \ No newline at end of file ++++++ go-0.0.r60.3+hg20120207.tar.bz2 -> go-0.0.r60.3+hg20120304.tar.bz2 ++++++ /work/SRC/openSUSE:Factory/go/go-0.0.r60.3+hg20120207.tar.bz2 /work/SRC/openSUSE:Factory/.go.new/go-0.0.r60.3+hg20120304.tar.bz2 differ: char 11, line 1 ++++++ go-build-dont-reinstall-stdlibs.patch ++++++ diff --git a/src/cmd/go/build.go b/src/cmd/go/build.go index cf249cd..56c540f 100644 --- a/src/cmd/go/build.go +++ b/src/cmd/go/build.go @@ -85,6 +85,7 @@ func init() { } // Flags set by multiple commands. +var buildS bool // OPENSUSE -s (for packaging only) var buildA bool // -a flag var buildN bool // -n flag var buildP = runtime.NumCPU() // -p flag @@ -101,6 +102,10 @@ var buildContext = build.Default // addBuildFlags adds the flags common to the build and install commands. func addBuildFlags(cmd *Command) { // NOTE: If you add flags here, also add them to testflag.go. + + // OPENSUSE + cmd.Flag.BoolVar(&buildS, "s", false, "") + cmd.Flag.BoolVar(&buildA, "a", false, "") cmd.Flag.BoolVar(&buildN, "n", false, "") cmd.Flag.IntVar(&buildP, "p", buildP, "") @@ -714,6 +719,12 @@ func (b *builder) build(a *action) error { // install is the action for installing a single package or executable. func (b *builder) install(a *action) error { + + // OPENSUSE + if buildS && (a.p.Standard || a.p.ImportPath == "cmd/cgo") { + return nil + } + a1 := a.deps[0] perm := os.FileMode(0666) if a1.link { ++++++ godoc-path-locations.patch ++++++ diff --git a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go index b290e31..725c2b5 100644 --- a/src/cmd/godoc/godoc.go +++ b/src/cmd/godoc/godoc.go @@ -81,8 +81,16 @@ var ( cmdHandler docServer pkgHandler docServer ) +const ( + SUSE_DOC_DIR = "/usr/share/doc/packages/go-doc/" + SUSE_SRC_DIR = "/usr/share/go/" +) 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) + // Add named directories in -path argument as // subdirectories of src/pkg. for _, p := range filepath.SplitList(*pkgPath) { ++++++ godoc.service ++++++ # systemd service file for Go language API & documentation server # this file is part of the Go programming language package [Unit] Description=godoc - Go API and documentation server After=syslog.target network.target [Service] User=nobody PIDFile=/var/run/godoc.pid ExecStart=/usr/bin/godoc -http=:6060 -index=true ExecStop=/bin/kill -TERM $MAINPID ExecStop=/bin/kill -QUIT $MAINPID KillMode=process KillSignal=SIGKILL SendSIGKILL=yes RestartSec=30 Restart=always [Install] WantedBy=multi-user.target ++++++ macros.go ++++++ --- /var/tmp/diff_new_pack.oqD00U/_old 2012-03-08 19:42:59.000000000 +0100 +++ /var/tmp/diff_new_pack.oqD00U/_new 2012-03-08 19:42:59.000000000 +0100 @@ -19,71 +19,124 @@ %go_disable_brp_strip_static_archive \ %define __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib/rpm/[^/]*/?brp-strip-static-archive %{__strip}!!g') -%go_make \ -install -d %{buildroot}%{_bindir} \ -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() \ +# Prepare the expected Go package build environement. +# We need a $GOPATH: go help gopath +# We need a valid importpath: go help packages +%goprep() \ export GOPATH=%{_builddir}/go \ -mkdir -p %{_builddir}/go/src/%1 && mkdir %{_builddir}/go/bin -p && mv ./* %{_builddir}/go/src/%1 \ -mkdir -p %{_builddir}/go/pkg/linux_%{go_arch}/%1 \ -cd ../ && rmdir %{_builddir}/%(basename %1) \ -ln -s %{_builddir}/go/src/%1 %{_builddir}/%(basename %1) \ +if [ %# -eq 0 ]; then \ + echo "goprep: please specify a valid importpath, see: go help packages" \ + exit 1 \ +else \ + export IMPORTPATH=%1 \ +fi \ +# create the importpath and move the package there \ +mkdir -p $GOPATH/src/$IMPORTPATH && mv ./* $GOPATH/src/$IMPORTPATH \ +# now link the old location to the new (for compatibility) \ +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}%{_bindir} \ -if [ %# -gt 1 ]; then \ - if [ "%2" == "..." ]; then \ - GOIMPORT=%1%2 \ - else \ - GOIMPORT=%1/%2 \ - fi \ +%{nil} + +# %%gobuild macro actually performs the command "go install", but the go +# toolchain will install to the $GOPATH which allows us then customise the final +# install for the distro default locations. +# +# gobuild accepts zero or more arguments. Each argument corresponds to +# a modifier of the importpath. If no arguments are passed, this is equivalent +# to the following go install statement: +# +# go install [importpath] +# +# Only the first or last arguement may be ONLY the wildcard argument "..." +# if the wildcard argument is passed then the importpath expands to all packages +# and binaries underneath it. If the argument contains only the wildcard no further +# arguments are considered. +# +# If no wildcard argument is passed, go install will be invoked on each $arg +# subdirectory under the importpath. +# +# Valid importpath modifier examples: +# +# example: %gobuild ... +# command: go install importpath... +# +# example: %gobuild /... +# command: go install importpath/... (All subdirs NOT including importpath) +# +# example: %gobuild foo... +# command: go install importpath/foo... (All subdirs INCLUDING foo) +# +# example: %gobuild foo ... (same as foo...) +# command: go install importpath/foo... (All subdirs INCLUDING foo) +# +# example: %gobuild foo/... +# commands: go install importpath/foo/... (All subdirs NOT including foo) +# +# example: %gobuild foo bar +# commands: go install importpath/foo +# go install importpath/bar +# +# example: %gobuild foo ... bar +# commands: go install importpath/foo... (bar is ignored) +# +# example: %gobuild foo bar... baz +# commands: go install importpath/foo +# go install importpath/bar... +# go install importpath/baz +# +# See: go help install, go help packages +%gobuild() \ +export BUILDFLAGS="-s -v -p 4" \ +MOD="" \ +if [ %# -gt 0 ]; then \ + for mod in %*; do \ + if [ $mod == "..." ]; then \ + MOD=$MOD... \ + go install $BUILDFLAGS $IMPORTPATH$MOD \ + break \ + else \ + MOD=/$mod \ + go install $BUILDFLAGS $IMPORTPATH$MOD \ + fi \ + done \ else \ - GOIMPORT=%1 \ + go install $BUILDFLAGS $IMPORTPATH \ +fi \ +%{nil} + +# Install all compiled packages and binaries to the buildroot +%goinstall() \ +export GOPATH=%{_builddir}/go \ +TMPPKG=%{_builddir}/go/pkg \ +if [ "$(ls -A $TMPPKG)" ]; then \ + cp -ar %{_builddir}/go/pkg/linux_%{go_arch}/* %{buildroot}%{go_sitearch} \ fi \ -GOPATH=%{_builddir}/go go install -s -v -x -p 4 $GOIMPORT \ -cp -arv %{_builddir}/go/pkg/linux_%{go_arch}/%1 %{buildroot}%{go_sitearch} \ TMPBIN=%{_builddir}/go/bin \ if [ "$(ls -A $TMPBIN)" ]; then \ install -m755 $TMPBIN/* %{buildroot}%{_bindir} \ fi \ %{nil} -%gotest() \ -if [ %# -gt 1 ]; then \ - if [ "%2" == "..." ]; then \ - GOIMPORT=%1%2 \ - else \ - GOIMPORT=%1/%2 \ - fi \ +%gofix() \ +export GOPATH=%{_builddir}/go \ +if [ %# -eq 0 ]; then \ + echo "gofix: please specify a valid importpath, see: go help fix" \ + exit 1 \ else \ - GOIMPORT=%1 \ + go fix %1... \ fi \ -GOPATH=%{_builddir}/go \ -go test $GOIMPORT \ %{nil} -%gofix() \ -if [ %# -gt 1 ]; then \ - if [ "%2" == "..." ]; then \ - GOIMPORT=%1%2 \ - else \ - GOIMPORT=%1/%2 \ - fi \ +%gotest() \ +export GOPATH=%{_builddir}/go \ +if [ %# -eq 0 ]; then \ + echo "gotest: please specify a valid importpath, see: go help test" \ + exit 1 \ else \ - GOIMPORT=%1 \ + go test %1... \ fi \ -GOPATH=%{_builddir}/go \ -go fix $GOIMPORT \ %{nil} \ No newline at end of file -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org