Re: bsd-grep-20080725_1 -v flag busted...
... Also, note that there IS output when grepping from /dev/null with the 20080725_1 version of bsdgrep: % /usr/local/bin/grep . /dev/null | hd ff 0a |..| 0002 % Thanks to bothnof you for the bug reports, I'll try to fix these asap. Best, Gábor ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
On Mon, 4 Aug 2008 at 16:32 -, Chuck Swiger wrote: (I'm much more interested in confirming whether the bug I see in BSD grep is reproducible by others than debating how to get real newlines from various shells.) Yes, I was seeing problems building several ports with the latest bsdgrep port. Specifically the neon28 and avifile ports where hanging in the ./configure phase as shown at in the original message in this thread. The problem appeared to be in the return code from grep. It looked like ./configure was in a loop doing a 'grep . file' as a method of testing for an empty file. Using tcsh: % set printexitvalue % /usr/bin/grep . /dev/null Exit 1 % /usr/bin/grep -V grep (GNU grep) 2.5.1-FreeBSD Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. % % /usr/local/bin/grep . /dev/null Exit 1 % /usr/local/bin/grep -V grep (BSD grep) 2.5.1-FreeBSD % pkg_info -I bsd-grep\* bsd-grep-20080723 BSD-licensed version of grep from OpenBSD % % pkg_delete bsd-grep\* % pkg_add ~/bsd-grep-20080725_1.tbz % /usr/local/bin/grep . /dev/null ÿ % /usr/local/bin/grep -V grep (BSD grep) 2.5.1-FreeBSD % pkg_info -I bsd-grep\* bsd-grep-20080725_1 BSD-licensed version of grep from OpenBSD % Also, note that there IS output when grepping from /dev/null with the 20080725_1 version of bsdgrep: % /usr/local/bin/grep . /dev/null | hd ff 0a |..| 0002 % Stuart Barkley___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
On Aug 5, 2008, at 5:10 PM, Stuart Barkley wrote: [ ... ] Yes, I was seeing problems building several ports with the latest bsdgrep port. Specifically the neon28 and avifile ports where hanging in the ./configure phase as shown at in the original message in this thread. Thanks for the confirmation, Stuart, as well as your analysis of what the configure script was trying to do with grep that was resulting in the endless loop. Regards, -- -Chuck ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
bsd-grep-20080725_1 -v flag busted...
Hi-- I'd just updated the BSD grep port to bsd-grep-20080725_1, but regrettably have noticed that many things using grep stopped working. For example, running GNU-style ./configure hangs here: configure: creating ./config.status load: 1.15 cmd: sh 72964 [runnable] 7.60u 95.78s 14% 2260k A trivial test case: % echo 'fee\nfi\nfoe\nfum' | ./grep -v fi % echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi fee foe fum % ./grep --version grep (BSD grep) 2.5.1-FreeBSD Regards, -- -Chuck ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
Chuck Swiger escribió: I'd just updated the BSD grep port to bsd-grep-20080725_1, but regrettably have noticed that many things using grep stopped working. For example, running GNU-style ./configure hangs here: configure: creating ./config.status load: 1.15 cmd: sh 72964 [runnable] 7.60u 95.78s 14% 2260k A trivial test case: % echo 'fee\nfi\nfoe\nfum' | ./grep -v fi % echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi fee foe fum % ./grep --version grep (BSD grep) 2.5.1-FreeBSD Hello Chuck, thanks for your notes. It seems very strange to me, because GNU grep produces the same output for me. Apart from this, the -v flag was really broken, but I applied some fixes before updating the port and in the version, which I committer, I thought that the -v flag was compatible. Here is what I get at the moment: echo 'fee\nfi\nfoe\nfum' | ./grep -v fi echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi /usr/bin/grep -V grep (GNU grep) 2.5.1-FreeBSD Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It's still the same, thus I don't understand how you could produce that output with GNU grep. Best, -- Gabor Kovesdan EMAIL: [EMAIL PROTECTED] WWW: http://www.kovesdan.org ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
On Mon, Aug 04, 2008 at 08:59:25PM +0200, G?bor K?vesd?n wrote: thanks for your notes. It seems very strange to me, because GNU grep produces the same output for me. Apart from this, the -v flag was really broken, but I applied some fixes before updating the port and in the version, which I committer, I thought that the -v flag was compatible. Here is what I get at the moment: echo 'fee\nfi\nfoe\nfum' | ./grep -v fi echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi Example is broken, echo (for sh) supposed to be echo 'fee fi foe fum' | ... -- http://ache.pp.ru/ ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
Gábor Kövesdán [EMAIL PROTECTED] 2008-08-04: Chuck Swiger escribió: I'd just updated the BSD grep port to bsd-grep-20080725_1, but regrettably have noticed that many things using grep stopped working. For example, running GNU-style ./configure hangs here: configure: creating ./config.status load: 1.15 cmd: sh 72964 [runnable] 7.60u 95.78s 14% 2260k A trivial test case: % echo 'fee\nfi\nfoe\nfum' | ./grep -v fi % echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi fee foe fum % ./grep --version grep (BSD grep) 2.5.1-FreeBSD Hello Chuck, thanks for your notes. It seems very strange to me, because GNU grep produces the same output for me. Apart from this, the -v flag was really broken, but I applied some fixes before updating the port and in the version, which I committer, I thought that the -v flag was compatible. Here is what I get at the moment: echo 'fee\nfi\nfoe\nfum' | ./grep -v fi echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi /usr/bin/grep -V grep (GNU grep) 2.5.1-FreeBSD Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It's still the same, thus I don't understand how you could produce that output with GNU grep. I may be stating the obvious, but note that depending on your shell and it's configuration, echo might not translate \n to an actual newline. You might need to use `echo -e' instead of `echo' to get four lines printed instead of one. /bin/sh and bash need it, ksh doesn't, not sure about (t)csh. Also note that our /bin/echo doesn't know about -e and will never translate \n to a newline. The following should be more portable across different shells: printf 'fee\nfi\nfoe\nfum' | ./grep -v fi printf 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi -- Daniel Roethlisberger http://daniel.roe.ch/ ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
On Aug 4, 2008, at 1:18 PM, Andrey Chernov wrote: echo 'fee\nfi\nfoe\nfum' | ./grep -v fi echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi Example is broken, echo (for sh) supposed to be echo 'fee fi foe fum' | ... Well, if your shell's built-in echo doesn't grok newlines, then /usr/ bin/printf works, as Daniel suggested. But using /bin/sh and a multiline statement as you suggest shows the exact same problem: % echo 'fee fi foe fum' | ./grep -v fi % echo 'fee fi foe fum' | /usr/bin/grep -v fi fee foe fum (I'm much more interested in confirming whether the bug I see in BSD grep is reproducible by others than debating how to get real newlines from various shells.) -- -Chuck ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
--On Monday, August 04, 2008 22:24:21 +0200 Daniel Roethlisberger [EMAIL PROTECTED] wrote: Gábor Kövesdán [EMAIL PROTECTED] 2008-08-04: Chuck Swiger escribió: I'd just updated the BSD grep port to bsd-grep-20080725_1, but regrettably have noticed that many things using grep stopped working. For example, running GNU-style ./configure hangs here: configure: creating ./config.status load: 1.15 cmd: sh 72964 [runnable] 7.60u 95.78s 14% 2260k A trivial test case: % echo 'fee\nfi\nfoe\nfum' | ./grep -v fi % echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi fee foe fum % ./grep --version grep (BSD grep) 2.5.1-FreeBSD Hello Chuck, thanks for your notes. It seems very strange to me, because GNU grep produces the same output for me. Apart from this, the -v flag was really broken, but I applied some fixes before updating the port and in the version, which I committer, I thought that the -v flag was compatible. Here is what I get at the moment: echo 'fee\nfi\nfoe\nfum' | ./grep -v fi echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi /usr/bin/grep -V grep (GNU grep) 2.5.1-FreeBSD Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It's still the same, thus I don't understand how you could produce that output with GNU grep. I may be stating the obvious, but note that depending on your shell and it's configuration, echo might not translate \n to an actual newline. You might need to use `echo -e' instead of `echo' to get four lines printed instead of one. /bin/sh and bash need it, ksh doesn't, not sure about (t)csh. Also note that our /bin/echo doesn't know about -e and will never translate \n to a newline. The following should be more portable across different shells: printf 'fee\nfi\nfoe\nfum' | ./grep -v fi printf 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi Indeed: [EMAIL PROTECTED] echo -e 'fee\nfi\nfoe\nfum' fee fi foe fum [EMAIL PROTECTED] echo -e 'fee\nfi\nfoe\nfum' | grep -v fi fee foe fum -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. *** Check the headers before clicking on Reply. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
--On Tuesday, August 05, 2008 00:18:07 +0400 Andrey Chernov [EMAIL PROTECTED] wrote: On Mon, Aug 04, 2008 at 08:59:25PM +0200, G?bor K?vesd?n wrote: thanks for your notes. It seems very strange to me, because GNU grep produces the same output for me. Apart from this, the -v flag was really broken, but I applied some fixes before updating the port and in the version, which I committer, I thought that the -v flag was compatible. Here is what I get at the moment: echo 'fee\nfi\nfoe\nfum' | ./grep -v fi echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi Example is broken, echo (for sh) supposed to be echo 'fee fi foe fum' | ... This seems to work fine: [EMAIL PROTECTED] echo 'fee fi foe fum' | grep -v fi fee foe fum -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. *** Check the headers before clicking on Reply. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
--On Tuesday, August 05, 2008 00:18:07 +0400 Andrey Chernov [EMAIL PROTECTED] wrote: On Mon, Aug 04, 2008 at 08:59:25PM +0200, G?bor K?vesd?n wrote: thanks for your notes. It seems very strange to me, because GNU grep produces the same output for me. Apart from this, the -v flag was really broken, but I applied some fixes before updating the port and in the version, which I committer, I thought that the -v flag was compatible. Here is what I get at the moment: echo 'fee\nfi\nfoe\nfum' | ./grep -v fi echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi Example is broken, echo (for sh) supposed to be echo 'fee fi foe fum' | ... Are you sure it's grep that's broken? [EMAIL PROTECTED] echo 'fee\nfi\nfoe\nfum' fee\nfi\nfoe\nfum -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. *** Check the headers before clicking on Reply. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bsd-grep-20080725_1 -v flag busted...
On Aug 4, 2008, at 1:26 PM, Paul Schmehl wrote: Are you sure it's grep that's broken? No, not entirely. :-) [EMAIL PROTECTED] echo 'fee\nfi\nfoe\nfum' fee\nfi\nfoe\nfum Your shell's built-in echo doesn't understand the C-style \n; try using printf command instead of echo. -- -Chuck ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to [EMAIL PROTECTED]