update to 5.1.3 snapshot

This commit is contained in:
Tigro 2014-05-19 13:21:04 +04:00
parent 1199e0401c
commit 1e876eed28
4 changed files with 216 additions and 127 deletions

View file

@ -1,3 +1,4 @@
sources:
xz-5.0.4.tar.xz: 2b57b7825ec62dc4cb3540bd11390c183238688c
xz-5.0.5.tar.xz: 56f1d78117f0c32bbb1cfd40117aa7f55bee8765
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

189
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 libdev %mklibname -d %{lname}
%bcond_with uclibc
%bcond_with dietlibc
%bcond_without uclibc
%bcond_without dietlibc
Summary: XZ utils
Name: xz
Version: 5.0.5
Release: 1
Version: 5.1.3
%define gitdate 20140129
Release: 0.alpha.3.%{gitdate}.1
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
%rename lzma
%rename lzma-utils
# needed by check suite
BuildRequires: diffutils
%if %{with uclibc}
@ -24,33 +27,29 @@ BuildRequires: uClibc-devel
%if %{with diet}
BuildRequires: dietlibc-devel
%endif
%rename lzma
%rename lzma-utils
URL: http://tukaani.org/xz/
%description
XZ provides very high compression ratio and fast decompression. The
core of the XZ utils is Igor Pavlov's LZMA SDK containing the actual
LZMA encoder/decoder. LZMA utils add a few scripts which provide
gzip-like command line interface and a couple of other XZ related
tools. Also provides:
XZ Utils is free general-purpose data compression software with high
compression ratio. XZ Utils were written for POSIX-like systems, but also
work on some not-so-POSIX systems.
XZ Utils are the successor to LZMA Utils.
- Average compression ratio 30% better than that of gzip and 15%
better than that of bzip2.
- Decompression speed is only little slower than that of gzip, being
two to five times faster than bzip2.
- In fast mode, compresses faster than bzip2 with a comparable
compression ratio.
- Achieving the best compression ratios takes four to even twelve
times longer than with bzip2. However. this doesn't affect
decompressing speed.
- Very similar command line interface than what gzip and bzip2 have.
The core of the XZ Utils compression code is based on LZMA SDK,
but it has been modified quite a lot to be suitable for XZ Utils.
The primary compression algorithm is currently LZMA2, which is used inside
the .xz container format. With typical files, XZ Utils create 30 % smaller
output than gzip and 15 % smaller output than bzip2.
%files -f %{name}.lang
%doc README THANKS
%{_bindir}/*
%{_mandir}/man1/*
XZ Utils consist of several components:
#----------------------------------------------------------------------------
* liblzma is a compression library with API similar to that of zlib.
* xz is a command line tool with syntax similar to that of gzip.
* xzdec is a decompression-only tool smaller than the full-featured xz tool.
* A set of shell scripts (xzgrep, xzdiff, etc.) have been adapted from gzip to
ease viewing, grepping, and comparing compressed files.
* Emulation of command line tools of LZMA Utils eases transition from LZMA
Utils to XZ Utils.
%package -n %{libname}
Summary: Libraries for decoding XZ/LZMA compression
@ -59,52 +58,53 @@ Group: System/Libraries
%description -n %{libname}
Libraries for decoding LZMA compression.
%files -n %{libname}
/%{_lib}/liblzma.so.%{major}*
%package -n uclibc-%{libname}
Summary: Libraries for decoding XZ/LZMA compression (uClibc build)
Group: System/Libraries
#----------------------------------------------------------------------------
%description -n uclibc-%{libname}
Libraries for decoding LZMA compression.
%package -n %{devname}
%package -n %{libdev}
Summary: Devel libraries & headers for liblzma
Group: Development/C
Requires: %{libname} = %{EVRD}
Provides: %{lname}-devel = %{EVRD}
Provides: lib%{lname}-devel = %{EVRD}
Provides: %{lname}-devel = %{version}-%{release}
Provides: lib%{lname}-devel = %{version}-%{release}
Requires: %{libname} = %{version}
%if %{with uclibc}
Requires: uclibc-%{libname} = %{version}
%endif
%description -n %{devname}
%description -n %{libdev}
Devel libraries & headers for liblzma.
%files -n %{devname}
%{_includedir}/%{lname}.h
%dir %{_includedir}/%{lname}
%{_includedir}/%{lname}/*.h
%{_libdir}/*.so
%{_libdir}/*.a
%if %{with dietlibc}
%{_prefix}/lib/dietlibc/lib-%{_arch}/liblzma.a
%endif
%if %{with uclibc}
%{uclibc_root}%{_libdir}/liblzma.a
%endif
%{_libdir}/pkgconfig/lib%{lname}.pc
#----------------------------------------------------------------------------
%prep
%setup -q
%setup -q -n %{name}-%{version}alpha
%patch0 -p1 -b .text~
%patch1 -p1 -b .day~
%build
export CONFIGURE_TOP=`pwd`
mkdir objs
pushd objs
CFLAGS="%{optflags} -O3 -funroll-loops" \
%configure2_5x
export CONFIGURE_TOP="$PWD"
%if %{with uclibc}
mkdir -p objsuclibc
pushd objsuclibc
%uclibc_configure \
--enable-shared \
--enable-static \
--disable-xz \
--disable-xzdec \
--disable-lzmadec \
--disable-lzmainfo \
--disable-lzma-links \
--disable-scripts
%make
popd
%endif
%if %{with dietlibc}
mkdir objsdietlibc
mkdir -p objsdietlibc
pushd objsdietlibc
CFLAGS="-Os" CC="diet gcc" \
%configure2_5x --disable-shared \
@ -119,37 +119,34 @@ CFLAGS="-Os" CC="diet gcc" \
popd
%endif
%if %{with uclibc}
mkdir objsuclibc
pushd objsuclibc
CFLAGS="%{uclibc_cflags}" LDFLAGS="%{?ldflags}" CC="%{uclibc_cc}" \
%configure2_5x --disable-shared \
--enable-static \
--disable-xz \
--disable-xzdec \
--disable-lzmadec \
--disable-lzmainfo \
--disable-lzma-links \
--disable-scripts
mkdir -p objs
pushd objs
CFLAGS="%{optflags} -Ofast -funroll-loops" \
%configure2_5x --enable-static
%make
popd
%endif
%install
%makeinstall_std -C objs
install -d %{buildroot}/%{_lib}
mv %{buildroot}%{_libdir}/*.so.* %{buildroot}/%{_lib}/
ln -sf ../../%{_lib}/liblzma.so.%{version} %{buildroot}%{_libdir}/liblzma.so
%if %{with uclibc}
install -D objsuclibc/src/liblzma/.libs/liblzma.a -D %{buildroot}%{uclibc_root}%{_libdir}/liblzma.a
%makeinstall_std -C objsuclibc
install -d %{buildroot}%{uclibc_root}/%{_lib}
rm %{buildroot}%{uclibc_root}%{_libdir}/liblzma.so
mv %{buildroot}%{uclibc_root}%{_libdir}/liblzma.so.%{major}* %{buildroot}%{uclibc_root}/%{_lib}
ln -sr %{buildroot}%{uclibc_root}/%{_lib}/liblzma.so.%{major}.* %{buildroot}%{uclibc_root}%{_libdir}/liblzma.so
rm -r %{buildroot}%{uclibc_root}%{_datadir} %{buildroot}%{uclibc_root}%{_libdir}/pkgconfig
%endif
%if %{with dietlibc}
install -D objsdietlibc/src/liblzma/.libs/liblzma.a -D %{buildroot}%{_prefix}/lib/dietlibc/lib-%{_arch}/liblzma.a
%endif
%makeinstall_std -C objs
install -d %{buildroot}/%{_lib}
rm %{buildroot}%{_libdir}/liblzma.so
mv %{buildroot}%{_libdir}/liblzma.so.%{major}* %{buildroot}/%{_lib}
ln -sr %{buildroot}/%{_lib}/liblzma.so.%{major}.* %{buildroot}%{_libdir}/liblzma.so
install -m755 %{SOURCE1} -D %{buildroot}%{_bindir}/xzme
%find_lang %{name}
@ -157,3 +154,31 @@ install -m755 %{SOURCE1} -D %{buildroot}%{_bindir}/xzme
%check
make check -C objs
%files -f %{name}.lang
%doc README THANKS
%{_bindir}/*
%{_mandir}/man1/*
%files -n %{libname}
/%{_lib}/liblzma.so.%{major}*
%if %{with uclibc}
%files -n uclibc-%{libname}
%{uclibc_root}/%{_lib}/liblzma.so.%{major}*
%endif
%files -n %{libdev}
%{_includedir}/%{lname}.h
%dir %{_includedir}/%{lname}
%{_includedir}/%{lname}/*.h
%{_libdir}/liblzma.so
%{_libdir}/liblzma.a
%if %{with dietlibc}
%{_prefix}/lib/dietlibc/lib-%{_arch}/liblzma.a
%endif
%if %{with uclibc}
%{uclibc_root}%{_libdir}/liblzma.a
%{uclibc_root}%{_libdir}/liblzma.so
%endif
%{_libdir}/pkgconfig/lib%{lname}.pc