1 |
commit: 401ffe8e0a86c7b59dc90945b16466e88add3d41 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 1 18:51:03 2021 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 1 18:52:26 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=401ffe8e |
7 |
|
8 |
dev-lang/go: drop 1.16.x |
9 |
|
10 |
Normally we keep the two most recent versions of Go in the tree, but |
11 |
that is not the case this time because upstream is not backporting the |
12 |
fix for this vulnerability. |
13 |
|
14 |
Bug: https://bugs.gentoo.org/807049 |
15 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
16 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
17 |
|
18 |
dev-lang/go/Manifest | 1 - |
19 |
dev-lang/go/go-1.16.7.ebuild | 194 ------------------------------------------- |
20 |
2 files changed, 195 deletions(-) |
21 |
|
22 |
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest |
23 |
index ce21718c2e2..d05cdde1523 100644 |
24 |
--- a/dev-lang/go/Manifest |
25 |
+++ b/dev-lang/go/Manifest |
26 |
@@ -1,2 +1 @@ |
27 |
-DIST go1.16.7.src.tar.gz 20922206 BLAKE2B 65e53684f66975313caf4661a7c52b178dde8b32ac40f98fe8164fe035c835e1407ef442d41c7cbf907d5093703e440d0e62c398f8ed541bad074b537f6dd6ff SHA512 1aab6f3dcbae71ebfa29a1d9a46613a3aa48de01cee82b48842d92abbb4ee57db019a4d47a3f12af9553c8e2a982e90114a06ee187f908f7c29245d9786b9186 |
28 |
DIST go1.17.src.tar.gz 22178549 BLAKE2B 86cb84ff782eaee3fc0411b1f31cd985f3fdcda7b2709f3a94cba0fbe827ac13632d0476e1f67deaf06d2352c2ea3ac9217db7d170702dffff6a64beabdb0814 SHA512 bb94d69555faa103bc092ce85b73168954a553a5c72e4b38c39bd99a3eb4db679f352685e66507b0945ed12676eb2a0c51674e456f68a9a5b98c3ec6a948d35b |
29 |
|
30 |
diff --git a/dev-lang/go/go-1.16.7.ebuild b/dev-lang/go/go-1.16.7.ebuild |
31 |
deleted file mode 100644 |
32 |
index e24025473dc..00000000000 |
33 |
--- a/dev-lang/go/go-1.16.7.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,194 +0,0 @@ |
36 |
-# Copyright 1999-2021 Gentoo Authors |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI=7 |
40 |
- |
41 |
-export CBUILD=${CBUILD:-${CHOST}} |
42 |
-export CTARGET=${CTARGET:-${CHOST}} |
43 |
- |
44 |
-MY_PV=${PV/_/} |
45 |
- |
46 |
-inherit toolchain-funcs |
47 |
- |
48 |
-case ${PV} in |
49 |
-*9999*) |
50 |
- EGIT_REPO_URI="https://github.com/golang/go.git" |
51 |
- inherit git-r3 |
52 |
- ;; |
53 |
-*) |
54 |
- SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " |
55 |
- S="${WORKDIR}"/go |
56 |
- case ${PV} in |
57 |
- *_beta*|*_rc*) ;; |
58 |
- *) |
59 |
- KEYWORDS="-* amd64 arm arm64 ppc64 ~riscv ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" |
60 |
- ;; |
61 |
- esac |
62 |
-esac |
63 |
- |
64 |
-DESCRIPTION="A concurrent garbage collected and typesafe programming language" |
65 |
-HOMEPAGE="https://golang.org" |
66 |
- |
67 |
-LICENSE="BSD" |
68 |
-SLOT="0/${PV}" |
69 |
-IUSE="cpu_flags_x86_sse2" |
70 |
- |
71 |
-BDEPEND="|| ( |
72 |
- dev-lang/go |
73 |
- dev-lang/go-bootstrap )" |
74 |
-RDEPEND="!<dev-go/go-tools-0_pre20150902" |
75 |
- |
76 |
-# Do not complain about CFLAGS, etc, since Go doesn't use them. |
77 |
-QA_FLAGS_IGNORED='.*' |
78 |
- |
79 |
-# The tools in /usr/lib/go should not cause the multilib-strict check to fail. |
80 |
-QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" |
81 |
- |
82 |
-# This package triggers "unrecognized elf file(s)" notices on riscv. |
83 |
-# https://bugs.gentoo.org/794046 |
84 |
-QA_PREBUILT='.*' |
85 |
- |
86 |
-# Do not strip this package. Stripping is unsupported upstream and may |
87 |
-# fail. |
88 |
-RESTRICT+=" strip" |
89 |
- |
90 |
-DOCS=( |
91 |
-AUTHORS |
92 |
-CONTRIBUTING.md |
93 |
-CONTRIBUTORS |
94 |
-PATENTS |
95 |
-README.md |
96 |
-) |
97 |
- |
98 |
-go_arch() { |
99 |
- # By chance most portage arch names match Go |
100 |
- local portage_arch=$(tc-arch $@) |
101 |
- case "${portage_arch}" in |
102 |
- x86) echo 386;; |
103 |
- x64-*) echo amd64;; |
104 |
- ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; |
105 |
- riscv) echo riscv64 ;; |
106 |
- s390) echo s390x ;; |
107 |
- *) echo "${portage_arch}";; |
108 |
- esac |
109 |
-} |
110 |
- |
111 |
-go_arm() { |
112 |
- case "${1:-${CHOST}}" in |
113 |
- armv5*) echo 5;; |
114 |
- armv6*) echo 6;; |
115 |
- armv7*) echo 7;; |
116 |
- *) |
117 |
- die "unknown GOARM for ${1:-${CHOST}}" |
118 |
- ;; |
119 |
- esac |
120 |
-} |
121 |
- |
122 |
-go_os() { |
123 |
- case "${1:-${CHOST}}" in |
124 |
- *-linux*) echo linux;; |
125 |
- *-darwin*) echo darwin;; |
126 |
- *-freebsd*) echo freebsd;; |
127 |
- *-netbsd*) echo netbsd;; |
128 |
- *-openbsd*) echo openbsd;; |
129 |
- *-solaris*) echo solaris;; |
130 |
- *-cygwin*|*-interix*|*-winnt*) |
131 |
- echo windows |
132 |
- ;; |
133 |
- *) |
134 |
- die "unknown GOOS for ${1:-${CHOST}}" |
135 |
- ;; |
136 |
- esac |
137 |
-} |
138 |
- |
139 |
-go_tuple() { |
140 |
- echo "$(go_os $@)_$(go_arch $@)" |
141 |
-} |
142 |
- |
143 |
-go_cross_compile() { |
144 |
- [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] |
145 |
-} |
146 |
- |
147 |
-src_compile() { |
148 |
- if has_version -b dev-lang/go; then |
149 |
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go" |
150 |
- elif has_version -b dev-lang/go-bootstrap; then |
151 |
- export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap" |
152 |
- else |
153 |
- eerror "Go cannot be built without go or go-bootstrap installed" |
154 |
- die "Should not be here, please report a bug" |
155 |
- fi |
156 |
- |
157 |
- export GOROOT_FINAL="${EPREFIX}"/usr/lib/go |
158 |
- export GOROOT="${PWD}" |
159 |
- export GOBIN="${GOROOT}/bin" |
160 |
- |
161 |
- # Go's build script does not use BUILD/HOST/TARGET consistently. :( |
162 |
- export GOHOSTARCH=$(go_arch ${CBUILD}) |
163 |
- export GOHOSTOS=$(go_os ${CBUILD}) |
164 |
- export CC=$(tc-getBUILD_CC) |
165 |
- |
166 |
- export GOARCH=$(go_arch) |
167 |
- export GOOS=$(go_os) |
168 |
- export CC_FOR_TARGET=$(tc-getCC) |
169 |
- export CXX_FOR_TARGET=$(tc-getCXX) |
170 |
- use arm && export GOARM=$(go_arm) |
171 |
- use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat') |
172 |
- |
173 |
- cd src |
174 |
- bash -x ./make.bash || die "build failed" |
175 |
-} |
176 |
- |
177 |
-src_test() { |
178 |
- go_cross_compile && return 0 |
179 |
- |
180 |
- cd src |
181 |
- PATH="${GOBIN}:${PATH}" \ |
182 |
- ./run.bash -no-rebuild || die "tests failed" |
183 |
- cd .. |
184 |
- rm -fr pkg/*_race || die |
185 |
- rm -fr pkg/obj/go-build || die |
186 |
-} |
187 |
- |
188 |
-src_install() { |
189 |
- # There is a known issue which requires the source tree to be installed [1]. |
190 |
- # Once this is fixed, we can consider using the doc use flag to control |
191 |
- # installing the doc and src directories. |
192 |
- # The use of cp is deliberate in order to retain permissions |
193 |
- # [1] https://golang.org/issue/2775 |
194 |
- dodir /usr/lib/go |
195 |
- cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go |
196 |
- einstalldocs |
197 |
- |
198 |
- # testdata directories are not needed on the installed system |
199 |
- rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print) |
200 |
- |
201 |
- local bin_path |
202 |
- if go_cross_compile; then |
203 |
- bin_path="bin/$(go_tuple)" |
204 |
- else |
205 |
- bin_path=bin |
206 |
- fi |
207 |
- local f x |
208 |
- for x in ${bin_path}/*; do |
209 |
- f=${x##*/} |
210 |
- dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} |
211 |
- done |
212 |
- |
213 |
- # install the @golang-rebuild set for Portage |
214 |
- insinto /usr/share/portage/config/sets |
215 |
- newins "${FILESDIR}"/go-sets.conf go.conf |
216 |
-} |
217 |
- |
218 |
-pkg_postinst() { |
219 |
- [[ -z ${REPLACING_VERSIONS} ]] && return |
220 |
- einfo "After ${CATEGORY}/${PN} is updated it is recommended to rebuild" |
221 |
- einfo "all packages compiled with previous versions of ${CATEGORY}/${PN}" |
222 |
- einfo "due to the static linking nature of go." |
223 |
- einfo "If this is not done, the packages compiled with the older" |
224 |
- einfo "version of the compiler will not be updated until they are" |
225 |
- einfo "updated individually, which could mean they will have" |
226 |
- einfo "vulnerabilities." |
227 |
- einfo "Run 'emerge @golang-rebuild' to rebuild all 'go' packages" |
228 |
- einfo "See https://bugs.gentoo.org/752153 for more info" |
229 |
-} |