xz 5.6.4, now with 75% fewer backdoors

OBS-URL: https://build.opensuse.org/package/show/Base:System/xz?expand=0&rev=169
This commit is contained in:
Dirk Mueller 2025-02-05 16:04:58 +00:00 committed by Git OBS Bridge
commit 0926830515
14 changed files with 1797 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

4
baselibs.conf Normal file
View File

@ -0,0 +1,4 @@
liblzma5
xz-devel
requires -xz-<targettype>
requires "liblzma5-<targettype> = <version>"

BIN
xz-5.6.2.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
xz-5.6.2.tar.xz.sig Normal file

Binary file not shown.

3
xz-5.6.3.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:db0590629b6f0fa36e74aea5f9731dc6f8df068ce7b7bafa45301832a5eebc3a
size 1328224

BIN
xz-5.6.3.tar.xz.sig Normal file

Binary file not shown.

3
xz-5.6.4.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:829ccfe79d769748f7557e7a4429a64d06858e27e1e362e25d01ab7b931d9c95
size 1340516

BIN
xz-5.6.4.tar.xz.sig Normal file

Binary file not shown.

1273
xz.changes Normal file

File diff suppressed because it is too large Load Diff

52
xz.keyring Normal file
View File

@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBEzEOZIBEACxg/IuXERlDB48JBWmF4NxNUuuup1IhJAJyFGFSKh3OGAO2Ard
sNuRLjANsFXA7m7P5eTFcG+BoHHuAVYmKnI3PPZtHVLnUt4pGItPczQZ2BE1WpcI
ayjGTBJeKItX3Npqg9D/odO9WWS1i3FQPVdrLn0YH37/BA66jeMQCRo7g7GLpaNf
IrvYGsqTbxCwsmA37rpE7oyU4Yrf74HT091WBsRIoq/MelhbxTDMR8eu/dUGZQVc
Kj3lN55RepwWwUUKyqarY0zMt4HkFJ7v7yRL+Cvzy92Ouv4Wf2FlhNtEs5LE4Tax
W0PO5AEmUoKjX87SezQK0f652018b4u6Ex52cY7p+n5TII/UyoowH6+tY8UHo9yb
fStrqgNE/mY2bhA6+AwCaOUGsFzVVPTbjtxL3HacUP/jlA1h78V8VTvTs5d55iG7
jSqR9o05wje8rwNiXXK0xtiJahyNzL97Kn/DgPSqPIi45G+8nxWSPFM5eunBKRl9
vAnsvwrdPRsR6YR3uMHTuVhQX9/CY891MHkaZJ6wydWtKt3yQwJLYqwo5d4DwnUX
CduUwSKv+6RmtWI5ZmTQYOcBRcZyGKml9X9Q8iSbm6cnpFXmLrNQwCJN+D3SiYGc
MtbltZo0ysPMa6Xj5xFaYqWk/BI4iLb2Gs+ByGo/+a0Eq4XYBMOpitNniQARAQAB
tCdMYXNzZSBDb2xsaW4gPGxhc3NlLmNvbGxpbkB0dWthYW5pL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sP20TGM
BrvbI8qMCM1gH58vcBWBHtpm2kGEjVdJyl75RgjCf1VHqPab6A0/+tABGlLf5rm9
kxOmb2wDCW8xPno/A8psVWcYE7gERT6Bdqbkr3SZw92izGCA4m17O1MPf6vj/ngb
RROvuEI11HLOmBJv
=m5Nx
-----END PGP PUBLIC KEY BLOCK-----

219
xz.spec Normal file
View File

@ -0,0 +1,219 @@
#
# spec file for package xz
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# avoid bootstrapping problem
%if 0%{?suse_version} == 1500
%bcond_without static
%else
%bcond_with static
%endif
Name: xz
Version: 5.6.4
Release: 0
Summary: A Program for Compressing Files with the LempelZivMarkov algorithm
License: 0BSD AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later
Group: Productivity/Archiving/Compression
URL: https://tukaani.org/xz/
Source0: https://github.com/tukaani-project/xz/releases/download/v%{version}/xz-%{version}.tar.xz
Source1: https://github.com/tukaani-project/xz/releases/download/v%{version}/xz-%{version}.tar.xz.sig
Source2: baselibs.conf
Source3: https://tukaani.org/misc/lasse_collin_pubkey.txt#/xz.keyring
Source4: xznew
Source5: xznew.1
BuildRequires: pkgconfig
Provides: lzma = %{version}
Obsoletes: lzma < %{version}
%{?suse_build_hwcaps_libs}
%description
The xz command is a program for compressing files.
* Average compression ratio of LZMA is about 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 does not affect
decompressing speed.
* Very similar command line interface to what gzip and bzip2 have.
%lang_package
%package -n liblzma5
Summary: LempelZivMarkov chain algorithm compression library
License: 0BSD
Group: System/Libraries
%description -n liblzma5
Library for encoding/decoding LZMA files.
%package devel
Summary: Development package for the LZMA library
License: 0BSD
Group: Development/Libraries/C and C++
Requires: liblzma5 = %{version}
Provides: lzma-devel = %{version}
Obsoletes: lzma-devel < %{version}
Provides: lzma-alpha-devel = %{version}
Obsoletes: lzma-alpha-devel < %{version}
%description devel
This package contains the header files and libraries needed for
compiling programs using the LZMA library.
%if %{with static}
%package static-devel
Summary: Static version of LZMA library
License: SUSE-Public-Domain
Group: Development/Libraries/C and C++
Requires: xz-devel = %{version}
%description static-devel
Static library for the LZMA library
%endif
%prep
%autosetup -p1
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
export CFLAGS="%{optflags} -D_REENTRANT -pipe -fPIE"
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
# Either we build it without pic enabled, or we build one at a time
%if %{with static}
%configure \
--with-pic \
--docdir=%{_docdir}/%{name} \
--disable-shared CONFIG_SHELL=/bin/sh
%make_build
cp ./src/liblzma/.libs/liblzma.a liblzma.a
%endif
%configure \
--with-pic \
--docdir=%{_docdir}/%{name} \
--disable-static CONFIG_SHELL=/bin/sh
%if 0%{?do_profiling}
%make_build CFLAGS="${CFLAGS} %{cflags_profile_generate}"
%make_build
%make_build clean
%make_build CFLAGS="${CFLAGS} %{cflags_profile_feedback}"
%else
%make_build
%endif
%check
%make_build check
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name} --all-name --with-man
install -Dpm 0755 %{SOURCE4} %{buildroot}%{_bindir}/xznew
install -Dpm 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/xznew.1
%if %{with static}
install -Dpm 0644 liblzma.a %{buildroot}%{_libdir}/
%endif
rm -vf %{buildroot}%{_docdir}/%{name}/{COPYING,COPYING.GPLv2}
%ldconfig_scriptlets -n liblzma5
%files
%license COPYING COPYING.GPLv2
%{_docdir}/%{name}
%{_bindir}/lzcat
%{_bindir}/lzcmp
%{_bindir}/lzdiff
%{_bindir}/lzegrep
%{_bindir}/lzfgrep
%{_bindir}/lzgrep
%{_bindir}/lzless
%{_bindir}/lzma
%{_bindir}/lzmadec
%{_bindir}/lzmainfo
%{_bindir}/lzmore
%{_bindir}/unlzma
%{_bindir}/unxz
%{_bindir}/xz
%{_bindir}/xzcat
%{_bindir}/xzcmp
%{_bindir}/xzdec
%{_bindir}/xzdiff
%{_bindir}/xzegrep
%{_bindir}/xzfgrep
%{_bindir}/xzgrep
%{_bindir}/xzless
%{_bindir}/xzmore
%{_bindir}/xznew
%{_mandir}/man1/lzcat.1%{?ext_man}
%{_mandir}/man1/lzcmp.1%{?ext_man}
%{_mandir}/man1/lzdiff.1%{?ext_man}
%{_mandir}/man1/lzegrep.1%{?ext_man}
%{_mandir}/man1/lzfgrep.1%{?ext_man}
%{_mandir}/man1/lzgrep.1%{?ext_man}
%{_mandir}/man1/lzless.1%{?ext_man}
%{_mandir}/man1/lzma.1%{?ext_man}
%{_mandir}/man1/lzmadec.1%{?ext_man}
%{_mandir}/man1/lzmainfo.1%{?ext_man}
%{_mandir}/man1/lzmore.1%{?ext_man}
%{_mandir}/man1/unlzma.1%{?ext_man}
%{_mandir}/man1/unxz.1%{?ext_man}
%{_mandir}/man1/xz.1%{?ext_man}
%{_mandir}/man1/xzcat.1%{?ext_man}
%{_mandir}/man1/xzcmp.1%{?ext_man}
%{_mandir}/man1/xzdec.1%{?ext_man}
%{_mandir}/man1/xzdiff.1%{?ext_man}
%{_mandir}/man1/xzegrep.1%{?ext_man}
%{_mandir}/man1/xzfgrep.1%{?ext_man}
%{_mandir}/man1/xzgrep.1%{?ext_man}
%{_mandir}/man1/xzless.1%{?ext_man}
%{_mandir}/man1/xzmore.1%{?ext_man}
%{_mandir}/man1/xznew.1%{?ext_man}
%files lang -f %{name}.lang
%license COPYING COPYING.GPLv2
%dir %{_mandir}/fr
%dir %{_mandir}/de
%dir %{_mandir}/ko
%if 0%{?suse_version} == 1500
%dir %{_mandir}/ro
%dir %{_mandir}/uk
%endif
%files -n liblzma5
%license COPYING COPYING.GPLv2
%{_libdir}/liblzma.so.5*
%files devel
%license COPYING COPYING.GPLv2
%{_includedir}/lzma.h
%dir %{_includedir}/lzma/
%{_includedir}/lzma/*
%{_libdir}/liblzma.so
%{_libdir}/pkgconfig/liblzma.pc
%if %{with static}
%files static-devel
%license COPYING COPYING.GPLv2
%{_libdir}/liblzma.a
%endif
%changelog

177
xznew Normal file
View File

@ -0,0 +1,177 @@
#!/bin/sh
# Copyright (C) 2015 Hans-Peter Jansen
# Copyright (C) 1998, 2002, 2004 Free Software Foundation
# Copyright (C) 1993 Jean-loup Gailly
# 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
PATH="/usr/bin:$PATH"; export PATH
check=0
pipe=0
opt=
files=
keep=0
res=0
old=0
new=0
block=1024
# block is the disk block size (best guess, need not be exact)
warn="(does not preserve modes and timestamp)"
tmp=`mktemp -d ${TMPDIR-/tmp}/zfoo.XXXXXX` || {
echo 'cannot create temporary directory' >&2
exit 1
}
trap "rm -rf $tmp/" 0 1 2 3 6 13 15
set -C
echo hi > $tmp/1
echo hi > $tmp/2
if test -z "`(${CPMOD-cpmod} $tmp/1 $tmp/2) 2>&1`"; then
cpmod=${CPMOD-cpmod}
warn=""
fi
if test -z "$cpmod" && ${TOUCH-touch} -r $tmp/1 $tmp/2 2>/dev/null; then
cpmod="${TOUCH-touch}"
cpmodarg="-r"
warn="(does not preserve file modes)"
fi
# check about xz extension
xz $tmp/1 > /dev/null 2>&1
ext=`echo $tmp/1* | sed "s|$tmp/1||"`
rm -rf $tmp/
trap - 0 1 2 3 6 13 15
if test -z "$ext"; then
echo xznew: error determining xz extension
exit 1
fi
if test "$ext" = ".gz"; then
echo xznew: cannot use .gz as xz extension.
exit 1
fi
for arg
do
case "$arg" in
-*) opt="$opt $arg"; shift;;
*) break;;
esac
done
if test $# -eq 0; then
echo "recompress .gz or .tgz files into $ext (xz) files"
echo usage: `echo $0 | sed 's,^.*/,,'` "[-tv9KP]" file.gz...
echo " -t tests the new files before deleting originals"
echo " -v be verbose"
echo " -9 use the slowest compression method (optimal compression)"
echo " -K keep a .gz file when it is smaller than the $ext file"
echo " -P use pipes for the conversion $warn"
exit 1
fi
opt=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'`
case "$opt" in
*t*) check=1; opt=`echo "$opt" | sed 's/t//g'`
esac
case "$opt" in
*K*) keep=1; opt=`echo "$opt" | sed 's/K//g'`
esac
case "$opt" in
*P*) pipe=1; opt=`echo "$opt" | sed 's/P//g'`
esac
if test -n "$opt"; then
opt="-$opt"
fi
for i do
m=`echo $i | sed 's/\.tgz$//'`
if test -f "$m.tgz" ; then
echo "Renaming file *.tgz to *.tar.gz"
mv "$i" "$m.tar.gz"
n=`echo $i | sed 's/\.tgz$/\.tar/'`
else
n=`echo $i | sed 's/\.gz$//'`
fi
if test ! -f "$n.gz" ; then
echo $n.gz not found
res=1; continue
fi
test $keep -eq 1 && old=`wc -c < "$n.gz"`
if test $pipe -eq 1; then
if gzip -d < "$n.gz" | xz $opt > "$n$ext"; then
# Copy file attributes from old file to new one, if possible.
test -n "$cpmod" && $cpmod $cpmodarg "$n.gz" "$n$ext" 2> /dev/null
else
echo error while recompressing $n.gz
res=1; continue
fi
else
if test $check -eq 1; then
if cp -p "$n.gz" "$n.$$" 2> /dev/null || cp "$n.gz" "$n.$$"; then
:
else
echo cannot backup "$n.gz"
res=1; continue
fi
fi
if gzip -d "$n.gz"; then
:
else
test $check -eq 1 && mv "$n.$$" "$n.gz"
echo error while uncompressing $n.gz
res=1; continue
fi
if xz $opt "$n"; then
:
else
if test $check -eq 1; then
mv "$n.$$" "$n.gz" && rm -f "$n"
echo error while recompressing $n
else
# gzip $n (might be dangerous if disk full)
echo error while recompressing $n, left uncompressed
fi
res=1; continue
fi
fi
test $keep -eq 1 && new=`wc -c < "$n$ext"`
if test $keep -eq 1 && test `expr \( $old + $block - 1 \) / $block` -lt \
`expr \( $new + $block - 1 \) / $block`; then
if test $pipe -eq 1; then
rm -f "$n$ext"
elif test $check -eq 1; then
mv "$n.$$" "$n.gz" && rm -f "$n$ext"
else
xz -d "$n$ext" && gzip "$n" && rm -f "$n$ext"
fi
echo "$n.gz smaller than $n$ext -- unchanged"
elif test $check -eq 1; then
if xz -t "$n$ext" ; then
rm -f "$n.$$" "$n.gz"
else
test $pipe -eq 0 && mv "$n.$$" "$n.gz"
rm -f "$n$ext"
echo error while testing $n$ext, $n.gz unchanged
res=1; continue
fi
elif test $pipe -eq 1; then
rm -f "$n.gz"
fi
done
exit $res

39
xznew.1 Normal file
View File

@ -0,0 +1,39 @@
.TH XZNEW 1
.SH NAME
xznew \- recompress .gz or .tgz files to .xz files
.SH SYNOPSIS
.B xznew
[ -ftv9PK] [ name.gz ... ]
.SH DESCRIPTION
.I xznew
recompresses files from .gz (gzip) format to .xz (xz) format.
If you want to recompress a file already in xz format, rename the file
to force a .xz extension then apply xznew.
.SH OPTIONS
.TP
.B \-f
Force recompression from .gz to .xz format even if a .xz file already exists.
.TP
.B \-t
Tests the new files before deleting originals.
.TP
.B \-v
Verbose. Display the name and percentage reduction for each file compressed.
.TP
.B \-9
Use the slowest compression method (optimal compression).
.TP
.B \-P
Use pipes for the conversion to reduce disk space usage.
.TP
.B \-K
Keep a .gz file when it is smaller than the .xz file
.SH "SEE ALSO"
xz(1), gzip(1)
.SH BUGS
.I xznew
does not maintain the time stamp with the -P option if
.I cpmod(1)
is not available and
.I touch(1)
does not support the -r option.