GNU bug report logs - #38799
[PATCH] gnu: vim: Update to 8.2.0055.

Previous Next

Package: guix-patches;

Reported by: Jakub Kądziołka <kuba <at> kadziolka.net>

Date: Sun, 29 Dec 2019 22:07:01 UTC

Severity: normal

Tags: patch

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38799 in the body.
You can then email your comments to 38799 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#38799; Package guix-patches. (Sun, 29 Dec 2019 22:07:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 29 Dec 2019 22:07:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: vim: Update to 8.2.0055.
Date: Sun, 29 Dec 2019 18:34:05 +0100
* gnu/packages/vim.scm (vim): Update to 8.2.0055.
[arguments]: Work around new build-container-related test failures.
[native-inputs]: Add tzdata to make a test pass.
---
 gnu/packages/vim.scm | 61 +++++++++++++++++++++++++++++++-------------
 1 file changed, 43 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index b33fe42ceb..c8d6f6d5f1 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -67,16 +67,16 @@
 (define-public vim
   (package
     (name "vim")
-    (version "8.1.0644")
+    (version "8.2.0055")
     (source (origin
-             (method git-fetch)
-             (uri (git-reference
+              (method git-fetch)
+              (uri (git-reference
                     (url "https://github.com/vim/vim")
                     (commit (string-append "v" version))))
-             (file-name (git-file-name name version))
-             (sha256
-              (base32
-               "1xksb2v8rw1zgrd5fwqvrh44lf277k85sad2y4ia1z17y7i8j2fl"))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0lcf3q7sv4fz4nn54i805wz3zz4p64jb87bhqhv0ndx7rmhkba24"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -92,26 +92,51 @@
                             "src/testdir/test_terminal.vim")
                (("/bin/sh") (which "sh")))
              #t))
+         (add-before 'check 'set-tzdir
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; One of the tests tests timezone-dependent functions.
+             (setenv "TZDIR"
+                     (string-append (assoc-ref inputs "tzdata")
+                                    "/share/zoneinfo"))
+             #t))
          (add-before 'check 'patch-failing-tests
            (lambda _
-             ;; XXX A single test fails with “Can't create file /dev/stdout” (at
-             ;; Test_writefile_sync_dev_stdout line 5) while /dev/stdout exists.
-             (substitute* "src/testdir/test_writefile.vim"
-               (("/dev/stdout") "a-regular-file"))
+             ;; This test fails when run in the build container:
+             ;; When handling swap files, Vim needs to check whether a process
+             ;; with a specific PID exists. This is done with kill(pid, 0),
+             ;; which gives similar enough results when the process exists, but
+             ;; Vim does not have permission to send signals to it.
+             ;;
+             ;; This is used in the test by modifying a swap file to say
+             ;; it came from PID 1. This works in a normal environment, since
+             ;; PID 1 usually runs as root, and the test suite does not.
+             ;; The test even contains a check for running as root, since
+             ;; that's one of the situation where the test fails.
+             ;;
+             ;; However, in the build container, PID 1 isn't root, but the same
+             ;; user as the test suite itself. As such, we skip this test.
+             ;; An alternative approach would be to patch the PID used to a
+             ;; random 32-bit value and hope it never shows up in the test
+             ;; environment.
+             (substitute* "src/testdir/test_swap.vim"
+               (("if !IsRoot\\(\\)") "if 0"))
 
-             ;; XXX: This test fails when run in the build container:
-             ;; <https://github.com/vim/vim/issues/3348>.
-             (substitute* "src/testdir/test_search.vim"
-               ((".*'Test_incsearch_substitute_03'.*" all)
-                (string-append "\"" all "\n")))
+             ;; This test checks how the terminal looks after executing some
+             ;; actions. The path of the bash binary is shown, which results in
+             ;; a difference being detected. Patching the expected result is
+             ;; non-trivial due to the special format used, so skip the test.
+             (substitute* "src/testdir/test_terminal.vim"
+               ((".*Test_terminal_postponed_scrollback.*" line)
+                (string-append line "return\n")))
              #t)))))
     (inputs
      `(("gawk" ,gawk)
        ("ncurses" ,ncurses)
        ("perl" ,perl)
-       ("tcsh" ,tcsh))) ; For runtime/tools/vim32
+       ("tcsh" ,tcsh)))                 ; For runtime/tools/vim32
     (native-inputs
-     `(("libtool" ,libtool)))
+     `(("libtool" ,libtool)
+       ("tzdata" ,tzdata-for-tests))) ; For Test_strftime in test_functions.vim
     (home-page "https://www.vim.org/")
     (synopsis "Text editor based on vi")
     (description
-- 
2.24.1





Information forwarded to guix-patches <at> gnu.org:
bug#38799; Package guix-patches. (Mon, 30 Dec 2019 00:34:01 GMT) Full text and rfc822 format available.

Message #8 received at 38799 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 38799 <at> debbugs.gnu.org
Subject: Re: [bug#38799] [PATCH] gnu: vim: Update to 8.2.0055.
Date: Mon, 30 Dec 2019 01:33:05 +0100
[Message part 1 (text/plain, inline)]
Jakub,

Thank you for working so hard on this!

Jakub Kądziołka 写道:
> * gnu/packages/vim.scm (vim): Update to 8.2.0055.
> [arguments]: Work around new build-container-related test 
> failures.
> [native-inputs]: Add tzdata to make a test pass.

This all looks good to me.

I'll push it tomorrow after another look with less tired eyes, and 
with a tiny change to the commit message to also mention the 
removal of old work-arounds.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#38799; Package guix-patches. (Tue, 31 Dec 2019 20:22:01 GMT) Full text and rfc822 format available.

Message #11 received at 38799 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: 38799 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: vim: Update to 8.2.0066.
Date: Tue, 31 Dec 2019 21:21:34 +0100
Vim pushed some new commits that look desirable -- 8.2.0063 seems to
have fixed a crash -- so here's a new patch with a bumped version &
hash.

--- CUT HERE ---
* gnu/packages/vim.scm (vim): Update to 8.2.0066.
[arguments]: Work around new build-container-related test failures.
[native-inputs]: Add tzdata to make a test pass.
---
 gnu/packages/vim.scm | 61 +++++++++++++++++++++++++++++++-------------
 1 file changed, 43 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index b33fe42ceb..efbe625998 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -67,16 +67,16 @@
 (define-public vim
   (package
     (name "vim")
-    (version "8.1.0644")
+    (version "8.2.0066")
     (source (origin
-             (method git-fetch)
-             (uri (git-reference
+              (method git-fetch)
+              (uri (git-reference
                     (url "https://github.com/vim/vim")
                     (commit (string-append "v" version))))
-             (file-name (git-file-name name version))
-             (sha256
-              (base32
-               "1xksb2v8rw1zgrd5fwqvrh44lf277k85sad2y4ia1z17y7i8j2fl"))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1yrmbqfwyj2ri61ahgzrglznpy1p6f1ldqkazhyxpwl4azk4n7zx"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -92,26 +92,51 @@
                             "src/testdir/test_terminal.vim")
                (("/bin/sh") (which "sh")))
              #t))
+         (add-before 'check 'set-tzdir
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; One of the tests tests timezone-dependent functions.
+             (setenv "TZDIR"
+                     (string-append (assoc-ref inputs "tzdata")
+                                    "/share/zoneinfo"))
+             #t))
          (add-before 'check 'patch-failing-tests
            (lambda _
-             ;; XXX A single test fails with “Can't create file /dev/stdout” (at
-             ;; Test_writefile_sync_dev_stdout line 5) while /dev/stdout exists.
-             (substitute* "src/testdir/test_writefile.vim"
-               (("/dev/stdout") "a-regular-file"))
+             ;; This test fails when run in the build container:
+             ;; When handling swap files, Vim needs to check whether a process
+             ;; with a specific PID exists. This is done with kill(pid, 0),
+             ;; which gives similar enough results when the process exists, but
+             ;; Vim does not have permission to send signals to it.
+             ;;
+             ;; This is used in the test by modifying a swap file to say
+             ;; it came from PID 1. This works in a normal environment, since
+             ;; PID 1 usually runs as root, and the test suite does not.
+             ;; The test even contains a check for running as root, since
+             ;; that's one of the situation where the test fails.
+             ;;
+             ;; However, in the build container, PID 1 isn't root, but the same
+             ;; user as the test suite itself. As such, we skip this test.
+             ;; An alternative approach would be to patch the PID used to a
+             ;; random 32-bit value and hope it never shows up in the test
+             ;; environment.
+             (substitute* "src/testdir/test_swap.vim"
+               (("if !IsRoot\\(\\)") "if 0"))
 
-             ;; XXX: This test fails when run in the build container:
-             ;; <https://github.com/vim/vim/issues/3348>.
-             (substitute* "src/testdir/test_search.vim"
-               ((".*'Test_incsearch_substitute_03'.*" all)
-                (string-append "\"" all "\n")))
+             ;; This test checks how the terminal looks after executing some
+             ;; actions. The path of the bash binary is shown, which results in
+             ;; a difference being detected. Patching the expected result is
+             ;; non-trivial due to the special format used, so skip the test.
+             (substitute* "src/testdir/test_terminal.vim"
+               ((".*Test_terminal_postponed_scrollback.*" line)
+                (string-append line "return\n")))
              #t)))))
     (inputs
      `(("gawk" ,gawk)
        ("ncurses" ,ncurses)
        ("perl" ,perl)
-       ("tcsh" ,tcsh))) ; For runtime/tools/vim32
+       ("tcsh" ,tcsh)))                 ; For runtime/tools/vim32
     (native-inputs
-     `(("libtool" ,libtool)))
+     `(("libtool" ,libtool)
+       ("tzdata" ,tzdata-for-tests))) ; For Test_strftime in test_functions.vim
     (home-page "https://www.vim.org/")
     (synopsis "Text editor based on vi")
     (description
-- 
2.24.1





Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Tue, 31 Dec 2019 22:50:02 GMT) Full text and rfc822 format available.

Notification sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
bug acknowledged by developer. (Tue, 31 Dec 2019 22:50:02 GMT) Full text and rfc822 format available.

Message #16 received at 38799-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 38799-done <at> debbugs.gnu.org, Jakub Kądziołka
 <kuba <at> kadziolka.net>
Subject: Re: [bug#38799] [PATCH v2] gnu: vim: Update to 8.2.0066.
Date: Tue, 31 Dec 2019 23:49:23 +0100
[Message part 1 (text/plain, inline)]
Jakub,

Jakub Kądziołka 写道:
> Vim pushed some new commits that look desirable -- 8.2.0063 
> seems to
> have fixed a crash -- so here's a new patch with a bumped 
> version &
> hash.

Thank you!  I've made only tiny cosmetic changes:

- Added a copyright line for you as discussed on IRC.

- I agree with your source indentation fixes, but they make this 
 patch less clear.  Let's keep them for when we ever switch to 
 URL-FETCH, for example.

- Shortened the MegaComment — it was very clear (thank you!) but 
 longer than is customary.

- The awkward indentation of the tzdata-for-tests comment bothered 
 me. I replaced it with a less detailed but, again, customary 
 variant. It's not like something will be silently missing if 
 anyone tries removing it: the test suite will fail, loudly.

Linted and pushed as 9efcc4948143a845355f7869fe05dbcca0f74a34. 
Happy 2020!

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 29 Jan 2020 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.