diff options
author | William Hubbs <williamh@gentoo.org> | 2012-05-15 18:11:26 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2012-05-15 18:11:26 +0000 |
commit | 91452cb6eca37fe2e38a798f988711ef3a383ff5 (patch) | |
tree | cb1da6bfc8a92b7701a2e27760cc78e49fdaf764 /dev-lang/go | |
parent | Depend only once on ICU. (diff) | |
download | historical-91452cb6eca37fe2e38a798f988711ef3a383ff5.tar.gz historical-91452cb6eca37fe2e38a798f988711ef3a383ff5.tar.bz2 historical-91452cb6eca37fe2e38a798f988711ef3a383ff5.zip |
Initial commit for bug #342505.
I would like to thank johnny@9souldier.org for the initial report and
ebuild. Also, I would like to thank powerman-asdf@yandex.ru for the
original hardened patch and everyone else who worked with me on the bug
so we could get this into the tree.
Package-Manager: portage-2.2.0_alpha104/cvs/Linux i686
Diffstat (limited to 'dev-lang/go')
-rw-r--r-- | dev-lang/go/ChangeLog | 15 | ||||
-rw-r--r-- | dev-lang/go/Manifest | 16 | ||||
-rw-r--r-- | dev-lang/go/files/go-1.0.1-hardened.patch | 55 | ||||
-rw-r--r-- | dev-lang/go/go-1.0.1.ebuild | 144 | ||||
-rw-r--r-- | dev-lang/go/go-9999.ebuild | 144 | ||||
-rw-r--r-- | dev-lang/go/metadata.xml | 16 |
6 files changed, 390 insertions, 0 deletions
diff --git a/dev-lang/go/ChangeLog b/dev-lang/go/ChangeLog new file mode 100644 index 000000000000..f148488fe1b2 --- /dev/null +++ b/dev-lang/go/ChangeLog @@ -0,0 +1,15 @@ +# ChangeLog for dev-lang/go +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/ChangeLog,v 1.1 2012/05/15 18:11:26 williamh Exp $ + +*go-9999 (15 May 2012) +*go-1.0.1 (15 May 2012) + + 15 May 2012; William Hubbs <williamh@gentoo.org> +go-1.0.1.ebuild, + +files/go-1.0.1-hardened.patch, +go-9999.ebuild, +metadata.xml: + Initial commit for bug #342505. + I would like to thank johnny@9souldier.org for the initial report and + ebuild. Also, I would like to thank powerman-asdf@yandex.ru for the + original hardened patch and everyone else who worked with me on the bug + so we could get this into the tree. + diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest new file mode 100644 index 000000000000..c139ab27c440 --- /dev/null +++ b/dev-lang/go/Manifest @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX go-1.0.1-hardened.patch 1503 RMD160 8f1da55b2e4feeac00789bd480dfa65fffcec8a8 SHA1 7f0767b201ebba4362ba84cbf901a6b9c7f4774e SHA256 decdc5ae8cf875bab581a279ef3602262de6530275f5ac48ab40965d5660f378 +DIST go1.0.1.src.tar.gz 9617092 RMD160 4e2d8e33519b2fd3562a4c06762f02ee5014fa66 SHA1 fc8a6d6725f7f2bf7c94685c5fd0880c9b7f67f6 SHA256 29cdba7bc909df7091d81f52049de023502b5b3351cd206094f2c2d9961c0315 +EBUILD go-1.0.1.ebuild 3286 RMD160 9252fc8fcdf82c0ba106fb135b8f8a6e9ed8bcbd SHA1 16d82f0be366c9b302affe1db577b1524f2d3531 SHA256 df998e38d0f8b60b969dd237bf33a47060ca626af696e85514ee7a29080a8eb0 +EBUILD go-9999.ebuild 3285 RMD160 5dd6762dde840752bc30d70ef9f59ba2ac6bf797 SHA1 ac7825c4e0fcf0ffc8edb9ee8b8386681bdcc588 SHA256 5d487eff68da21fd5fe87ac9ad921145f9e78b862608a5644968e4c1b7c57b82 +MISC ChangeLog 669 RMD160 cb86c69a18de920acfef1758f3a8ce4fd948653c SHA1 9f66aeaed3a1a65e4de95c8a9a3add365171e0e4 SHA256 1859cbb6e6cb23e9c267f30e08a3d194bac78554a330d9457c16494bd22c6921 +MISC metadata.xml 543 RMD160 25cf8ab8c7070f006278a9592fd8b8562c1ef26e SHA1 7c3c6c204466b7cc04abc043e7a7662bdb98602b SHA256 cd941b060081d57159d3e44b171ad76f6fdf56545d58b9577963ed1d20278fe7 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iEYEARECAAYFAk+ynGIACgkQblQW9DDEZTiWUQCgi7BKXD6HKgtv72xrTZ6nl1M0 +zesAn1Mp5jysU6qVZwrwk23KGmLPs0Fc +=DZTk +-----END PGP SIGNATURE----- diff --git a/dev-lang/go/files/go-1.0.1-hardened.patch b/dev-lang/go/files/go-1.0.1-hardened.patch new file mode 100644 index 000000000000..220bc1b6e4c5 --- /dev/null +++ b/dev-lang/go/files/go-1.0.1-hardened.patch @@ -0,0 +1,55 @@ +diff -r 95d6aec944d4 src/all.bash +--- a/src/all.bash Tue May 15 12:00:13 2012 +1000 ++++ b/src/all.bash Tue May 15 08:46:50 2012 -0500 +@@ -8,6 +8,6 @@ + echo 'all.bash must be run from $GOROOT/src' 1>&2 + exit 1 + fi +-. ./make.bash --no-banner ++. ./make.bash $@ --no-banner + bash run.bash --no-rebuild --banner + $GOTOOLDIR/dist banner # print build info +diff -r 95d6aec944d4 src/make.bash +--- a/src/make.bash Tue May 15 12:00:13 2012 +1000 ++++ b/src/make.bash Tue May 15 08:46:50 2012 -0500 +@@ -116,6 +116,40 @@ + ./cmd/dist/dist bootstrap $buildall -v # builds go_bootstrap + # Delay move of dist tool to now, because bootstrap may clear tool directory. + mv cmd/dist/dist "$GOTOOLDIR"/dist ++if [ "$1" = "--pax-kernel" ]; then ++ shift ++ if [ -f "$GOTOOLDIR"/8l ]; then ++ mv "$GOTOOLDIR"/8l{,.orig} ++ cat <<'EOF' >"$GOTOOLDIR"/8l ++#!/bin/bash ++BIN="8.out" ++for (( i = 1 ; i <= $# ; i++ )); do ++ if [ "x${!i}" = "x-o" ]; then ++ i=$(( i + 1 )) ++ BIN="${!i}" ++ fi ++done ++$(dirname $0)/8l.orig "$@" && paxctl -cm "$BIN" &>/dev/null ++EOF ++ chmod +x "$GOTOOLDIR"/8l ++ fi ++ if [ -f "$GOTOOLDIR"/6l ]; then ++ mv "$GOTOOLDIR"/6l{,.orig} ++ cat <<'EOF' >"$GOTOOLDIR"/6l ++#!/bin/bash ++BIN="6.out" ++for (( i = 1 ; i <= $# ; i++ )); do ++ if [ "x${!i}" = "x-o" ]; then ++ i=$(( i + 1 )) ++ BIN="${!i}" ++ fi ++done ++$(dirname $0)/6l.orig "$@" && paxctl -cm "$BIN" &>/dev/null ++EOF ++ chmod +x "$GOTOOLDIR"/6l ++ fi ++ paxctl -cm "$GOTOOLDIR"/go_bootstrap &>/dev/null ++fi + "$GOTOOLDIR"/go_bootstrap clean -i std + echo + diff --git a/dev-lang/go/go-1.0.1.ebuild b/dev-lang/go/go-1.0.1.ebuild new file mode 100644 index 000000000000..3c3de64960a2 --- /dev/null +++ b/dev-lang/go/go-1.0.1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-1.0.1.ebuild,v 1.1 2012/05/15 18:11:26 williamh Exp $ + +EAPI=4 + +EHG_REPO_URI="https://go.googlecode.com/hg" + +[[ ${PV} == 9999 ]] && vcs=mercurial + +inherit $vcs bash-completion-r1 elisp-common eutils + +if [[ ${PV} != 9999 ]]; then + SRC_URI="http://go.googlecode.com/files/go${PV}.src.tar.gz" + # Upstream only supports go on amd64, arm and x86 architectures. + KEYWORDS="-* ~x86" +fi + +DESCRIPTION="A concurrent garbage collected and typesafe programming language" +HOMEPAGE="http://www.golang.org" + +LICENSE="BSD" +SLOT="0" +IUSE="bash-completion emacs vim-syntax zsh-completion" + +if [[ ${PV} != 9999 ]]; then + IUSE="${IUSE} pax_kernel" + COMMON_DEPEND="pax_kernel? ( sys-apps/paxctl )" +fi + +DEPEND="sys-apps/ed + ${COMMON_DEPEND}" +RDEPEND="bash-completion? ( app-shells/bash-completion ) + emacs? ( virtual/emacs ) + vim-syntax? ( app-editors/vim ) + zsh-completion? ( app-shells/zsh-completion ) + ${COMMON_DEPEND}" + + # The go language stores binary data for packages in *.a files. + # These are _NOT_ libraries, and should not be stripped. +STRIP_MASK="/usr/lib/go/pkg/linux*/*.a" + +[[ ${PV} == 9999 ]] || S="${WORKDIR}"/go + +export_settings() +{ + export HOST_EXTRA_CFLAGS="${CFLAGS}" + export HOST_EXTRA_LDFLAGS="${LDFLAGS}" + export GOROOT_FINAL=/usr/lib/go + export GOROOT="$(pwd)" + export GOBIN="${GOROOT}/bin" +} + +src_prepare() +{ + if [[ ${PV} != 9999 ]]; then + epatch "${FILESDIR}"/${P}-hardened.patch + fi +} + +src_compile() +{ + export_settings + if [[ ${PV} != 9999 ]]; then + use pax_kernel && opts="--pax-kernel" + fi + cd src + ./make.bash $opts + cd .. + + if use emacs; then + elisp-compile misc/emacs/*.el + fi +} + +src_test() +{ + export_settings + cd src + ./run.bash --no-rebuild --banner +} + +src_install() +{ + dobin bin/* + dodoc AUTHORS CONTRIBUTORS PATENTS README + + dodir /usr/lib/go + insinto /usr/lib/go + + # There is a known issue which requires the source tree to be installed [1]. + # Once this is fixed, we can consider using the doc use flag to control + # installing the doc and src directories. + # [1] http://code.google.com/p/go/issues/detail?id=2775 + doins -r doc lib pkg src + + if use bash-completion; then + dobashcomp misc/bash/go + fi + + if use emacs; then + elisp-install ${PN} misc/emacs/*.el misc/emacs/*.elc + fi + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles + doins -r misc/vim/ftdetect + doins -r misc/vim/ftplugin + doins -r misc/vim/syntax + doins -r misc/vim/plugin + doins -r misc/vim/indent + fi + + if use zsh-completion; then + insinto /usr/share/zsh/site-functions + doins misc/zsh/go + fi + + fperms -R +x /usr/lib/go/pkg/tool +} + +pkg_postinst() +{ + if use emacs; then + elisp-site-regen + fi + + # If the go tool sees a package file timestamped older than a dependancy it + # will rebuild that file. So, in order to stop go from rebuilding lots of + # packages for every build we need to fix the timestamps. The compiler and + # linker are also checked - so we need to fix them too. + ebegin "fixing timestamps to avoid unnecessary rebuilds" + tref="usr/lib/go/pkg/*/runtime.a" + find "${ROOT}"usr/lib/go/pkg -type f \ + -exec touch -r "${ROOT}"${tref} {} \; + eend $? +} + +pkg_postrm() +{ + if use emacs; then + elisp-site-regen + fi +} diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild new file mode 100644 index 000000000000..476286345290 --- /dev/null +++ b/dev-lang/go/go-9999.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/go/go-9999.ebuild,v 1.1 2012/05/15 18:11:26 williamh Exp $ + +EAPI=4 + +EHG_REPO_URI="https://go.googlecode.com/hg" + +[[ ${PV} == 9999 ]] && vcs=mercurial + +inherit $vcs bash-completion-r1 elisp-common eutils + +if [[ ${PV} != 9999 ]]; then + SRC_URI="http://go.googlecode.com/files/go${PV}.src.tar.gz" + # Upstream only supports go on amd64, arm and x86 architectures. + KEYWORDS="-* ~x86" +fi + +DESCRIPTION="A concurrent garbage collected and typesafe programming language" +HOMEPAGE="http://www.golang.org" + +LICENSE="BSD" +SLOT="0" +IUSE="bash-completion emacs vim-syntax zsh-completion" + +if [[ ${PV} != 9999 ]]; then + IUSE="${IUSE} pax_kernel" + COMMON_DEPEND="pax_kernel? ( sys-apps/paxctl )" +fi + +DEPEND="sys-apps/ed + ${COMMON_DEPEND}" +RDEPEND="bash-completion? ( app-shells/bash-completion ) + emacs? ( virtual/emacs ) + vim-syntax? ( app-editors/vim ) + zsh-completion? ( app-shells/zsh-completion ) + ${COMMON_DEPEND}" + + # The go language stores binary data for packages in *.a files. + # These are _NOT_ libraries, and should not be stripped. +STRIP_MASK="/usr/lib/go/pkg/linux*/*.a" + +[[ ${PV} == 9999 ]] || S="${WORKDIR}"/go + +export_settings() +{ + export HOST_EXTRA_CFLAGS="${CFLAGS}" + export HOST_EXTRA_LDFLAGS="${LDFLAGS}" + export GOROOT_FINAL=/usr/lib/go + export GOROOT="$(pwd)" + export GOBIN="${GOROOT}/bin" +} + +src_prepare() +{ + if [[ ${PV} != 9999 ]]; then + epatch "${FILESDIR}"/${P}-hardened.patch + fi +} + +src_compile() +{ + export_settings + if [[ ${PV} != 9999 ]]; then + use pax_kernel && opts="--pax-kernel" + fi + cd src + ./make.bash $opts + cd .. + + if use emacs; then + elisp-compile misc/emacs/*.el + fi +} + +src_test() +{ + export_settings + cd src + ./run.bash --no-rebuild --banner +} + +src_install() +{ + dobin bin/* + dodoc AUTHORS CONTRIBUTORS PATENTS README + + dodir /usr/lib/go + insinto /usr/lib/go + + # There is a known issue which requires the source tree to be installed [1]. + # Once this is fixed, we can consider using the doc use flag to control + # installing the doc and src directories. + # [1] http://code.google.com/p/go/issues/detail?id=2775 + doins -r doc lib pkg src + + if use bash-completion; then + dobashcomp misc/bash/go + fi + + if use emacs; then + elisp-install ${PN} misc/emacs/*.el misc/emacs/*.elc + fi + + if use vim-syntax; then + insinto /usr/share/vim/vimfiles + doins -r misc/vim/ftdetect + doins -r misc/vim/ftplugin + doins -r misc/vim/syntax + doins -r misc/vim/plugin + doins -r misc/vim/indent + fi + + if use zsh-completion; then + insinto /usr/share/zsh/site-functions + doins misc/zsh/go + fi + + fperms -R +x /usr/lib/go/pkg/tool +} + +pkg_postinst() +{ + if use emacs; then + elisp-site-regen + fi + + # If the go tool sees a package file timestamped older than a dependancy it + # will rebuild that file. So, in order to stop go from rebuilding lots of + # packages for every build we need to fix the timestamps. The compiler and + # linker are also checked - so we need to fix them too. + ebegin "fixing timestamps to avoid unnecessary rebuilds" + tref="usr/lib/go/pkg/*/runtime.a" + find "${ROOT}"usr/lib/go/pkg -type f \ + -exec touch -r "${ROOT}"${tref} {} \; + eend $? +} + +pkg_postrm() +{ + if use emacs; then + elisp-site-regen + fi +} diff --git a/dev-lang/go/metadata.xml b/dev-lang/go/metadata.xml new file mode 100644 index 000000000000..b1ab5c0f9546 --- /dev/null +++ b/dev-lang/go/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>williamh@gentoo.org</email> + <name>William Hubbs</name> + </maintainer> + <use> + <flag name="pax_kernel">enable running under a kernel with PaX enabled</flag> + </use> + <longdescription lang="en"> + Go is a new systems programming language developped at google by + Rob Pike. It has garbage collection, coroutines, communication + channels and a clean syntax. + </longdescription> +</pkgmetadata> |