Bug#855463: e2image: attempt to seek into a pipe

2017-09-21 Thread G.raud
On Tue, Aug 22, 2017 at 06:15:27PM -0400, Theodore Ts'o wrote:
> On Sat, Feb 18, 2017 at 06:13:53PM +0100, G.raud wrote:
> > Package: e2fsprogs
> > Version: 1.42.12-2+b1
> > Severity: normal
> > 
> > e2image tries to seek into an ouput to stdout ("-"), even when it is a
> > pipe:
> > 
> > --
> > #  LC_ALL=C  e2image /dev/mapper/debian-var - | cat >test
> > e2image 1.42.12 (29-Aug-2014)
> > seek_set: Illegal seek
> > --
> > 
> > According the manpage, only the raw and qcow2 formats require seeking
> > into the output.
> 
> Actually, the manage states that only the raw mode supports using
> stdout:
> 
>If image-file is -, then the output of e2image will be sent to
>standard output, so that the output can be piped to another
>program, such as gzip(1).  (Note that this is currently only
>supported when creating a raw image file using the -r option, since
>the process of creating a normal image file, or QCOW2 image
>currently requires random access to the file, which cannot be done
>using a pipe.  This restriction will hopefully be lifted in a
>future version of e2image.)

Either I misread that part or the manpage in jessie was erroneous.

> The fact that e2image doesn't work on "normal" e2image files is a
> long-standing short-coming.  But note that it's really an obsolete
> format.  The raw or qcow image formats are actually far more useful,
> and the primary use cases of e2image today.  The only reason why
> "normal" is still used to describe the original e2image format is for
> historical reasons.

To avoid that someone else makes the same mistake, I suggest to put a
warning message to stderr in case such a combination of options is
selected, because "seek_set: Illegal seek" implies a programming error.

Regards

-- 
G.raud



Bug#855463: e2image: attempt to seek into a pipe

2017-08-22 Thread Theodore Ts'o
severity 855463 wishlist
merge 236408 855463
thanks

On Sat, Feb 18, 2017 at 06:13:53PM +0100, G.raud wrote:
> Package: e2fsprogs
> Version: 1.42.12-2+b1
> Severity: normal
> 
> e2image tries to seek into an ouput to stdout ("-"), even when it is a
> pipe:
> 
> --
> #  LC_ALL=C  e2image /dev/mapper/debian-var - | cat >test
> e2image 1.42.12 (29-Aug-2014)
> seek_set: Illegal seek
> --
> 
> According the manpage, only the raw and qcow2 formats require seeking
> into the output.

Actually, the manage states that only the raw mode supports using
stdout:

   If image-file is -, then the output of e2image will be sent to
   standard output, so that the output can be piped to another
   program, such as gzip(1).  (Note that this is currently only
   supported when creating a raw image file using the -r option, since
   the process of creating a normal image file, or QCOW2 image
   currently requires random access to the file, which cannot be done
   using a pipe.  This restriction will hopefully be lifted in a
   future version of e2image.)

The fact that e2image doesn't work on "normal" e2image files is a
long-standing short-coming.  But note that it's really an obsolete
format.  The raw or qcow image formats are actually far more useful,
and the primary use cases of e2image today.  The only reason why
"normal" is still used to describe the original e2image format is for
historical reasons.

Cheers,

- Ted



Bug#855463: e2image: attempt to seek into a pipe

2017-02-18 Thread G.raud
Package: e2fsprogs
Version: 1.42.12-2+b1
Severity: normal

e2image tries to seek into an ouput to stdout ("-"), even when it is a
pipe:

--
#  LC_ALL=C  e2image /dev/mapper/debian-var - | cat >test
e2image 1.42.12 (29-Aug-2014)
seek_set: Illegal seek
--

According the manpage, only the raw and qcow2 formats require seeking
into the output.