1 |
commit: be6f91c94f38123523623a6d98a67b13377dc07d |
2 |
Author: Ke Wu <mikewu <AT> google <DOT> com> |
3 |
AuthorDate: Tue Dec 7 19:13:56 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 8 06:20:42 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be6f91c9 |
7 |
|
8 |
app-editors/vim: 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 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
17 |
|
18 |
app-editors/vim/Manifest | 1 + |
19 |
app-editors/vim/vim-8.2.3669.ebuild | 355 ++++++++++++++++++++++++++++++++++++ |
20 |
2 files changed, 356 insertions(+) |
21 |
|
22 |
diff --git a/app-editors/vim/Manifest b/app-editors/vim/Manifest |
23 |
index ce47050db942..fc7f6789c5c7 100644 |
24 |
--- a/app-editors/vim/Manifest |
25 |
+++ b/app-editors/vim/Manifest |
26 |
@@ -3,3 +3,4 @@ DIST vim-8.2.0814.tar.gz 14953478 BLAKE2B fd4155ec749bd9a705e8114ff7f8cc321182c9 |
27 |
DIST vim-8.2.3428.tar.gz 15715383 BLAKE2B 865842bae0de25c34f255085f6edfe35b6905e220bdcb76372d7289ef1f6c2b2dee2f88e4a5f849d43fa560db4ade1e8e498d86f5651c5218d9153cde5ecddd3 SHA512 7cb473afa0ad6a9728dfc2f7d8ca19a21de329c4790141c7cb815b71c07e92a1ce04a5fcc2a0381c4beb304670d6c08629dc2ed2cb0842998cca2fd846c8cd6b |
28 |
DIST vim-8.2.3567.tar.gz 15771981 BLAKE2B 5a10ce998769b73a9c3b30fccb84e90eef8242d04e52b1cf475af777233ac774a6e5ec8c2aa09cadfe2db747b485fcc26d1d953017df4bb459d8a427715a3048 SHA512 f1b5debc77d5392966d168974eab7faae99082509a8148ea212e8e06ae980d9a2652ac77547d77d10953119527f68c633440cf813bb6dec8e259b7628af93af6 |
29 |
DIST vim-8.2.3582.tar.gz 15778667 BLAKE2B c8eaa95fa4fde6514168a9f42a712a78442a7fe504b59158e2e7717b8025a59cb4d8948451d72418b29f2b7cf3619cd765ef43e1304d73f81a6cba405f9706e7 SHA512 f476f24390807b71a0e02729f1815b3743b6b42cdd28a414e9ceaf0aa3fd4cab91e3550a669b1c64b4cd83207515cfe2b4acf2358a6def60e216e101c979037e |
30 |
+DIST vim-8.2.3669.tar.gz 15810783 BLAKE2B edac6dabfbeb11057c7b15830b30ec555a10942494bc89d7d85b4c701b5ff8f7413887e4e33e7b812057177ffebd2cdc74e69e86080a86cfee529b1da45156bb SHA512 83d172f7e1a3c5a8ea6238f2766bf077463d32d429111c08e5b28b8aafb8aea584807023281abf3b1710d61820fec8d2b808b42b5c50058d5eb4eb917deb19ab |
31 |
|
32 |
diff --git a/app-editors/vim/vim-8.2.3669.ebuild b/app-editors/vim/vim-8.2.3669.ebuild |
33 |
new file mode 100644 |
34 |
index 000000000000..a17b74f24534 |
35 |
--- /dev/null |
36 |
+++ b/app-editors/vim/vim-8.2.3669.ebuild |
37 |
@@ -0,0 +1,355 @@ |
38 |
+# Copyright 1999-2021 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=7 |
42 |
+ |
43 |
+# Please bump with app-editors/vim-core and app-editors/gvim |
44 |
+ |
45 |
+VIM_VERSION="8.2" |
46 |
+LUA_COMPAT=( lua5-1 luajit ) |
47 |
+PYTHON_COMPAT=( python3_{7..10} ) |
48 |
+PYTHON_REQ_USE="threads(+)" |
49 |
+USE_RUBY="ruby24 ruby25 ruby26 ruby27" |
50 |
+ |
51 |
+inherit vim-doc flag-o-matic bash-completion-r1 lua-single python-single-r1 ruby-single desktop xdg-utils |
52 |
+ |
53 |
+if [[ ${PV} == 9999* ]] ; then |
54 |
+ inherit git-r3 |
55 |
+ EGIT_REPO_URI="https://github.com/vim/vim.git" |
56 |
+else |
57 |
+ SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz |
58 |
+ https://dev.gentoo.org/~zlogene/distfiles/app-editors/vim/vim-8.2.0360-gentoo-patches.tar.xz" |
59 |
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
60 |
+fi |
61 |
+ |
62 |
+DESCRIPTION="Vim, an improved vi-style text editor" |
63 |
+HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" |
64 |
+ |
65 |
+LICENSE="vim" |
66 |
+SLOT="0" |
67 |
+IUSE="X acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager" |
68 |
+REQUIRED_USE=" |
69 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
70 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
71 |
+ vim-pager? ( !minimal ) |
72 |
+" |
73 |
+ |
74 |
+RDEPEND=" |
75 |
+ >=app-eselect/eselect-vi-1.1 |
76 |
+ >=sys-libs/ncurses-5.2-r2:0= |
77 |
+ nls? ( virtual/libintl ) |
78 |
+ acl? ( kernel_linux? ( sys-apps/acl ) ) |
79 |
+ crypt? ( dev-libs/libsodium:= ) |
80 |
+ cscope? ( dev-util/cscope ) |
81 |
+ gpm? ( >=sys-libs/gpm-1.19.3 ) |
82 |
+ lua? ( ${LUA_DEPS} |
83 |
+ $(lua_gen_impl_dep 'deprecated' lua5-1) |
84 |
+ ) |
85 |
+ !minimal? ( ~app-editors/vim-core-${PV} ) |
86 |
+ vim-pager? ( app-editors/vim-core[-minimal] ) |
87 |
+ perl? ( dev-lang/perl:= ) |
88 |
+ python? ( ${PYTHON_DEPS} ) |
89 |
+ racket? ( dev-scheme/racket ) |
90 |
+ ruby? ( ${RUBY_DEPS} ) |
91 |
+ selinux? ( sys-libs/libselinux ) |
92 |
+ sound? ( media-libs/libcanberra ) |
93 |
+ tcl? ( dev-lang/tcl:0= ) |
94 |
+ X? ( x11-libs/libXt ) |
95 |
+" |
96 |
+DEPEND="${RDEPEND}" |
97 |
+# configure runs the Lua interpreter |
98 |
+BDEPEND=" |
99 |
+ sys-devel/autoconf |
100 |
+ lua? ( ${LUA_DEPS} ) |
101 |
+ nls? ( sys-devel/gettext ) |
102 |
+" |
103 |
+ |
104 |
+pkg_setup() { |
105 |
+ # people with broken alphabets run into trouble. bug #82186. |
106 |
+ unset LANG LC_ALL |
107 |
+ export LC_COLLATE="C" |
108 |
+ |
109 |
+ # Gnome sandbox silliness. bug #114475. |
110 |
+ mkdir -p "${T}"/home || die "mkdir failed" |
111 |
+ export HOME="${T}"/home |
112 |
+ |
113 |
+ use lua && lua-single_pkg_setup |
114 |
+ use python && python-single-r1_pkg_setup |
115 |
+} |
116 |
+ |
117 |
+src_prepare() { |
118 |
+ if [[ ${PV} != 9999* ]] ; then |
119 |
+ # Gentoo patches to fix runtime issues, cross-compile errors, etc |
120 |
+ eapply "${WORKDIR}"/patches/ |
121 |
+ fi |
122 |
+ |
123 |
+ # Fixup a script to use awk instead of nawk |
124 |
+ sed -i -e \ |
125 |
+ '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ |
126 |
+ "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed" |
127 |
+ |
128 |
+ # Read vimrc and gvimrc from /etc/vim |
129 |
+ echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \ |
130 |
+ >> "${S}"/src/feature.h || die "echo failed" |
131 |
+ echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ |
132 |
+ >> "${S}"/src/feature.h || die "echo failed" |
133 |
+ |
134 |
+ # Use exuberant ctags which installs as /usr/bin/exuberant-ctags. |
135 |
+ # Hopefully this pattern won't break for a while at least. |
136 |
+ # This fixes bug #29398 (27 Sep 2003 agriffis) |
137 |
+ sed -i -e \ |
138 |
+ 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ |
139 |
+ "${S}"/runtime/doc/syntax.txt \ |
140 |
+ "${S}"/runtime/doc/tagsrch.txt \ |
141 |
+ "${S}"/runtime/doc/usr_29.txt \ |
142 |
+ "${S}"/runtime/menu.vim \ |
143 |
+ "${S}"/src/configure.ac || die 'sed failed' |
144 |
+ |
145 |
+ # Don't be fooled by /usr/include/libc.h. When found, vim thinks |
146 |
+ # this is NeXT, but it's actually just a file in dev-libs/9libs |
147 |
+ # This fixes bug #43885 (20 Mar 2004 agriffis) |
148 |
+ sed -i -e \ |
149 |
+ 's/ libc\.h / /' \ |
150 |
+ "${S}"/src/configure.ac || die 'sed failed' |
151 |
+ |
152 |
+ # gcc on sparc32 has this, uhm, interesting problem with detecting EOF |
153 |
+ # correctly. To avoid some really entertaining error messages about stuff |
154 |
+ # which isn't even in the source file being invalid, we'll do some trickery |
155 |
+ # to make the error never occur. bug 66162 (02 October 2004 ciaranm) |
156 |
+ find "${S}" -name '*.c' | while read c; do |
157 |
+ echo >> "$c" || die "echo failed" |
158 |
+ done |
159 |
+ |
160 |
+ # conditionally make the manpager.sh script |
161 |
+ if use vim-pager; then |
162 |
+ cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed" |
163 |
+ #!/bin/sh |
164 |
+ sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\ |
165 |
+ vim \\ |
166 |
+ -c 'let no_plugin_maps = 1' \\ |
167 |
+ -c 'set nolist nomod ft=man ts=8' \\ |
168 |
+ -c 'let g:showmarks_enable=0' \\ |
169 |
+ -c 'runtime! macros/less.vim' - |
170 |
+ _EOF_ |
171 |
+ fi |
172 |
+ |
173 |
+ # Try to avoid sandbox problems. Bug #114475. |
174 |
+ if [[ -d "${S}"/src/po ]]; then |
175 |
+ sed -i -e \ |
176 |
+ '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ |
177 |
+ "${S}"/src/po/Makefile || die "sed failed" |
178 |
+ fi |
179 |
+ |
180 |
+ cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" |
181 |
+ |
182 |
+ sed -i -e \ |
183 |
+ "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ |
184 |
+ "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' |
185 |
+ |
186 |
+ eapply_user |
187 |
+} |
188 |
+ |
189 |
+src_configure() { |
190 |
+ local myconf=() |
191 |
+ |
192 |
+ # Fix bug #37354: Disallow -funroll-all-loops on amd64 |
193 |
+ # Bug #57859 suggests that we want to do this for all archs |
194 |
+ filter-flags -funroll-all-loops |
195 |
+ |
196 |
+ # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for |
197 |
+ # everyone since previous flag filtering bugs have turned out to affect |
198 |
+ # multiple archs... |
199 |
+ replace-flags -O3 -O2 |
200 |
+ |
201 |
+ # Fix bug 18245: Prevent "make" from the following chain: |
202 |
+ # (1) Notice configure.ac is newer than auto/configure |
203 |
+ # (2) Rebuild auto/configure |
204 |
+ # (3) Notice auto/configure is newer than auto/config.mk |
205 |
+ # (4) Run ./configure (with wrong args) to remake auto/config.mk |
206 |
+ sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" |
207 |
+ rm src/auto/configure || die "rm failed" |
208 |
+ emake -j1 -C src autoconf |
209 |
+ |
210 |
+ # This should fix a sandbox violation (see bug #24447). The hvc |
211 |
+ # things are for ppc64, see bug #86433. |
212 |
+ for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do |
213 |
+ if [[ -e "${file}" ]]; then |
214 |
+ addwrite ${file} |
215 |
+ fi |
216 |
+ done |
217 |
+ |
218 |
+ if use minimal; then |
219 |
+ myconf=( |
220 |
+ --with-features=tiny |
221 |
+ --disable-nls |
222 |
+ --disable-canberra |
223 |
+ --disable-acl |
224 |
+ --enable-gui=no |
225 |
+ --without-x |
226 |
+ --disable-darwin |
227 |
+ --disable-luainterp |
228 |
+ --disable-perlinterp |
229 |
+ --disable-pythoninterp |
230 |
+ --disable-mzschemeinterp |
231 |
+ --disable-rubyinterp |
232 |
+ --disable-selinux |
233 |
+ --disable-tclinterp |
234 |
+ --disable-gpm |
235 |
+ ) |
236 |
+ else |
237 |
+ use debug && append-flags "-DDEBUG" |
238 |
+ |
239 |
+ myconf=( |
240 |
+ --with-features=huge |
241 |
+ $(use_enable sound canberra) |
242 |
+ $(use_enable acl) |
243 |
+ $(use_enable crypt libsodium) |
244 |
+ $(use_enable cscope) |
245 |
+ $(use_enable gpm) |
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 tcl tclinterp) |
254 |
+ $(use_enable terminal) |
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 "sed failed" |
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 |
+ # don't test USE=X here ... see bug #19115 |
273 |
+ # but need to provide a way to link against X ... see bug #20093 |
274 |
+ myconf+=( |
275 |
+ --enable-gui=no |
276 |
+ --disable-darwin |
277 |
+ $(use_with X x) |
278 |
+ ) |
279 |
+ fi |
280 |
+ |
281 |
+ # let package manager strip binaries |
282 |
+ export ac_cv_prog_STRIP="$(type -P true ) faking strip" |
283 |
+ |
284 |
+ # keep prefix env contained within the EPREFIX |
285 |
+ use prefix && myconf+=( --without-local-dir ) |
286 |
+ |
287 |
+ econf \ |
288 |
+ --with-modified-by=Gentoo-${PVR} \ |
289 |
+ "${myconf[@]}" |
290 |
+} |
291 |
+ |
292 |
+src_compile() { |
293 |
+ # The following allows emake to be used |
294 |
+ emake -j1 -C src auto/osdef.h objects |
295 |
+ |
296 |
+ emake |
297 |
+} |
298 |
+ |
299 |
+src_test() { |
300 |
+ einfo |
301 |
+ einfo "Starting vim tests. Several error messages will be shown" |
302 |
+ einfo "while the tests run. This is normal behaviour and does not" |
303 |
+ einfo "indicate a fault." |
304 |
+ einfo |
305 |
+ ewarn "If the tests fail, your terminal may be left in a strange" |
306 |
+ ewarn "state. Usually, running 'reset' will fix this." |
307 |
+ einfo |
308 |
+ |
309 |
+ # Don't let vim talk to X |
310 |
+ unset DISPLAY |
311 |
+ |
312 |
+ # See https://github.com/vim/vim/blob/f08b0eb8691ff09f98bc4beef986ece1c521655f/src/testdir/runtest.vim#L5 |
313 |
+ # for more information on test variables we can use. |
314 |
+ # Note that certain variables need vim-compatible regex (not PCRE), see e.g. |
315 |
+ # http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml. |
316 |
+ # |
317 |
+ # Skipped tests: |
318 |
+ # - Test_expand_star_star |
319 |
+ # Hangs because of a recursive symlink in /usr/include/nodejs (bug #616680) |
320 |
+ # - Test_exrc |
321 |
+ # Looks in wrong location? (bug #742710) |
322 |
+ # - Test_job_tty_in_out |
323 |
+ # Fragile and depends on TERM(?) |
324 |
+ # - Test_spelldump_bang |
325 |
+ # Hangs. |
326 |
+ export TEST_SKIP_PAT='\(Test_expand_star_star\|Test_exrc\|Test_job_tty_in_out\|Test_spelldump_bang\)' |
327 |
+ |
328 |
+ emake -j1 -C src/testdir nongui |
329 |
+} |
330 |
+ |
331 |
+# Call eselect vi update with --if-unset |
332 |
+# to respect user's choice (bug #187449) |
333 |
+eselect_vi_update() { |
334 |
+ einfo "Calling eselect vi update..." |
335 |
+ eselect vi update --if-unset |
336 |
+ eend $? |
337 |
+} |
338 |
+ |
339 |
+src_install() { |
340 |
+ local vimfiles=/usr/share/vim/vim${VIM_VERSION/.} |
341 |
+ |
342 |
+ # Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are |
343 |
+ # managed by eselect-vi |
344 |
+ dobin src/vim |
345 |
+ if ! use minimal ; then |
346 |
+ dosym vim /usr/bin/vimdiff |
347 |
+ fi |
348 |
+ dosym vim /usr/bin/rvim |
349 |
+ dosym vim /usr/bin/rview |
350 |
+ if use vim-pager ; then |
351 |
+ dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager |
352 |
+ dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager |
353 |
+ insinto ${vimfiles}/macros |
354 |
+ doins runtime/macros/manpager.sh |
355 |
+ fperms a+x ${vimfiles}/macros/manpager.sh |
356 |
+ fi |
357 |
+ |
358 |
+ # Fix an issue of missing defaults.vim when USE=minimal. |
359 |
+ if use minimal ; then |
360 |
+ insinto ${vimfiles} |
361 |
+ doins runtime/defaults.vim |
362 |
+ fi |
363 |
+ |
364 |
+ domenu runtime/vim.desktop |
365 |
+ |
366 |
+ newbashcomp "${FILESDIR}"/${PN}-completion ${PN} |
367 |
+ |
368 |
+ # keep in sync with 'complete ... -F' list |
369 |
+ bashcomp_alias vim ex vi view rvim rview vimdiff |
370 |
+} |
371 |
+ |
372 |
+pkg_postinst() { |
373 |
+ # Update documentation tags (from vim-doc.eclass) |
374 |
+ update_vim_helptags |
375 |
+ |
376 |
+ # Call eselect vi update |
377 |
+ eselect_vi_update |
378 |
+ |
379 |
+ # update desktop file mime cache |
380 |
+ xdg_desktop_database_update |
381 |
+} |
382 |
+ |
383 |
+pkg_postrm() { |
384 |
+ # Update documentation tags (from vim-doc.eclass) |
385 |
+ update_vim_helptags |
386 |
+ |
387 |
+ # Call eselect vi update |
388 |
+ eselect_vi_update |
389 |
+ |
390 |
+ # update desktop file mime cache |
391 |
+ xdg_desktop_database_update |
392 |
+} |