To make use of them:
sudo add-apt-repository ppa:niemeyer/ppa
sudo apt-get update
sudo apt-get install golang
export GOROOT=/usr/lib/go
Current release available is 2011-02-01.1. They will be maintained
up-to-date, so apt-get upgrade on new releases.
Please let me know if you find problems while using the packages.
--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/blog
http://niemeyer.net/twitter
sudo apt-get install golang
> Gustavo, this is great news! I've installed it on my Maverick vm and the
> installation went very smoothly. I can compile and link perfectly, but I am
> unable to install any packages, because the GOROOT environment variable
> isn't set for root.
Yeah, as I explained, there's some work to be done in goinstall to support
that kind of packaging. It will have to be tweaked to support installing
packages in $HOME, and to not attempt to compile package it has no
write-access to on every iteration, among other things.
There's still debate to be had about how to do this properly. This is just
the first step.
Thanks for testing the packaging. Please keep me informed about any
other issues you find.
Yeah, as I explained, there's some work to be done in goinstall to support
that kind of packaging. It will have to be tweaked to support installing
packages in $HOME, and to not attempt to compile package it has no
write-access to on every iteration, among other things.
Yes. And on this score the ball is very much in my court. I hope to
have this sorted out in the next few weeks.
Andrew
That's great to hear, thanks Andrew. I'll be happy to collaborate
with you to help getting things going on this front.
We have some packages available[1] as well on the openSUSE Build Service[1].
openSUSE 11.1-3 Installation
----------------------------
zypper ar <repo url[3]> Golang
zypper ref
zypper in go
$GOROOT/$GOBIN etc will bet set for you but will only take effect on a new
login session as the env is set in /etc/profile.d/go.sh
While the name may indicate that this is openSUSE specific, the OBS was
actually designed to target multiple distros (and currently supports all major
distros), so we have enabled build targets and publishing for SLES[4] and
Mandriva[5] as well.
We already package a few third party libs and over the coming days and weeks
we'll package up some of the more popular and interesting packages listed on
the dashboard[6].
If you have a particular preference for having something packaged, feel free
to get in touch. Alternatively, you might consider using OBS as a platform to
publish your own library or app as .rpm or .deb formats. If this is something
you are interested in, the wiki development portal[7] has some guidelines and
instructions.
>There's a good amount of work to be done to make them
>good, such as proper handling of module packages, and support for
>$HOME-installed modules with goinstall, but this is the beginning.
>They are also available only for Maverick for now (10.10) as well,
>but on both 32 and 64 bit versions.
Likewise, our packages are very much work in progress and goinstall presents
some additional challenges for Linux packagers. Having third party libs
installable to $HOME while $GOROOT is somewhere else (/usr/lib64/go) could be
very handy.
Additionally, is it entirely necessary for the standard library imports to be
compiled and installed every time goinstall is invoked for a third party lib?
(Presumably multiple times if goinstall -a is used).
Cheers the noo,
Graham
[1] https://build.opensuse.org/project/show?project=devel:languages:go
[2] https://build.opensuse.org/
[3]
http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_11.1/
[3]
http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_11.2/
[3]
http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_11.3/
[3]
http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_11.3/
[4] http://download.opensuse.org/repositories/devel:/languages:/go/SLE_11_SP1/
[5]
http://download.opensuse.org/repositories/devel:/languages:/go/Mandriva_2010.1/
[6] http://godashboard.appspot.com/package
[7] http://en.opensuse.org/Portal:Development
--
“What can be asserted without proof can be dismissed without proof.”
- Christopher Hitchens
> We have some packages available[1] as well on the openSUSE Build Service[1].
Nice!
> Likewise, our packages are very much work in progress and goinstall presents
> some additional challenges for Linux packagers. Having third party libs
> installable to $HOME while $GOROOT is somewhere else (/usr/lib64/go) could be
> very handy.
We'll get there. Andrew has already been working on supporting
$GOPATH, and with some additional tweaks this will be feasible.
> Additionally, is it entirely necessary for the standard library imports to be
> compiled and installed every time goinstall is invoked for a third party lib?
> (Presumably multiple times if goinstall -a is used).
The problem is a bit broader than this, in the sense that this is a
problem even if it's not a standard library package. It must enable
the use of third-party packages which it hasn't itself installed, so
that they may be installed by different means (dpkg/rpm/msi/whatever),
and not attempt to rebuild them on every installation it's asked to
make.
Gustavo, yes indeed. Thinking about this though, I wonder if we might be able
to tackle this by leveraging some of the existing package format
specifications.
In the rpm format, I can specify the following field in the .spec file:
Provides: log4go.googlecode.com/hg
A query can be performed against the rpm database:
• ganderson@excession [15:12:10] ../go-log4go
: rpm -q --whatprovides log4go.googlecode.com/hg
go-log4go-2.0.2-0.x86_64
I'm not so familiar with the dpkg format but from what I understand user
defined fields can be specified in the package control file which will then be
exported to the binary/source packages.
e.g.
XBS-Provides: log4go.googlecode.com/hg
would be exported as:
Provides: log4go.googlecode.com/hg
Now here is about where my knowledge of dpkg/deb and it's tools stops, so my
question would be; is there a convenient way to then query for this exported
"provides" field?
Cheers the noo,
Graham
On Thursday 03 February 2011 22:05:02 Gustavo Niemeyer wrote:
>The first iteration of pre-built Go (gc) packages for Ubuntu should be
>usable.We have some packages available[1] as well on the openSUSE Build Service[1].
openSUSE 11.1-3 Installation
----------------------------zypper ar <repo url[3]> Golang
zypper ref
zypper in go$GOROOT/$GOBIN etc will bet set for you but will only take effect on a new
login session as the env is set in /etc/profile.d/go.sh
While the name may indicate that this is openSUSE specific, the OBS was
actually designed to target multiple distros (and currently supports all major
distros), so we have enabled build targets and publishing for SLES[4] and
Mandriva[5] as well.
We already package a few third party libs and over the coming days and weeks
we'll package up some of the more popular and interesting packages listed on
the dashboard[6].
Likewise, our packages are very much work in progress and goinstall presents
some additional challenges for Linux packagers. Having third party libs
installable to $HOME while $GOROOT is somewhere else (/usr/lib64/go) could be
very handy.
Packaging Go initially was quite a challenge, it took me quite some time to do
it right.
> > While the name may indicate that this is openSUSE specific, the OBS was
> > actually designed to target multiple distros (and currently supports all
> > major
> > distros), so we have enabled build targets and publishing for SLES[4] and
> > Mandriva[5] as well.
>
> This is interesting. We've been working on our own spec file:
> https://bugzilla.redhat.com/show_bug.cgi?id=652987
>
> Glad to see other distros are working on this too ;)
I've just enabled Fedora package building in the devel:languages:go OBS
project and they build just fine. Feel free to give them a try.
--
Mit freundlichen Grüßen,
Sascha Peilicke
http://saschpe.wordpress.com
> Any idea of why, out of the box, it doesn't build?
What do you mean by 'it' ? Go itself or some module?
Is there an hg or git branch I can follow for this?