Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/vim-core/
Date: Wed, 08 Dec 2021 06:21:59
Message-Id: 1638944443.952ead41b609e6ab010b6d8edae9724b63034595.sam@gentoo
1 commit: 952ead41b609e6ab010b6d8edae9724b63034595
2 Author: Ke Wu <mikewu <AT> google <DOT> com>
3 AuthorDate: Tue Dec 7 19:18:15 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 8 06:20:43 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=952ead41
7
8 app-editors/vim-core: 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-core/Manifest | 1 +
19 app-editors/vim-core/vim-core-8.2.3669.ebuild | 233 ++++++++++++++++++++++++++
20 2 files changed, 234 insertions(+)
21
22 diff --git a/app-editors/vim-core/Manifest b/app-editors/vim-core/Manifest
23 index ce47050db942..fc7f6789c5c7 100644
24 --- a/app-editors/vim-core/Manifest
25 +++ b/app-editors/vim-core/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-core/vim-core-8.2.3669.ebuild b/app-editors/vim-core/vim-core-8.2.3669.ebuild
33 new file mode 100644
34 index 000000000000..d04960a41e81
35 --- /dev/null
36 +++ b/app-editors/vim-core/vim-core-8.2.3669.ebuild
37 @@ -0,0 +1,233 @@
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 and app-editors/gvim
44 +
45 +VIM_VERSION="8.2"
46 +inherit estack vim-doc flag-o-matic bash-completion-r1 prefix desktop xdg-utils
47 +
48 +if [[ ${PV} == 9999* ]] ; then
49 + inherit git-r3
50 + EGIT_REPO_URI="https://github.com/vim/vim.git"
51 + EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV}
52 +else
53 + SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> vim-${PV}.tar.gz
54 + https://dev.gentoo.org/~zlogene/distfiles/app-editors/vim/vim-8.2.0360-gentoo-patches.tar.xz"
55 + 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"
56 +fi
57 +S="${WORKDIR}"/vim-${PV}
58 +
59 +DESCRIPTION="vim and gvim shared files"
60 +HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
61 +
62 +LICENSE="vim"
63 +SLOT="0"
64 +IUSE="nls acl minimal"
65 +
66 +BDEPEND="sys-devel/autoconf"
67 +# Avoid icon file collision, bug #673880
68 +RDEPEND="!!<app-editors/gvim-8.1.0648"
69 +PDEPEND="!minimal? ( app-vim/gentoo-syntax )"
70 +
71 +pkg_setup() {
72 + # people with broken alphabets run into trouble. bug #82186.
73 + unset LANG LC_ALL
74 + export LC_COLLATE="C"
75 +
76 + # Gnome sandbox silliness. bug #114475.
77 + mkdir -p "${T}"/home || die "mkdir -p failed"
78 + export HOME="${T}"/home
79 +}
80 +
81 +src_prepare() {
82 + if [[ ${PV} != 9999* ]] ; then
83 + # Gentoo patches to fix runtime issues, cross-compile errors, etc
84 + eapply "${WORKDIR}"/patches
85 + fi
86 +
87 + # Fixup a script to use awk instead of nawk
88 + sed -i \
89 + -e '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
90 + "${S}"/runtime/tools/mve.awk || die "sed failed"
91 +
92 + # See bug #77841. We remove this file after the tarball extraction.
93 + rm -v "${S}"/runtime/tools/vimspell.sh || die "rm failed"
94 +
95 + # Read vimrc and gvimrc from /etc/vim
96 + echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
97 + echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
98 +
99 + # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
100 + # Hopefully this pattern won't break for a while at least.
101 + # This fixes bug #29398 (27 Sep 2003 agriffis)
102 + sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
103 + "${S}"/runtime/doc/syntax.txt \
104 + "${S}"/runtime/doc/tagsrch.txt \
105 + "${S}"/runtime/doc/usr_29.txt \
106 + "${S}"/runtime/menu.vim \
107 + "${S}"/src/configure.ac || die 'sed failed'
108 +
109 + # Don't be fooled by /usr/include/libc.h. When found, vim thinks
110 + # this is NeXT, but it's actually just a file in dev-libs/9libs
111 + # This fixes bug #43885 (20 Mar 2004 agriffis)
112 + sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed'
113 +
114 + # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
115 + # correctly. To avoid some really entertaining error messages about stuff
116 + # which isn't even in the source file being invalid, we'll do some trickery
117 + # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
118 + find "${S}" -name '*.c' | while read c; do
119 + echo >> "$c" || die "echo failed"
120 + done
121 +
122 + # Try to avoid sandbox problems. Bug #114475.
123 + if [[ -d "${S}"/src/po ]]; then
124 + sed -i -e \
125 + '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
126 + "${S}"/src/po/Makefile || die "sed failed"
127 + fi
128 +
129 + cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
130 +
131 + # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
132 + sed -i -e \
133 + "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
134 + "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
135 +
136 + eapply_user
137 +}
138 +
139 +src_configure() {
140 + local myconf
141 +
142 + # Fix bug #37354: Disallow -funroll-all-loops on amd64
143 + # Bug 57859 suggests that we want to do this for all archs
144 + filter-flags -funroll-all-loops
145 +
146 + # Fix bug #76331: -O3 causes problems, use -O2 instead. We'll do this for
147 + # everyone since previous flag filtering bugs have turned out to affect
148 + # multiple archs...
149 + replace-flags -O3 -O2
150 +
151 + # Fix bug #18245: Prevent "make" from the following chain:
152 + # (1) Notice configure.ac is newer than auto/configure
153 + # (2) Rebuild auto/configure
154 + # (3) Notice auto/configure is newer than auto/config.mk
155 + # (4) Run ./configure (with wrong args) to remake auto/config.mk
156 + sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
157 +
158 + # Remove src/auto/configure file.
159 + rm -v src/auto/configure || die "rm configure failed"
160 +
161 + emake -j1 -C src autoconf
162 +
163 + # This should fix a sandbox violation (see bug 24447). The hvc
164 + # things are for ppc64, see bug 86433.
165 + for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
166 + if [[ -e "${file}" ]]; then
167 + addwrite ${file}
168 + fi
169 + done
170 +
171 + # Let Portage do the stripping. Some people like that.
172 + export ac_cv_prog_STRIP="$(type -P true ) faking strip"
173 +
174 + # Keep Gentoo Prefix env contained within the EPREFIX
175 + use prefix && myconf+=" --without-local-dir"
176 +
177 + econf \
178 + --with-modified-by=Gentoo-${PVR} \
179 + --enable-gui=no \
180 + --without-x \
181 + --disable-darwin \
182 + --disable-perlinterp \
183 + --disable-pythoninterp \
184 + --disable-rubyinterp \
185 + --disable-gpm \
186 + --disable-selinux \
187 + $(use_enable nls) \
188 + $(use_enable acl) \
189 + ${myconf}
190 +}
191 +
192 +src_compile() {
193 + emake -j1 -C src auto/osdef.h objects
194 + emake tools
195 +}
196 +
197 +src_test() { :; }
198 +
199 +src_install() {
200 + local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
201 +
202 + dodir /usr/{bin,share/{man/man1,vim}}
203 + emake -C src \
204 + installruntime \
205 + installmanlinks \
206 + installmacros \
207 + installtutor \
208 + installtutorbin \
209 + installtools \
210 + install-languages \
211 + DESTDIR="${D}" \
212 + BINDIR="${EPREFIX}"/usr/bin \
213 + MANDIR="${EPREFIX}"/usr/share/man \
214 + DATADIR="${EPREFIX}"/usr/share
215 +
216 + keepdir ${vimfiles}/keymap
217 +
218 + # default vimrc is installed by vim-core since it applies to
219 + # both vim and gvim
220 + insinto /etc/vim/
221 + newins "${FILESDIR}"/vimrc-r5 vimrc
222 + eprefixify "${ED}"/etc/vim/vimrc
223 +
224 + if use minimal; then
225 + # To save space, install only a subset of the files.
226 + # Helps minimalize the livecd, bug 65144.
227 + eshopts_push -s extglob
228 +
229 + rm -rv "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent} || die "rm failed"
230 + rm -rv "${ED}${vimfiles}"/{macros,print,tools,tutor} || die "rm failed"
231 + rm -v "${ED}"/usr/bin/vimtutor || die "rm failed"
232 +
233 + # Delete defaults.vim to avoid conflicts with one from vim[minimal]
234 + rm -v "${ED}${vimfiles}"/defaults.vim || die "rm failed"
235 +
236 + local keep_colors="default"
237 + ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim )
238 +
239 + local keep_syntax="conf|crontab|fstab|inittab|resolv|sshdconfig"
240 + # tinkering with the next line might make bad things happen ...
241 + keep_syntax="${keep_syntax}|syntax|nosyntax|synload"
242 + ignore=$(rm -fr "${ED}${vimfiles}"/syntax/!(${keep_syntax}).vim )
243 +
244 + # Delete skip_defaults_vim config not supported by vim[minimal]
245 + sed -i '/skip_defaults_vim/d' "${ED}"/etc/vim/vimrc || die "sed failed"
246 +
247 + eshopts_pop
248 + fi
249 +
250 + newbashcomp "${FILESDIR}"/xxd-completion xxd
251 +
252 + # install gvim icon since both vim/gvim desktop files reference it
253 + doicon -s scalable "${FILESDIR}"/gvim.svg
254 +}
255 +
256 +pkg_postinst() {
257 + # update documentation tags (from vim-doc.eclass)
258 + update_vim_helptags
259 +
260 + # update icon cache
261 + xdg_icon_cache_update
262 +}
263 +
264 +pkg_postrm() {
265 + # Update documentation tags (from vim-doc.eclass)
266 + update_vim_helptags
267 +
268 + # update icon cache
269 + xdg_icon_cache_update
270 +}