X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 9D0CEDC791E for ; Fri, 3 Jul 2015 22:26:32 +0000 (UTC) Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 6C2E5DC74A6 for ; Fri, 3 Jul 2015 22:26:31 +0000 (UTC) Received: by oiyy130 with SMTP id y130so85609012oiy.0 for ; Fri, 03 Jul 2015 15:26:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=X/WgRXvd7uYh9pV8hOnHnY1BI7usaz1cEvHzLk6tQNQ=; b=YGXGnsLKh7Dyge0udqTVk5Ka7GZ4A1oQTtKLdugSnqymWbclKWBwTJk7wwGM+Too6a odzeIJC8JFC6rHHadBDeT6skxC0lEGO2J6qCsyBRtoNpkkpfLSZnIvOjqvJpWvKy2XqN MHXlFJ3tEnpYw9Wd76K2bHouIW/w5fNX6D61ybVEVL5KOr/3EvdcMZw4FH/wmDj29m8o 4JfWn/If7UpyrDdYFXHjYoDskTbQvqlc3lqnrwL9zul5wMU+EkZ8g/ux4BvZQJ56soEn SryWjZ9j5f+3rYB1qpa9YHA79Yiq+Tbif1cfOHVDur/kl9U6uVcPI82+/GU74EsR141T LQmQ== X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 X-Received: by 10.202.218.132 with SMTP id r126mr34900863oig.69.1435962391747; Fri, 03 Jul 2015 15:26:31 -0700 (PDT) Received: by 10.76.70.199 with HTTP; Fri, 3 Jul 2015 15:26:31 -0700 (PDT) In-Reply-To: References: <20150630183840.543112f7@tukaani.org> <20150703213148.2060418c@tukaani.org> Date: Fri, 3 Jul 2015 15:26:31 -0700 Message-ID: Subject: [alpine-devel] Re: xzdiff in xz package is broken on alpine linux From: Michael Fox <415fox@gmail.com> To: Lasse Collin , busybox@busybox.net Cc: alpine-devel , Natanael Copa Content-Type: multipart/alternative; boundary=001a113d5dfa456291051a000c75 X-Virus-Scanned: ClamAV using ClamSMTP --001a113d5dfa456291051a000c75 Content-Type: text/plain; charset=UTF-8 I was hoping this might work: diff <(echo foo) <(echo bar) But no. This part of the standard describes a subshell environment but scrolling up it gives grammar: io_file : '<' filename | LESSAND filename | '>' filename | GREATAND filename | DGREAT filename | LESSGREAT filename | CLOBBER filename The terminal `filename` sort of implies that it doesn't describe subshell output to an anonymous file the way bash does. On Fri, Jul 3, 2015 at 2:41 PM, Michael Fox <415fox@gmail.com> wrote: > Do you think it's a bug in busybox? I think they follow this opengroup > standard > > http://pubs.opengroup.org/onlinepubs/009695399/utilities/diff.html > > It's hard to tell from the description of diff in that document whether > and how it should deal with two stdin pipes. > > I'll CC their mailing list and see what they say. > > > On Fri, Jul 3, 2015 at 11:31 AM, Lasse Collin > wrote: > >> On 2015-06-30 Michael Fox wrote: >> > I have to admit the xzdiff script is a little beyond me but the way >> > xzdiff fails is you compare two different files and it just returns 0 >> > as if they were the same. I think the easiest way to see it is to >> > download an alpine linux live CD: >> > >> > http://alpinelinux.org/downloads/ >> > >> > To make it run in a VM takes just a few minutes. Here is complete >> > steps to make it simple as possible: >> >> Thanks. The diffs you sent didn't help, so I tested it under Alpine >> Linux as you suggested. The problem is BusyBox diff which doesn't work >> correctly if both arguments are pipes. Installing GNU diffutils makes >> the problem go away. >> >> Here is a simple test case using bash and other shells that support >> the <(foo) syntax: >> >> bash$ echo foo | diff <(echo bar) - ; echo $? >> 1c1 >> < bar >> --- >> > foo >> 1 >> >> Switching to BusyBox diff: >> >> bash$ echo foo | busybox diff <(echo bar) - ; echo $? >> 0 >> >> For me it would be convenient if you could report the bug to the BusyBox >> developers, but I can do it too if you prefer so. Thanks! >> >> -- >> Lasse Collin | IRC: Larhzu @ IRCnet & Freenode >> > > > > -- > > - > Michael > -- - Michael --001a113d5dfa456291051a000c75 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I was hoping this might work:

=C2= =A0=C2=A0=C2=A0 diff <(echo foo) <(echo bar)

But no. Thi= s part of the standard describes a subshell environment but scrolling up it= gives grammar:

io_file          : '<'       fil=
ename
                 | LESSAND   filename
                 | '>'       filename
                 | GREATAND  filename
                 | DGREAT    filename
                 | LESSGREAT filename
                 | CLOBBER   filename

The terminal `filen= ame` sort of implies that it doesn't describe subshell output to an ano= nymous file the way bash does.

On Fri, Jul 3, 2015 at 2:41 PM, Michael Fox <415fox@= gmail.com> wrote:
Do you think it's a bug in busybox? I think they fol= low this opengroup standard

http://pubs.opengr= oup.org/onlinepubs/009695399/utilities/diff.html

It's = hard to tell from the description of diff in that document whether and how = it should deal with two stdin pipes.

I'll CC their mailing= list and see what they say.


On Fri, Jul 3, 2= 015 at 11:31 AM, Lasse Collin <lasse.collin@tukaani.org> wrote:
On 2015-06-30 Michael Fo= x wrote:
> I have to admit the xzdiff script is a little beyond me but the way > xzdiff fails is you compare two different files and it just returns 0<= br> > as if they were the same. I think the easiest way to see it is to
> download=C2=A0 an alpine linux live CD:
>
> http://alpinelinux.org/downloads/
>
> To make it run in a VM takes just a few minutes. Here is complete
> steps to make it simple as possible:

Thanks. The diffs you sent didn't help, so I tested it under Alp= ine
Linux as you suggested. The problem is BusyBox diff which doesn't work<= br> correctly if both arguments are pipes. Installing GNU diffutils makes
the problem go away.

Here is a simple test case using bash and other shells that support
the <(foo) syntax:

=C2=A0 =C2=A0 bash$ echo foo | diff <(echo bar) - ; echo $?
=C2=A0 =C2=A0 1c1
=C2=A0 =C2=A0 < bar
=C2=A0 =C2=A0 ---
=C2=A0 =C2=A0 > foo
=C2=A0 =C2=A0 1

Switching to BusyBox diff:

=C2=A0 =C2=A0 bash$ echo foo | busybox diff <(echo bar) - ; echo $?
=C2=A0 =C2=A0 0

For me it would be convenient if you could report the bug to the BusyBox developers, but I can do it too if you prefer so. Thanks!

--
Lasse Collin=C2=A0 |=C2=A0 IRC: Larhzu @ IRCnet & Freenode



--

-
Michael



--

-
Michael
--001a113d5dfa456291051a000c75-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---