1 |
commit: 4e983932e78749663d33aa91cfd0f95491552ab5 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 31 19:11:20 2019 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 31 19:12:49 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e983932 |
7 |
|
8 |
dev-lang/go: remove vulnerable version 1.11.5 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/680240 |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
12 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
13 |
|
14 |
dev-lang/go/Manifest | 1 - |
15 |
dev-lang/go/go-1.11.5.ebuild | 236 ------------------------------------------- |
16 |
2 files changed, 237 deletions(-) |
17 |
|
18 |
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest |
19 |
index 9191df9ead4..840c6b2a0f4 100644 |
20 |
--- a/dev-lang/go/Manifest |
21 |
+++ b/dev-lang/go/Manifest |
22 |
@@ -9,5 +9,4 @@ DIST go-linux-ppc64-bootstrap-1.8.tbz 52315782 BLAKE2B 6be0a48e8bc4e5fed4d34f8aa |
23 |
DIST go-linux-ppc64le-bootstrap-1.8.tbz 52211575 BLAKE2B 7a28ec5a381369c4e9415c8360e904c2545380513afd328077c584e8af0bf6bd818aa03e5a58c350cbb98facc1c9dccb02b06adcb27233875497cf5d33265912 SHA512 6931d999dd0ee1ff44c4cec48acb27af061f57f87aa74802dcebab78553b46bc8ac732f07fe91e5074dbdd32c55b707994875934bfb12bb4276d71eb1d06c4ba |
24 |
DIST go-linux-s390x-bootstrap-1.8.tbz 57124869 BLAKE2B 920a176b8f4fc3a816e724324bbb30a383d599e31a0d2093d24797dbcd0e799a662a3589dbb87d2f5dd16df07c4cf8f1e444e87b540ec732746bb025dc9271f8 SHA512 d429cae870d66217ab2e07c74209d3031d97baa4f899b4d70ae6283a1a5b1434b037904c4cfca0b2bc798d5ba0b358c3739e000eccbc74809baf564c5686df5a |
25 |
DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 0a45312f090d81ebf46fe5950cb65c059e2801394231e715e94145d1f918eb59b10472b2385e57ebd5cfb9eca0ad7290fb118436486b665520bb540970f971ab SHA512 52b849e5b9a940e10de7ba3df0ebdf6e1c5d631de9581d936c9edf8f38e6bb3314acbc2b2d5202b0528fde2a359d52bc0c6f39acf9b1b614725e4b4a947ed10d |
26 |
-DIST go1.11.5.src.tar.gz 21108339 BLAKE2B 3a33a89e267e57fee688e4d67257810ca1f37cfb904b6806c3a566b021aa80153f59f64d3a61ed68f526f093e0d5b6b3c95565cd06622cf9a65eef81bc7e9733 SHA512 63500238e8d73e4b29279ee3eb9242960de93ccd3b52bacc4009f45cf123cb8edfe5f519d38c5b07bdf2a810925758511ff3255310a056113d0169f78be1d2f6 |
27 |
DIST go1.12.1.src.tar.gz 21963082 BLAKE2B fd9c0ca19e6bd285c52034a88df1a58f96b957483362fac2e0c0f2a9dddde0543e7569d76fb93eff473774d152db361bfe9bdd354d80412c71ee5c4162010346 SHA512 b3fdfb874e6e0e0b50458085724fbd8e8b9be212df3f777b97db340aa3b80f32ee08d646a57a8a7d52ff6f19657d884dd25018c866c6173473aafa20a58f1975 |
28 |
|
29 |
diff --git a/dev-lang/go/go-1.11.5.ebuild b/dev-lang/go/go-1.11.5.ebuild |
30 |
deleted file mode 100644 |
31 |
index 414547edcf6..00000000000 |
32 |
--- a/dev-lang/go/go-1.11.5.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,236 +0,0 @@ |
35 |
-# Copyright 1999-2019 Gentoo Authors |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
- |
38 |
-EAPI=6 |
39 |
- |
40 |
-export CBUILD=${CBUILD:-${CHOST}} |
41 |
-export CTARGET=${CTARGET:-${CHOST}} |
42 |
- |
43 |
-MY_PV=${PV/_/} |
44 |
- |
45 |
-inherit toolchain-funcs |
46 |
- |
47 |
-BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist" |
48 |
-BOOTSTRAP_VERSION="bootstrap-1.8" |
49 |
-BOOTSTRAP_URI=" |
50 |
-amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz ) |
51 |
-arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz ) |
52 |
-arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz ) |
53 |
-ppc64? ( |
54 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz |
55 |
- ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz |
56 |
-) |
57 |
-s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz ) |
58 |
-x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz ) |
59 |
-amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz ) |
60 |
-x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz ) |
61 |
-x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz ) |
62 |
-x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz ) |
63 |
-" |
64 |
- |
65 |
-case ${PV} in |
66 |
-*9999*) |
67 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
68 |
- inherit git-r3 |
69 |
- ;; |
70 |
-*) |
71 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
72 |
- S="${WORKDIR}"/go |
73 |
- case ${PV} in |
74 |
- *_beta*|*_rc*) ;; |
75 |
- *) |
76 |
- KEYWORDS="-* amd64 arm ~arm64 ~ppc64 ~s390 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x64-solaris" |
77 |
- # The upstream tests fail under portage but pass if the build is |
78 |
- # run according to their documentation [1]. |
79 |
- # I am restricting the tests on released versions until this is |
80 |
- # solved. |
81 |
- # [1] https://golang.org/issues/18442 |
82 |
- RESTRICT="test" |
83 |
- ;; |
84 |
- esac |
85 |
-esac |
86 |
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )" |
87 |
- |
88 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
89 |
-HOMEPAGE="https://golang.org" |
90 |
- |
91 |
-LICENSE="BSD" |
92 |
-SLOT="0/${PV}" |
93 |
-IUSE="gccgo" |
94 |
- |
95 |
-DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )" |
96 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
97 |
- |
98 |
-# These test data objects have writable/executable stacks. |
99 |
-QA_EXECSTACK=" |
100 |
- usr/lib/go/src/debug/elf/testdata/*.obj |
101 |
- usr/lib/go/src/go/internal/gccgoimporter/testdata/escapeinfo.gox |
102 |
- usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox |
103 |
- usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox |
104 |
- " |
105 |
- |
106 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
107 |
-QA_FLAGS_IGNORED='.*' |
108 |
- |
109 |
-REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*" |
110 |
- |
111 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
112 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
113 |
- |
114 |
-# Do not strip this package. Stripping is unsupported upstream and may |
115 |
-# fail. |
116 |
-RESTRICT+=" strip" |
117 |
- |
118 |
-DOCS=( |
119 |
-AUTHORS |
120 |
-CONTRIBUTING.md |
121 |
-CONTRIBUTORS |
122 |
-PATENTS |
123 |
-README.md |
124 |
-) |
125 |
- |
126 |
-go_arch() |
127 |
-{ |
128 |
- # By chance most portage arch names match Go |
129 |
- local portage_arch=$(tc-arch $@) |
130 |
- case "${portage_arch}" in |
131 |
- x86) echo 386;; |
132 |
- x64-*) echo amd64;; |
133 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
134 |
- s390) echo s390x ;; |
135 |
- *) echo "${portage_arch}";; |
136 |
- esac |
137 |
-} |
138 |
- |
139 |
-go_arm() |
140 |
-{ |
141 |
- case "${1:-${CHOST}}" in |
142 |
- armv5*) echo 5;; |
143 |
- armv6*) echo 6;; |
144 |
- armv7*) echo 7;; |
145 |
- *) |
146 |
- die "unknown GOARM for ${1:-${CHOST}}" |
147 |
- ;; |
148 |
- esac |
149 |
-} |
150 |
- |
151 |
-go_os() |
152 |
-{ |
153 |
- case "${1:-${CHOST}}" in |
154 |
- *-linux*) echo linux;; |
155 |
- *-darwin*) echo darwin;; |
156 |
- *-freebsd*) echo freebsd;; |
157 |
- *-netbsd*) echo netbsd;; |
158 |
- *-openbsd*) echo openbsd;; |
159 |
- *-solaris*) echo solaris;; |
160 |
- *-cygwin*|*-interix*|*-winnt*) |
161 |
- echo windows |
162 |
- ;; |
163 |
- *) |
164 |
- die "unknown GOOS for ${1:-${CHOST}}" |
165 |
- ;; |
166 |
- esac |
167 |
-} |
168 |
- |
169 |
-go_tuple() |
170 |
-{ |
171 |
- echo "$(go_os $@)_$(go_arch $@)" |
172 |
-} |
173 |
- |
174 |
-go_cross_compile() |
175 |
-{ |
176 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
177 |
-} |
178 |
- |
179 |
-pkg_pretend() |
180 |
-{ |
181 |
- # make.bash does not understand cross-compiling a cross-compiler |
182 |
- if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then |
183 |
- die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}" |
184 |
- fi |
185 |
-} |
186 |
- |
187 |
-src_unpack() |
188 |
-{ |
189 |
- if [[ ${PV} = 9999 ]]; then |
190 |
- git-r3_src_unpack |
191 |
- fi |
192 |
- default |
193 |
-} |
194 |
- |
195 |
-src_compile() |
196 |
-{ |
197 |
- export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap |
198 |
- if use gccgo; then |
199 |
- mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die |
200 |
- local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version) |
201 |
- [[ -x ${go_binary} ]] || go_binary=$( |
202 |
- find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) | |
203 |
- sort -V | tail -n1) |
204 |
- [[ -x ${go_binary} ]] || |
205 |
- die "go-$(gcc-major-version): command not found" |
206 |
- ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die |
207 |
- fi |
208 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
209 |
- export GOROOT="$(pwd)" |
210 |
- export GOBIN="${GOROOT}/bin" |
211 |
- |
212 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
213 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
214 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
215 |
- export CC=$(tc-getBUILD_CC) |
216 |
- |
217 |
- export GOARCH=$(go_arch) |
218 |
- export GOOS=$(go_os) |
219 |
- export CC_FOR_TARGET=$(tc-getCC) |
220 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
221 |
- if [[ ${ARCH} == arm ]]; then |
222 |
- export GOARM=$(go_arm) |
223 |
- fi |
224 |
- einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}" |
225 |
- |
226 |
- cd src |
227 |
- ./make.bash || die "build failed" |
228 |
-} |
229 |
- |
230 |
-src_test() |
231 |
-{ |
232 |
- go_cross_compile && return 0 |
233 |
- |
234 |
- cd src |
235 |
- PATH="${GOBIN}:${PATH}" \ |
236 |
- ./run.bash -no-rebuild || die "tests failed" |
237 |
-} |
238 |
- |
239 |
-src_install() |
240 |
-{ |
241 |
- local bin_path f x |
242 |
- |
243 |
- dodir /usr/lib/go |
244 |
- |
245 |
- # There is a known issue which requires the source tree to be installed [1]. |
246 |
- # Once this is fixed, we can consider using the doc use flag to control |
247 |
- # installing the doc and src directories. |
248 |
- # [1] https://golang.org/issue/2775 |
249 |
- # |
250 |
- # deliberately use cp to retain permissions |
251 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
252 |
- if go_cross_compile; then |
253 |
- bin_path="bin/$(go_tuple)" |
254 |
- else |
255 |
- bin_path=bin |
256 |
- fi |
257 |
- for x in ${bin_path}/*; do |
258 |
- f=${x##*/} |
259 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
260 |
- done |
261 |
- einstalldocs |
262 |
- |
263 |
- if [[ ${CHOST} == *-darwin* ]] ; then |
264 |
- # fix install_name for test object (binutils_test) on Darwin, it |
265 |
- # is never used in real circumstances |
266 |
- local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/ |
267 |
- libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64 |
268 |
- install_name_tool -id "${libmac64}" "${D}${libmac64}" |
269 |
- fi |
270 |
-} |