- update to 1.14:

* zupdate.cc: '-r -d' now keeps last component of dir arguments.
  * zutils.texi: New chapter 'Syntax of command-line arguments'.
  * check.sh: Use 'cp' instead of 'cat'.

OBS-URL: https://build.opensuse.org/package/show/Archiving/zutils?expand=0&rev=26
This commit is contained in:
Martin Pluskal 2025-01-20 11:30:30 +00:00 committed by Git OBS Bridge
commit 4cd1c81708
10 changed files with 364 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
zutils-1.13.tar.lz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:957d03c6c1b6b68c94e313ff9633bf6c7e32ab50e150ab67cc244b0ccd2a4c17
size 63316

BIN
zutils-1.13.tar.lz.sig Normal file

Binary file not shown.

3
zutils-1.14.tar.lz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0225a7cbe3bdeade33ef08323d7fe7fb0c6edb1e8e0955287d50b21b7b5d989e
size 64446

BIN
zutils-1.14.tar.lz.sig Normal file

Binary file not shown.

View File

@ -0,0 +1,59 @@
From: Luigi Baldoni <aloisio@gmx.com>
Date: 2018-08-25 14:19:22 +0200
Subject: Avoid conflict with gzip package
References: boo#1105973
Use zutils- prefix with executables also present in the gzip
package.
---
Index: zutils-1.12/Makefile.in
===================================================================
--- zutils-1.12.orig/Makefile.in
+++ zutils-1.12/Makefile.in
@@ -126,12 +126,12 @@ install-strip-compress : install-bin-str
install-bin : all
if [ ! -d "$(DESTDIR)$(bindir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ; fi
- $(INSTALL_PROGRAM) ./zcat "$(DESTDIR)$(bindir)/zcat"
- $(INSTALL_PROGRAM) ./zcmp "$(DESTDIR)$(bindir)/zcmp"
- $(INSTALL_PROGRAM) ./zdiff "$(DESTDIR)$(bindir)/zdiff"
- $(INSTALL_SCRIPT) ./zegrep "$(DESTDIR)$(bindir)/zegrep"
- $(INSTALL_SCRIPT) ./zfgrep "$(DESTDIR)$(bindir)/zfgrep"
- $(INSTALL_PROGRAM) ./zgrep "$(DESTDIR)$(bindir)/zgrep"
+ $(INSTALL_PROGRAM) ./zcat "$(DESTDIR)$(bindir)/zutils-zcat"
+ $(INSTALL_PROGRAM) ./zcmp "$(DESTDIR)$(bindir)/zutils-zcmp"
+ $(INSTALL_PROGRAM) ./zdiff "$(DESTDIR)$(bindir)/zutils-zdiff"
+ $(INSTALL_SCRIPT) ./zegrep "$(DESTDIR)$(bindir)/zutils-zegrep"
+ $(INSTALL_SCRIPT) ./zfgrep "$(DESTDIR)$(bindir)/zutils-zfgrep"
+ $(INSTALL_PROGRAM) ./zgrep "$(DESTDIR)$(bindir)/zutils-zgrep"
$(INSTALL_PROGRAM) ./ztest "$(DESTDIR)$(bindir)/ztest"
$(INSTALL_PROGRAM) ./zupdate "$(DESTDIR)$(bindir)/zupdate"
if [ ! -e "$(DESTDIR)$(sysconfdir)/$(pkgname).conf" ] ; then \
@@ -161,18 +161,18 @@ install-man :
-rm -f "$(DESTDIR)$(mandir)/man1/zgrep.1"*
-rm -f "$(DESTDIR)$(mandir)/man1/ztest.1"*
-rm -f "$(DESTDIR)$(mandir)/man1/zupdate.1"*
- $(INSTALL_DATA) $(VPATH)/doc/zcat.1 "$(DESTDIR)$(mandir)/man1/zcat.1"
- $(INSTALL_DATA) $(VPATH)/doc/zcmp.1 "$(DESTDIR)$(mandir)/man1/zcmp.1"
- $(INSTALL_DATA) $(VPATH)/doc/zdiff.1 "$(DESTDIR)$(mandir)/man1/zdiff.1"
- $(INSTALL_DATA) $(VPATH)/doc/zgrep.1 "$(DESTDIR)$(mandir)/man1/zgrep.1"
+ $(INSTALL_DATA) $(VPATH)/doc/zcat.1 "$(DESTDIR)$(mandir)/man1/zutils-zcat.1"
+ $(INSTALL_DATA) $(VPATH)/doc/zcmp.1 "$(DESTDIR)$(mandir)/man1/zutils-zcmp.1"
+ $(INSTALL_DATA) $(VPATH)/doc/zdiff.1 "$(DESTDIR)$(mandir)/man1/zutils-zdiff.1"
+ $(INSTALL_DATA) $(VPATH)/doc/zgrep.1 "$(DESTDIR)$(mandir)/man1/zutils-zgrep.1"
$(INSTALL_DATA) $(VPATH)/doc/ztest.1 "$(DESTDIR)$(mandir)/man1/ztest.1"
$(INSTALL_DATA) $(VPATH)/doc/zupdate.1 "$(DESTDIR)$(mandir)/man1/zupdate.1"
install-man-compress : install-man
- lzip -v -9 "$(DESTDIR)$(mandir)/man1/zcat.1"
- lzip -v -9 "$(DESTDIR)$(mandir)/man1/zcmp.1"
- lzip -v -9 "$(DESTDIR)$(mandir)/man1/zdiff.1"
- lzip -v -9 "$(DESTDIR)$(mandir)/man1/zgrep.1"
+ lzip -v -9 "$(DESTDIR)$(mandir)/man1/zutils-zcat.1"
+ lzip -v -9 "$(DESTDIR)$(mandir)/man1/zutils-zcmp.1"
+ lzip -v -9 "$(DESTDIR)$(mandir)/man1/zutils-zdiff.1"
+ lzip -v -9 "$(DESTDIR)$(mandir)/man1/zutils-zgrep.1"
lzip -v -9 "$(DESTDIR)$(mandir)/man1/ztest.1"
lzip -v -9 "$(DESTDIR)$(mandir)/man1/zupdate.1"

168
zutils.changes Normal file
View File

@ -0,0 +1,168 @@
-------------------------------------------------------------------
Sun Jan 19 13:32:23 UTC 2025 - Andrea Manzini <andrea.manzini@suse.com>
- update to 1.14:
* zupdate.cc: '-r -d' now keeps last component of dir arguments.
* zutils.texi: New chapter 'Syntax of command-line arguments'.
* check.sh: Use 'cp' instead of 'cat'.
-------------------------------------------------------------------
Sat Feb 10 16:37:17 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- update to 1.13:
* Fix detection of bzip2 files with no compressed blocks
* When zcat, zcmp, zdiff, or zgrep need to try compressed file
names, gzip (.gz) is now tried before bzip2 (.bz2).
* When only one compressed file is passed to zcmp or zdiff, they
now try to compare it with a compressed file of any of the
remaining formats if the corresponding uncompressed file does
not exist.
* zcmp now reports EOF on empty file like GNU cmp:
"zcmp: EOF on FILE which is empty".
* File diagnostics in zupdate have been reformatted as
'PROGRAM: FILE: MESSAGE'.
-------------------------------------------------------------------
Sun Jan 22 11:39:46 UTC 2023 - Andreas Stieger <andreas.stieger@gmx.de>
- update to 1.12:
* 'zutilsrc' has been renamed to 'zutils.conf', and is loog for in
$XDG_CONFIG_HOME/zutils.conf instead of $HOME/.zutilsrc.
(XDG_CONFIG_HOME defaults to $HOME/.config).
* In zcat, zcmp, zdiff, and zgrep, the option '-O, --force-format'
now can force also "uncompressed" format.
* zcmp now accepts the option '-H, --hexadecimal' to print byte
values in hexadecimal instead of octal.
* zcmp: option '-s' changed to '--script'
* zcmp: '-q' has been assigned to options '--quiet' and '--silent'
* zcmp: '-q' now only suppresses diagnostic messages written to
stderr
* zcmp: '-s' now only suppresses messages about file differences
written to stdout or stderr.
* zcmp: Option '-l, --list' is now different from option '-v,
--verbose', whichnow undoes the effect of '--quiet'.
* zcmp now prints byte and line in EOF message like GNU cmp:
"zcmp: EOF on FILE after byte B, in line L".
* zgrep now also accepts the following options:
'-G, --basic-regexp',
'--label=<label>',
'--line-buffered',
'-P, --perl-regexp',
'--silent',
'-T, --initial-tab',
'-U, --binary', and
'-Z, --null'.
* ztest now exits with status 2 if an uncompressed file has a
compressed file name extension, or if a compressed file has a
wrong compressed extension.
* zudate now accepts option '-d, --destdir' to write recompressed
files to another directory.
* zupdate now accepts option '-e, --expand-extensions', which
makes it expand combined file name extensions; tgz --> tar.lz.
* zupdate now also accepts option '-i, --ignore-errors', which
makes it ignore non-fatal errors
* All utilities now support compress'd (.Z) files through gzip.
* At verbosity level 1 (2 for zdiff and zgrep) or higher, '-V,
--version' now prints the versions of the compressors used
(limited by option '-M, --format').
* Diagnostics caused by invalid arguments to command line options
now show the argument and the name of the option.
-------------------------------------------------------------------
Thu Apr 14 12:49:57 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>
- Update to version 1.11:
* zcmp.cc, zdiff.cc (main): Fix race returning 1 instead of 2 when a
compressor is not found or when the wrong format is forced.
* zcmp.cc (getnum): Show option name and valid range if error.
* All tools: Show option name if error in option argument.
* Add support for zstd format to all tools.
* 'zdiff -v -V' now prints the version of the diff program used.
* 'zgrep --verbose -V' now prints the version of the grep program used.
* zutils.texi: Document recompression of read-only files by linking.
* zutils.texi: Change GNU Texinfo category to 'Compression'.
-------------------------------------------------------------------
Thu Jan 21 09:42:36 UTC 2021 - Martin Pluskal <mpluskal@suse.com>
- Update to version 1.10:
* zdiff.cc (set_fifonames): Encode pid in little endian order.
* zupdate.cc (zupdate_file): Fix a portability issue with Solaris 10.
* zutils.texi: Document that 'zgrep -L' fails with GNU grep 3.2 to 3.4.
* check.sh: Test empty input files with all tools except zupdate.
-------------------------------------------------------------------
Mon Aug 17 11:55:19 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 1.9:
* zcmp.cc zdiff.cc: Read standard input only if requested.
* zdiff.cc (main): Pass options '-W' and '-y' to diff.
* zutils.cc (test_format): Detect bzip2 and lzip files better.
* ztest.cc (main): Continue testing if any input file is a terminal.
If verbosity >= 1, print number of files that failed the test.
* zcat.cc zgrep.cc ztest.cc (main): Check return value of close( infd ).
* zutils.cc (good_status): Ignore trailing data remaining in feeder.
* zupdate.cc (zupdate_file): Support new and old lzip option '-o'.
Keep combined extensions: tgz, tbz, tbz2, txz --> tlz.
Quote file names in zcmp_command to allow file names with spaces.
* *.cc (main): Set a valid invocation_name even if argc == 0.
* zutils.texi: Improve descriptions of zcat, zcmp, and zdiff.
-------------------------------------------------------------------
Wed Apr 22 06:23:09 UTC 2020 - Martin Pluskal <mpluskal@suse.com>
- Update to version 1.8:
* See provided NEWS for detailed list of changes
- Drop no longer needed patches:
* zutils-1.7-zcat-buffer-overrun.patch
-------------------------------------------------------------------
Sat Aug 25 12:28:27 UTC 2018 - aloisio@gmx.com
- Added zutils-1.7-noconflict.patch (fixes boo#1105973)
-------------------------------------------------------------------
Mon Aug 6 10:29:51 UTC 2018 - aloisio@gmx.com
- Added zutils-1.7-zcat-buffer-overrun.patch (fixes boo#1103878)
-------------------------------------------------------------------
Sat Jul 14 08:27:03 UTC 2018 - antoine.belvire@opensuse.org
- Update to version 1.7:
* zgrep.cc (main): Pass '--color' option to grep.
* check.sh: Added new tests for zgrep.
-------------------------------------------------------------------
Mon Feb 19 12:07:34 UTC 2018 - aloisio@gmx.com
- Update to version 1.6
* zcmp.cc: Accept 'B' suffix in '--ignore-initial=1kB:1234B'.
* zutils.cc (feed_data): Show input filename in error messages.
Version 1.5
* zupdate.cc (zupdate_file): Pass '-q' to zcmp if verbosity < 0.
* zcat.cc zgrep.cc ztest.cc (main): Don't use stdin more than
once.
* zdiff.cc (set_fifonames): Use '_' if both names are different.
* configure: Avoid warning on some shells when testing for g++.
* Makefile.in: Detect the existence of install-info.
* testsuite/check.sh: A POSIX shell is required to run the
tests.
-------------------------------------------------------------------
Sun Jan 3 13:57:23 UTC 2016 - p.drouand@gmail.com
- Update to version 1.4
* Option '--format' has been renamed to '-O, --force-format'.
* Added new option '-M, --format=<list>' to all utilities.
-------------------------------------------------------------------
Sat Apr 18 16:51:15 UTC 2015 - mpluskal@suse.com
- Conflict with gzip
-------------------------------------------------------------------
Sat Apr 18 10:22:53 UTC 2015 - mpluskal@suse.com
- Initial package for version 1.3

41
zutils.keyring Normal file
View File

@ -0,0 +1,41 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQGiBD9odIARBADkRI3Qc2qWpoxOFBlD8L5JaQlIEAaPI/19Y/z4ORHESY6s2Tfm
EtC51vlu8V/hXX8Sh4OZC3CrBIwhvSyIVIXbas+GR09B+8GRsfekRUS7jiwz/FsZ
Rnb0AjV1zNjJZazjyOUQjBou3Mo1MwiQXzeMQzqLC1xW+ABkAbQnAnZZIwCgvquq
rmQ1LKpBpYhb876T8x9TZIcD/2KTMvrvJVj+tKiRp6Wfiib8B4unllXAQ04hlul2
FP5oVIETdhQjsxj7/8F8yOONGgnL5Vn1+6sldd0LQ9il4MiZ36VFOec2xAeyYoB1
D3hup/zUTjzljj+JyKyGXahrwm0941QhYr+Kw/99dvE0pB8CsaQ5/e5R70uv7YnD
ZT9xA/wO4acdvGCLDw5ZPVKZW1rcgGL1Pr2nWCc92hv4SxdSWu3FU8aeGOVwJa2q
I/CwiEk2oEXI/WwTEf9mde3qlsc1SkRKgR0DDj+7Az5MUcilCUDv2BG2mLa+dEus
zwqLDPmjo2AWP1L2UIx7c46U9suvcGBwsI7NSnD9PLrvrUVGYrQjQW50b25pbyBE
aWF6IDxhbnRfZGlhekB0ZWxlbGluZS5lcz6IRQQQEQIABgUCRq91hAAKCRCc1ciz
Z9joZ1SNAJUbaHmR/R8cCGFsCxvu0woOzvgcAJwN6jv0Z/IUHkfviDCF9+yDxvTH
aYhGBBARAgAGBQJGq3cLAAoJEA5xZ6X1njIytIwAn2h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D9odJIQBAC7Nr/BOCBOovFtIAnFufclBiUZ1jC8kvNT
C0i8vparh0WroyRCNfzYujc4H6zLbe/9hPhexSTR8GD0q3m2MxGnADpbwhHFrsMK
+Tpk/dva7twlPWmwt4ZOl+wsmXRG9d6iDXdgVfThuXY009lY6TRUHlPWCCe4zkjs
RV0Sq9qy0wADBQQAh3FFwHKq2M9qfuykxlhMpDt2CbeiwnIeMpOHwXoVcG8ahfxl
aT1J9RnKIkzMJ9KSueyqWvjGrDfWAmoFbXgQ/rv82qmEMwKwmg75kzktelVlFMic
qX1N1KT1Ttce0UAxuxd1Vi/SfMzJLbc0s4fHDdfnVZH7fgq+SM9F0DHcqnuITgQY
EQIABgUCP2h0kgASCRCP6ZUDEy13QgdlR1BHAAEBaHYAn1bocEx8GNykRG/RBe2o
ctjFEFlNAKCMIurPIOzYo20sBAq7kIR9x8qvwQ==
=Ua5w
-----END PGP PUBLIC KEY BLOCK-----

66
zutils.spec Normal file
View File

@ -0,0 +1,66 @@
#
# spec file for package zutils
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: zutils
Version: 1.14
Release: 0
Summary: Collection of utilities for dealing with compressed files
License: GPL-2.0-or-later
Group: Productivity/Archiving/Compression
URL: https://www.nongnu.org/zutils/zutils.html
Source0: https://download.savannah.gnu.org/releases/zutils/zutils-%{version}.tar.lz
Source1: https://download.savannah.gnu.org/releases/zutils/zutils-%{version}.tar.lz.sig
Source2: %{name}.keyring
# PATCH-FIX-OPENSUSE zutils-1.7-noconflict.patch
Patch1: zutils-1.7-noconflict.patch
BuildRequires: c++_compiler
BuildRequires: lzip
%description
Zutils is a collection of utilities able to deal with any combination
of compressed and uncompressed files transparently. If any given file,
including standard input, is compressed, its decompressed content is
used. Compressed files are decompressed on the fly; no temporary files
are created.
These utilities are not wrapper scripts but safer and more efficient
C++ programs. In particular the "--recursive" option is very efficient
in those utilities supporting it.
%prep
%autosetup -p1
%build
%configure CXXFLAGS="%{optflags}"
%make_build
%install
%make_install
%check
%make_build check
%files
%doc ChangeLog README
%license COPYING
%config %{_sysconfdir}/zutils.conf
%{_bindir}/*
%{_infodir}/*.info%{?ext_info}
%{_mandir}/man1/*.1%{?ext_man}
%changelog