From patchwork Fri Nov 12 14:00:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: david larsson X-Patchwork-Id: 34411 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 70C0927BBE1; Fri, 12 Nov 2021 14:01:37 +0000 (GMT) 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,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 ESMTPS id 2F91427BBE3 for ; Fri, 12 Nov 2021 14:01:36 +0000 (GMT) Received: from localhost ([::1]:35014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mlX7X-0006A0-C8 for patchwork@mira.cbaines.net; Fri, 12 Nov 2021 09:01:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlX70-00069q-QD for guix-patches@gnu.org; Fri, 12 Nov 2021 09:01:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60445) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mlX70-0006FW-Ct for guix-patches@gnu.org; Fri, 12 Nov 2021 09:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mlX70-0000lu-Bw for guix-patches@gnu.org; Fri, 12 Nov 2021 09:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51791] [PATCH 1/2]: Update guile-bash Resent-From: david larsson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Nov 2021 14:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51791 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51791@debbugs.gnu.org Cc: Guix-patches Received: via spool by 51791-submit@debbugs.gnu.org id=B51791.16367256362924 (code B ref 51791); Fri, 12 Nov 2021 14:01:02 +0000 Received: (at 51791) by debbugs.gnu.org; 12 Nov 2021 14:00:36 +0000 Received: from localhost ([127.0.0.1]:43758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlX6Z-0000l6-NX for submit@debbugs.gnu.org; Fri, 12 Nov 2021 09:00:35 -0500 Received: from server0.selfhosted.xyz ([217.64.149.7]:53314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlX6X-0000kr-4J for 51791@debbugs.gnu.org; Fri, 12 Nov 2021 09:00:34 -0500 Received: from server0.selfhosted.xyz (localhost [127.0.0.1]) by server0.selfhosted.xyz (Postfix) with ESMTP id E5DAA272F387; Fri, 12 Nov 2021 15:00:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=selfhosted.xyz; s=dkim; t=1636725627; bh=K6DO6CUp2DW5WGHNfLom2yiqwbsYufSEmNxvLx2H/rE=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=28G0zmBvAf/cZBAX9F8Egfuy1QYnwoTLwi6sg8el97vAUkAsFzhXdbN+ryGsyW8/I EDKb2aKO1BLAKCPWmEK5YBB9H9oSWU/A8+Sgo4nJTzW7k9KxL82+36eQlKMW5K3OAT w590ZuhTPa3hgKTBvz+J68L8qzPCvOht8AVFg8mprHjWttWxHuKlOkG3MMFUYvE8Vz KDCagOs87saS8+cbLTBDODQihX3CsjaCYDGrfWHjugNrUkMOVtEEAPqe9hvTRdSMUP 8jkvcxaeY3OZ3xShn3Ws+TvQNR3oUfbTm0xnCmT7G6g/mX7vNFAHATDAw0QMI22j31 w2MUdvcx0RH8A== X-Fuglu-Suspect: bbdf6c0ee4f34e2d93ca6580ed0f5430 X-Fuglu-Spamstatus: NO Received: from webmail.selfhosted.xyz (office.selfhosted.xyz [192.168.1.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: mail@selfhosted.xyz) by server0.selfhosted.xyz (Postfix) with ESMTPSA; Fri, 12 Nov 2021 15:00:20 +0100 (CET) MIME-Version: 1.0 Date: Fri, 12 Nov 2021 15:00:20 +0100 From: david larsson In-Reply-To: References: Message-ID: X-Sender: david.larsson@selfhosted.xyz X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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 On 2021-11-12 14:56, david larsson wrote: > Hi, > > The following 2 patches update the guile-bash source url and > home-page, and adds a patch for it that does 2 things: > - fixes a bug, see below > - enables reading newline- or null-separated arguments via stdin to > guile-bash-defined bash functions. > > The bug is that guile-bash can't read string args with whitespaces in > it. Example: > ------------------------ > ~$ enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm > ~$ scm /tmp/printargs > ~$ printargs "apa bepa" cepa > In procedure printargs: scm-function called from Bash with args (apa > bepa cepa) failed to match signature (file1 file2) > ~$ cat /tmp/printargs > (use-modules > (gnu bash)) > (define-bash-function (printargs file1 file2) > (display file1) > (display "\n") > (display file2) > (display "\n")) > ------------------------- > > After this patch, you can read args "as normal", or via stdin that are > either newline- or null-separated: > ------------------------- > ~$ printargs "apa bepa" cepa > apa bepa > cepa > ~$ echo "$apa" > aba > aca > ~$ printf '%s\0' "$apa" bepa | printargs -z > aba > aca > bepa > ~$ echo "$apa" | printargs > aba > aca > ------------------------- > > Best regards, > David From 413c8f08b0056fe6d08ee7dc08a9279f60c960c7 Mon Sep 17 00:00:00 2001 From: David Larsson Date: Fri, 12 Nov 2021 13:16:58 +0100 Subject: [PATCH 1/2] gnu: guile-bash: Update source url * gnu/packages/guile-xyz (guile-bash)[homepage]: update to the new repository. --- gnu/packages/guile-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 56d6d2565d..1d35c41796 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -413,7 +413,7 @@ dictionary and suggesting spelling corrections.") (name "guile2.0-bash") (version (string-append "0.1.6-" revision "." (string-take commit 7))) (home-page - "https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git") + "https://git.sr.ht/~kaction/guile-bash") (source (origin (method git-fetch) (uri (git-reference -- 2.31.0