From patchwork Sun Apr 12 23:27:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Soo X-Patchwork-Id: 21210 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 B1AE527BBE4; Mon, 13 Apr 2020 00:28:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 14DA427BBE1 for ; Mon, 13 Apr 2020 00:28:12 +0100 (BST) Received: from localhost ([::1]:38732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNm1L-0005yW-L2 for patchwork@mira.cbaines.net; Sun, 12 Apr 2020 19:28:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55294) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNm1D-0005yB-Eq for guix-patches@gnu.org; Sun, 12 Apr 2020 19:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNm1C-0001nN-18 for guix-patches@gnu.org; Sun, 12 Apr 2020 19:28:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47466) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNm1B-0001n0-So for guix-patches@gnu.org; Sun, 12 Apr 2020 19:28:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jNm1B-0006Up-Nj for guix-patches@gnu.org; Sun, 12 Apr 2020 19:28:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40588] [PATCH] gnu: fish: Upgrade to 3.1.0. Resent-From: John Soo Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Apr 2020 23:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40588 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40588@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158673406824949 (code B ref -1); Sun, 12 Apr 2020 23:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Apr 2020 23:27:48 +0000 Received: from localhost ([127.0.0.1]:59012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNm0q-0006UC-9I for submit@debbugs.gnu.org; Sun, 12 Apr 2020 19:27:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:49274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNm0o-0006U5-Mn for submit@debbugs.gnu.org; Sun, 12 Apr 2020 19:27:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55257) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jNm0n-0005wa-69 for guix-patches@gnu.org; Sun, 12 Apr 2020 19:27:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jNm0l-0001cJ-5K for guix-patches@gnu.org; Sun, 12 Apr 2020 19:27:36 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:40977) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jNm0k-0001c9-SA for guix-patches@gnu.org; Sun, 12 Apr 2020 19:27:35 -0400 Received: by mail-pl1-x630.google.com with SMTP id d24so2787686pll.8 for ; Sun, 12 Apr 2020 16:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu-edu.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=PszRk2WLXKEnGUeOGH1LCPY5HhDTsEWfDDtXeDdIdCw=; b=yDolE6g7KZqTVM0lANyWZuOqMZkdSj8CgNxZPpCSdy05ptALqYc9zKCrVroe4AHOVx MIbiVVkmWx6hmOATbTqLtSlo+7eBXJ/49yK7vUvhyDY7MIjv+DcYbSiVQQPrjbpaOMDI GrnoB89XGGDwup3eBmw4HQWOcNUm8UFIeqHMRAQOilMmQmAMOR6bHfMSr9EsNKun6R79 ZsQ1x2XANuDQmBRYRUST/WIjBFo7eEQXtknZWJQt/ANw4Q9GO1VuA01C6PmhC8Tg71IH XL7wMMSlrQHeeuXuoIMe0Xkqygn/+3bzFE2u9XYYhHRRGmHavf2LfPzo8DOuJOCqzVwp AGeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=PszRk2WLXKEnGUeOGH1LCPY5HhDTsEWfDDtXeDdIdCw=; b=mUHZp91uXCuzA62/ynn2sgqJl3hZd/7xhpHuUPKaaKRLbbATuS33BFoyFmQmsx7x+B ZK3UwcLFQD/aA/guaG2KBQ0tb1MWS5FBuBYfp499d9TyEIxYXmMuBUgidGzk52aj6aM2 mEyP6b5b43v+gQYczIHZMJ30zzXH9EqC0q9prp6euDy52wpErxNdNQkCe1hZI0FwufyI zz79eNF+fJMYb4OXz78SB9q25vZQP4w9NrR3Rhwqe/mTPDDL+m/fGab416p4iO9lpF6l BmjxtFEAFBsIVNA8Po96LprJxdIPRUzDmfHHoOy5cG48rmcZeh6ZT2P5aOb0EHcTI6iS BLhw== X-Gm-Message-State: AGi0PuZN2IhnClAUky6wm9ibXe2C9+/C2jnFdjuUh2ffkFmJsw6euLfe hprtwQAb9V1xdjfNo0RPsZ8DzBuvbiPQFw== X-Google-Smtp-Source: APiQypIt06cRfzSOzjLhMP+dehfNhv2X9hYqlsC7c8NV/npJmKQ1EOjqtgKmVnwSec76bvi+RJWEGA== X-Received: by 2002:a17:90a:2e15:: with SMTP id q21mr18465148pjd.166.1586734053415; Sun, 12 Apr 2020 16:27:33 -0700 (PDT) Received: from ecenter ([2600:1700:83b0:8bd0::429]) by smtp.gmail.com with ESMTPSA id k5sm7109653pfp.147.2020.04.12.16.27.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Apr 2020 16:27:32 -0700 (PDT) From: John Soo Date: Sun, 12 Apr 2020 16:27:30 -0700 Message-ID: <871rosjndp.fsf@asu.edu> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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 Hi Guix, Fish shell had a large minor release a couple months ago. Here are the patches to use the updated version. It features a cmake build system, an extensive test suite and a lot of new features and bug fixes. I also include what I think might be a patch to export some variables that should be exposed all the time but I am not sure. That patch might not be desirable to have on master yet, as it is mostly my research into issue #30265. Thanks! John From f3e813e2374b0bf38391488442a1bded1c4016b2 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sun, 12 Apr 2020 14:18:30 -0700 Subject: [PATCH 2/2] gnu: fish: Upgrade to 3.1.0. * gnu/packages/shells (fish):[version] Update to 3.1.0. [arguments] Enable tests, patch test files, and avoid patches that no longer apply. [inputs] Make groff a native-input. --- gnu/packages/shells.scm | 74 +++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 25 deletions(-) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 6b03b6bc0f..b64c319eb8 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -40,6 +40,7 @@ #:use-module (gnu packages guile) #:use-module (gnu packages libbsd) #:use-module (gnu packages libedit) + #:use-module (gnu packages linux) #:use-module (gnu packages ncurses) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) @@ -48,13 +49,15 @@ #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) #:use-module (gnu packages scheme) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix licenses) - #:use-module (guix packages)) + #:use-module (guix packages) + #:use-module (guix utils)) (define-public dash (package @@ -95,7 +98,7 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") (define-public fish (package (name "fish") - (version "3.0.2") + (version "3.1.0") (source (origin (method url-fetch) @@ -103,38 +106,53 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") "releases/download/" version "/" "fish-" version ".tar.gz")) (sha256 - (base32 "03j3jl9jzlnhq4p86zj8wqsh5sx45j1d1fvfa80ks1cfdg68qwhl")))) - (build-system gnu-build-system) + (base32 "0s2356mlx7fp9kgqgw91lm5ds2i9iq9hq071fbqmcp3875l1xnz5")))) + (build-system cmake-build-system) (inputs `(("fish-foreign-env" ,fish-foreign-env) - ("groff" ,groff) ; for 'fish --help' ("ncurses" ,ncurses) ("pcre2" ,pcre2) ; don't use the bundled PCRE2 ("python" ,python))) ; for fish_config and manpage completions (native-inputs - `(("doxygen" ,doxygen))) + `(("doxygen" ,doxygen) + ; for 'fish --help' + ("groff" ,groff))) (arguments - '(#:tests? #f ; no check target - #:phases + '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-source - (lambda _ - (substitute* '("build_tools/build_commands_hdr.sh" - "build_tools/build_user_doc.sh") - (("/usr/bin/env") "env")) - #t)) - ;; Embed absolute paths. - (add-before 'install 'embed-absolute-paths - (lambda _ - (substitute* '("share/functions/__fish_config_interactive.fish" - "share/functions/fish_config.fish" - "share/functions/fish_update_completions.fish") - (("python3") (which "python3"))) - (substitute* "share/functions/__fish_print_help.fish" - (("nroff") (which "nroff"))) - #t)) + (add-after 'unpack 'patch-tests + (lambda* (#:key inputs #:allow-other-keys) + (let ((coreutils (assoc-ref inputs "coreutils")) + (bash (assoc-ref inputs "bash"))) + ;; These try to open a terminal + (delete-file "tests/checks/interactive.fish") + (delete-file "tests/checks/login-interactive.fish") + ;; These contain absolute path references + (substitute* "src/fish_tests.cpp" + (("/bin/echo" echo) (string-append coreutils echo)) + (("/bin/ca" ca) (string-append coreutils ca)) + (("\"(/bin/c)\"" _ c) (string-append "\"" coreutils c "\"")) + (("/bin/ls_not_a_path" ls-not-a-path) + (string-append coreutils ls-not-a-path)) + (("/bin/ls" ls) (string-append coreutils ls)) + (("(/bin/)\"" _ bin) (string-append coreutils bin "\"")) + (("/bin -" bin) (string-append coreutils bin)) + (((string-append + "do_test\\(is_potential_path\\(" + "L\"/usr\", wds, vars, PATH_REQUIRE_DIR\\)\\);")) + "")) + (substitute* + (append (find-files "tests" ".*\\.(in|out|err)$") + (find-files "tests/checks" ".*\\.fish")) + (("/bin/pwd" pwd) (string-append coreutils pwd)) + (("/bin/echo" echo) (string-append coreutils echo)) + (("/bin/sh" sh) (string-append bash sh)) + (("/bin/ls" ls) (string-append coreutils ls))) + (substitute* (find-files "tests" ".*\\.(in|out|err)$") + (("/usr/bin") (string-append coreutils "/bin"))) + #t))) ;; Source /etc/fish/config.fish from $__fish_sysconf_dir/config.fish. - (add-before 'install 'patch-fish-config + (add-after 'patch-tests 'patch-fish-config (lambda _ (let ((port (open-file "etc/config.fish" "a"))) (display (string-append @@ -147,6 +165,12 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") port) (close-port port)) #t)) + ;; Embed absolute paths. + (add-before 'install 'embed-absolute-paths + (lambda _ + (substitute* "share/functions/__fish_print_help.fish" + (("nroff") (which "nroff"))) + #t)) ;; Enable completions, functions and configurations in user's and ;; system's guix profiles by adding them to __extra_* variables. (add-before 'install 'patch-fish-extra-paths -- 2.26.0