Sync from SUSE:SLFO:Main xz revision fac7e79d51f614b879618042a83a82ab

This commit is contained in:
Adrian Schröter 2024-05-04 02:19:02 +02:00
commit ac536ebd6d
9 changed files with 1579 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

4
baselibs.conf Normal file
View File

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

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

Binary file not shown.

BIN
xz-5.4.3.tar.gz.sig Normal file

Binary file not shown.

1100
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-----
mQINBGOsX3EBEADZxyfiZVg7aub+JoBG+sPChHUwbJc+SH7BWOPbu4HLNfk6ZUzi
/JSBYIG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cY2fkItqcRDiPQJ7FuEAnRAa8SfcFLUG9cwHg7RmeSp5WrfOw+7xdqj1ImF
ABEBAAGJAjwEGAEKACYWIQQi1GXytMFzgDsgxt5Z/PIH/qf0RQUCY6xfcQIbDAUJ
CWYBgAAKCRBZ/PIH/qf0RW8dD/9tQqJ4bcRXLPXrQzbBiMpRBiLqRxlpeS2nwFUr
ryv7JCbAbgZ4GqKa3tR/5oUfICZwgSJhVUMeFfUtDAOuLVRBEHAksVxztUxpAVzF
2tH6ZrvTI26tzFQw5U+xrTEl3eazNgZF6Qsqv5313RI8SrUAhv95s0A8CdVIi3RZ
5LPPsoT/XggtaSz28iSaZxDChjY5jNNvC8sjp445+egpglXxjR24otShUDaZLd6Y
LfMHTR1raOoIZd8lbRoUAJ32vkXu2UUPgI6GC0HaEyHQQ3faG5SGUrcWuA6XOD9p
7Xtu3SDgAUE6gbxUeCQWiFm2c+dEoldtr4n3BXIOOKfPHi/hiNVDmGWzPsB2XzCb
oUPHfWj4p54I+IFf+wt3IuR0H9OqXipL/9yE2cHkp7zaIVuc43xPa2FVOkJL0XnF
M67tSMKVaKFA6myewHDrteBDyZVt4IH8clejhs6cwWOf9DOcbPQO1C94vMc+Glah
oCL0FGS1mU/CumiNB1zCP0o29IUXQvLk/mM8w/zL65sfilbfm7kLk1l8UOy/pUxk
4U9Kpv79Z7aIUwSZVXkkfQuHlmGCm0y6QKLTaZQL68uDXrMpWO2O2B+tOCJibGFz
ecPedd7w77GKqjMHXcVX3Hd2wnZAMTwIJsjHG4qO/LfA8jze5+Ohd3qzilP7ziwm
aK5MKg==
=d3XT
-----END PGP PUBLIC KEY BLOCK-----

181
xz.spec Normal file
View File

@ -0,0 +1,181 @@
#
# spec file for package xz
#
# Copyright (c) 2023 SUSE LLC
#
# 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
%define _binary_payload w9.bzdio
Name: xz
Version: 5.4.3
Release: 0
Summary: A Program for Compressing Files with the LempelZivMarkov algorithm
License: GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND SUSE-Public-Domain
Group: Productivity/Archiving/Compression
URL: https://tukaani.org/xz/
Source0: https://tukaani.org/xz/%{name}-%{version}.tar.gz
Source1: https://tukaani.org/xz/%{name}-%{version}.tar.gz.sig
Source2: baselibs.conf
Source3: https://tukaani.org/misc/jia_tan_pubkey.txt#/%{name}.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: SUSE-Public-Domain
Group: System/Libraries
%description -n liblzma5
Library for encoding/decoding LZMA files.
%package devel
Summary: Development package for the LZMA library
License: SUSE-Public-Domain
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.
%prep
%autosetup
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
export CFLAGS="%{optflags} -D_REENTRANT -pipe -fPIE"
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
%configure \
--with-pic \
--docdir=%{_docdir}/%{name} \
--disable-static
%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
rm -vf %{buildroot}%{_docdir}/%{name}/{COPYING,COPYING.GPLv2}
%post -n liblzma5 -p /sbin/ldconfig
%postun -n liblzma5 -p /sbin/ldconfig
%files lang -f %{name}.lang
%dir %{_mandir}/fr
%dir %{_mandir}/de
%dir %{_mandir}/ko
%if 0%{?suse_version} == 1500
%dir %{_mandir}/ro
%dir %{_mandir}/uk
%endif
%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 -n liblzma5
%{_libdir}/liblzma.so.5*
%files devel
%{_includedir}/lzma.h
%dir %{_includedir}/lzma/
%{_includedir}/lzma/*
%{_libdir}/liblzma.so
%{_libdir}/pkgconfig/liblzma.pc
%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
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.