GNU bug report logs -
#51791
[PATCH 0/2]: Update guile-bash
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51791 in the body.
You can then email your comments to 51791 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#51791
; Package
guix-patches
.
(Fri, 12 Nov 2021 13:57:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
david larsson <david.larsson <at> selfhosted.xyz>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 12 Nov 2021 13:57:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#51791
; Package
guix-patches
.
(Fri, 12 Nov 2021 14:01:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 51791 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[0001-gnu-guile-bash-Update-source-url.patch (text/x-diff, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#51791
; Package
guix-patches
.
(Fri, 12 Nov 2021 14:02:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 51791 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[0002-gnu-guile-bash-Add-patch-that-fixes-reading-args.patch (text/x-diff, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#51791
; Package
guix-patches
.
(Fri, 12 Nov 2021 15:51:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 51791 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[0002-gnu-guile-bash-Add-patch-that-fixes-reading-args.patch (text/x-diff, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#51791
; Package
guix-patches
.
(Fri, 26 Nov 2021 19:17:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 51791 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Forgot to update gnu/local.mk with the patch file for guile-bash so
fixing that with this new patch.
[0002-gnu-guile-bash-Add-patch-that-fixes-reading-args.patch (text/x-diff, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#51791
; Package
guix-patches
.
(Wed, 01 Dec 2021 07:22:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 51791 <at> debbugs.gnu.org (full text, mbox):
Hi David,
thank you for the update! What is the upstream status of this
patch? Has it been sent to upstream? Is upstream development
continuing? (That’s what the new home-page implies.)
--
Ricardo
Information forwarded
to
guix-patches <at> gnu.org
:
bug#51791
; Package
guix-patches
.
(Wed, 01 Dec 2021 10:30:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 51791 <at> debbugs.gnu.org (full text, mbox):
On 2021-12-01 08:20, Ricardo Wurmus wrote:
> Hi David,
>
> thank you for the update! What is the upstream status of this patch?
> Has it been sent to upstream? Is upstream development continuing?
> (That’s what the new home-page implies.)
I have sent a patch a couple weeks ago via sr.ht (my fork is here:
https://git.sr.ht/~methuselah-0/guile-bash) to the author but no
response so far.
The latest patch is from 6 years ago so development has probably not
restarted.
I still think it would be good to change the upstream to sr.ht because
it very much looks like it's the original author's repository (username
is kaction) and it has all the change history - versus as it is now
where I think software heritage is used when building it from source (or
maybe a cached version on the build farms).
Best regards,
David
Information forwarded
to
guix-patches <at> gnu.org
:
bug#51791
; Package
guix-patches
.
(Wed, 15 Dec 2021 11:56:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 51791 <at> debbugs.gnu.org (full text, mbox):
If anyone wants to install a guile-bash that can read arguments with
whitespace, and newlines, you can install it like this:
wget -O /tmp/patch.temp http://paste.debian.net/plain/1223545 ; guix
package --with-patch=guile-bash=/tmp/patch.temp -i guile-bash
Then prepare it like this for example:
------------------------------------------
$ export GUILE_AUTO_COMPILE=0
$ enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
$ cat <<'EOF'>/tmp/printargs.scm
(use-modules
(gnu bash))
(define-bash-function (printargs file1 file2)
(display file1)
(display "\n")
(display file2)
(display "\n"))
EOF
$ scm /tmp/printargs.scm
-------------------------
And then use the guile function from bash like this:
-------------------------
~$ 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
-------------------------
Closing this bug now.
Reply sent
to
david larsson <david.larsson <at> selfhosted.xyz>
:
You have taken responsibility.
(Wed, 15 Dec 2021 11:56:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
david larsson <david.larsson <at> selfhosted.xyz>
:
bug acknowledged by developer.
(Wed, 15 Dec 2021 11:56:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 51791-done <at> debbugs.gnu.org (full text, mbox):
done
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 12 Jan 2022 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.