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