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