public inbox for goredo-devel@lists.cypherpunks.ru
Atom feed
* goredo 1.3.0 release announcement
@ 2021-02-15 14:05 Sergey Matveev
  2021-02-26 17:26 ` GoRedo shell specification? Norman Kabir
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Matveev @ 2021-02-15 14:05 UTC (permalink / raw)
  To: goredo-devel

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

I am pleased to announce goredo 1.3.0 release availability!

goredo is Go implementation of djb's redo,
Makefile replacement that sucks less.

------------------------ >8 ------------------------

The main improvements for that release are:

* Experimental "redo-sources", "redo-targets" and "redo-ood"
  commands.
* Repetitive OOD determination optimization: pass all already known
  to be OOD targets to redoing targets.

------------------------ >8 ------------------------

goredo's home page is: http://www.goredo.cypherpunks.ru/

Source code and its signature for that version can be found here:

    http://www.goredo.cypherpunks.ru/download/goredo-1.3.0.tar.zst (339 KiB)
    http://www.goredo.cypherpunks.ru/download/goredo-1.3.0.tar.zst.sig

SHA256 hash: E9D05149 779F29C8 25D4CF3C 9CF2B0C5 1EEDBD62 6F57388B D7095D0B 6C7956B1
GPG key ID: 0x3A528DDE952C7E93 goredo releases <goredo@cypherpunks•ru>
Fingerprint: 7531 BB84 FAF0 BF35 960C  63B9 3A52 8DDE 952C 7E93

Please send questions regarding the use of goredo, bug reports and patches
to mailing list: https://lists.cypherpunks.ru/pipermail/goredo-devel/

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* GoRedo shell specification?
  2021-02-15 14:05 goredo 1.3.0 release announcement Sergey Matveev
@ 2021-02-26 17:26 ` Norman Kabir
  2021-02-26 17:39   ` spacefrogg-goredo
  2021-02-26 20:15   ` Norman Kabir
  0 siblings, 2 replies; 5+ messages in thread
From: Norman Kabir @ 2021-02-26 17:26 UTC (permalink / raw)
  To: goredo-devel

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

How is the shell specified in goredo? I have .do files with #!/bin/bash but
when I invoke "source" I get an error message:

source: not found

This implies that it's running sh instead of bash.

#!/usr/bin/env bash

echo "Hello" 1>&2
echo $SHELL $0 1>&2
source foo.sh

Cheers,
--Norm

[-- Attachment #2: Type: text/html, Size: 554 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* GoRedo shell specification?
  2021-02-26 17:26 ` GoRedo shell specification? Norman Kabir
@ 2021-02-26 17:39   ` spacefrogg-goredo
  2021-02-26 20:15   ` Norman Kabir
  1 sibling, 0 replies; 5+ messages in thread
From: spacefrogg-goredo @ 2021-02-26 17:39 UTC (permalink / raw)
  To: goredo-devel

You must make your do files executable.

goredo does not parse #! headers itself.
do files that are not executable are always called with /bin/sh. Those that are, are just called and the kernel decides how to proceed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GoRedo shell specification?
  2021-02-26 17:26 ` GoRedo shell specification? Norman Kabir
  2021-02-26 17:39   ` spacefrogg-goredo
@ 2021-02-26 20:15   ` Norman Kabir
  2021-02-26 20:59     ` Sergey Matveev
  1 sibling, 1 reply; 5+ messages in thread
From: Norman Kabir @ 2021-02-26 20:15 UTC (permalink / raw)
  To: goredo-devel

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

I figured it out--the behavior is different if it's executable.

*> executable .do is run as is, non-executable is run with /bin/sh -e[x]*

http://www.goredo.cypherpunks.ru/Notes.html#Notes

What is the motivation for this behavior? It's different from
apenwarr's implementation.

The tool is fantastic, by the way. Thank you!

Cheers,
--Norm


On Fri, Feb 26, 2021 at 11:26 AM Norman Kabir <nkabir@gmail•com> wrote:

> How is the shell specified in goredo? I have .do files with #!/bin/bash
> but when I invoke "source" I get an error message:
>
> source: not found
>
> This implies that it's running sh instead of bash.
>
> #!/usr/bin/env bash
>
> echo "Hello" 1>&2
> echo $SHELL $0 1>&2
> source foo.sh
>
> Cheers,
> --Norm
>

[-- Attachment #2: Type: text/html, Size: 1515 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GoRedo shell specification?
  2021-02-26 20:15   ` Norman Kabir
@ 2021-02-26 20:59     ` Sergey Matveev
  0 siblings, 0 replies; 5+ messages in thread
From: Sergey Matveev @ 2021-02-26 20:59 UTC (permalink / raw)
  To: goredo-devel

[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]

*** Norman Kabir [2021-02-26 14:15]:
>*> executable .do is run as is, non-executable is run with /bin/sh -e[x]*
>What is the motivation for this behavior? It's different from
>apenwarr's implementation.

Several other implementations (not sure, but I remember that actually
the most I saw) also differs from apenwarr and goredo and only execute
(executable) .do files.

I like approach of executable .do-s because it requires literally
nothing from the redo implementation itself -- the kernel does all the
job: parsing shebangs and executing necessary command line. It is
versatile: you can use binary object files, or shebang-ed scripts of any
language you prefer.

But also I believe that most of .do-s are POSIX shell scripts in
practice. And the tool should be convenient and helpful. It is annoying
to keep "#!/bin/sh" in every single .do file. Moreover it is *very*
convenient to have ability to switch on (set -x) trace flag to see what
happens during the .do's invocation. So redo implementation have to have
some way of turning "-x" flag on. And here is convenient suggestion of
keeping .do files shebangless with explicit "-x" control. And you
differentiate "universal" .do files from shebangless ones with
executable permission bit.

Executable .do-s will work everywhere, but you loose ability to control
"-x" flag if it is POSIX shell. Or you may parse the .do and make the
work kernel already does. Non-executable .do-s are just convenient
single use-case. I see no reason of non-executable shebang-ed .do,
because if it is not POSIX shell script, then you can not safely add
"-x" flag to it and its behaviour does not differ from the executable one.

Also there is some critique of apenwarr's .do parsing (I am agreed with)
at the bottom of that page:
http://web.archive.org/web/20201231033027/http://jdebp.eu/FGA/introduction-to-redo.html

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-26 20:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 14:05 goredo 1.3.0 release announcement Sergey Matveev
2021-02-26 17:26 ` GoRedo shell specification? Norman Kabir
2021-02-26 17:39   ` spacefrogg-goredo
2021-02-26 20:15   ` Norman Kabir
2021-02-26 20:59     ` Sergey Matveev