1 |
commit: 520d2400781dbb0bbef1fafd8bed7ab2d5013175 |
2 |
Author: Ke Wu <mikewu <AT> google <DOT> com> |
3 |
AuthorDate: Tue Dec 7 19:21:48 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 8 06:20:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=520d2400 |
7 |
|
8 |
app-editors/gvim: version bump to v8.2.3669. |
9 |
|
10 |
This fixes CVE-2021-3968, CVE-2021-3973, CVE-2021-3974, |
11 |
CVE-2021-3984 and CVE-2021-4019. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/824930 |
14 |
|
15 |
Signed-off-by: Ke Wu <mikewu <AT> google.com> |
16 |
Closes: https://github.com/gentoo/gentoo/pull/23212 |
17 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
18 |
|
19 |
app-editors/gvim/Manifest | 1 + |
20 |
app-editors/gvim/gvim-8.2.3669.ebuild | 383 ++++++++++++++++++++++++++++++++++ |
21 |
2 files changed, 384 insertions(+) |
22 |
|
23 |
diff --git a/app-editors/gvim/Manifest b/app-editors/gvim/Manifest |
24 |
index ce47050db942..fc7f6789c5c7 100644 |
25 |
--- a/app-editors/gvim/Manifest |
26 |
+++ b/app-editors/gvim/Manifest |
27 |
@@ -3,3 +3,4 @@ DIST vim-8.2.0814.tar.gz 14953478 BLAKE2B fd4155ec749bd9a705e8114ff7f8cc321182c9 |
28 |
DIST vim-8.2.3428.tar.gz 15715383 BLAKE2B 865842bae0de25c34f255085f6edfe35b6905e220bdcb76372d7289ef1f6c2b2dee2f88e4a5f849d43fa560db4ade1e8e498d86f5651c5218d9153cde5ecddd3 SHA512 7cb473afa0ad6a9728dfc2f7d8ca19a21de329c4790141c7cb815b71c07e92a1ce04a5fcc2a0381c4beb304670d6c08629dc2ed2cb0842998cca2fd846c8cd6b |
29 |
DIST vim-8.2.3567.tar.gz 15771981 BLAKE2B 5a10ce998769b73a9c3b30fccb84e90eef8242d04e52b1cf475af777233ac774a6e5ec8c2aa09cadfe2db747b485fcc26d1d953017df4bb459d8a427715a3048 SHA512 f1b5debc77d5392966d168974eab7faae99082509a8148ea212e8e06ae980d9a2652ac77547d77d10953119527f68c633440cf813bb6dec8e259b7628af93af6 |
30 |
DIST vim-8.2.3582.tar.gz 15778667 BLAKE2B c8eaa95fa4fde6514168a9f42a712a78442a7fe504b59158e2e7717b8025a59cb4d8948451d72418b29f2b7cf3619cd765ef43e1304d73f81a6cba405f9706e7 SHA512 f476f24390807b71a0e02729f1815b3743b6b42cdd28a414e9ceaf0aa3fd4cab91e3550a669b1c64b4cd83207515cfe2b4acf2358a6def60e216e101c979037e |
31 |
+DIST vim-8.2.3669.tar.gz 15810783 BLAKE2B edac6dabfbeb11057c7b15830b30ec555a10942494bc89d7d85b4c701b5ff8f7413887e4e33e7b812057177ffebd2cdc74e69e86080a86cfee529b1da45156bb SHA512 83d172f7e1a3c5a8ea6238f2766bf077463d32d429111c08e5b28b8aafb8aea584807023281abf3b1710d61820fec8d2b808b42b5c50058d5eb4eb917deb19ab |
32 |
|
33 |
diff --git a/app-editors/gvim/gvim-8.2.3669.ebuild b/app-editors/gvim/gvim-8.2.3669.ebuild |
34 |
new file mode 100644 |
35 |
index 000000000000..a3183caf7daf |
36 |
--- /dev/null |
37 |
+++ b/app-editors/gvim/gvim-8.2.3669.ebuild |
38 |
@@ -0,0 +1,383 @@ |
39 |
+# Copyright 1999-2021 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=7 |
43 |
+ |
44 |
+# Please bump with app-editors/vim-core and app-editors/gvim |
45 |
+ |
46 |
+VIM_VERSION="8.2" |
47 |
+LUA_COMPAT=( lua5-1 luajit ) |
48 |
+PYTHON_COMPAT=( python3_{7..10} ) |
49 |
+PYTHON_REQ_USE="threads(+)" |
50 |
+USE_RUBY="ruby24 ruby25 ruby26 ruby27" |
51 |
+ |
52 |
+inherit vim-doc flag-o-matic xdg-utils bash-completion-r1 prefix lua-single python-single-r1 ruby-single |
53 |
+ |
54 |
+if [[ ${PV} == 9999* ]]; then |
55 |
+ inherit git-r3 |
56 |
+ EGIT_REPO_URI="https://github.com/vim/vim.git" |
57 |
+ EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV} |
58 |
+else |
59 |
+ SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz |
60 |
+ https://dev.gentoo.org/~zlogene/distfiles/app-editors/vim/vim-8.2.0360-gentoo-patches.tar.xz" |
61 |
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris" |
62 |
+fi |
63 |
+S="${WORKDIR}"/vim-${PV} |
64 |
+ |
65 |
+DESCRIPTION="GUI version of the Vim text editor" |
66 |
+HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" |
67 |
+ |
68 |
+LICENSE="vim" |
69 |
+SLOT="0" |
70 |
+IUSE="acl aqua crypt cscope debug gtk gtk2 lua motif neXt netbeans nls perl python racket ruby selinux session sound tcl" |
71 |
+REQUIRED_USE=" |
72 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
73 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
74 |
+" |
75 |
+ |
76 |
+RDEPEND=" |
77 |
+ ~app-editors/vim-core-${PV} |
78 |
+ >=app-eselect/eselect-vi-1.1 |
79 |
+ >=sys-libs/ncurses-5.2-r2:0= |
80 |
+ x11-libs/libICE |
81 |
+ x11-libs/libSM |
82 |
+ x11-libs/libXext |
83 |
+ x11-libs/libXt |
84 |
+ acl? ( kernel_linux? ( sys-apps/acl ) ) |
85 |
+ !aqua? ( |
86 |
+ gtk? ( |
87 |
+ x11-libs/gtk+:3 |
88 |
+ x11-libs/libXft |
89 |
+ ) |
90 |
+ !gtk? ( |
91 |
+ gtk2? ( |
92 |
+ >=x11-libs/gtk+-2.6:2 |
93 |
+ x11-libs/libXft |
94 |
+ ) |
95 |
+ !gtk2? ( |
96 |
+ motif? ( >=x11-libs/motif-2.3:0 ) |
97 |
+ !motif? ( |
98 |
+ neXt? ( x11-libs/neXtaw ) |
99 |
+ !neXt? ( x11-libs/libXaw ) |
100 |
+ ) |
101 |
+ ) |
102 |
+ ) |
103 |
+ ) |
104 |
+ crypt? ( dev-libs/libsodium:= ) |
105 |
+ cscope? ( dev-util/cscope ) |
106 |
+ lua? ( |
107 |
+ ${LUA_DEPS} |
108 |
+ $(lua_gen_impl_dep 'deprecated' lua5-1) |
109 |
+ ) |
110 |
+ nls? ( virtual/libintl ) |
111 |
+ perl? ( dev-lang/perl:= ) |
112 |
+ python? ( ${PYTHON_DEPS} ) |
113 |
+ racket? ( dev-scheme/racket ) |
114 |
+ ruby? ( ${RUBY_DEPS} ) |
115 |
+ selinux? ( sys-libs/libselinux ) |
116 |
+ session? ( x11-libs/libSM ) |
117 |
+ sound? ( media-libs/libcanberra ) |
118 |
+ tcl? ( dev-lang/tcl:0= ) |
119 |
+" |
120 |
+DEPEND="${RDEPEND}" |
121 |
+# configure runs the Lua interpreter |
122 |
+BDEPEND=" |
123 |
+ sys-devel/autoconf |
124 |
+ virtual/pkgconfig |
125 |
+ lua? ( ${LUA_DEPS} ) |
126 |
+ nls? ( sys-devel/gettext ) |
127 |
+" |
128 |
+ |
129 |
+# various failures (bugs #630042 and #682320) |
130 |
+RESTRICT="test" |
131 |
+ |
132 |
+pkg_setup() { |
133 |
+ # people with broken alphabets run into trouble. bug 82186. |
134 |
+ unset LANG LC_ALL |
135 |
+ export LC_COLLATE="C" |
136 |
+ |
137 |
+ # Gnome sandbox silliness. bug #114475. |
138 |
+ mkdir -p "${T}"/home || die |
139 |
+ export HOME="${T}"/home |
140 |
+ |
141 |
+ use lua && lua-single_pkg_setup |
142 |
+ use python && python-single-r1_pkg_setup |
143 |
+} |
144 |
+ |
145 |
+src_prepare() { |
146 |
+ if [[ ${PV} != 9999* ]]; then |
147 |
+ # Gentoo patches to fix runtime issues, cross-compile errors, etc |
148 |
+ eapply "${WORKDIR}"/patches/ |
149 |
+ fi |
150 |
+ |
151 |
+ # Fixup a script to use awk instead of nawk |
152 |
+ sed -i -e \ |
153 |
+ '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ |
154 |
+ "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed" |
155 |
+ |
156 |
+ # Read vimrc and gvimrc from /etc/vim |
157 |
+ echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \ |
158 |
+ >> "${S}"/src/feature.h || die "echo failed" |
159 |
+ echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ |
160 |
+ >> "${S}"/src/feature.h || die "echo failed" |
161 |
+ |
162 |
+ # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. |
163 |
+ # Hopefully this pattern won't break for a while at least. |
164 |
+ # This fixes bug 29398 (27 Sep 2003 agriffis) |
165 |
+ sed -i -e \ |
166 |
+ 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ |
167 |
+ "${S}"/runtime/doc/syntax.txt \ |
168 |
+ "${S}"/runtime/doc/tagsrch.txt \ |
169 |
+ "${S}"/runtime/doc/usr_29.txt \ |
170 |
+ "${S}"/runtime/menu.vim \ |
171 |
+ "${S}"/src/configure.ac || die 'sed failed' |
172 |
+ |
173 |
+ # Don't be fooled by /usr/include/libc.h. When found, vim thinks |
174 |
+ # this is NeXT, but it's actually just a file in dev-libs/9libs |
175 |
+ # This fixes bug 43885 (20 Mar 2004 agriffis) |
176 |
+ sed -i -e \ |
177 |
+ 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed' |
178 |
+ |
179 |
+ # gcc on sparc32 has this, uhm, interesting problem with detecting EOF |
180 |
+ # correctly. To avoid some really entertaining error messages about stuff |
181 |
+ # which isn't even in the source file being invalid, we'll do some trickery |
182 |
+ # to make the error never occur. bug 66162 (02 October 2004 ciaranm) |
183 |
+ find "${S}" -name '*.c' | while read c; do |
184 |
+ echo >> "$c" || die "echo failed" |
185 |
+ done |
186 |
+ |
187 |
+ # Try to avoid sandbox problems. Bug #114475. |
188 |
+ if [[ -d "${S}"/src/po ]]; then |
189 |
+ sed -i -e \ |
190 |
+ '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ |
191 |
+ "${S}"/src/po/Makefile || die |
192 |
+ fi |
193 |
+ |
194 |
+ cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" |
195 |
+ |
196 |
+ # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 |
197 |
+ sed -i -e \ |
198 |
+ "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ |
199 |
+ "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' |
200 |
+ |
201 |
+ eapply_user |
202 |
+} |
203 |
+ |
204 |
+src_configure() { |
205 |
+ local myconf=() |
206 |
+ |
207 |
+ # Fix bug 37354: Disallow -funroll-all-loops on amd64 |
208 |
+ # Bug 57859 suggests that we want to do this for all archs |
209 |
+ filter-flags -funroll-all-loops |
210 |
+ |
211 |
+ # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for |
212 |
+ # everyone since previous flag filtering bugs have turned out to affect |
213 |
+ # multiple archs... |
214 |
+ replace-flags -O3 -O2 |
215 |
+ |
216 |
+ # Fix bug 18245: Prevent "make" from the following chain: |
217 |
+ # (1) Notice configure.ac is newer than auto/configure |
218 |
+ # (2) Rebuild auto/configure |
219 |
+ # (3) Notice auto/configure is newer than auto/config.mk |
220 |
+ # (4) Run ./configure (with wrong args) to remake auto/config.mk |
221 |
+ sed -i -e \ |
222 |
+ 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" |
223 |
+ rm -v src/auto/configure || die "rm failed" |
224 |
+ emake -j1 -C src autoconf |
225 |
+ |
226 |
+ # This should fix a sandbox violation (see bug 24447). The hvc |
227 |
+ # things are for ppc64, see bug 86433. |
228 |
+ local file |
229 |
+ for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do |
230 |
+ if [[ -e ${file} ]]; then |
231 |
+ addwrite $file |
232 |
+ fi |
233 |
+ done |
234 |
+ |
235 |
+ use debug && append-flags "-DDEBUG" |
236 |
+ |
237 |
+ myconf=( |
238 |
+ --with-features=huge |
239 |
+ --disable-gpm |
240 |
+ --with-gnome=no |
241 |
+ $(use_enable sound canberra) |
242 |
+ $(use_enable acl) |
243 |
+ $(use_enable crypt libsodium) |
244 |
+ $(use_enable cscope) |
245 |
+ $(use_enable netbeans) |
246 |
+ $(use_enable nls) |
247 |
+ $(use_enable perl perlinterp) |
248 |
+ $(use_enable python python3interp) |
249 |
+ $(use_with python python3-command "${PYTHON}") |
250 |
+ $(use_enable racket mzschemeinterp) |
251 |
+ $(use_enable ruby rubyinterp) |
252 |
+ $(use_enable selinux) |
253 |
+ $(use_enable session xsmp) |
254 |
+ $(use_enable tcl tclinterp) |
255 |
+ ) |
256 |
+ |
257 |
+ # --with-features=huge forces on cscope even if we --disable it. We need |
258 |
+ # to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) |
259 |
+ if ! use cscope; then |
260 |
+ sed -i -e \ |
261 |
+ '/# define FEAT_CSCOPE/d' src/feature.h || die "couldn't disable cscope" |
262 |
+ fi |
263 |
+ |
264 |
+ if use lua; then |
265 |
+ myconf+=( |
266 |
+ --enable-luainterp |
267 |
+ $(use_with lua_single_target_luajit luajit) |
268 |
+ --with-lua-prefix="${EPREFIX}/usr" |
269 |
+ ) |
270 |
+ fi |
271 |
+ |
272 |
+ # gvim's GUI preference order is as follows: |
273 |
+ # aqua CARBON (not tested) |
274 |
+ # -aqua gtk GTK3 |
275 |
+ # -aqua -gtk gtk2 GTK2 |
276 |
+ # -aqua -gtk -gtk motif MOTIF |
277 |
+ # -aqua -gtk -gtk -motif neXt NEXTAW |
278 |
+ # -aqua -gtk -gtk -motif -neXt ATHENA |
279 |
+ echo ; echo |
280 |
+ if use aqua; then |
281 |
+ einfo "Building gvim with the Carbon GUI" |
282 |
+ myconf+=( |
283 |
+ --enable-darwin |
284 |
+ --enable-gui=carbon |
285 |
+ ) |
286 |
+ elif use gtk; then |
287 |
+ myconf+=( --enable-gtk3-check ) |
288 |
+ einfo "Building gvim with the gtk+-3 GUI" |
289 |
+ myconf+=( --enable-gui=gtk3 ) |
290 |
+ elif use gtk2; then |
291 |
+ myconf+=( --enable-gtk2-check ) |
292 |
+ einfo "Building gvim with the gtk+-2 GUI" |
293 |
+ myconf+=( --enable-gui=gtk2 ) |
294 |
+ elif use motif; then |
295 |
+ einfo "Building gvim with the MOTIF GUI" |
296 |
+ myconf+=( --enable-gui=motif ) |
297 |
+ elif use neXt; then |
298 |
+ einfo "Building gvim with the neXtaw GUI" |
299 |
+ myconf+=( --enable-gui=nextaw ) |
300 |
+ else |
301 |
+ einfo "Building gvim with the Athena GUI" |
302 |
+ myconf+=( --enable-gui=athena ) |
303 |
+ fi |
304 |
+ echo ; echo |
305 |
+ |
306 |
+ # let package manager strip binaries |
307 |
+ export ac_cv_prog_STRIP="$(type -P true ) faking strip" |
308 |
+ |
309 |
+ # keep prefix env contained within the EPREFIX |
310 |
+ use prefix && myconf+=( --without-local-dir ) |
311 |
+ |
312 |
+ if [[ ${CHOST} == *-interix* ]]; then |
313 |
+ # avoid finding of this function, to avoid having to patch either |
314 |
+ # configure or the source, which would be much more hackish. |
315 |
+ # after all vim does it right, only interix is badly broken (again) |
316 |
+ export ac_cv_func_sigaction=no |
317 |
+ fi |
318 |
+ |
319 |
+ econf \ |
320 |
+ --with-modified-by=Gentoo-${PVR} \ |
321 |
+ --with-vim-name=gvim \ |
322 |
+ --with-x \ |
323 |
+ "${myconf[@]}" |
324 |
+} |
325 |
+ |
326 |
+src_compile() { |
327 |
+ # The following allows emake to be used |
328 |
+ emake -j1 -C src auto/osdef.h objects |
329 |
+ |
330 |
+ emake |
331 |
+} |
332 |
+ |
333 |
+src_test() { |
334 |
+ einfo |
335 |
+ einfo "Starting vim tests. Several error messages will be shown" |
336 |
+ einfo "while the tests run. This is normal behaviour and does not" |
337 |
+ einfo "indicate a fault." |
338 |
+ einfo |
339 |
+ ewarn "If the tests fail, your terminal may be left in a strange" |
340 |
+ ewarn "state. Usually, running 'reset' will fix this." |
341 |
+ einfo |
342 |
+ |
343 |
+ # Don't let vim talk to X |
344 |
+ unset DISPLAY |
345 |
+ |
346 |
+ # Make gvim not try to connect to X. See :help gui-x11-start in vim for how |
347 |
+ # this evil trickery works. |
348 |
+ ln -s "${S}"/src/gvim "${S}"/src/testvim || die |
349 |
+ |
350 |
+ # Make sure our VIMPROG is used. |
351 |
+ sed -i -e 's:\.\./vim:../testvim:' src/testdir/test49.vim || die |
352 |
+ |
353 |
+ # Don't do additional GUI tests. |
354 |
+ emake -j1 VIMPROG=../testvim -C src/testdir nongui |
355 |
+} |
356 |
+ |
357 |
+# Call eselect vi update with --if-unset |
358 |
+# to respect user's choice (bug 187449) |
359 |
+eselect_vi_update() { |
360 |
+ einfo "Calling eselect vi update..." |
361 |
+ eselect vi update --if-unset |
362 |
+ eend $? |
363 |
+} |
364 |
+ |
365 |
+src_install() { |
366 |
+ local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} |
367 |
+ |
368 |
+ dobin src/gvim |
369 |
+ dosym gvim /usr/bin/gvimdiff |
370 |
+ dosym gvim /usr/bin/evim |
371 |
+ dosym gvim /usr/bin/eview |
372 |
+ dosym gvim /usr/bin/gview |
373 |
+ dosym gvim /usr/bin/rgvim |
374 |
+ dosym gvim /usr/bin/rgview |
375 |
+ |
376 |
+ emake -C src DESTDIR="${D}" DATADIR="${EPREFIX}"/usr/share install-icons |
377 |
+ |
378 |
+ dodir /usr/share/man/man1 |
379 |
+ echo ".so vim.1" > "${ED}"/usr/share/man/man1/gvim.1 || die "echo failed" |
380 |
+ echo ".so vim.1" > "${ED}"/usr/share/man/man1/gview.1 || die "echo failed" |
381 |
+ echo ".so vimdiff.1" > "${ED}"/usr/share/man/man1/gvimdiff.1 || \ |
382 |
+ die "echo failed" |
383 |
+ |
384 |
+ insinto /etc/vim |
385 |
+ newins "${FILESDIR}"/gvimrc-r1 gvimrc |
386 |
+ eprefixify "${ED}"/etc/vim/gvimrc |
387 |
+ |
388 |
+ # bash completion script, bug #79018. |
389 |
+ newbashcomp "${FILESDIR}"/${PN}-completion ${PN} |
390 |
+ |
391 |
+ # don't install vim desktop file |
392 |
+ rm -v "${ED}"/usr/share/applications/vim.desktop || die "failed to remove vim.desktop" |
393 |
+} |
394 |
+ |
395 |
+pkg_postinst() { |
396 |
+ # update documentation tags (from vim-doc.eclass) |
397 |
+ update_vim_helptags |
398 |
+ |
399 |
+ # update fdo mime stuff, bug #78394 |
400 |
+ xdg_desktop_database_update |
401 |
+ |
402 |
+ # update icon cache |
403 |
+ xdg_icon_cache_update |
404 |
+ |
405 |
+ # call eselect vi update |
406 |
+ eselect_vi_update |
407 |
+} |
408 |
+ |
409 |
+pkg_postrm() { |
410 |
+ # update documentation tags (from vim-doc.eclass) |
411 |
+ update_vim_helptags |
412 |
+ |
413 |
+ # update fdo mime stuff, bug #78394 |
414 |
+ xdg_desktop_database_update |
415 |
+ |
416 |
+ # update icon cache |
417 |
+ xdg_icon_cache_update |
418 |
+ |
419 |
+ # call eselect vi update |
420 |
+ eselect_vi_update |
421 |
+} |