Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ugrep for openSUSE:Factory checked in at 2022-06-08 14:24:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ugrep (Old) and /work/SRC/openSUSE:Factory/.ugrep.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ugrep" Wed Jun 8 14:24:46 2022 rev:28 rq:981182 version:3.8.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ugrep/ugrep.changes 2022-05-31 15:48:34.872035980 +0200 +++ /work/SRC/openSUSE:Factory/.ugrep.new.1548/ugrep.changes 2022-06-08 14:25:05.168514648 +0200 @@ -1,0 +2,6 @@ +Tue Jun 7 16:19:36 UTC 2022 - Andreas Stieger <andreas.stie...@gmx.de> + +- update to 3.8.1: + * Fix bz2 issue cutting off decompression too soon + +------------------------------------------------------------------- Old: ---- ugrep-3.8.0.tar.gz New: ---- ugrep-3.8.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ugrep.spec ++++++ --- /var/tmp/diff_new_pack.Rsd7VN/_old 2022-06-08 14:25:05.772515397 +0200 +++ /var/tmp/diff_new_pack.Rsd7VN/_new 2022-06-08 14:25:05.776515402 +0200 @@ -17,7 +17,7 @@ Name: ugrep -Version: 3.8.0 +Version: 3.8.1 Release: 0 Summary: Universal grep: a feature-rich grep implementation with focus on speed License: BSD-3-Clause ++++++ ugrep-3.8.0.tar.gz -> ugrep-3.8.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.8.0/README.md new/ugrep-3.8.1/README.md --- old/ugrep-3.8.0/README.md 2022-05-29 19:32:18.000000000 +0200 +++ new/ugrep-3.8.1/README.md 2022-06-07 02:37:01.000000000 +0200 @@ -22,13 +22,13 @@ - Built-in help: `ugrep --help WHAT` displays options related to `WHAT` you are looking for - > ????**ProTip** try `--help help`. Try `--help regex` and `--help globs`. + > ????**ProTip** try `--help help`, `--help regex` and `--help globs`. -- User-friendly with sensible defaults and customizable [configuration files](#config) used by the `ug` command, a short command for `ugrep --config` to load a .ugrep configuration file with your preferences +- User-friendly with sensible defaults and customizable [configuration files](#config) used by the `ug` command intended for interactive use that loads a .ugrep configuration file with your preferences ug PATTERN ... ugrep --config PATTERN ... - > ????**ProTip** `ug --save-config` saves a .ugrep config file in the working directory, overwriting an old. + > ????**ProTip** `ug --save-config ...options...` saves a .ugrep config file in the working directory. - Interactive [query TUI](#query), press F1 or CTRL-Z for help and TAB/SHIFT-TAB to navigate to dirs and files @@ -3093,7 +3093,7 @@ and --line-buffered. --pretty When output is sent to a terminal, enables --color, --heading, -n, - --sort and -T when not explicitly disabled or set. + --sort and -T when not explicitly disabled. To change the color palette, set the `GREP_COLORS` environment variable or use `--colors=COLORS`. The value is a colon-separated list of ANSI SGR parameters @@ -4424,7 +4424,7 @@ --pretty When output is sent to a terminal, enables --color, --heading, - -n, --sort and -T when not explicitly disabled or set. + -n, --sort and -T when not explicitly disabled. -Q[DELAY], --query[=DELAY] Query mode: user interface to perform interactive searches. @@ -5226,7 +5226,7 @@ - ugrep 3.8.0 May 29, 2022 UGREP(1) + ugrep 3.8.1 June 06, 2022 UGREP(1) ???? [Back to table of contents](#toc) Binary files old/ugrep-3.8.0/bin/win32/ugrep.exe and new/ugrep-3.8.1/bin/win32/ugrep.exe differ Binary files old/ugrep-3.8.0/bin/win64/ugrep.exe and new/ugrep-3.8.1/bin/win64/ugrep.exe differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.8.0/man/ugrep.1 new/ugrep-3.8.1/man/ugrep.1 --- old/ugrep-3.8.0/man/ugrep.1 2022-05-29 19:32:18.000000000 +0200 +++ new/ugrep-3.8.1/man/ugrep.1 2022-06-07 02:37:01.000000000 +0200 @@ -1,4 +1,4 @@ -.TH UGREP "1" "May 29, 2022" "ugrep 3.8.0" "User Commands" +.TH UGREP "1" "June 06, 2022" "ugrep 3.8.1" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS @@ -580,7 +580,7 @@ .TP \fB\-\-pretty\fR When output is sent to a terminal, enables \fB\-\-color\fR, \fB\-\-heading\fR, \fB\-n\fR, -\fB\-\-sort\fR and \fB\-T\fR when not explicitly disabled or set. +\fB\-\-sort\fR and \fB\-T\fR when not explicitly disabled. .TP \fB\-Q\fR[\fIDELAY\fR], \fB\-\-query\fR[=\fIDELAY\fR] Query mode: user interface to perform interactive searches. This diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.8.0/src/ugrep.cpp new/ugrep-3.8.1/src/ugrep.cpp --- old/ugrep-3.8.0/src/ugrep.cpp 2022-05-29 19:32:18.000000000 +0200 +++ new/ugrep-3.8.1/src/ugrep.cpp 2022-06-07 02:37:01.000000000 +0200 @@ -1262,12 +1262,12 @@ break; // fill the rest of the buffer with decompressed data - if (static_cast<size_t>(len) < maxlen) + while (len < BLOCKSIZE || static_cast<size_t>(len) < maxlen) { std::streamsize len_in = zstream->decompress(buf + len, maxlen - static_cast<size_t>(len)); - // error? - if (len_in < 0) + // error or EOF? + if (len_in <= 0) break; len += len_in; @@ -3935,7 +3935,7 @@ { "php", "php,php3,php4,phtml", NULL, NULL }, { "Php", "php,php3,php4,phtml", NULL, "#!\\h*/.*\\Wphp(\\W.*)?\\n" }, { "png", "png", NULL, NULL }, - { "Png", "png", NULL, "\\x89png\\x0d\\x0a\\x1a\\x0a" }, + { "Png", "png", NULL, "\\x89PNG\\x0d\\x0a\\x1a\\x0a" }, { "prolog", "pl,pro", NULL, NULL }, { "python", "py", NULL, NULL }, { "Python", "py", NULL, "#!\\h*/.*\\Wpython[23]?(\\W.*)?\\n" }, @@ -12211,7 +12211,7 @@ and --line-buffered.\n\ --pretty\n\ When output is sent to a terminal, enables --color, --heading, -n,\n\ - --sort and -T when not explicitly disabled or set.\n\ + --sort and -T when not explicitly disabled.\n\ -Q[DELAY], --query[=DELAY]\n\ Query mode: user interface to perform interactive searches. This\n\ mode requires an ANSI capable terminal. An optional DELAY argument\n\ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.8.0/src/ugrep.hpp new/ugrep-3.8.1/src/ugrep.hpp --- old/ugrep-3.8.0/src/ugrep.hpp 2022-05-29 19:32:18.000000000 +0200 +++ new/ugrep-3.8.1/src/ugrep.hpp 2022-06-07 02:37:01.000000000 +0200 @@ -38,7 +38,7 @@ #define UGREP_HPP // ugrep version -#define UGREP_VERSION "3.8.0" +#define UGREP_VERSION "3.8.1" // disable mmap because mmap is almost always slower than the file reading speed improvements since 3.0.0 #define WITH_NO_MMAP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.8.0/src/zstream.hpp new/ugrep-3.8.1/src/zstream.hpp --- old/ugrep-3.8.0/src/zstream.hpp 2022-05-29 19:32:18.000000000 +0200 +++ new/ugrep-3.8.1/src/zstream.hpp 2022-06-07 02:37:01.000000000 +0200 @@ -430,44 +430,15 @@ if (method == Compression::DEFLATE && z_strm_ != NULL) { - int ret = Z_OK; - - // decompress non-empty zbuf_[] into the given buf[] - if (z_strm_->avail_in > 0 && z_strm_->avail_out == 0) + while (true) { - z_strm_->next_out = buf; - z_strm_->avail_out = len; - - ret = inflate(z_strm_, Z_NO_FLUSH); - - zcur_ = zlen_ - z_strm_->avail_in; - - if (ret != Z_OK && ret != Z_STREAM_END && ret != Z_BUF_ERROR) - { - cannot_decompress(pathname_, "a zlib decompression error was detected in the zip compressed data"); - num = -1; - zend_ = true; - } - else - { - num = len - z_strm_->avail_out; - zend_ = ret == Z_STREAM_END; - } - } + int ret = Z_OK; - // read compressed data into zbuf_[] and decompress zbuf_[] into the given buf[] - if (ret == Z_OK && z_strm_->avail_in == 0 && num < static_cast<int>(len)) - { - if (read()) + // decompress non-empty zbuf_[] into the given buf[] + if (z_strm_->avail_in > 0 && z_strm_->avail_out == 0) { - z_strm_->next_in = zbuf_; - z_strm_->avail_in = zlen_; - - if (num == 0) - { - z_strm_->next_out = buf; - z_strm_->avail_out = len; - } + z_strm_->next_out = buf; + z_strm_->avail_out = len; ret = inflate(z_strm_, Z_NO_FLUSH); @@ -485,65 +456,74 @@ zend_ = ret == Z_STREAM_END; } } - else + + // read compressed data into zbuf_[] and decompress zbuf_[] into the given buf[] + if (ret == Z_OK && z_strm_->avail_in == 0 && num < static_cast<int>(len)) { - cannot_decompress(pathname_, "EOF detected in the zip compressed data"); - num = -1; - zend_ = true; + if (read()) + { + z_strm_->next_in = zbuf_; + z_strm_->avail_in = zlen_; + + if (num == 0) + { + z_strm_->next_out = buf; + z_strm_->avail_out = len; + } + + ret = inflate(z_strm_, Z_NO_FLUSH); + + zcur_ = zlen_ - z_strm_->avail_in; + + if (ret != Z_OK && ret != Z_STREAM_END && ret != Z_BUF_ERROR) + { + cannot_decompress(pathname_, "a zlib decompression error was detected in the zip compressed data"); + num = -1; + zend_ = true; + } + else + { + num = len - z_strm_->avail_out; + + if (num == 0 && ret == BZ_OK) + continue; + + zend_ = ret == Z_STREAM_END; + } + } + else + { + cannot_decompress(pathname_, "EOF detected in the zip compressed data"); + num = -1; + zend_ = true; + } } - } - if (zend_) - { - ret = inflateEnd(z_strm_); - if (ret != Z_OK) + if (zend_) { - cannot_decompress(pathname_, "a zlib decompression error was detected in the zip compressed data"); - num = -1; + ret = inflateEnd(z_strm_); + if (ret != Z_OK) + { + cannot_decompress(pathname_, "a zlib decompression error was detected in the zip compressed data"); + num = -1; + } } + + break; } } #ifdef HAVE_LIBBZ2 else if (method == Compression::BZIP2 && bz_strm_ != NULL) { - int ret = BZ_OK; - - // decompress non-empty zbuf_[] into the given buf[] - if (bz_strm_->avail_in > 0 && bz_strm_->avail_out == 0) + while (true) { - bz_strm_->next_out = reinterpret_cast<char*>(buf); - bz_strm_->avail_out = len; - - ret = BZ2_bzDecompress(bz_strm_); - - zcur_ = zlen_ - bz_strm_->avail_in; - - if (ret != BZ_OK && ret != BZ_STREAM_END) - { - cannot_decompress(pathname_, "a bzip2 decompression error was detected in the zip compressed data"); - num = -1; - zend_ = true; - } - else - { - num = len - bz_strm_->avail_out; - zend_ = ret == BZ_STREAM_END; - } - } + int ret = BZ_OK; - // read compressed data into zbuf_[] and decompress zbuf_[] into the given buf[] - if (ret == BZ_OK && bz_strm_->avail_in == 0 && num < static_cast<int>(len)) - { - if (read()) + // decompress non-empty zbuf_[] into the given buf[] + if (bz_strm_->avail_in > 0 && bz_strm_->avail_out == 0) { - bz_strm_->next_in = reinterpret_cast<char*>(zbuf_); - bz_strm_->avail_in = zlen_; - - if (num == 0) - { - bz_strm_->next_out = reinterpret_cast<char*>(buf); - bz_strm_->avail_out = len; - } + bz_strm_->next_out = reinterpret_cast<char*>(buf); + bz_strm_->avail_out = len; ret = BZ2_bzDecompress(bz_strm_); @@ -561,22 +541,60 @@ zend_ = ret == BZ_STREAM_END; } } - else + + // read compressed data into zbuf_[] and decompress zbuf_[] into the given buf[] + if (ret == BZ_OK && bz_strm_->avail_in == 0 && num < static_cast<int>(len)) { - cannot_decompress(pathname_, "EOF detected in the zip compressed data"); - num = -1; - zend_ = true; + if (read()) + { + bz_strm_->next_in = reinterpret_cast<char*>(zbuf_); + bz_strm_->avail_in = zlen_; + + if (num == 0) + { + bz_strm_->next_out = reinterpret_cast<char*>(buf); + bz_strm_->avail_out = len; + } + + ret = BZ2_bzDecompress(bz_strm_); + + zcur_ = zlen_ - bz_strm_->avail_in; + + if (ret != BZ_OK && ret != BZ_STREAM_END) + { + cannot_decompress(pathname_, "a bzip2 decompression error was detected in the zip compressed data"); + num = -1; + zend_ = true; + } + else + { + num = len - bz_strm_->avail_out; + + if (num == 0 && ret == BZ_OK) + continue; + + zend_ = ret == BZ_STREAM_END; + } + } + else + { + cannot_decompress(pathname_, "EOF detected in the zip compressed data"); + num = -1; + zend_ = true; + } } - } - if (zend_) - { - ret = BZ2_bzDecompressEnd(bz_strm_); - if (ret != BZ_OK) + if (zend_) { - cannot_decompress(pathname_, "a bzip2 decompression error was detected in the zip compressed data"); - num = -1; + ret = BZ2_bzDecompressEnd(bz_strm_); + if (ret != BZ_OK) + { + cannot_decompress(pathname_, "a bzip2 decompression error was detected in the zip compressed data"); + num = -1; + } } + + break; } } #endif @@ -1565,6 +1583,9 @@ else { num = len - zfile_->strm.avail_out; + + if (num == 0 && ret == Z_OK) + continue; } } } @@ -1672,6 +1693,9 @@ else { num = len - bzfile_->strm.avail_out; + + if (num == 0 && ret == BZ_OK) + continue; } } }