no release tarball

Richard W.M. Jones rjones at redhat.com
Thu Apr 21 13:20:43 UTC 2022


On Thu, Apr 21, 2022 at 12:41:11PM +0100, Daniel P. Berrangé wrote:
> On Thu, Apr 21, 2022 at 01:30:29PM +0200, Henrik Riomar wrote:
> > On Thu, Apr 21, 2022 at 1:11 PM Richard W.M. Jones <rjones at redhat.com> wrote:
> > >
> > > On Thu, Apr 21, 2022 at 12:54:42PM +0200, Henrik Riomar wrote:
> > 
> > > > I now note that commit b7cc3d93a613ef6d0ac5ccd6e32cc3d66e057243, that
> > > > is part of v1.22 introduced two bashisms:
> > > >
> > > > possible bashism in ./virt-what line 119 (echo -e):
> > > >                                   │
> > > >     if ( { echo -e "GET /latest/meta-datainstance/instance-type
> > > > HTTP/1.0\r\nHost: 100.100.100.200\r\n\r" │
> > > > >&3; grep -sq 'ebm' <&3 ; } 3<> /dev/tcp/100.100.100.200/80 ) 2>/dev/null ; then                         │
> > > > possible bashism in ./virt-what line 119 (/dev/(tcp|udp)):
> > > >                                   │
> > > >     if ( { echo -e "GET /latest/meta-datainstance/instance-type
> > > > HTTP/1.0\r\nHost: 100.100.100.200\r\n\r" │
> > > > >&3; grep -sq 'ebm' <&3 ; } 3<> /dev/tcp/100.100.100.200/80 ) 2>/dev/null ; then
> > > >
> > > > Can this be fixed? as that is the only bashisms in virt-what.
> > >
> > > Can you send a patch to fix it?
> > 
> > The echo -e should be a simple replace with printf "%b\n", but the
> > code using file descriptor 3 and the bash feature to open a tcp
> > socket, needs some more work,
> > it can be replaced with nc, but the problem is that I have no Alibaba
> > Cloud VM to test a fix on.
> 
> Or just change the first line of the script to #!/bin/bash, so it
> doesn't rely on the default shell impl.

I know that Guido Gunther (Debian developer) was keep for us to avoid
bashisms, and we have generally stuck to that rule for this project.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit


More information about the virt-tools-list mailing list