New version 5.1.3 alpha

This commit is contained in:
Andrey Bondrov 2014-05-29 16:44:16 +11:00
parent ab9aaf07c6
commit 898d168425
4 changed files with 119 additions and 52 deletions

View file

@ -1,2 +1,2 @@
sources:
xz-5.0.4.tar.xz: 2b57b7825ec62dc4cb3540bd11390c183238688c
xz-5.1.3alpha.tar.xz: 52bbddfd0909590d7f47c7a7f82aa5fa5e6a2208

View file

@ -0,0 +1,64 @@
--- xz-5.1.3alpha/src/xz/message.c.day 2013-10-26 12:27:12.000000000 +0200
+++ xz-5.1.3alpha/src/xz/message.c 2014-02-10 12:58:14.957708913 +0100
@@ -1090,7 +1090,8 @@ message_help(bool long_help)
puts(_(
" -z, --compress force compression\n"
-" -d, --decompress force decompression\n"
+" -d, --decompress, --uncompress\n"
+" force decompression\n"
" -t, --test test compressed file integrity\n"
" -l, --list list information about .xz files"));
@@ -1100,7 +1101,8 @@ message_help(bool long_help)
puts(_(
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
-" -c, --stdout write to standard output and don't delete input files"));
+" -c, --stdout, --to-stdout\n"
+" write to standard output and don't delete input files"));
if (long_help) {
puts(_(
@@ -1150,7 +1152,7 @@ message_help(bool long_help)
puts(_( // xgettext:no-c-format
" --memlimit-compress=LIMIT\n"
" --memlimit-decompress=LIMIT\n"
-" -M, --memlimit=LIMIT\n"
+" -M, --memlimit=LIMIT, (old alias --memory=LIMIT)\n"
" set memory usage limit for compression, decompression,\n"
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"));
--- xz-5.1.3alpha/src/xz/xz.1.day 2013-10-26 12:27:12.000000000 +0200
+++ xz-5.1.3alpha/src/xz/xz.1 2014-02-10 12:58:14.957708913 +0100
@@ -972,7 +972,7 @@ See
for possible ways to specify the
.IR limit .
.TP
-\fB\-M\fR \fIlimit\fR, \fB\-\-memlimit=\fIlimit\fR, \fB\-\-memory=\fIlimit
+\fB\-M\fR \fIlimit\fR, \fB\-\-memlimit=\fIlimit\fR, (old alias \fB\-\-memory=\fIlimit\fR)
This is equivalent to specifying \fB\-\-memlimit\-compress=\fIlimit
\fB\-\-memlimit\-decompress=\fIlimit\fR.
.TP
--- xz-5.1.3alpha/src/xzdec/xzdec.c.day 2014-02-10 12:58:14.957708913 +0100
+++ xz-5.1.3alpha/src/xzdec/xzdec.c 2014-02-10 13:02:37.107709989 +0100
@@ -65,12 +65,16 @@ help(void)
"Decompress files in the ." TOOL_FORMAT " format to standard output.\n"
"\n"
" -d, --decompress (ignored, only decompression is supported)\n"
-" -k, --keep (ignored, files are never deleted)\n"
-" -c, --stdout (ignored, output is always written to standard output)\n"
" -q, --quiet specify *twice* to suppress errors\n"
-" -Q, --no-warn (ignored, the exit status 2 is never used)\n"
" -h, --help display this help and exit\n"
" -V, --version display the version number and exit\n"
+" -c, --stdout, --to-stdout\n"
+" ignored, data are always written to standard output\n"
+" -d, --decompress, --uncompress\n"
+" ignored, only decompression is supported\n"
+" -k, --keep ignored, we never create/remove any files\n"
+" -Q, --no-warn ignored, we never use exit status 2\n"
+
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
"\n"

View file

@ -1,5 +1,5 @@
--- xz-5.0.0/src/liblzma/api/lzma/container.h.text~ 2010-10-23 16:47:33.000000000 +0200
+++ xz-5.0.0/src/liblzma/api/lzma/container.h 2010-12-14 23:57:08.628431579 +0100
--- xz-5.1.3alpha/src/liblzma/api/lzma/container.h.text~ 2014-02-10 20:53:46.000000000 +0100
+++ xz-5.1.3alpha/src/liblzma/api/lzma/container.h 2014-02-11 11:58:23.406404399 +0100
@@ -43,7 +43,7 @@
/*
* Preset flags
@ -9,7 +9,7 @@
*/
/**
@@ -59,6 +59,13 @@
@@ -59,6 +59,12 @@
*/
#define LZMA_PRESET_EXTREME (UINT32_C(1) << 31)
@ -19,12 +19,11 @@
+ * TODO
+ */
+#define LZMA_PRESET_TEXT (UINT32_C(1) << 18)
+
#ifdef LZMA_UNSTABLE /* Unstable API that may change. Use only for testing. */
/**
* \brief Calculate approximate memory usage of easy encoder
--- xz-5.0.0/src/liblzma/lzma/lzma_encoder_presets.c.text~ 2010-10-23 16:47:33.000000000 +0200
+++ xz-5.0.0/src/liblzma/lzma/lzma_encoder_presets.c 2010-12-15 01:01:27.610442970 +0100
--- xz-5.1.3alpha/src/liblzma/lzma/lzma_encoder_presets.c.text~ 2014-02-10 20:53:46.000000000 +0100
+++ xz-5.1.3alpha/src/liblzma/lzma/lzma_encoder_presets.c 2014-02-11 11:58:23.406404399 +0100
@@ -18,7 +18,7 @@ lzma_lzma_preset(lzma_options_lzma *opti
{
const uint32_t level = preset & LZMA_PRESET_LEVEL_MASK;
@ -34,7 +33,7 @@
if (level > 9 || (flags & ~supported_flags))
return true;
@@ -57,5 +57,18 @@ lzma_lzma_preset(lzma_options_lzma *opti
@@ -59,5 +59,18 @@ lzma_lzma_preset(lzma_options_lzma *opti
}
}
@ -53,17 +52,17 @@
+
return false;
}
--- xz-5.0.0/src/xz/args.c.text~ 2010-10-23 16:47:33.000000000 +0200
+++ xz-5.0.0/src/xz/args.c 2010-12-14 23:57:08.639432696 +0100
@@ -76,6 +76,7 @@ parse_real(args_info *args, int argc, ch
OPT_NO_ADJUST,
--- xz-5.1.3alpha/src/xz/args.c.text~ 2014-02-10 20:53:46.000000000 +0100
+++ xz-5.1.3alpha/src/xz/args.c 2014-02-11 12:12:51.916381380 +0100
@@ -141,6 +141,7 @@ parse_real(args_info *args, int argc, ch
OPT_INFO_MEMORY,
OPT_ROBOT,
OPT_FLUSH_TIMEOUT,
+ OPT_TEXT,
};
static const char short_opts[]
@@ -113,6 +114,8 @@ parse_real(args_info *args, int argc, ch
@@ -182,6 +183,8 @@ parse_real(args_info *args, int argc, ch
{ "extreme", no_argument, NULL, 'e' },
{ "fast", no_argument, NULL, '0' },
{ "best", no_argument, NULL, '9' },
@ -72,8 +71,8 @@
// Filters
{ "lzma1", optional_argument, NULL, OPT_LZMA1 },
@@ -401,6 +404,10 @@ parse_real(args_info *args, int argc, ch
opt_auto_adjust = false;
@@ -490,6 +493,10 @@ parse_real(args_info *args, int argc, ch
optarg, 0, UINT64_MAX);
break;
+ case OPT_TEXT:
@ -83,46 +82,36 @@
default:
message_try_help();
tuklib_exit(E_ERROR, E_ERROR, false);
--- xz-5.0.0/src/xz/coder.c.text~ 2010-10-23 16:47:33.000000000 +0200
+++ xz-5.0.0/src/xz/coder.c 2010-12-14 23:57:08.640432976 +0100
@@ -47,6 +47,9 @@ static size_t preset_number = 6;
/// compression ratio.
static bool preset_extreme = false;
--- xz-5.1.3alpha/src/xz/coder.c.text~ 2014-02-10 20:53:46.000000000 +0100
+++ xz-5.1.3alpha/src/xz/coder.c 2014-02-11 11:58:23.406404399 +0100
@@ -59,6 +59,8 @@ static lzma_mt mt_options = {
};
#endif
+/// TODO: Description..
+static bool preset_text = false;
+
/// Integrity check type
static lzma_check check;
@@ -89,6 +92,14 @@ coder_set_extreme(void)
extern void
+coder_set_text(void)
+{
+ preset_text = true;
+ return;
+}
coder_set_check(lzma_check new_check)
@@ -101,6 +103,15 @@ coder_set_extreme(void)
forget_filter_chain();
return;
}
+
+
+extern void
coder_add_filter(lzma_vli id, void *options)
{
if (filters_count == LZMA_FILTERS_MAX)
@@ -137,6 +148,9 @@ coder_set_compression_settings(void)
if (preset_extreme)
preset_number |= LZMA_PRESET_EXTREME;
+coder_set_text(void)
+{
+ preset_number |= LZMA_PRESET_TEXT;
+ forget_filter_chain();
+ return;
+}
+ if (preset_text)
+ preset_number |= LZMA_PRESET_TEXT;
+
if (lzma_lzma_preset(&opt_lzma, preset_number))
message_bug();
--- xz-5.0.0/src/xz/coder.h.text~ 2010-10-23 16:47:33.000000000 +0200
+++ xz-5.0.0/src/xz/coder.h 2010-12-14 23:57:08.649682731 +0100
@@ -51,6 +51,9 @@ extern void coder_set_preset(size_t new_
extern void
--- xz-5.1.3alpha/src/xz/coder.h.text~ 2014-02-10 20:53:46.000000000 +0100
+++ xz-5.1.3alpha/src/xz/coder.h 2014-02-11 11:58:23.406404399 +0100
@@ -61,6 +61,9 @@ extern void coder_set_preset(uint32_t ne
/// Enable extreme mode
extern void coder_set_extreme(void);
@ -132,3 +121,13 @@
/// Add a filter to the custom filter chain
extern void coder_add_filter(lzma_vli id, void *options);
--- xz-5.1.3alpha/tests/test_compress.sh.text~ 2014-02-11 13:03:45.431535071 +0100
+++ xz-5.1.3alpha/tests/test_compress.sh 2014-02-11 15:33:40.012017357 +0100
@@ -103,6 +103,7 @@ do
# Don't test with empty arguments; it breaks some ancient
# proprietary /bin/sh versions due to $@ used in test_xz().
+ test_xz -0 --text
test_xz -1
test_xz -2
test_xz -3

16
xz.spec
View file

@ -1,21 +1,24 @@
%define major 5
%define lname lzma
%define libname %mklibname %{lname} %{major}
%define devname %mklibname -d %{lname}
%define devname %mklibname %{lname} -d
%bcond_with uclibc
%bcond_with dietlibc
%define gitdate 20140129
Summary: XZ utils
Name: xz
Version: 5.0.4
Release: 3
Version: 5.1.3
Release: 0.alpha.3.%{gitdate}.2
License: Public Domain
Group: Archiving/Compression
Url: http://tukaani.org/xz/
Source0: http://tukaani.org/xz/%{name}-%{version}.tar.xz
Source0: http://tukaani.org/xz/%{name}-%{version}alpha.tar.xz
Source1: xzme
Patch0: xz-5.0.0-text-tune.patch
Patch0: xz-5.1.3alpha-text-tune.patch
Patch1: xz-5.1.3alpha-man-page-day.patch
# needed by check suite
BuildRequires: diffutils
%if %{with uclibc}
@ -91,8 +94,9 @@ Devel libraries & headers for liblzma.
#----------------------------------------------------------------------------
%prep
%setup -q
%setup -qn %{name}-%{version}alpha
%patch0 -p1 -b .text~
%patch1 -p1 -b .day~
%build
export CONFIGURE_TOP=`pwd`