[Bug 799561] New: zgrep silently fails on LZMA compressed files
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c0 Summary: zgrep silently fails on LZMA compressed files Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: Other OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: Ulrich.Windl@rz.uni-regensburg.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0 "zgrep kernel /var/log/messages-20130121.xz" never matches, but "xzcat /var/log/messages-20130121.xz | grep kernel" does Reproducible: Always Steps to Reproduce: 1. zgrep for something you are sure to find in a compressed syslog, like zgrep kernel /var/log/messages-20130121.xz Actual Results: no matches found Expected Results: matches found The manual page is not up to date; it says: "Zgrep invokes grep on compressed or gzipped files." However, zgrep can handle bzip2 compressed files, also -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c Christian Boltz <suse-beta@cboltz.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |suse-beta@cboltz.de AssignedTo|bnc-team-screening@forge.pr |vcizek@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |vdziewiecki@suse.com AssignedTo|vcizek@suse.com |vdziewiecki@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c1 --- Comment #1 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-01-28 12:35:35 UTC --- xzgrep works though. I'll look into it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c2 Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution| |WONTFIX --- Comment #2 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-01-28 13:46:39 UTC ---
From the xzgrep manpage: xzgrep invokes grep(1) on files which may be either uncompressed or compressed with xz(1), lzma(1), gzip(1), or bzip2(1).
I see no reason to fix this since an utility with the desired functionality already exists - xzgrep. If you really want zgrep to handle this, edit /usr/bin/zgrep and change: case $i in *.bz2) uncompress=bzip2 ;; *) uncompress=gzip ;; esac to: case $i in *.bz2) uncompress=bzip2 ;; *.xz) uncompress=xz ;; *.lzma) uncompress=lzma ;; *) uncompress=gzip ;; esac Wojtek -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c3 --- Comment #3 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> 2013-01-29 08:59:07 CET --- (In reply to comment #1)
xzgrep works though.
For the same reason that you don't have a "bzgrep" and a "gzgrep" in addition zu "zgrep", having a "xzgrep" doesn't solve the problem, especially when consigering that you might have a mixture of compressed files (older openSUSE used gzip, later openSUSE used bzip2, and recent openSUSE uses lzma to compress syslog (and other)). To the real bug was to intoduce a new compression while not adjusting zgrep (IMHO). So I think the solution in comment #2 is the preferred one. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c4 Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|WONTFIX | --- Comment #4 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-01-29 12:48:43 UTC --- Ok then. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c5 --- Comment #5 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-01-31 18:00:09 CET --- This is an autogenerated message for OBS integration: This bug (799561) was mentioned in https://build.opensuse.org/request/show/150618 Factory / gzip -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c6 --- Comment #6 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-02-01 12:00:18 CET --- This is an autogenerated message for OBS integration: This bug (799561) was mentioned in https://build.opensuse.org/request/show/150684 Factory / gzip -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=799561 https://bugzilla.novell.com/show_bug.cgi?id=799561#c7 Wojtek Dziewięcki <vdziewiecki@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |CLOSED Resolution| |FIXED --- Comment #7 from Wojtek Dziewięcki <vdziewiecki@suse.com> 2013-02-04 11:47:59 UTC --- Ok the fix was added to factory and 12.3, I hope that will suffice. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com