From 3f035cee1da9f864609885e5ef2a1be77cd37eee Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:11:01 +0000 Subject: import xz-5.2.2-1.el7 --- diff --git a/.gitignore b/.gitignore index 94ad704..4d59a1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ SOURCES/xz-4.999.9beta.20100401git.tar.bz2 -SOURCES/xz-5.1.2alpha.tar.gz +SOURCES/xz-5.2.2.tar.gz diff --git a/.xz.metadata b/.xz.metadata index 1674c20..81f388c 100644 --- a/.xz.metadata +++ b/.xz.metadata @@ -1,2 +1,2 @@ bb0fd27570627e7316927619494568de3414402a SOURCES/xz-4.999.9beta.20100401git.tar.bz2 -b161f85b16cb86725022b8c58bce2c8228158852 SOURCES/xz-5.1.2alpha.tar.gz +14663612422ab61386673be78fbb2556f50a1f08 SOURCES/xz-5.2.2.tar.gz diff --git a/SOURCES/xz-5.1.2alpha-less-version-check.patch b/SOURCES/xz-5.1.2alpha-less-version-check.patch deleted file mode 100644 index 2381ddb..0000000 --- a/SOURCES/xz-5.1.2alpha-less-version-check.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/scripts/xzless.in b/src/scripts/xzless.in -index a3da697..288dd87 100644 ---- a/src/scripts/xzless.in -+++ b/src/scripts/xzless.in -@@ -46,7 +46,7 @@ if test "${LESSMETACHARS+set}" != set; then - LESSMETACHARS="$space$tab$nl'"';*?"()<>[|&^`#\$%=~' - fi - --if test "$(less -V | { read ver && echo ${ver#less }; })" -ge 429; then -+if test "$(less -V | { read less ver re && echo ${ver}; })" -ge 429; then - # less 429 or later: LESSOPEN pipe will be used on - # standard input if $LESSOPEN begins with |-. - LESSOPEN="|-$xz -cdfq -- %s" diff --git a/SOURCES/xz-5.1.2alpha-man-page-day.patch b/SOURCES/xz-5.1.2alpha-man-page-day.patch deleted file mode 100644 index 1d15a59..0000000 --- a/SOURCES/xz-5.1.2alpha-man-page-day.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff --git a/src/xz/message.c b/src/xz/message.c -index abbd171..ce953ac 100644 ---- a/src/xz/message.c -+++ b/src/xz/message.c -@@ -1110,7 +1110,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")); - -@@ -1120,7 +1121,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(_( -@@ -1152,6 +1154,10 @@ message_help(bool long_help) - " -e, --extreme try to improve compression ratio by using more CPU time;\n" - " does not affect decompressor memory requirements")); - -+ puts(_( -+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n" -+" to use the number of processor cores")); -+ - if (long_help) { - // FIXME? Mention something about threading? - puts(_( -@@ -1166,7 +1172,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")); - -diff --git a/src/xz/xz.1 b/src/xz/xz.1 -index 0368f05..e5da140 100644 ---- a/src/xz/xz.1 -+++ b/src/xz/xz.1 -@@ -912,7 +912,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 -diff --git a/src/xzdec/xzdec.c b/src/xzdec/xzdec.c -index b7830db..48ac1fe 100644 ---- a/src/xzdec/xzdec.c -+++ b/src/xzdec/xzdec.c -@@ -64,13 +64,15 @@ help(void) - "Usage: %s [OPTION]... [FILE]...\n" - "Uncompress files in the ." TOOL_FORMAT " format to the standard output.\n" - "\n" --" -c, --stdout (ignored)\n" --" -d, --decompress (ignored)\n" --" -k, --keep (ignored)\n" - " -q, --quiet specify *twice* to suppress errors\n" --" -Q, --no-warn (ignored)\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" diff --git a/SOURCES/xz-5.1.2alpha-xzgrep-and-h-option.patch b/SOURCES/xz-5.1.2alpha-xzgrep-and-h-option.patch deleted file mode 100644 index dfbdf35..0000000 --- a/SOURCES/xz-5.1.2alpha-xzgrep-and-h-option.patch +++ /dev/null @@ -1,23 +0,0 @@ -commit 5019413a055ce29e660dbbf15e02443cb5a26c59 -Author: Jeff Bastian -AuthorDate: Wed Apr 3 13:59:17 2013 +0200 -Commit: Lasse Collin -CommitDate: Fri Apr 5 19:14:50 2013 +0300 - - xzgrep: make the '-h' option to be --no-filename equivalent - - * src/scripts/xzgrep.in: Accept the '-h' option in argument parsing. - -diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in -index d8e9bb5..951266b 100644 ---- a/src/scripts/xzgrep.in -+++ b/src/scripts/xzgrep.in -@@ -109,7 +109,7 @@ while test $# -ne 0; do - files_with_matches=1;; - (-L | --files-witho*) - files_without_matches=1;; -- (--no-f*) -+ (-h | --no-f*) - no_filename=1;; - (-V | --v | --ve | --ver | --vers | --versi | --versio | --version) - echo "$version" || exit 2 diff --git a/SOURCES/xz-5.1.2alpha-xzgrep-exit-test.patch b/SOURCES/xz-5.1.2alpha-xzgrep-exit-test.patch deleted file mode 100644 index 352aa2d..0000000 --- a/SOURCES/xz-5.1.2alpha-xzgrep-exit-test.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 1e60f2c0a0ee6c18b02943ce56214799a70aac26 (HEAD, origin/master, origin/HEAD, master) -Author: Lasse Collin -AuthorDate: Wed Jun 11 21:03:25 2014 +0300 -Commit: Lasse Collin -CommitDate: Wed Jun 11 21:03:25 2014 +0300 - - xzgrep: Add a test for the previous fix. - - This is a simplified version of Pavel Raiskup's - original patch. - -diff --git a/tests/test_scripts.sh b/tests/test_scripts.sh -index 293929e..7ac1fea 100755 ---- a/tests/test_scripts.sh -+++ b/tests/test_scripts.sh -@@ -12,16 +12,18 @@ - # If scripts weren't built, this test is skipped. - XZ=../src/xz/xz - XZDIFF=../src/scripts/xzdiff --test -x "$XZ" || XZ= --test -x "$XZDIFF" || XZDIFF= --if test -z "$XZ" || test -z "$XZDIFF"; then -+XZGREP=../src/scripts/xzgrep -+ -+for i in XZ XZDIFF XZGREP; do -+ eval test -x "\$$i" && continue - (exit 77) - exit 77 --fi -+done - - PATH=`pwd`/../src/xz:$PATH - export PATH - -+test -z "$srcdir" && srcdir=. - preimage=$srcdir/files/good-1-check-crc32.xz - samepostimage=$srcdir/files/good-1-check-crc64.xz - otherpostimage=$srcdir/files/good-1-lzma2-1.xz -@@ -50,5 +52,21 @@ if test "$status" != 2 ; then - exit 1 - fi - -+# The exit status must be 0 when a match was found at least from one file, -+# and 1 when no match was found in any file. -+for pattern in el Hello NOMATCH; do -+ for opts in "" "-l" "-h" "-H"; do -+ "$XZGREP" $opts $pattern \ -+ "$srcdir/files/good-1-lzma2-1.xz" \ -+ "$srcdir/files/good-2-lzma2.xz" > /dev/null 2>&1 -+ status=$? -+ test $status = 0 && test $pattern != NOMATCH && continue -+ test $status = 1 && test $pattern = NOMATCH && continue -+ echo "wrong exit status from xzgrep" -+ (exit 1) -+ exit 1 -+ done -+done -+ - (exit 0) - exit 0 diff --git a/SOURCES/xz-5.1.2alpha-xzgrep-exit.patch b/SOURCES/xz-5.1.2alpha-xzgrep-exit.patch deleted file mode 100644 index a64b464..0000000 --- a/SOURCES/xz-5.1.2alpha-xzgrep-exit.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit ceca37901783988204caaf40dff4623d535cc789 -Author: Lasse Collin -AuthorDate: Wed Jun 11 20:43:28 2014 +0300 -Commit: Lasse Collin -CommitDate: Wed Jun 11 20:43:28 2014 +0300 - - xzgrep: exit 0 when at least one file matches. - - Mimic the original grep behavior and return exit_success when - at least one xz compressed file matches given pattern. - - Original bugreport: - https://bugzilla.redhat.com/show_bug.cgi?id=1108085 - - Thanks to Pavel Raiskup for the patch. - -diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in -index 951266b..018915f 100644 ---- a/src/scripts/xzgrep.in -+++ b/src/scripts/xzgrep.in -@@ -147,7 +147,9 @@ if test $# -eq 0; then - fi - - exec 3>&1 --res=0 -+ -+# res=1 means that no file matched yet -+res=1 - - for i; do - case $i in -@@ -195,8 +197,17 @@ for i; do - fi >&3 5>&- - ) - r=$? -+ -+ # fail occured previously, nothing worse can happen -+ test $res -gt 1 && continue -+ - test "$xz_status" -eq 0 || test "$xz_status" -eq 2 \ - || test "$(kill -l "$xz_status" 2> /dev/null)" = "PIPE" || r=2 -- test $res -lt $r && res=$r -+ -+ # still no match -+ test $r -eq 1 && continue -+ -+ # 0 == match, >=2 == fail -+ res=$r - done - exit $res diff --git a/SOURCES/xz-5.2.2-compat-libs.patch b/SOURCES/xz-5.2.2-compat-libs.patch new file mode 100644 index 0000000..23670c1 --- /dev/null +++ b/SOURCES/xz-5.2.2-compat-libs.patch @@ -0,0 +1,35 @@ +We provided two 5.1.2alpha symbols (lzma_stream_encoder_mt and +lzma_stream_encoder_mt_memusage) before we updated to xz-5.2.2-1 in RHEL7.3. + +Those symbols did not change ABI in 5.2.2 so it should be safe to provide +(except for 5.0 and 5.2 symbols) also the two 5.1.2alpha symbols and +use 5.1.2alpha symbol version as parent for 5.2. + +For better reasoning look at container.h in 5.1.2alpha -- those two symbols +were for testing purposes only, and thus not considered to be API/ABI. + +diff --git a/src/liblzma/liblzma.map b/src/liblzma/liblzma.map +index f53a4ea..9c3002a 100644 +--- a/src/liblzma/liblzma.map ++++ b/src/liblzma/liblzma.map +@@ -95,7 +95,13 @@ global: + lzma_vli_size; + }; + +-XZ_5.2 { ++XZ_5.1.2alpha { ++global: ++ lzma_stream_encoder_mt; ++ lzma_stream_encoder_mt_memusage; ++} XZ_5.0; ++ ++XZ_5.2.2 { + global: + lzma_block_uncomp_encode; + lzma_cputhreads; +@@ -105,4 +111,4 @@ global: + + local: + *; +-} XZ_5.0; ++} XZ_5.1.2alpha; diff --git a/SOURCES/xz-5.2.2-man-page-day.patch b/SOURCES/xz-5.2.2-man-page-day.patch new file mode 100644 index 0000000..c958e3e --- /dev/null +++ b/SOURCES/xz-5.2.2-man-page-day.patch @@ -0,0 +1,82 @@ +From 66a2cc02d631b9b5103467a9c15fccc17faef8bd Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup +Date: Fri, 4 Mar 2016 13:33:46 +0100 +Subject: [PATCH] man-page-day fixes + +This is to not let the man-page-day script report issues against +xz again, even though this has not been accepted upsttream. + +TODO: Blacklist this in man-page-day testsuite. +--- + src/xz/message.c | 8 +++++--- + src/xz/xz.1 | 2 +- + src/xzdec/xzdec.c | 6 ++++-- + 3 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/src/xz/message.c b/src/xz/message.c +index f88c123..f4ebddc 100644 +--- a/src/xz/message.c ++++ b/src/xz/message.c +@@ -1091,7 +1091,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")); + +@@ -1101,7 +1102,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(_( +@@ -1157,7 +1159,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")); + +diff --git a/src/xz/xz.1 b/src/xz/xz.1 +index bc5514d..b4406d6 100644 +--- a/src/xz/xz.1 ++++ b/src/xz/xz.1 +@@ -1022,7 +1022,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 +diff --git a/src/xzdec/xzdec.c b/src/xzdec/xzdec.c +index 5cb7530..6cab322 100644 +--- a/src/xzdec/xzdec.c ++++ b/src/xzdec/xzdec.c +@@ -64,9 +64,11 @@ help(void) + "Usage: %s [OPTION]... [FILE]...\n" + "Decompress files in the ." TOOL_FORMAT " format to standard output.\n" + "\n" +-" -d, --decompress (ignored, only decompression is supported)\n" ++" -d, --decompress, --uncompress\n" ++" (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" ++" -c, --stdout, --to-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" +-- +2.5.0 + diff --git a/SPECS/xz.spec b/SPECS/xz.spec index 13413fd..363f475 100644 --- a/SPECS/xz.spec +++ b/SPECS/xz.spec @@ -2,38 +2,26 @@ Summary: LZMA compression utilities Name: xz -Version: 5.1.2 -Release: 12alpha%{?dist} +Version: 5.2.2 +Release: 1%{?dist} License: LGPLv2+ Group: Applications/File # official upstream release -Source0: http://tukaani.org/%{name}/%{name}-%{version}alpha.tar.gz +Source0: http://tukaani.org/%{name}/%{name}-%{version}.tar.gz # source created as "make dist" in checked out GIT tree Source1: %{compat_ver}.20100401git.tar.bz2 URL: http://tukaani.org/%{name}/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: %{name}-libs = %{version}-%{release} -# partly upstream/partly not (yet?) +# downstream # ~> proposal: http://www.mail-archive.com/xz-devel@tukaani.org/msg00153.html # ~> #948533 -Patch0: xz-5.1.2alpha-man-page-day.patch +Patch0: xz-5.2.2-man-page-day.patch -# fix 'xzgrep -h' to behave as expected -# ~> upstream (5019413a0) -# ~> #850898 -Patch1: xz-5.1.2alpha-xzgrep-and-h-option.patch - -# fix less version checking -# ~> upstream (db5c1817fa, 9e6dabcf22) -# ~> #1082639, #1015924 -Patch2: xz-5.1.2alpha-less-version-check.patch - -# fix for bad xzgrep exit value when not _all_ files match -# ~> upstream (ceca37901783) -# ~> #1109123 -Patch3: xz-5.1.2alpha-xzgrep-exit.patch -Patch4: xz-5.1.2alpha-xzgrep-exit-test.patch +# Make sure the alpha symbols' version are kept in RHEL7. +# ~> downstream +Patch1: xz-5.2.2-compat-libs.patch %description XZ Utils are an attempt to make LZMA compression easy to use on free (as in @@ -86,12 +74,9 @@ The lzma-compat package contains compatibility links for older commands that deal with the older LZMA format. %prep -%setup -q -a1 -n %{name}-%{version}alpha +%setup -q -a1 -n %{name}-%{version} %patch0 -p1 -b .man-page-day -%patch1 -p1 -b .xzgrep-and-h-option -%patch2 -p1 -b .less-version-check -%patch3 -p1 -b .xzgrep-exit-status -%patch4 -p1 -b .xzgrep-exit-status-test +%patch1 -p1 -b .xzgrep-exit-status-test for i in `find . -name config.sub`; do perl -pi -e "s/ppc64-\*/ppc64-\* \| ppc64p7-\*/" $i @@ -169,6 +154,9 @@ rm -rf %{buildroot} %{_mandir}/man1/*lz* %changelog +* Fri Mar 04 2016 Pavel Raiskup - 5.2.2-1 +- rebase to stable release (rhbz#1190713, rhbz#1160193) + * Wed Jul 08 2015 Pavel Raiskup - 5.1.2-12alpha - xzgrep: return 0 when at least one file matches (rhbz#1109123)