[PATCH] gnu: vim: Update to 8.0.0494.

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • Marius Bakke
Owner
unassigned
Submitted by
Marius Bakke
Severity
normal
M
M
Marius Bakke wrote on 20 Mar 2017 07:51
(address . guix-patches@gnu.org)(name . Marius Bakke)(address . mbakke@fastmail.com)
20170320065135.18205-1-mbakke@fastmail.com
* gnu/packages/patches/vim-CVE-2017-5953.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
* gnu/packages/vim.scm (vim, vim-full): Update to 8.0.0494.
[source]: Remove patch.
(vim-full)[arguments]: Add two phases to drop tests and start xorg.
[native-inputs]: Add XORG-SERVER.
---
gnu/local.mk | 1 -
gnu/packages/patches/vim-CVE-2017-5953.patch | 32 ----------------------------
gnu/packages/vim.scm | 28 +++++++++++++++++++-----
3 files changed, 23 insertions(+), 38 deletions(-)
delete mode 100644 gnu/packages/patches/vim-CVE-2017-5953.patch

Toggle diff (113 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 885c1137a..dc41ac1d5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -965,7 +965,6 @@ dist_patch_DATA = \
%D%/packages/patches/util-linux-CVE-2017-2616.patch \
%D%/packages/patches/upower-builddir.patch \
%D%/packages/patches/valgrind-enable-arm.patch \
- %D%/packages/patches/vim-CVE-2017-5953.patch \
%D%/packages/patches/virglrenderer-CVE-2017-6386.patch \
%D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \
%D%/packages/patches/vorbis-tools-CVE-2014-9640.patch \
diff --git a/gnu/packages/patches/vim-CVE-2017-5953.patch b/gnu/packages/patches/vim-CVE-2017-5953.patch
deleted file mode 100644
index 070f98c2c..000000000
--- a/gnu/packages/patches/vim-CVE-2017-5953.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Fix CVE-2017-5953:
-
-https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5953
-https://groups.google.com/forum/#!topic/vim_dev/t-3RSdEnrHY
-
-This change is adapted from the upstream source repository:
-
-https://github.com/vim/vim/commit/6d3c8586fc81b022e9f06c611b9926108fb878c7
-
-diff --git a/src/spellfile.c b/src/spellfile.c
-index c7d87c6..00ef019 100644
---- a/src/spellfile.c
-+++ b/src/spellfile.c
-@@ -1585,7 +1585,7 @@ spell_read_tree(
- int prefixtree, /* TRUE for the prefix tree */
- int prefixcnt) /* when "prefixtree" is TRUE: prefix count */
- {
-- int len;
-+ long len;
- int idx;
- char_u *bp;
- idx_T *ip;
-@@ -1595,6 +1595,9 @@ spell_read_tree(
- len = get4c(fd);
- if (len < 0)
- return SP_TRUNCERROR;
-+ if (len >= LONG_MAX / (long)sizeof(int))
-+ /* Invalid length, multiply with sizeof(int) would overflow. */
-+ return SP_FORMERROR;
- if (len > 0)
- {
- /* Allocate the byte array. */
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 82403feb1..4f6d8542b 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -22,6 +22,7 @@
(define-module (gnu packages vim)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
@@ -58,16 +59,15 @@
(define-public vim
(package
(name "vim")
- (version "8.0.0300")
+ (version "8.0.0494")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/vim/vim/archive/v"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
- (patches (search-patches "vim-CVE-2017-5953.patch"))
(sha256
(base32
- "04samk2bakyixbxyc3p0g6ypls45105sikibg0wc6lmak9bqjs85"))))
+ "08kzimdyla35ndrbn68jf8pmzm7nd2qrydnvk57j089m6ajic62r"))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
@@ -128,9 +128,27 @@ configuration files.")
"--enable-xim"
"--disable-selinux"
"--enable-gui")
- ,@(package-arguments vim)))
+ ,@(substitute-keyword-arguments (package-arguments vim)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'build 'drop-failing-tests
+ (lambda _
+ ;; These tests fail mysteriously with GUI enabled.
+ ;; https://github.com/vim/vim/issues/1460
+ (substitute* "src/testdir/test_cmdline.vim"
+ (("call assert_equal\\(.+getcmd.+\\(\\)\\)") ""))
+ #t))
+ (add-before 'check 'start-xserver
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Some tests require an X server, but does not start one.
+ (let ((xorg-server (assoc-ref inputs "xorg-server"))
+ (display ":1"))
+ (setenv "DISPLAY" display)
+ (zero? (system (string-append xorg-server "/bin/Xvfb "
+ display " &")))))))))))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("pkg-config" ,pkg-config)
+ ("xorg-server" ,xorg-server)))
(inputs
`(("acl" ,acl)
("atk" ,atk)
--
2.12.0
L
L
Leo Famulari wrote on 20 Mar 2017 19:03
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 26189@debbugs.gnu.org)
20170320180350.GA3820@jasmine
On Mon, Mar 20, 2017 at 07:51:35AM +0100, Marius Bakke wrote:
Toggle quote (7 lines)
> * gnu/packages/patches/vim-CVE-2017-5953.patch: Delete file.
> * gnu/local.mk (dist_patch_DATA): Remove it.
> * gnu/packages/vim.scm (vim, vim-full): Update to 8.0.0494.
> [source]: Remove patch.
> (vim-full)[arguments]: Add two phases to drop tests and start xorg.
> [native-inputs]: Add XORG-SERVER.

As long as it doesn't keep a reference to xorg-server (checked with
`guix gc --references`), LGTM!
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAljQGYMACgkQJkb6MLrK
fwis8A//UOnXOIQyW9IvCQ6ELuXasdPqgw5HLjjiSx2j6RmM3kMnZbQBK9HBkdQF
drAZOfbAilNP3pU/TzLwlUnU7PudJNCZXjZ3UDlNywFwTQ8gwf40JhJyLeib+FNT
X5CDsgqpAkRptZe1yzxztuJucVyAquJ84Thz3oX14Qbxg07tVsovR/I7uFW5eWU+
8xqp+50ly+n3UUavv/Jh6UCC0haYH1N772FbY5H0mmffIAqb3it4oMAmUyirceCa
11HtPYiZ6ZOm12qvmy0635CG5vGvP8ty5XYxCTLtnlpUI5tcqaQP3r89tsht5MQ1
8o3k9HqOzdfnCW1fz6KYQIGfrbXY9hOpbXigf4UfE5h9dvMqNu9fZ5HR/zJF825E
zvCJdqpNTVtBVhme9RN/tMnKl4Me+GAjMfFrw2R0fppr/BuiZI/fI7kDqT3lGTGG
Wt7SQxXFwyYlcgzuPuTT7dQvmMRzqI+XIgqqrhPBjzqiGR29hHm+qIYQittdhgTk
SwlbmJNgZoxHMhhss/vRuUNsWmPEpgavUa6YfUBNd8y6W7caE6Vf4e3kmapilOkP
eZ/QNQCe4Wr9QbVA3Z4UWxB7ydQ4kSbRh5EjTGmB/NdJm1qTSbyfCh/HyUVxHKUG
J7HwTyH5RZ0v2x/b2IARqbfTGFgD+4wNrJ82/vVSp5SqXFWsmXc=
=F5o7
-----END PGP SIGNATURE-----


M
M
Marius Bakke wrote on 20 Mar 2017 23:41
(name . Leo Famulari)(address . leo@famulari.name)(address . 26189-done@debbugs.gnu.org)
87wpbj6074.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Leo Famulari <leo@famulari.name> writes:

Toggle quote (11 lines)
> On Mon, Mar 20, 2017 at 07:51:35AM +0100, Marius Bakke wrote:
>> * gnu/packages/patches/vim-CVE-2017-5953.patch: Delete file.
>> * gnu/local.mk (dist_patch_DATA): Remove it.
>> * gnu/packages/vim.scm (vim, vim-full): Update to 8.0.0494.
>> [source]: Remove patch.
>> (vim-full)[arguments]: Add two phases to drop tests and start xorg.
>> [native-inputs]: Add XORG-SERVER.
>
> As long as it doesn't keep a reference to xorg-server (checked with
> `guix gc --references`), LGTM!

Verified and pushed. Thanks for checking!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAljQWn8ACgkQoqBt8qM6
VPqr3Qf8CQ9p2Xk/TvsqXqxzLyiUFMtI0QYzyDbmHYn6PVJxQ6k30I8me9G18fz2
B2T4TOZCUuA1F0iyFP3aMWIfQH1OHg/c4jPAz6+dKzIFJ2gd0sOG0EpFEz1jEjb2
8vGDdBBTa0G4gZRTfhGDcOkIUnyQK0qOhCWZNawxCF9r1F5Wt6W/s9ff89EFkwcc
jjCgZL7PkP+TbyANW+nihyzI3LMbpMItuVwqlm0pJuTQPil9TlY3nFYrKZTmz5es
t2vUdTjgb8XE5BBeW6+VhXhBmkG1AqVkrO3BhnWoSc0A6pprVrtki1/5varHTWbP
mA8WNlOr+ueNMC8ykaQd++2dyKjn1Q==
=ncIq
-----END PGP SIGNATURE-----

Closed
?