Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ugrep-indexer for openSUSE:Factory 
checked in at 2024-03-09 20:56:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ugrep-indexer (Old)
 and      /work/SRC/openSUSE:Factory/.ugrep-indexer.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ugrep-indexer"

Sat Mar  9 20:56:43 2024 rev:5 rq:1156652 version:0.9.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/ugrep-indexer/ugrep-indexer.changes      
2024-01-06 17:30:15.994007548 +0100
+++ /work/SRC/openSUSE:Factory/.ugrep-indexer.new.1770/ugrep-indexer.changes    
2024-03-09 20:56:48.507253578 +0100
@@ -1,0 +2,7 @@
+Sat Mar  9 19:42:34 UTC 2024 - Andreas Stieger <[email protected]>
+
+- update to 0.9.6:
+  * fix missing C++ header
+  * fix an issue with option -z and compressed files
+
+-------------------------------------------------------------------

Old:
----
  ugrep-indexer-0.9.5-2.tar.gz

New:
----
  ugrep-indexer-0.9.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ugrep-indexer.spec ++++++
--- /var/tmp/diff_new_pack.ITx80u/_old  2024-03-09 20:56:49.363284914 +0100
+++ /var/tmp/diff_new_pack.ITx80u/_new  2024-03-09 20:56:49.363284914 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ugrep-indexer
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2024 Andreas Stieger <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,12 +17,12 @@
 
 
 Name:           ugrep-indexer
-Version:        0.9.5
+Version:        0.9.6
 Release:        0
 Summary:        File indexer for accelerated search using ugrep
 License:        BSD-3-Clause
 URL:            https://github.com/Genivia/ugrep-indexer
-Source:         
https://github.com/Genivia/ugrep-indexer/archive/refs/tags/v%{version}-2.tar.gz#/%{name}-%{version}-2.tar.gz
+Source:         
https://github.com/Genivia/ugrep-indexer/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRequires:  c++_compiler
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(bzip2)
@@ -42,7 +42,7 @@
 searching on file systems with ugrep.
 
 %prep
-%setup -q -n %{name}-%{version}-2
+%autosetup -p1
 
 %build
 %configure \

++++++ ugrep-indexer-0.9.5-2.tar.gz -> ugrep-indexer-0.9.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/Makefile.am 
new/ugrep-indexer-0.9.6/Makefile.am
--- old/ugrep-indexer-0.9.5-2/Makefile.am       2024-01-05 22:28:44.000000000 
+0100
+++ new/ugrep-indexer-0.9.6/Makefile.am 2024-02-29 21:29:51.000000000 +0100
@@ -1,4 +1,8 @@
-SUBDIRS = lzma/C src
+SUBDIRS =
+if ENABLE_7ZIP
+SUBDIRS += lzma/C
+endif
+SUBDIRS += src
 
 man1_MANS = man/ugrep-indexer.1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/Makefile.in 
new/ugrep-indexer-0.9.6/Makefile.in
--- old/ugrep-indexer-0.9.5-2/Makefile.in       2024-01-05 22:28:44.000000000 
+0100
+++ new/ugrep-indexer-0.9.6/Makefile.in 2024-02-29 21:29:51.000000000 +0100
@@ -87,6 +87,7 @@
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
+@ENABLE_7ZIP_TRUE@am__append_1 = lzma/C
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_brotlilib.m4 \
@@ -193,7 +194,7 @@
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-DIST_SUBDIRS = $(SUBDIRS)
+DIST_SUBDIRS = lzma/C src
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
        README.md ar-lib compile config.guess config.sub depcomp \
        install-sh missing
@@ -350,7 +351,7 @@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-SUBDIRS = lzma/C src
+SUBDIRS = $(am__append_1) src
 man1_MANS = man/ugrep-indexer.1
 EXTRA_DIST = README.md LICENSE.txt CONTRIBUTING.md CODE_OF_CONDUCT.md
 all: config.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/README.md 
new/ugrep-indexer-0.9.6/README.md
--- old/ugrep-indexer-0.9.5-2/README.md 2024-01-05 22:28:44.000000000 +0100
+++ new/ugrep-indexer-0.9.6/README.md   2024-02-29 21:29:51.000000000 +0100
@@ -11,7 +11,7 @@
 user feedback.  Regardless, this implementation has been extensively tested for
 correctness.*
 
-[ugrep](https://github.com/Genivia/ugrep) is a grep-compatible ultra fast file
+[ugrep](https://github.com/Genivia/ugrep) is a grep-compatible fast file
 searcher that supports index-based searching as of v3.12.5.
 
 Index-based search can be significantly faster on slow file systems and when
@@ -21,14 +21,18 @@
 an index of the file.  This index allows for a quick check if there is a
 potential match, thus we avoid searching all files.
 
-Indexed-based search should be safe and never skip updated files that may now
-match.  If any files and directories are added or changed after indexing, then
-searching will always search these additions and changes made to the file
+Also the contents of archives and compressed files can be indexed to speed up
+recursive searching.  This eliminates searching them when none of their
+contents match the specified patterns.
+
+Indexed-based search with ugrep is safe and never skips updated files that may
+now match.  If any files and directories are added or changed after indexing,
+then searching will always search these additions and changes made to the file
 system by comparing file and directory time stamps to the indexing time stamp.
 
-If many files were added or changed, then we might want to re-index to bring
-the indexing up to date.  Re-indexing is incremental, so it will not take as
-much time as the initial indexing process.
+When many files are added or changed after indexing, then we might want to
+re-index to bring the indexes up to date.  Re-indexing is incremental, so it
+will not take as much time as the initial indexing process.
 
 A typical but small example of an index-based search, for example on the ugrep
 v3.12.6 repository placed on a separate drive:
@@ -230,23 +234,21 @@
   this approach is that index-based search with `ugrep --index` is no longer
   safe: new and modified files that are not indexed yet will not be searched.*
 
-- Indexing tiny files might not be effective to speed up grepping.  This needs
-  further investigation.  The indexer could skip such tiny files for example.
-
 - Each N-gram Bloom filter has its own "bit tier" in the hash table to avoid
   hash conflicts.  For example 2-grams do not share any bits with 3-grams.
   This ensures that we never have any false positives with characters being
-  matched that are not part of the pattern.  However, the 1-gram (single
-  character) bit space is small (at most 256 bits).  Therefore, we waste some
-  bits when hash tables are larger.  A possible approach to reduce waste is to
-  combine 1-grams with 2-grams to share the same bit space.  This is easy to do
-  if we consider a 1-gram being equal to a 2-gram with the second character set
-  to `\0` (NUL).  We can lower the false positive rate with a second 2-gram
-  hash based on a different hash method.  Or we can expand the "bit tiers" from
-  8 to 9 to store 9-grams.  That will increase the indexing accuracy for longer
-  patterns (9 or longer) at no additional cost.  On the other hand, that change
-  may cause more false positives when characters are being matched that are not
-  part of the pattern; we lose the advantage of a perfect 1-gram accuracy.
+  falsely matched that are actually not part of the pattern.  However, the
+  1-gram (single character) bit space is small (at most 256 bits).  Therefore,
+  we waste some bits when hash tables are larger.  A possible approach to
+  reduce waste is to combine 1-grams with 2-grams to share the same bit space.
+  This is easy to do if we consider a 1-gram being equal to a 2-gram with the
+  second character set to `\0` (NUL).  We can lower the false positive rate
+  with a second 2-gram hash based on a different hash method.  Or we can expand
+  the "bit tiers" from 8 to 9 to store 9-grams.  That will increase the
+  indexing accuracy for longer patterns (9 or longer) at no additional cost.
+  On the other hand, that change may cause more false positives when characters
+  are falsely matched that are not part of the pattern; we lose the advantage
+  of a perfect 1-gram accuracy.
 
 Q&A
 ---
@@ -285,24 +287,25 @@
 that the table encodes hashes for 8 windows at offsets from the start of the
 pattern, corresponding to the 8 bits per index hashing table cell.  Combining
 the two halves of the table may flip some bits to zero from one, which may
-cause a false positive match.  This proves the monotonicity of the indexer.
+cause a false positive match.  This proves the monotonicity of the indexer.  A
+zero bit hash value indicates a possible match.
 
-The ugrep-indexer understands "binary files", which can be ignored and not
-indexed with ugrep-indexer option `-I` (`--ignore-binary`).  This is useful
-when searching with ugrep option `-I` (`--ignore-binary`) to ignore binary
-files, which is a typical scenario.
-
-The ugrep-indexer also supports .gitignore files (and similar), specified with
-ugrep-indexer option `-X` (`--ignore-files`).  Ignored files and directories
-will not be indexed to save file system space.  This works well when searching
-for files with ugrep option `--ignore-files`.
+The ugrep-indexer detects "binary files", which can be ignored and not indexed
+with ugrep-indexer option `-I` (`--ignore-binary`).  This is useful when
+searching with ugrep option `-I` (`--ignore-binary`) to ignore binary files,
+which is a typical scenario.
+
+The ugrep-indexer obeys .gitignore file exclusions when specified with option
+`-X` (`--ignore-files`).  Ignored files and directories will not be indexed to
+save file system space.  This works well when searching for files with ugrep
+option `--ignore-files`.
 
 Indexing can be aborted, for example with CTRL-C, which will not result in a
 loss of search capability with ugrep, but will leave the directory structure
 only partially indexed.
 
 Option `-c` checks indexes for stale references and non-indexed files and
-directories.  Run ugrep-indexer again to incrementally update all indexes.
+directories.
 
 Indexes are deleted with ugrep-indexer option `-d`.
 
Binary files old/ugrep-indexer-0.9.5-2/bin/win32/ugrep-indexer.exe and 
new/ugrep-indexer-0.9.6/bin/win32/ugrep-indexer.exe differ
Binary files old/ugrep-indexer-0.9.5-2/bin/win64/ugrep-indexer.exe and 
new/ugrep-indexer-0.9.6/bin/win64/ugrep-indexer.exe differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/configure 
new/ugrep-indexer-0.9.6/configure
--- old/ugrep-indexer-0.9.5-2/configure 2024-01-05 22:28:44.000000000 +0100
+++ new/ugrep-indexer-0.9.6/configure   2024-02-29 21:29:51.000000000 +0100
@@ -653,6 +653,8 @@
 PTHREAD_LIBS
 PTHREAD_CFLAGS
 EXTRA_CFLAGS
+ENABLE_7ZIP_FALSE
+ENABLE_7ZIP_TRUE
 PLATFORM
 host_os
 host_vendor
@@ -7808,6 +7810,14 @@
 fi
 
 fi
+ if test "x$with_7zip" = "xyes"; then
+  ENABLE_7ZIP_TRUE=
+  ENABLE_7ZIP_FALSE='#'
+else
+  ENABLE_7ZIP_TRUE='#'
+  ENABLE_7ZIP_FALSE=
+fi
+
 
 
 PTHREAD_CFLAGS=""
@@ -7959,6 +7969,10 @@
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${ENABLE_7ZIP_TRUE}" && test -z "${ENABLE_7ZIP_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_7ZIP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/configure.ac 
new/ugrep-indexer-0.9.6/configure.ac
--- old/ugrep-indexer-0.9.5-2/configure.ac      2024-01-05 22:28:44.000000000 
+0100
+++ new/ugrep-indexer-0.9.6/configure.ac        2024-02-29 21:29:51.000000000 
+0100
@@ -76,6 +76,7 @@
 fi
 
 fi
+AM_CONDITIONAL([ENABLE_7ZIP],[test "x$with_7zip" = "xyes"])
 
 AC_SUBST(EXTRA_CFLAGS)
 AC_SUBST([PTHREAD_CFLAGS], [""])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/lzma/7zls.c 
new/ugrep-indexer-0.9.6/lzma/7zls.c
--- old/ugrep-indexer-0.9.5-2/lzma/7zls.c       2024-01-05 22:28:44.000000000 
+0100
+++ new/ugrep-indexer-0.9.6/lzma/7zls.c 2024-02-29 21:29:51.000000000 +0100
@@ -34,6 +34,11 @@
 @copyright (c) BSD-3 License - see LICENSE.txt
 */
 
+/* to build and run 7zls:
+   cc -o 7zls 7zls.c C/libviiz.a
+   ./7zls ../tests/archive.7z
+*/
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/lzma/C/7zCrc.c 
new/ugrep-indexer-0.9.6/lzma/C/7zCrc.c
--- old/ugrep-indexer-0.9.5-2/lzma/C/7zCrc.c    2024-01-05 22:28:44.000000000 
+0100
+++ new/ugrep-indexer-0.9.6/lzma/C/7zCrc.c      2024-02-29 21:29:51.000000000 
+0100
@@ -84,8 +84,9 @@
     #endif
     #endif
     #endif
-  #elif (defined(__clang__) && (__clang_major__ >= 3)) \
-     || (defined(__GNUC__) && (__GNUC__ > 4))
+  #elif ( (defined(__clang__) && (__clang_major__ >= 3)) ||     \
+          (defined(__GNUC__)  && (__GNUC__ > 4)        )    ) && \
+        (__ARM_ARCH >= 8)
       #if !defined(__ARM_FEATURE_CRC32)
         #define __ARM_FEATURE_CRC32 1
         #if defined(__clang__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/lzma/C/Makefile.in 
new/ugrep-indexer-0.9.6/lzma/C/Makefile.in
--- old/ugrep-indexer-0.9.5-2/lzma/C/Makefile.in        2024-01-05 
22:28:44.000000000 +0100
+++ new/ugrep-indexer-0.9.6/lzma/C/Makefile.in  2024-02-29 21:29:51.000000000 
+0100
@@ -90,13 +90,11 @@
 host_triplet = @host@
 subdir = lzma/C
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_boost_regex.m4 \
-       $(top_srcdir)/m4/ax_check_brotlilib.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_brotlilib.m4 \
        $(top_srcdir)/m4/ax_check_bz2lib.m4 \
        $(top_srcdir)/m4/ax_check_bzip3lib.m4 \
        $(top_srcdir)/m4/ax_check_lz4lib.m4 \
        $(top_srcdir)/m4/ax_check_lzmalib.m4 \
-       $(top_srcdir)/m4/ax_check_pcre2.m4 \
        $(top_srcdir)/m4/ax_check_zlib.m4 \
        $(top_srcdir)/m4/ax_check_zstdlib.m4 \
        $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
@@ -212,9 +210,6 @@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BASH_COMPLETION_CFLAGS = @BASH_COMPLETION_CFLAGS@
-BASH_COMPLETION_DIR = @BASH_COMPLETION_DIR@
-BASH_COMPLETION_LIBS = @BASH_COMPLETION_LIBS@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
@@ -222,7 +217,6 @@
 CSCOPE = @CSCOPE@
 CTAGS = @CTAGS@
 CXX = @CXX@
-CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
@@ -234,10 +228,6 @@
 ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 EXTRA_CFLAGS = @EXTRA_CFLAGS@
-FISH_COMPLETION_CFLAGS = @FISH_COMPLETION_CFLAGS@
-FISH_COMPLETION_DIR = @FISH_COMPLETION_DIR@
-FISH_COMPLETION_LIBS = @FISH_COMPLETION_LIBS@
-GREP_PATH = @GREP_PATH@
 HAVE_CXX11 = @HAVE_CXX11@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -260,22 +250,14 @@
 PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PLATFORM = @PLATFORM@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
-SIMD_AVX2_FLAGS = @SIMD_AVX2_FLAGS@
-SIMD_AVX512BW_FLAGS = @SIMD_AVX512BW_FLAGS@
-SIMD_FLAGS = @SIMD_FLAGS@
 STRIP = @STRIP@
 VERSION = @VERSION@
-ZSH_COMPLETION_DIR = @ZSH_COMPLETION_DIR@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/lzma/C/README.txt 
new/ugrep-indexer-0.9.6/lzma/C/README.txt
--- old/ugrep-indexer-0.9.5-2/lzma/C/README.txt 2024-01-05 22:28:44.000000000 
+0100
+++ new/ugrep-indexer-0.9.6/lzma/C/README.txt   2024-02-29 21:29:51.000000000 
+0100
@@ -6,6 +6,9 @@
 
 LZMA SDK by Igor Pavlov.
 
+Updated to apply YOKOTA Hiroshi's patches:
+https://salsa.debian.org/debian/7zip/-/blob/master/debian/patches/0002-Disable-hardware-acceleration-support-on-armel.patch?ref_type=heads
+
 Included in this directory is a new C API to simplify decompression:
 
 - viizip.h   declarations, see below (hides implementation details)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/lzma/C/viizip.c 
new/ugrep-indexer-0.9.6/lzma/C/viizip.c
--- old/ugrep-indexer-0.9.5-2/lzma/C/viizip.c   2024-01-05 22:28:44.000000000 
+0100
+++ new/ugrep-indexer-0.9.6/lzma/C/viizip.c     2024-02-29 21:29:51.000000000 
+0100
@@ -333,10 +333,11 @@
   return res == SZ_OK ? 0 : -1;
 }
 
-/* decompress up to len bytes into buf[], return number of bytes decompressed 
*/
+/* decompress up to len bytes into buf[], return number of bytes decompressed 
or -1 on error */
 ssize_t viidec(struct viizip *viizip, unsigned char *buf, size_t len)
 {
-  if (viizip == NULL)
+  /* if not initialized or not called viiget() then return error */
+  if (viizip == NULL || viizip->index == 0)
     return -1;
 
   switch (viizip->state)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/man/ugrep-indexer.1 
new/ugrep-indexer-0.9.6/man/ugrep-indexer.1
--- old/ugrep-indexer-0.9.5-2/man/ugrep-indexer.1       2024-01-05 
22:28:44.000000000 +0100
+++ new/ugrep-indexer-0.9.6/man/ugrep-indexer.1 2024-02-29 21:29:51.000000000 
+0100
@@ -1,4 +1,4 @@
-.TH UGREP-INDEXER "1" "December 31, 2023" "ugrep-indexer 0.9.5" "User Commands"
+.TH UGREP-INDEXER "1" "February 29, 2024" "ugrep-indexer 0.9.6" "User Commands"
 .SH NAME
 \fBugrep-indexer\fR -- file indexer to accelerate recursive searching
 .SH SYNOPSIS
@@ -33,7 +33,7 @@
 storage overhead at the cost of a higher rate of false positive
 pattern matches (more noise).  A high accuracy reduces the rate of
 false positive regex pattern matches (less noise) at the cost of an
-increased indexing storage overhead.  An accuracy between 3 and 7
+increased indexing storage overhead.  An accuracy between 2 and 7
 is recommended.  The default accuracy is 5.
 .TP
 \fB\-.\fR, \fB\-\-hidden\fR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/src/ugrep-indexer.cpp 
new/ugrep-indexer-0.9.6/src/ugrep-indexer.cpp
--- old/ugrep-indexer-0.9.5-2/src/ugrep-indexer.cpp     2024-01-05 
22:28:44.000000000 +0100
+++ new/ugrep-indexer-0.9.6/src/ugrep-indexer.cpp       2024-02-29 
21:29:51.000000000 +0100
@@ -34,7 +34,7 @@
 @copyright (c) BSD-3 License - see LICENSE.txt
 */
 
-#define UGREP_INDEXER_VERSION "0.9.5 beta"
+#define UGREP_INDEXER_VERSION "0.9.6"
 
 // use a task-parallel thread to decompress the stream into a pipe to search, 
also handles nested archives
 #define WITH_DECOMPRESSION_THREAD
@@ -350,6 +350,10 @@
 
   void close()
   {
+    // close input separately when not associated with the file
+    if (input.file() != file && input.file() != NULL)
+      fclose(input.file());
+    // close the file
     if (file != NULL)
       fclose(file);
     file = NULL;
@@ -367,6 +371,14 @@
 
     if (flag_decompress)
     {
+      // close the underlying pipe previously created with pipe() and fdopen()
+      if (input.file() != NULL)
+      {
+        // close and unassign input
+        fclose(input.file());
+        input.clear();
+      }
+
       partname.clear();
 
       // start decompression thread if not running, get pipe with decompressed 
input
@@ -378,7 +390,7 @@
       }
 
       // read archive/compressed/plain data from the decompression thread 
chain pipe
-      input = reflex::Input(pipe_in);
+      input = pipe_in;
     }
     else
     {
@@ -434,10 +446,10 @@
     // -z: open next archived file if any or close the compressed file/archive
     if (flag_decompress)
     {
-      // close the input FILE* and its underlying pipe previously created with 
pipe() and fdopen()
+      // close the pipe previously created with pipe() and fdopen()
       if (input.file() != NULL)
       {
-        // close and unassign input, i.e. input.file() == NULL, also closes 
pipe_fd[0] per fdopen()
+        // close and unassign input
         fclose(input.file());
         input.clear();
       }
@@ -449,7 +461,7 @@
       if (pipe_in != NULL)
       {
         // assign the next extracted file as input to search
-        input = reflex::Input(pipe_in);
+        input = pipe_in;
 
         // start searching the next file in the archive
         return true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ugrep-indexer-0.9.5-2/src/zstream.hpp 
new/ugrep-indexer-0.9.6/src/zstream.hpp
--- old/ugrep-indexer-0.9.5-2/src/zstream.hpp   2024-01-05 22:28:44.000000000 
+0100
+++ new/ugrep-indexer-0.9.6/src/zstream.hpp     2024-02-29 21:29:51.000000000 
+0100
@@ -44,6 +44,7 @@
 #include <ctime>
 #include <climits>
 #include <exception>
+#include <stdexcept>
 #include <streambuf>
 #include <zlib.h>
 
@@ -538,8 +539,8 @@
     // read and decompress zip file data into buf[0..len-1], return number of 
bytes decompressed, 0 for EOF or -1 for error
     std::streamsize decompress(unsigned char *buf, size_t len)
     {
-      // if no more data to decompress, then return 0 to indicate EOF
-      if (zend_)
+      // if header() was not called or no more data to decompress, then return 
0 to indicate EOF
+      if (znew_ || zend_)
         return 0;
 
       std::streamsize num = 0;
@@ -1362,8 +1363,8 @@
 
       catch (const std::invalid_argument&)
       {
-        /* non-seekable 7zip files cannot be decompressed,  */
-        cannot_decompress("non-seekable 7zip archive", pathname);
+        /* non-seekable and password-protected 7zip files cannot be 
decompressed */
+        cannot_decompress("7zip archive: encrypted data or 7z input is not 
seekable", pathname);
         file_ = NULL;
       }
 

Reply via email to