On Thu, Feb 22, 2024 at 04:17:35PM -0600, Eric Blake wrote:
> Rather than changing captive nbdkit to export variables by default
> (where we don't know if it will break clients of --run to suddenly
> have more things in their environment variables), it is less invasive
> to just call attention in our documentation that a run script that
> relies on the environment must manually export variables.
> 
> Signed-off-by: Eric Blake <ebl...@redhat.com>
> ---
>  docs/nbdkit-captive.pod  | 7 ++++++-
>  docs/nbdkit-protocol.pod | 4 ++++
>  docs/nbdkit.pod          | 2 ++
>  server/options.h         | 1 +
>  tests/test-synopsis.sh   | 1 +
>  5 files changed, 14 insertions(+), 1 deletion(-)

Shoot; I amended the patch incorrectly.  This was intended to be just
a patch to nbdkit-captive.pod, and then I have a followup email for
the remaining changes to add a --no-structured-replies alias to
--no-sr, once it is fixed up to pass the testsuite.

> 
> diff --git a/docs/nbdkit-captive.pod b/docs/nbdkit-captive.pod
> index 4f9740bc..94a9acb2 100644
> --- a/docs/nbdkit-captive.pod
> +++ b/docs/nbdkit-captive.pod
> @@ -48,7 +48,12 @@ Running nbdkit captive under nbdsh for unit testing:
> 
>   nbdkit memory 1 --run 'nbdsh -u "$uri" -c "print(h.pread(1, 0))"'
> 
> -The following shell variables are available in the I<--run> argument:
> +Running an fio benchmark:
> +
> + nbdkit -f null 1G --run 'export uri; fio fio.git/examples/nbd.fio'
> +
> +The following shell variables are available in the I<--run> argument
> +(local to the run script unless you use C<export>):
> 
>  =over 4
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
_______________________________________________
Libguestfs mailing list -- guestfs@lists.libguestfs.org
To unsubscribe send an email to guestfs-le...@lists.libguestfs.org

Reply via email to