Hello community,
here is the log from the commit of package lzma
checked in at Fri Aug 1 23:48:22 CEST 2008.
--------
--- lzma/lzma.changes 2008-05-14 22:04:52.000000000 +0200
+++ lzma/lzma.changes 2008-07-30 13:53:34.000000000 +0200
@@ -1,0 +2,12 @@
+Wed Jul 30 13:53:18 CEST 2008 - schwab(a)suse.de
+
+- Update to lzma-4.32.7.
+ * If "lzma -t" is run on a corrupt file or interrupted by a signal,
+ don't unlink /dev/null.
+
+ * Partial fix to race conditions where a signal could make lzma to
+ unlink both the source and destination files. Now it cannot lose
+ data anymore, but with bad luck an incomplete file may be left
+ on the disk.
+
+-------------------------------------------------------------------
Old:
----
lzma-4.32.6.tar.bz2
New:
----
lzma-4.32.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lzma.spec ++++++
--- /var/tmp/diff_new_pack.X15082/_old 2008-08-01 23:46:42.000000000 +0200
+++ /var/tmp/diff_new_pack.X15082/_new 2008-08-01 23:46:42.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package lzma (Version 4.32.6)
+# spec file for package lzma (Version 4.32.7)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,7 +13,7 @@
Name: lzma
BuildRequires: gcc-c++
Summary: A Program for Compressing Files
-Version: 4.32.6
+Version: 4.32.7
Release: 1
Group: Productivity/Archiving/Compression
License: GPL v2 or later
@@ -124,6 +124,14 @@
%{_libdir}/lib*.*a
%changelog
+* Wed Jul 30 2008 schwab(a)suse.de
+- Update to lzma-4.32.7.
+ * If "lzma -t" is run on a corrupt file or interrupted by a signal,
+ don't unlink /dev/null.
+ * Partial fix to race conditions where a signal could make lzma to
+ unlink both the source and destination files. Now it cannot lose
+ data anymore, but with bad luck an incomplete file may be left
+ on the disk.
* Thu May 15 2008 schwab(a)suse.de
- Update to lzma-4.32.6.
* Always use 32-bit integer to hold probability variables. Earlier,
++++++ lzma-4.32.6.tar.bz2 -> lzma-4.32.7.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lzma-4.32.6/config.h.in new/lzma-4.32.7/config.h.in
--- old/lzma-4.32.6/config.h.in 2008-05-08 13:06:47.000000000 +0200
+++ new/lzma-4.32.7/config.h.in 2008-07-27 17:32:24.000000000 +0200
@@ -40,6 +40,9 @@
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
/* Define to 1 if stdbool.h conforms to C99. */
#undef HAVE_STDBOOL_H
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lzma-4.32.6/configure new/lzma-4.32.7/configure
--- old/lzma-4.32.6/configure 2008-05-08 13:06:24.000000000 +0200
+++ new/lzma-4.32.7/configure 2008-07-27 17:31:57.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for LZMA 4.32.6.
+# Generated by GNU Autoconf 2.62 for LZMA 4.32.7.
#
# Report bugs to <lasse.collin(a)tukaani.org>.
#
@@ -750,8 +750,8 @@
# Identity of this package.
PACKAGE_NAME='LZMA'
PACKAGE_TARNAME='lzma'
-PACKAGE_VERSION='4.32.6'
-PACKAGE_STRING='LZMA 4.32.6'
+PACKAGE_VERSION='4.32.7'
+PACKAGE_STRING='LZMA 4.32.7'
PACKAGE_BUGREPORT='lasse.collin(a)tukaani.org'
ac_unique_file="src/sdk/7zip/ICoder.h"
@@ -1482,7 +1482,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures LZMA 4.32.6 to adapt to many kinds of systems.
+\`configure' configures LZMA 4.32.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1552,7 +1552,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of LZMA 4.32.6:";;
+ short | recursive ) echo "Configuration of LZMA 4.32.7:";;
esac
cat <<\_ACEOF
@@ -1659,7 +1659,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-LZMA configure 4.32.6
+LZMA configure 4.32.7
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1673,7 +1673,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by LZMA $as_me 4.32.6, which was
+It was created by LZMA $as_me 4.32.7, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -2425,7 +2425,7 @@
# Define the identity of the package.
PACKAGE='lzma'
- VERSION='4.32.6'
+ VERSION='4.32.7'
cat >>confdefs.h <<_ACEOF
@@ -22555,7 +22555,8 @@
-for ac_func in memmove strdup memset strerror strrchr strtol utime utimes futimes futimesat
+
+for ac_func in memmove strdup memset strerror strrchr strtol utime utimes futimes futimesat snprintf
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -23657,7 +23658,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by LZMA $as_me 4.32.6, which was
+This file was extended by LZMA $as_me 4.32.7, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23710,7 +23711,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-LZMA config.status 4.32.6
+LZMA config.status 4.32.7
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lzma-4.32.6/configure.ac new/lzma-4.32.7/configure.ac
--- old/lzma-4.32.6/configure.ac 2008-05-08 13:06:06.000000000 +0200
+++ new/lzma-4.32.7/configure.ac 2008-07-27 17:30:58.000000000 +0200
@@ -5,7 +5,7 @@
# [LZMA] instead of [LZMA utils] since I prefer to have lzma-version.tar.gz
# instead of lzma-utils-version.tar.gz.
-AC_INIT([LZMA], [4.32.6], [lasse.collin(a)tukaani.org]
+AC_INIT([LZMA], [4.32.7], [lasse.collin(a)tukaani.org]
AC_CONFIG_SRCDIR([src/sdk/7zip/ICoder.h])
AC_CONFIG_HEADER([config.h])
@@ -73,7 +73,7 @@
AC_SYS_LARGEFILE
# Checks for library functions.
-AC_CHECK_FUNCS([memmove strdup memset strerror strrchr strtol utime utimes futimes futimesat])
+AC_CHECK_FUNCS([memmove strdup memset strerror strrchr strtol utime utimes futimes futimesat snprintf])
gl_GETOPT
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lzma-4.32.6/NEWS new/lzma-4.32.7/NEWS
--- old/lzma-4.32.6/NEWS 2008-05-14 20:14:57.000000000 +0200
+++ new/lzma-4.32.7/NEWS 2008-07-27 17:29:55.000000000 +0200
@@ -2,6 +2,20 @@
LZMA Utils user visible changes
===============================
+Version 4.32.7
+
+ * If "lzma -t" is run on a corrupt file or interrupted by a signal,
+ don't unlink /dev/null.
+
+ * Partial fix to race conditions where a signal could make lzma to
+ unlink both the source and destination files. Now it cannot lose
+ data anymore, but with bad luck an incomplete file may be left
+ on the disk.
+
+ (This partial fix was much simpler to implement than a real fix.
+ LZMA Utils 5 is hopefully not too far away, and it never had
+ these bugs in the first place.)
+
Version 4.32.6
* Always use 32-bit integer to hold probability variables. Earlier,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lzma-4.32.6/src/lzma/lzmp.cpp new/lzma-4.32.7/src/lzma/lzmp.cpp
--- old/lzma-4.32.6/src/lzma/lzmp.cpp 2008-05-13 20:18:00.000000000 +0200
+++ new/lzma-4.32.7/src/lzma/lzmp.cpp 2008-07-27 17:14:09.000000000 +0200
@@ -68,6 +68,12 @@
#include "../lzma_version.h"
+// Quick 'n' dirty hack for systems lacking snprintf(). The buffers should
+// be big enough so there shouldn't be buffer overflows with sprintf().
+#ifndef HAVE_SNPRINTF
+#define snprintf(buf, size, fmt, arg) sprintf(buf, fmt, arg)
+#endif
+
namespace lzma {
const char *PROGRAM_VERSION = PACKAGE_VERSION;
@@ -436,8 +442,8 @@
if (result == E_OUTOFMEMORY)
throw Exception("Cannot allocate memory");
else if (result != S_OK) {
- char buffer[33];
- snprintf(buffer, 33, "%d", (unsigned int)result);
+ char buffer[64];
+ snprintf(buffer, sizeof(buffer), "%d", (unsigned int)result);
throw Exception(string("Encoder error: ") + buffer);
}
}
@@ -616,14 +622,17 @@
return ret;
}
-static string archive_name; // I know, it is crude, but I haven't found any other
- // way then making a global variable to transfer filename to handler
+// When this is non-zero, we will unlink the output file if we get a signal.
+static volatile sig_atomic_t unlink_on_signal = 0;
+static string output_filename;
void signal_handler (int signum)
{
- unlink (archive_name.c_str()); // deleting
- signal (signum, SIG_DFL); // we return the default function to used signal
- kill (getpid(), signum); // and then send this signal to the process again
+ if (unlink_on_signal)
+ unlink (output_filename.c_str());
+
+ signal (signum, SIG_DFL); // we return the default function to used signal
+ kill (getpid(), signum); // and then send this signal to the process again
}
static void
@@ -725,7 +734,6 @@
CMyComPtr<ISequentialOutStream> outStream;
UInt64 fileSize = 0;
int inhandle = 0, outhandle = 0;
- string output_filename;
if (stdinput) {
inStream = new CStdInFileStream;
@@ -821,8 +829,7 @@
else
output_filename = filenames[i]
+ suffix;
- archive_name = output_filename;
-
+
try {
outhandle = open_outstream(output_filename, outStream);
}
@@ -830,6 +837,14 @@
cerr << argv[0] << ": " << e.what() << endl;
return STATUS_ERROR;
}
+
+ // There is a race condition between this and
+ // open_outstream, but this is better than
+ // nothing. The proper fix would require
+ // modifying the SDK; this was quicker to
+ // implement.
+ if (program_mode != PM_TEST)
+ unlink_on_signal = 1;
}
}
@@ -866,7 +881,10 @@
}
catch (Exception e) {
cerr << argv[0] << ": " << e.what() << endl;
- unlink(output_filename.c_str());
+ if (!stdoutput) {
+ unlink(output_filename.c_str());
+ unlink_on_signal = 0;
+ }
delete(encoderSpec);
return STATUS_ERROR;
@@ -883,7 +901,10 @@
}
catch (Exception e) {
cerr << argv[0] << ": " << e.what() << endl;
- unlink(output_filename.c_str());
+ if (!stdoutput && program_mode == PM_DECOMPRESS) {
+ unlink(output_filename.c_str());
+ unlink_on_signal = 0;
+ }
delete(decoderSpec);
return STATUS_ERROR;
@@ -935,12 +956,14 @@
// need to handle it separately here.
if (outStream->Close()) {
unlink(output_filename.c_str());
+ unlink_on_signal = 0;
cerr << output_filename << ": write error\n";
continue;
}
// Output closed successfully. Now we can remove the input
// file unless --keep was specified.
+ unlink_on_signal = 0;
if (!keep)
unlink(filenames[i].c_str());
}
@@ -955,14 +978,14 @@
}
else if (in_stats_ok && out_stats_ok) {
- char buf[10] = { 0 };
+ char buf[64] = { 0 };
if (program_mode == PM_DECOMPRESS)
- snprintf(buf, 10, "%.1f%%",
+ snprintf(buf, sizeof(buf), "%.1f%%",
(1.0 - (double)in_stats.st_size
/ (double)out_stats.st_size) * 100.0);
if (program_mode == PM_COMPRESS)
- snprintf(buf, 10, "%.1f%%",
+ snprintf(buf, sizeof(buf), "%.1f%%",
(1.0 - (double)out_stats.st_size
/ (double)in_stats.st_size) * 100.0);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lzma-4.32.6/src/sdk/7zip/Compress/LZMA/LZMAEncoder.cpp new/lzma-4.32.7/src/sdk/7zip/Compress/LZMA/LZMAEncoder.cpp
--- old/lzma-4.32.6/src/sdk/7zip/Compress/LZMA/LZMAEncoder.cpp 2005-12-04 19:29:29.000000000 +0100
+++ new/lzma-4.32.7/src/sdk/7zip/Compress/LZMA/LZMAEncoder.cpp 2008-06-21 14:17:24.000000000 +0200
@@ -182,7 +182,7 @@
context = (context << 1) | bit;
}
return price;
-};
+}
namespace NLength {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lzma-4.32.6/src/sdk/Common/Types.h new/lzma-4.32.7/src/sdk/Common/Types.h
--- old/lzma-4.32.6/src/sdk/Common/Types.h 2008-05-08 12:56:41.000000000 +0200
+++ new/lzma-4.32.7/src/sdk/Common/Types.h 2008-07-28 11:17:41.000000000 +0200
@@ -9,6 +9,15 @@
#include <inttypes.h>
+// Interix doesn't include stdint.h in inttypes.h as it should. Doing
+// it unconditionally here would break IRIX, because it including stdint.h
+// directly is allowed only in C99 mode (not C++).
+#ifdef __INTERIX
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+
typedef uint8_t Byte;
typedef int32_t Int32;
typedef uint32_t UInt32;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/lzma-4.32.6/THANKS new/lzma-4.32.7/THANKS
--- old/lzma-4.32.6/THANKS 2008-05-14 13:03:16.000000000 +0200
+++ new/lzma-4.32.7/THANKS 2008-07-23 14:16:51.000000000 +0200
@@ -10,6 +10,7 @@
- Anders F. Björklund
- İsmail Dönmez
- Jean-loup Gailly
+ - Szymon Juraszczyk
- Per Øyvind Karlsen
- Ville Koskinen
- Siep Kroonenberg
@@ -21,6 +22,7 @@
- Stuart Shelton
- Mohammed Adnène Trojette
- Vladimir Volovich
+ - Steffi Wassermann
Also thanks to all the people who have participated the Tukaani project
and others who I have forgot.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org