Adding upstream version 1.3~pre2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e9785f0439
commit
a9fdc45187
14 changed files with 62 additions and 27 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2014-07-18 Antonio Diaz Diaz <antonio@gnu.org>
|
||||||
|
|
||||||
|
* Version 1.3-pre2 released.
|
||||||
|
* testsuite/check.sh: Fixed two values of expected exit status.
|
||||||
|
* zutils.texi: Documented that '--format' does not verify format.
|
||||||
|
|
||||||
2014-06-28 Antonio Diaz Diaz <antonio@gnu.org>
|
2014-06-28 Antonio Diaz Diaz <antonio@gnu.org>
|
||||||
|
|
||||||
* Version 1.3-pre1 released.
|
* Version 1.3-pre1 released.
|
||||||
|
|
7
NEWS
7
NEWS
|
@ -1,3 +1,10 @@
|
||||||
Changes in version 1.3:
|
Changes in version 1.3:
|
||||||
|
|
||||||
|
Two incomplete values of expected exit status producing sporadic
|
||||||
|
failures of the tests have been fixed.
|
||||||
|
|
||||||
The license has been changed to GPL version 2 or later.
|
The license has been changed to GPL version 2 or later.
|
||||||
|
|
||||||
|
It has been documented that the "--format" option does not verify the
|
||||||
|
format, allowing for example the processing of compress'd (.Z) files
|
||||||
|
with gzip.
|
||||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -6,7 +6,7 @@
|
||||||
# to copy, distribute and modify it.
|
# to copy, distribute and modify it.
|
||||||
|
|
||||||
pkgname=zutils
|
pkgname=zutils
|
||||||
pkgversion=1.3-pre1
|
pkgversion=1.3-pre2
|
||||||
srctrigger=doc/${pkgname}.texi
|
srctrigger=doc/${pkgname}.texi
|
||||||
|
|
||||||
# clear some things potentially inherited from environment.
|
# clear some things potentially inherited from environment.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||||
.TH ZCAT "1" "June 2014" "zcat (zutils) 1.3-pre1" "User Commands"
|
.TH ZCAT "1" "July 2014" "zcat (zutils) 1.3-pre2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zcat \- decompress and concatenate files to standard output
|
zcat \- decompress and concatenate files to standard output
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||||
.TH ZCMP "1" "June 2014" "zcmp (zutils) 1.3-pre1" "User Commands"
|
.TH ZCMP "1" "July 2014" "zcmp (zutils) 1.3-pre2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zcmp \- decompress and compare two files byte by byte
|
zcmp \- decompress and compare two files byte by byte
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||||
.TH ZDIFF "1" "June 2014" "zdiff (zutils) 1.3-pre1" "User Commands"
|
.TH ZDIFF "1" "July 2014" "zdiff (zutils) 1.3-pre2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zdiff \- decompress and compare two files line by line
|
zdiff \- decompress and compare two files line by line
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||||
.TH ZGREP "1" "June 2014" "zgrep (zutils) 1.3-pre1" "User Commands"
|
.TH ZGREP "1" "July 2014" "zgrep (zutils) 1.3-pre2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zgrep \- search compressed files for a regular expression
|
zgrep \- search compressed files for a regular expression
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||||
.TH ZTEST "1" "June 2014" "ztest (zutils) 1.3-pre1" "User Commands"
|
.TH ZTEST "1" "July 2014" "ztest (zutils) 1.3-pre2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ztest \- verify integrity of compressed files
|
ztest \- verify integrity of compressed files
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
|
||||||
.TH ZUPDATE "1" "June 2014" "zupdate (zutils) 1.3-pre1" "User Commands"
|
.TH ZUPDATE "1" "July 2014" "zupdate (zutils) 1.3-pre2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
zupdate \- recompress bzip2, gzip, xz files to lzip files
|
zupdate \- recompress bzip2, gzip, xz files to lzip files
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|
|
@ -12,7 +12,7 @@ File: zutils.info, Node: Top, Next: Introduction, Up: (dir)
|
||||||
Zutils Manual
|
Zutils Manual
|
||||||
*************
|
*************
|
||||||
|
|
||||||
This manual is for Zutils (version 1.3-pre1, 28 June 2014).
|
This manual is for Zutils (version 1.3-pre2, 17 July 2014).
|
||||||
|
|
||||||
* Menu:
|
* Menu:
|
||||||
|
|
||||||
|
@ -63,6 +63,11 @@ which makes them safe to use with zutils. Gzip and xz may return
|
||||||
ambiguous warning values, making them less reliable back ends for
|
ambiguous warning values, making them less reliable back ends for
|
||||||
zutils.
|
zutils.
|
||||||
|
|
||||||
|
FORMAT NOTE: If the '--format' option is given, the corresponding
|
||||||
|
files are passed to the decompressor without verifying their format,
|
||||||
|
allowing for example the processing of compress'd (.Z) files with gzip:
|
||||||
|
'zcmp --format=gz file.Z file.lz'.
|
||||||
|
|
||||||
LANGUAGE NOTE: Uncompressed = not compressed = plain data; it may
|
LANGUAGE NOTE: Uncompressed = not compressed = plain data; it may
|
||||||
never have been compressed. Decompressed is used to refer to data which
|
never have been compressed. Decompressed is used to refer to data which
|
||||||
has undergone the process of decompression.
|
has undergone the process of decompression.
|
||||||
|
@ -704,16 +709,16 @@ Concept index
|
||||||
Tag Table:
|
Tag Table:
|
||||||
Node: Top222
|
Node: Top222
|
||||||
Node: Introduction1156
|
Node: Introduction1156
|
||||||
Node: Common options3257
|
Node: Common options3503
|
||||||
Node: The zutilsrc file4506
|
Node: The zutilsrc file4752
|
||||||
Node: Zcat5432
|
Node: Zcat5678
|
||||||
Node: Zcmp7354
|
Node: Zcmp7600
|
||||||
Node: Zdiff9678
|
Node: Zdiff9924
|
||||||
Node: Zgrep12181
|
Node: Zgrep12427
|
||||||
Node: Ztest15149
|
Node: Ztest15395
|
||||||
Node: Zupdate16373
|
Node: Zupdate16619
|
||||||
Node: Problems18761
|
Node: Problems19007
|
||||||
Node: Concept index19295
|
Node: Concept index19541
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
@finalout
|
@finalout
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
|
|
||||||
@set UPDATED 28 June 2014
|
@set UPDATED 17 July 2014
|
||||||
@set VERSION 1.3-pre1
|
@set VERSION 1.3-pre2
|
||||||
|
|
||||||
@dircategory Data Compression
|
@dircategory Data Compression
|
||||||
@direntry
|
@direntry
|
||||||
|
@ -83,6 +83,11 @@ NOTE: Bzip2 and lzip provide well-defined values of exit status, which
|
||||||
makes them safe to use with zutils. Gzip and xz may return ambiguous
|
makes them safe to use with zutils. Gzip and xz may return ambiguous
|
||||||
warning values, making them less reliable back ends for zutils.
|
warning values, making them less reliable back ends for zutils.
|
||||||
|
|
||||||
|
FORMAT NOTE: If the @samp{--format} option is given, the corresponding
|
||||||
|
files are passed to the decompressor without verifying their format,
|
||||||
|
allowing for example the processing of compress'd (.Z) files with gzip:
|
||||||
|
@samp{zcmp --format=gz file.Z file.lz}.
|
||||||
|
|
||||||
LANGUAGE NOTE: Uncompressed = not compressed = plain data; it may never
|
LANGUAGE NOTE: Uncompressed = not compressed = plain data; it may never
|
||||||
have been compressed. Decompressed is used to refer to data which has
|
have been compressed. Decompressed is used to refer to data which has
|
||||||
undergone the process of decompression.
|
undergone the process of decompression.
|
||||||
|
|
|
@ -168,7 +168,8 @@ printf .
|
||||||
"${ZCMP}" -N -q --format=lz in.lz
|
"${ZCMP}" -N -q --format=lz in.lz
|
||||||
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
||||||
"${ZCMP}" -N --format=lz in.gz in.lz 2> /dev/null
|
"${ZCMP}" -N --format=lz in.gz in.lz 2> /dev/null
|
||||||
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
res=$?
|
||||||
|
if [ ${res} = 1 ] || [ ${res} = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
||||||
"${ZCMP}" -N -n -1 in in 2> /dev/null
|
"${ZCMP}" -N -n -1 in in 2> /dev/null
|
||||||
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
||||||
"${ZCMP}" -N --bad-option in in 2> /dev/null
|
"${ZCMP}" -N --bad-option in in 2> /dev/null
|
||||||
|
@ -233,7 +234,8 @@ printf .
|
||||||
"${ZDIFF}" -N -q --format=bz2 in.bz2 2> /dev/null
|
"${ZDIFF}" -N -q --format=bz2 in.bz2 2> /dev/null
|
||||||
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
||||||
"${ZDIFF}" -N -q --format=,lz in.lz in.bz2 > /dev/null 2>&1
|
"${ZDIFF}" -N -q --format=,lz in.lz in.bz2 > /dev/null 2>&1
|
||||||
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
res=$?
|
||||||
|
if [ ${res} = 1 ] || [ ${res} = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
||||||
"${ZDIFF}" -N --bad-option 2> /dev/null
|
"${ZDIFF}" -N --bad-option 2> /dev/null
|
||||||
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
|
||||||
|
|
||||||
|
|
13
ztest.cc
13
ztest.cc
|
@ -152,13 +152,24 @@ int ztest_file( const int infd, int format_index,
|
||||||
const std::string & input_filename,
|
const std::string & input_filename,
|
||||||
const std::vector< const char * > & ztest_args )
|
const std::vector< const char * > & ztest_args )
|
||||||
{
|
{
|
||||||
|
static int disable_xz = -1; // tri-state bool
|
||||||
const uint8_t * magic_data = 0;
|
const uint8_t * magic_data = 0;
|
||||||
int magic_size = 0;
|
int magic_size = 0;
|
||||||
if( format_index < 0 )
|
if( format_index < 0 )
|
||||||
format_index = test_format( infd, &magic_data, &magic_size );
|
format_index = test_format( infd, &magic_data, &magic_size );
|
||||||
const char * const compressor_name = get_compressor_name( format_index );
|
const char * const compressor_name = get_compressor_name( format_index );
|
||||||
if( !compressor_name )
|
if( !compressor_name )
|
||||||
return 0; // skip this file
|
return 0; // ignore this file
|
||||||
|
if( format_index == fmt_xz )
|
||||||
|
{
|
||||||
|
if( disable_xz < 0 )
|
||||||
|
{
|
||||||
|
std::string command( compressor_name ); command += " -V > /dev/null";
|
||||||
|
disable_xz = ( std::system( command.c_str() ) != 0 );
|
||||||
|
}
|
||||||
|
if( disable_xz ) return 0; // ignore this file if no xz installed
|
||||||
|
}
|
||||||
|
|
||||||
const pid_t pid = fork();
|
const pid_t pid = fork();
|
||||||
|
|
||||||
if( pid == 0 ) // child (compressor)
|
if( pid == 0 ) // child (compressor)
|
||||||
|
|
|
@ -136,14 +136,13 @@ struct { const char * from; const char * to; int format_index; } const
|
||||||
{ ".txz", ".tar", fmt_xz },
|
{ ".txz", ".tar", fmt_xz },
|
||||||
{ 0, 0, -1 } };
|
{ 0, 0, -1 } };
|
||||||
|
|
||||||
int disable_xz = -1; // tri-state bool
|
|
||||||
|
|
||||||
|
|
||||||
// Returns 0 for success, -1 for file skipped, 1 for error.
|
// Returns 0 for success, -1 for file skipped, 1 for error.
|
||||||
int zupdate_file( const std::string & name, const char * const lzip_name,
|
int zupdate_file( const std::string & name, const char * const lzip_name,
|
||||||
const std::vector< std::string > & lzip_args2,
|
const std::vector< std::string > & lzip_args2,
|
||||||
const bool force, const bool keep_input_files )
|
const bool force, const bool keep_input_files )
|
||||||
{
|
{
|
||||||
|
static int disable_xz = -1; // tri-state bool
|
||||||
int format_index = -1;
|
int format_index = -1;
|
||||||
std::string dname; // decompressed_name
|
std::string dname; // decompressed_name
|
||||||
|
|
||||||
|
@ -167,7 +166,7 @@ int zupdate_file( const std::string & name, const char * const lzip_name,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const char * const compressor_name = get_compressor_name( format_index );
|
const char * const compressor_name = get_compressor_name( format_index );
|
||||||
if( !compressor_name || !compressor_name[0] )
|
if( !compressor_name )
|
||||||
{
|
{
|
||||||
if( verbosity >= 2 )
|
if( verbosity >= 2 )
|
||||||
std::fprintf( stderr, "%s: Unknown extension in file name '%s' -- ignored.\n",
|
std::fprintf( stderr, "%s: Unknown extension in file name '%s' -- ignored.\n",
|
||||||
|
@ -384,7 +383,7 @@ int main( const int argc, const char * const argv[] )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char * const lzip_name = get_compressor_name( fmt_lz );
|
const char * const lzip_name = get_compressor_name( fmt_lz );
|
||||||
if( !lzip_name || !lzip_name[0] )
|
if( !lzip_name )
|
||||||
{ show_error( "Missing name of compressor for lzip format." ); return 1; }
|
{ show_error( "Missing name of compressor for lzip format." ); return 1; }
|
||||||
|
|
||||||
for( ; argind < parser.arguments(); ++argind )
|
for( ; argind < parser.arguments(); ++argind )
|
||||||
|
|
Loading…
Add table
Reference in a new issue