From patchwork Tue Dec 31 20:21:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Maja_K=C4=85dzio=C5=82ka?= X-Patchwork-Id: 19490 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8F37D179BD; Tue, 31 Dec 2019 20:22:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,RCVD_NUMERIC_HELO, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 43BBD17963 for ; Tue, 31 Dec 2019 20:22:10 +0000 (GMT) Received: from localhost ([::1]:46114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imO1p-0000tB-Lu for patchwork@mira.cbaines.net; Tue, 31 Dec 2019 15:22:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44836) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imO1j-0000t5-At for guix-patches@gnu.org; Tue, 31 Dec 2019 15:22:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imO1h-00078X-SL for guix-patches@gnu.org; Tue, 31 Dec 2019 15:22:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57492) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1imO1h-00077g-NC for guix-patches@gnu.org; Tue, 31 Dec 2019 15:22:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1imO1h-00005v-Ho for guix-patches@gnu.org; Tue, 31 Dec 2019 15:22:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38799] [PATCH v2] gnu: vim: Update to 8.2.0066. References: <20191229173405.gkwdnohqg3gim7m3@zdrowyportier.kadziolka.net> In-Reply-To: <20191229173405.gkwdnohqg3gim7m3@zdrowyportier.kadziolka.net> Resent-From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 31 Dec 2019 20:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38799 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38799@debbugs.gnu.org Received: via spool by 38799-submit@debbugs.gnu.org id=B38799.1577823700331 (code B ref 38799); Tue, 31 Dec 2019 20:22:01 +0000 Received: (at 38799) by debbugs.gnu.org; 31 Dec 2019 20:21:40 +0000 Received: from localhost ([127.0.0.1]:35232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imO1M-00005D-EG for submit@debbugs.gnu.org; Tue, 31 Dec 2019 15:21:40 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:60428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imO1J-00004v-S6 for 38799@debbugs.gnu.org; Tue, 31 Dec 2019 15:21:38 -0500 Received: (qmail 1229 invoked by uid 1009); 31 Dec 2019 21:21:35 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25679. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.026215 secs); 31 Dec 2019 20:21:35 -0000 Received: from unknown (HELO zdrowyportier.kadziolka.net) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 31 Dec 2019 21:21:35 +0100 Date: Tue, 31 Dec 2019 21:21:34 +0100 From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Message-ID: <20191231202134.o7npk5xcw3w46fw5@zdrowyportier.kadziolka.net> MIME-Version: 1.0 Content-Disposition: inline X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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: - ;; . - (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