summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--INSTALL2
-rw-r--r--NEWS3
-rw-r--r--README21
-rw-r--r--carg_parser.c2
-rw-r--r--carg_parser.h2
-rwxr-xr-xconfigure6
-rw-r--r--decoder.c2
-rw-r--r--decoder.h2
-rw-r--r--doc/lunzip.118
-rw-r--r--list.c2
-rw-r--r--lzip.h2
-rw-r--r--lzip_index.c2
-rw-r--r--lzip_index.h2
-rw-r--r--main.c25
-rwxr-xr-xtestsuite/check.sh2
16 files changed, 72 insertions, 33 deletions
diff --git a/ChangeLog b/ChangeLog
index 264c4a0..60453fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,10 @@
-2023-12-21 Antonio Diaz Diaz <antonio@gnu.org>
+2024-01-21 Antonio Diaz Diaz <antonio@gnu.org>
- * Version 1.14-rc1 released.
+ * Version 1.14 released.
* New options '--empty-error' and '--marking-error'.
* main.c: Reformat file diagnostics as 'PROGRAM: FILE: MESSAGE'.
(show_option_error): New function showing argument and option name.
+ (main): Make -o preserve date/mode/owner if 1 input file.
(open_outstream): Create missing intermediate directories.
* lzip.h: Rename verify_* to check_*.
* configure, Makefile.in: New variable 'MAKEINFO'.
@@ -133,8 +134,7 @@
* Created from the decompression code of clzip 1.1.
-Copyright (C) 2010-2023 Antonio Diaz Diaz.
+Copyright (C) 2010-2024 Antonio Diaz Diaz.
-This file is a collection of facts, and thus it is not copyrightable,
-but just in case, you have unlimited permission to copy, distribute, and
-modify it.
+This file is a collection of facts, and thus it is not copyrightable, but just
+in case, you have unlimited permission to copy, distribute, and modify it.
diff --git a/INSTALL b/INSTALL
index b8e9690..9fe40ef 100644
--- a/INSTALL
+++ b/INSTALL
@@ -74,7 +74,7 @@ After running 'configure', you can run 'make' and 'make install' as
explained above.
-Copyright (C) 2010-2023 Antonio Diaz Diaz.
+Copyright (C) 2010-2024 Antonio Diaz Diaz.
This file is free documentation: you have unlimited permission to copy,
distribute, and modify it.
diff --git a/NEWS b/NEWS
index 27003a0..b7979bd 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,9 @@ File diagnostics have been reformatted as 'PROGRAM: FILE: MESSAGE'.
Diagnostics caused by invalid arguments to command-line options now show the
argument and the name of the option.
+The option '-o, --output' now preserves dates, permissions, and ownership of
+the file when decompressing exactly one file.
+
The option '-o, --output' now creates missing intermediate directories when
writing to a file.
diff --git a/README b/README
index 90da7af..464de88 100644
--- a/README
+++ b/README
@@ -2,9 +2,21 @@ Description
Lunzip is a decompressor for the lzip format written in C. Its small size
makes it well suited for embedded devices or software installers that need
-to decompress files but don't need compression capabilities. Lunzip is fully
+to decompress files but don't need compression capabilities. Lunzip is
compatible with lzip 1.4 or newer.
+Lzip is a lossless data compressor with a user interface similar to the one
+of gzip or bzip2. Lzip uses a simplified form of the 'Lempel-Ziv-Markov
+chain-Algorithm' (LZMA) stream format to maximize interoperability. The
+maximum dictionary size is 512 MiB so that any lzip file can be decompressed
+on 32-bit machines. Lzip provides accurate and robust 3-factor integrity
+checking. Lzip can compress about as fast as gzip (lzip -0) or compress most
+files more than bzip2 (lzip -9). Decompression speed is intermediate between
+gzip and bzip2. Lzip is better than gzip and bzip2 from a data recovery
+perspective. Lzip has been designed, written, and tested with great care to
+replace gzip and bzip2 as the standard general-purpose compressed format for
+Unix-like systems.
+
The lzip file format is designed for data sharing and long-term archiving,
taking into account both data integrity and decoder availability:
@@ -89,11 +101,10 @@ been compressed. Decompressed is used to refer to data which have undergone
the process of decompression.
-Copyright (C) 2010-2023 Antonio Diaz Diaz.
+Copyright (C) 2010-2024 Antonio Diaz Diaz.
This file is free documentation: you have unlimited permission to copy,
distribute, and modify it.
-The file Makefile.in is a data file used by configure to produce the
-Makefile. It has the same copyright owner and permissions that configure
-itself.
+The file Makefile.in is a data file used by configure to produce the Makefile.
+It has the same copyright owner and permissions that configure itself.
diff --git a/carg_parser.c b/carg_parser.c
index 8882b97..edb4eb9 100644
--- a/carg_parser.c
+++ b/carg_parser.c
@@ -1,5 +1,5 @@
/* Arg_parser - POSIX/GNU command-line argument parser. (C version)
- Copyright (C) 2006-2023 Antonio Diaz Diaz.
+ Copyright (C) 2006-2024 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
diff --git a/carg_parser.h b/carg_parser.h
index ec5d3d0..69ce271 100644
--- a/carg_parser.h
+++ b/carg_parser.h
@@ -1,5 +1,5 @@
/* Arg_parser - POSIX/GNU command-line argument parser. (C version)
- Copyright (C) 2006-2023 Antonio Diaz Diaz.
+ Copyright (C) 2006-2024 Antonio Diaz Diaz.
This library is free software. Redistribution and use in source and
binary forms, with or without modification, are permitted provided
diff --git a/configure b/configure
index ad36847..a6e4a93 100755
--- a/configure
+++ b/configure
@@ -1,12 +1,12 @@
#! /bin/sh
# configure script for Lunzip - Decompressor for the lzip format
-# Copyright (C) 2010-2023 Antonio Diaz Diaz.
+# Copyright (C) 2010-2024 Antonio Diaz Diaz.
#
# This configure script is free software: you have unlimited permission
# to copy, distribute, and modify it.
pkgname=lunzip
-pkgversion=1.14-rc1
+pkgversion=1.14
progname=lunzip
srctrigger=doc/${progname}.1
@@ -171,7 +171,7 @@ echo "MAKEINFO = ${MAKEINFO}"
rm -f Makefile
cat > Makefile << EOF
# Makefile for Lunzip - Decompressor for the lzip format
-# Copyright (C) 2010-2023 Antonio Diaz Diaz.
+# Copyright (C) 2010-2024 Antonio Diaz Diaz.
# This file was generated automatically by configure. Don't edit.
#
# This Makefile is free software: you have unlimited permission
diff --git a/decoder.c b/decoder.c
index ab6a259..5f1dc5e 100644
--- a/decoder.c
+++ b/decoder.c
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2023 Antonio Diaz Diaz.
+ Copyright (C) 2010-2024 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/decoder.h b/decoder.h
index 0651cc2..8a948e9 100644
--- a/decoder.h
+++ b/decoder.h
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2023 Antonio Diaz Diaz.
+ Copyright (C) 2010-2024 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/doc/lunzip.1 b/doc/lunzip.1
index 3b9fb99..ce64bc9 100644
--- a/doc/lunzip.1
+++ b/doc/lunzip.1
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2.
-.TH LUNZIP "1" "December 2023" "lunzip 1.14-rc1" "User Commands"
+.TH LUNZIP "1" "January 2024" "lunzip 1.14" "User Commands"
.SH NAME
lunzip \- decompressor for the lzip format
.SH SYNOPSIS
@@ -8,9 +8,21 @@ lunzip \- decompressor for the lzip format
.SH DESCRIPTION
Lunzip is a decompressor for the lzip format written in C. Its small size
makes it well suited for embedded devices or software installers that need
-to decompress files but don't need compression capabilities. Lunzip is fully
+to decompress files but don't need compression capabilities. Lunzip is
compatible with lzip 1.4 or newer.
.PP
+Lzip is a lossless data compressor with a user interface similar to the one
+of gzip or bzip2. Lzip uses a simplified form of the 'Lempel\-Ziv\-Markov
+chain\-Algorithm' (LZMA) stream format to maximize interoperability. The
+maximum dictionary size is 512 MiB so that any lzip file can be decompressed
+on 32\-bit machines. Lzip provides accurate and robust 3\-factor integrity
+checking. Lzip can compress about as fast as gzip (lzip \fB\-0\fR) or compress most
+files more than bzip2 (lzip \fB\-9\fR). Decompression speed is intermediate between
+gzip and bzip2. Lzip is better than gzip and bzip2 from a data recovery
+perspective. Lzip has been designed, written, and tested with great care to
+replace gzip and bzip2 as the standard general\-purpose compressed format for
+Unix\-like systems.
+.PP
Lunzip provides a 'low memory' mode able to decompress any file using as
little memory as 50 kB, irrespective of the dictionary size used to
compress the file. To activate it, specify the size of the output buffer
@@ -96,7 +108,7 @@ Report bugs to lzip\-bug@nongnu.org
.br
Lunzip home page: http://www.nongnu.org/lzip/lunzip.html
.SH COPYRIGHT
-Copyright \(co 2023 Antonio Diaz Diaz.
+Copyright \(co 2024 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
.br
This is free software: you are free to change and redistribute it.
diff --git a/list.c b/list.c
index 3d4b242..c711031 100644
--- a/list.c
+++ b/list.c
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2023 Antonio Diaz Diaz.
+ Copyright (C) 2010-2024 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lzip.h b/lzip.h
index 22c75e5..91a64b1 100644
--- a/lzip.h
+++ b/lzip.h
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2023 Antonio Diaz Diaz.
+ Copyright (C) 2010-2024 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lzip_index.c b/lzip_index.c
index 688a370..ef0b0bd 100644
--- a/lzip_index.c
+++ b/lzip_index.c
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2023 Antonio Diaz Diaz.
+ Copyright (C) 2010-2024 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lzip_index.h b/lzip_index.h
index df2aeca..a4fbd56 100644
--- a/lzip_index.h
+++ b/lzip_index.h
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2023 Antonio Diaz Diaz.
+ Copyright (C) 2010-2024 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/main.c b/main.c
index 6949e1d..059d716 100644
--- a/main.c
+++ b/main.c
@@ -1,5 +1,5 @@
/* Lunzip - Decompressor for the lzip format
- Copyright (C) 2010-2023 Antonio Diaz Diaz.
+ Copyright (C) 2010-2024 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -76,7 +76,7 @@
int verbosity = 0;
static const char * const program_name = "lunzip";
-static const char * const program_year = "2023";
+static const char * const program_year = "2024";
static const char * invocation_name = "lunzip"; /* default value */
static const struct { const char * from; const char * to; } known_extensions[] = {
@@ -97,8 +97,19 @@ static void show_help( void )
{
printf( "Lunzip is a decompressor for the lzip format written in C. Its small size\n"
"makes it well suited for embedded devices or software installers that need\n"
- "to decompress files but don't need compression capabilities. Lunzip is fully\n"
+ "to decompress files but don't need compression capabilities. Lunzip is\n"
"compatible with lzip 1.4 or newer.\n"
+ "\nLzip is a lossless data compressor with a user interface similar to the one\n"
+ "of gzip or bzip2. Lzip uses a simplified form of the 'Lempel-Ziv-Markov\n"
+ "chain-Algorithm' (LZMA) stream format to maximize interoperability. The\n"
+ "maximum dictionary size is 512 MiB so that any lzip file can be decompressed\n"
+ "on 32-bit machines. Lzip provides accurate and robust 3-factor integrity\n"
+ "checking. Lzip can compress about as fast as gzip (lzip -0) or compress most\n"
+ "files more than bzip2 (lzip -9). Decompression speed is intermediate between\n"
+ "gzip and bzip2. Lzip is better than gzip and bzip2 from a data recovery\n"
+ "perspective. Lzip has been designed, written, and tested with great care to\n"
+ "replace gzip and bzip2 as the standard general-purpose compressed format for\n"
+ "Unix-like systems.\n"
"\nLunzip provides a 'low memory' mode able to decompress any file using as\n"
"little memory as 50 kB, irrespective of the dictionary size used to\n"
"compress the file. To activate it, specify the size of the output buffer\n"
@@ -558,7 +569,7 @@ static void close_and_set_permissions( const struct stat * const in_statsp )
if( in_statsp )
{
const mode_t mode = in_statsp->st_mode;
- /* fchown will in many cases return with EPERM, which can be safely ignored. */
+ /* fchown in many cases returns with EPERM, which can be safely ignored. */
if( fchown( outfd, in_statsp->st_uid, in_statsp->st_gid ) == 0 )
{ if( fchmod( outfd, mode ) != 0 ) warning = true; }
else
@@ -896,11 +907,11 @@ int main( const int argc, const char * const argv[] )
int retval = 0;
const bool one_to_one = !to_stdout && program_mode != m_test && !to_file;
bool stdin_used = false;
+ struct stat in_stats;
for( i = 0; i < num_filenames; ++i )
{
const char * input_filename = "";
int infd;
- struct stat in_stats;
Pp_set_name( &pp, filenames[i] );
if( strcmp( filenames[i], "-" ) == 0 )
@@ -966,7 +977,9 @@ int main( const int argc, const char * const argv[] )
if( input_filename[0] && !keep_input_files && one_to_one )
remove( input_filename );
}
- if( delete_output_on_interrupt ) close_and_set_permissions( 0 ); /* -o */
+ if( delete_output_on_interrupt ) /* -o */
+ close_and_set_permissions( ( retval == 0 && !stdin_used &&
+ filenames_given && num_filenames == 1 ) ? &in_stats : 0 );
else if( outfd >= 0 && close( outfd ) != 0 ) /* -c */
{
show_error( "Error closing stdout", errno, false );
diff --git a/testsuite/check.sh b/testsuite/check.sh
index 16682a7..1d36069 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# check script for Lunzip - Decompressor for the lzip format
-# Copyright (C) 2010-2023 Antonio Diaz Diaz.
+# Copyright (C) 2010-2024 Antonio Diaz Diaz.
#
# This script is free software: you have unlimited permission
# to copy, distribute, and modify it.