mirror of
https://git.tukaani.org/xz.git
synced 2025-12-18 11:28:45 +00:00
Compare commits
No commits in common. "master" and "v5.8.1" have entirely different histories.
42
.github/workflows/ci.yml
vendored
42
.github/workflows/ci.yml
vendored
@ -18,34 +18,26 @@ on:
|
||||
# Allows running workflow manually
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
POSIX:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
build_system: [autotools, cmake]
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4.1.6
|
||||
|
||||
########################
|
||||
# Install Dependencies #
|
||||
########################
|
||||
|
||||
# Install Autotools on Linux
|
||||
- name: Install Dependencies
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.build_system == 'autotools' }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y autoconf automake build-essential po4a autopoint doxygen musl-tools valgrind
|
||||
|
||||
- name: Install Dependencies
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
|
||||
run: |
|
||||
sudo apt-get install -y gcc-multilib
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y autoconf automake build-essential po4a autopoint gcc-multilib doxygen musl-tools valgrind
|
||||
|
||||
# Install Autotools on Mac
|
||||
- name: Install Dependencies
|
||||
@ -54,15 +46,15 @@ jobs:
|
||||
|
||||
# Install CMake on Linux
|
||||
- name: Install Dependencies
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.build_system == 'cmake' }}
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'cmake' }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential cmake gettext doxygen musl-tools
|
||||
sudo apt-get install -y build-essential cmake gettext musl-tools
|
||||
|
||||
# Install CMake on Mac
|
||||
- name: Install Dependencies
|
||||
if: ${{ matrix.os == 'macos-latest' && matrix.build_system == 'cmake' }}
|
||||
run: brew install cmake gettext doxygen
|
||||
run: brew install cmake gettext
|
||||
|
||||
##################
|
||||
# Build and Test #
|
||||
@ -89,33 +81,33 @@ jobs:
|
||||
# the /proc/ filesystem on Linux, which is used by the sanitizer's
|
||||
# instrumentation.
|
||||
- name: Build with -fsanitize=address,undefined
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.build_system == 'autotools' }}
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
|
||||
run: ./build-aux/ci_build.bash -b autotools -p build -f "-fsanitize=address,undefined" -d sandbox
|
||||
- name: Test with -fsanitize=address,undefined
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.build_system == 'autotools' }}
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
|
||||
run: |
|
||||
export UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1
|
||||
./build-aux/ci_build.bash -b autotools -p test -f "-fsanitize=address,undefined" -d sandbox
|
||||
cd ../xz_build && make distclean
|
||||
|
||||
- name: Build with Valgrind
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.build_system == 'autotools' }}
|
||||
run: ./build-aux/ci_build.bash -b autotools -p build -d shared,sandbox
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
|
||||
run: ./build-aux/ci_build.bash -b autotools -p build -d sandbox
|
||||
- name: Test with Valgrind
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.build_system == 'autotools' }}
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
|
||||
run: |
|
||||
./build-aux/ci_build.bash -b autotools -p test -d sandbox -w "valgrind --quiet --trace-children=yes --trace-children-skip=*/cmp,*/cp,*/diff,*/grep,*/rm,*/sed --exit-on-first-error=yes --error-exitcode=1"
|
||||
./build-aux/ci_build.bash -b autotools -p test -d sandbox -w "valgrind --quiet --trace-children=yes --trace-children-skip-by-arg=ls,cp,sed,grep,bash,sh --exit-on-first-error=yes --error-exitcode=1"
|
||||
cd ../xz_build && make distclean
|
||||
|
||||
- name: Build with musl libc
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') }}
|
||||
if: ${{ matrix.os == 'ubuntu-latest'}}
|
||||
run: ./build-aux/ci_build.bash -b ${{ matrix.build_system }} -p build -m "/usr/bin/musl-gcc"
|
||||
- name: Test with musl libc
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') }}
|
||||
if: ${{ matrix.os == 'ubuntu-latest'}}
|
||||
run: |
|
||||
./build-aux/ci_build.bash -b ${{ matrix.build_system }} -p test -m "/usr/bin/musl-gcc"
|
||||
- name: Clean up musl libc run
|
||||
if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.build_system == 'autotools' }}
|
||||
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
|
||||
run: cd ../xz_build && make distclean
|
||||
|
||||
- name: Build with full features
|
||||
@ -164,7 +156,7 @@ jobs:
|
||||
run: ./build-aux/ci_build.bash -b ${{ matrix.build_system }} -d small -p test -n small
|
||||
|
||||
# Attempt to upload the test logs as artifacts if any step has failed
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v4.3.3
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: ${{ matrix.os }} ${{ matrix.build_system }} Test Logs
|
||||
|
||||
55
.github/workflows/cifuzz.yml
vendored
55
.github/workflows/cifuzz.yml
vendored
@ -1,55 +0,0 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
# Authors: Sam James
|
||||
# Lasse Collin
|
||||
#
|
||||
# This was written based on the OSS-Fuzz docs:
|
||||
# https://google.github.io/oss-fuzz/getting-started/continuous-integration/
|
||||
|
||||
name: CIFuzz
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
CIFuzz:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sanitizer: [ address, undefined, memory ]
|
||||
|
||||
steps:
|
||||
- name: Build Fuzzers (${{ matrix.sanitizer }})
|
||||
id: build
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'xz'
|
||||
# The language must match the one in project.yaml in OSS-Fuzz:
|
||||
# https://github.com/google/oss-fuzz/blob/master/projects/xz/project.yaml
|
||||
# Thus, use C++ even though there are no C++ files in XZ Utils.
|
||||
language: c++
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
|
||||
- name: Run Fuzzers (${{ matrix.sanitizer }})
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'xz'
|
||||
language: c++
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
fuzz-seconds: 600
|
||||
report-timeouts: true
|
||||
report-ooms: true
|
||||
|
||||
- name: Upload Crash
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure() && steps.build.outcome == 'success'
|
||||
with:
|
||||
name: ${{ matrix.sanitizer }}-artifacts
|
||||
path: ./out/artifacts
|
||||
38
.github/workflows/coverity.yml
vendored
38
.github/workflows/coverity.yml
vendored
@ -1,38 +0,0 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
name: Coverity Scan
|
||||
|
||||
# We only want to test a special branch, per
|
||||
# https://docs.travis-ci.com/user/coverity-scan/#build-submission-frequency
|
||||
on:
|
||||
push:
|
||||
branches: [coverity_scan]
|
||||
|
||||
jobs:
|
||||
coverity:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -q
|
||||
sudo apt-get install -qy autoconf automake build-essential autopoint gcc-multilib
|
||||
|
||||
- name: Run autogen.sh
|
||||
run: ./autogen.sh --no-po4a
|
||||
|
||||
- name: Run configure
|
||||
run: ./configure --enable-debug --disable-silent-rules
|
||||
|
||||
# Coverity doesn't understand what the inline asm does,
|
||||
# which results in false positives.
|
||||
- name: Disable complex inline assembly code
|
||||
run: echo '#define LZMA_RANGE_DECODER_CONFIG 0' >> config.h
|
||||
|
||||
- name: Coverity Scan
|
||||
uses: vapier/coverity-scan-action@2068473c7bdf8c2fb984a6a40ae76ee7facd7a85 # v1.8.0
|
||||
with:
|
||||
command: make -Oline -j$(nproc)
|
||||
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
||||
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
40
.github/workflows/dragonflybsd.yml
vendored
40
.github/workflows/dragonflybsd.yml
vendored
@ -1,40 +0,0 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
name: DragonFly BSD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
DragonflyBSD:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
name: DragonFly BSD
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Test in DragonFly BSD
|
||||
id: test
|
||||
uses: vmactions/dragonflybsd-vm@4ffb90652b45abc8156f89ede453c85f7ea257bb #v1.1.4
|
||||
with:
|
||||
usesh: true
|
||||
prepare: >
|
||||
pkg install -y
|
||||
autoconf
|
||||
automake
|
||||
gettext-tools
|
||||
libtool
|
||||
m4
|
||||
run: |
|
||||
set -e
|
||||
uname -a
|
||||
./autogen.sh --no-po4a
|
||||
# Innocent putc() triggers strict-overflow warnings.
|
||||
./configure --disable-static --enable-debug --enable-werror CFLAGS='-g -O2 -pipe -Wno-error=strict-overflow'
|
||||
make -j4 check
|
||||
64
.github/workflows/freebsd.yml
vendored
64
.github/workflows/freebsd.yml
vendored
@ -9,50 +9,24 @@ on:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
FreeBSD:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- host: ubuntu-latest
|
||||
version: 12.4
|
||||
arch: x86_64
|
||||
- host: ubuntu-latest
|
||||
version: 15.0
|
||||
arch: x86_64
|
||||
# NOTE: Comment in the repo says that aarch64 VM is faster
|
||||
# on x86_64 host compared to ubuntu-24.04-arm.
|
||||
# - host: ubuntu-24.04-arm
|
||||
# version: 15.0
|
||||
# arch: aarch64
|
||||
|
||||
runs-on: ${{ matrix.host }}
|
||||
timeout-minutes: 10
|
||||
|
||||
name: FreeBSD
|
||||
|
||||
FreeBSD-test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test xz on FreeBSD
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Test in FreeBSD
|
||||
uses: vmactions/freebsd-vm@670398e4236735b8b65805c3da44b7a511fb8b27 #v1.3.0
|
||||
with:
|
||||
release: ${{ matrix.release }}
|
||||
arch: ${{ matrix.arch }}
|
||||
usesh: true
|
||||
prepare: >
|
||||
pkg install -y
|
||||
autoconf
|
||||
automake
|
||||
gettext-tools
|
||||
libtool
|
||||
m4
|
||||
po4a
|
||||
run: |
|
||||
set -e
|
||||
uname -a
|
||||
./autogen.sh
|
||||
./configure --disable-static --enable-debug --enable-werror
|
||||
make -j4 check
|
||||
- uses: actions/checkout@v4.1.6
|
||||
- name: Test in FreeBSD
|
||||
id: test
|
||||
uses: vmactions/FreeBSD-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d #v1.1.3
|
||||
with:
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install -y autoconf automake gmake gettext-tools gtar libtool m4 po4a
|
||||
run: |
|
||||
set -e
|
||||
export LC_ALL=C LANG=C
|
||||
uname -a
|
||||
./autogen.sh
|
||||
./configure --enable-werror
|
||||
make
|
||||
make check VERBOSE=1
|
||||
|
||||
138
.github/workflows/msvc.yml
vendored
138
.github/workflows/msvc.yml
vendored
@ -1,138 +0,0 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
# Author: Lasse Collin
|
||||
|
||||
name: Windows-MSVC
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
MSVC:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ windows-latest ]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Configure Win32
|
||||
run: >
|
||||
cmake
|
||||
-A Win32
|
||||
-B build-msvc-win32
|
||||
|
||||
- name: Build Win32 Debug
|
||||
run: >
|
||||
cmake
|
||||
--build build-msvc-win32
|
||||
--config Debug
|
||||
|
||||
- name: Test Win32 Debug
|
||||
run: >
|
||||
ctest
|
||||
--test-dir build-msvc-win32
|
||||
--build-config Debug
|
||||
--output-on-failure
|
||||
|
||||
- name: Build Win32 Release
|
||||
run: >
|
||||
cmake
|
||||
--build build-msvc-win32
|
||||
--config Release
|
||||
|
||||
# This fails with VS 2019 without b5a5d9e3f702.
|
||||
- name: Test Win32 Release
|
||||
run: >
|
||||
ctest
|
||||
--test-dir build-msvc-win32
|
||||
--build-config Release
|
||||
--output-on-failure
|
||||
|
||||
- name: Configure x64
|
||||
run: >
|
||||
cmake
|
||||
-A x64
|
||||
-B build-msvc-x64
|
||||
|
||||
- name: Build x64 Debug
|
||||
run: >
|
||||
cmake
|
||||
--build build-msvc-x64
|
||||
--config Debug
|
||||
|
||||
- name: Test x64 Debug
|
||||
run: >
|
||||
ctest
|
||||
--test-dir build-msvc-x64
|
||||
--build-config Debug
|
||||
--output-on-failure
|
||||
|
||||
- name: Build x64 Release
|
||||
run: >
|
||||
cmake
|
||||
--build build-msvc-x64
|
||||
--config Release
|
||||
|
||||
- name: Test x64 Release
|
||||
run: >
|
||||
ctest
|
||||
--test-dir build-msvc-x64
|
||||
--build-config Release
|
||||
--output-on-failure
|
||||
|
||||
- name: Configure ClangCL x64
|
||||
run: >
|
||||
cmake
|
||||
-T ClangCL
|
||||
-A x64
|
||||
-B build-clangcl-x64
|
||||
-DCMAKE_C_FLAGS="
|
||||
-Wno-cast-align
|
||||
-Wno-cast-qual
|
||||
-Wno-covered-switch-default
|
||||
-Wno-declaration-after-statement
|
||||
-Wno-deprecated-declarations
|
||||
-Wno-disabled-macro-expansion
|
||||
-Wno-nonportable-system-include-path
|
||||
-Wno-overlength-strings
|
||||
-Wno-pre-c11-compat
|
||||
-Wno-reserved-identifier
|
||||
-Wno-unsafe-buffer-usage
|
||||
-Wno-used-but-marked-unused"
|
||||
|
||||
- name: Build ClangCL x64 Debug
|
||||
run: >
|
||||
cmake
|
||||
--build build-clangcl-x64
|
||||
--config Debug
|
||||
|
||||
- name: Test ClangCL x64 Debug
|
||||
run: >
|
||||
ctest
|
||||
--test-dir build-clangcl-x64
|
||||
--build-config Debug
|
||||
--output-on-failure
|
||||
|
||||
- name: Build ClangCL x64 Release
|
||||
run: >
|
||||
cmake
|
||||
--build build-clangcl-x64
|
||||
--config Release
|
||||
|
||||
- name: Test ClangCL x64 Release
|
||||
run: >
|
||||
ctest
|
||||
--test-dir build-clangcl-x64
|
||||
--build-config Release
|
||||
--output-on-failure
|
||||
148
.github/workflows/msys2.yml
vendored
148
.github/workflows/msys2.yml
vendored
@ -1,148 +0,0 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Authors: Jia Tan
|
||||
# Lasse Collin
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
name: Windows-MSYS2
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
MSYS2:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runner: [ windows-latest ]
|
||||
sys: [ mingw32, ucrt64, clang64, msys ]
|
||||
include:
|
||||
- runner: windows-11-arm
|
||||
sys: clangarm64
|
||||
|
||||
# Set the shell to be msys2 as a default to avoid setting it for
|
||||
# every individual run command.
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
- name: Setup MSYS2
|
||||
if: ${{ matrix.sys == 'msys' }}
|
||||
uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
update: true
|
||||
install: >
|
||||
make
|
||||
ninja
|
||||
autotools
|
||||
cmake
|
||||
base-devel
|
||||
gettext-devel
|
||||
gcc
|
||||
|
||||
- name: Setup MSYS2
|
||||
if: ${{ matrix.sys != 'msys' }}
|
||||
uses: msys2/setup-msys2@fb197b72ce45fb24f17bf3f807a388985654d1f2 # v2.29.0
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
update: true
|
||||
pacboy: >
|
||||
make:p
|
||||
ninja:p
|
||||
autotools:p
|
||||
cmake:p
|
||||
toolchain:p
|
||||
gettext:p
|
||||
|
||||
- name: Git configuration
|
||||
# Need to explicitly set the shell here since we set the default
|
||||
# shell as msys2 earlier. This avoids an extra msys2 dependency on
|
||||
# git.
|
||||
shell: powershell
|
||||
# Avoid Windows line endings. Otherwise test_scripts.sh will fail
|
||||
# because the expected output is stored in the test framework as a
|
||||
# text file and will not match the output from xzgrep.
|
||||
run: git config --global core.autocrlf false
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: CMake (full, shared)
|
||||
run: |
|
||||
set -e
|
||||
cmake -G Ninja -B b-cmake-full \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DCMAKE_C_FLAGS='-UNDEBUG -g -O2 -pipe' \
|
||||
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
|
||||
${{ startsWith(matrix.sys, 'mingw') && '-DXZ_NLS=OFF' || '' }}
|
||||
ninja -C b-cmake-full
|
||||
ctest --test-dir b-cmake-full --output-on-failure
|
||||
|
||||
- name: CMake (small, static)
|
||||
if: ${{ matrix.runner == 'windows-latest' }}
|
||||
run: |
|
||||
set -e
|
||||
cmake -G Ninja -B b-cmake-small \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_C_FLAGS='-UNDEBUG -g -Os -pipe' \
|
||||
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
|
||||
-DXZ_SMALL=ON \
|
||||
-DXZ_THREADS=no \
|
||||
-DXZ_NLS=OFF
|
||||
ninja -C b-cmake-small
|
||||
ctest --test-dir b-cmake-small --output-on-failure
|
||||
|
||||
- name: autogen.sh
|
||||
run: ./autogen.sh --no-po4a
|
||||
|
||||
- name: Autotools (full, shared)
|
||||
run: |
|
||||
set -e
|
||||
mkdir b-autotools-full
|
||||
cd b-autotools-full
|
||||
../configure \
|
||||
--enable-debug \
|
||||
--enable-werror \
|
||||
--disable-static \
|
||||
${{ startsWith(matrix.sys, 'mingw') && '--disable-nls' || '' }}
|
||||
make -j"$(nproc)" check
|
||||
|
||||
- name: Autotools (small, static)
|
||||
if: ${{ matrix.runner == 'windows-latest' }}
|
||||
run: |
|
||||
set -e
|
||||
mkdir b-autotools-small
|
||||
cd b-autotools-small
|
||||
../configure \
|
||||
--enable-debug \
|
||||
--enable-werror \
|
||||
--disable-shared \
|
||||
--enable-small \
|
||||
--disable-threads \
|
||||
--disable-nls \
|
||||
CFLAGS='-g -Os'
|
||||
make -j"$(nproc)" check
|
||||
|
||||
# Upload the test logs as artifacts if any step has failed.
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: test-logs-${{ matrix.sys }}
|
||||
path: |
|
||||
b-cmake-*/Testing/Temporary/
|
||||
b-cmake-*/test_*/
|
||||
b-autotools-*/tests/*.log
|
||||
b-autotools-*/tests/*output
|
||||
44
.github/workflows/netbsd.yml
vendored
44
.github/workflows/netbsd.yml
vendored
@ -9,32 +9,24 @@ on:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
NetBSD:
|
||||
NetBSD-test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
name: NetBSD
|
||||
name: Test xz on NetBSD
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Test in NetBSD
|
||||
id: test
|
||||
uses: vmactions/netbsd-vm@b24ed5f7a605362ab1226e73df291c8b01990c85 #v1.2.3
|
||||
with:
|
||||
usesh: true
|
||||
prepare: >
|
||||
/usr/sbin/pkg_add -v
|
||||
cmake
|
||||
gettext-tools
|
||||
ninja-build
|
||||
po4a
|
||||
run: |
|
||||
set -e
|
||||
uname -a
|
||||
./po4a/update-po
|
||||
# Innocent putc() triggers strict-overflow warnings.
|
||||
cmake -G Ninja -B build -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS='-UNDEBUG -g -O2 -pipe -Wno-error=strict-overflow' -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
|
||||
ninja -C build
|
||||
ctest --test-dir build --output-on-failure
|
||||
- uses: actions/checkout@v4.1.6
|
||||
- name: Test in NetBSD
|
||||
id: test
|
||||
uses: vmactions/NetBSD-vm@dd0161ecbb6386e562fd098acf367633501487a4 #v1.1.3
|
||||
with:
|
||||
usesh: true
|
||||
prepare: |
|
||||
/usr/sbin/pkg_add -v autoconf automake gmake gettext-tools gtar-base libtool-base m4 po4a
|
||||
run: |
|
||||
set -e
|
||||
export LC_ALL=C LANG=C
|
||||
uname -a
|
||||
./autogen.sh
|
||||
./configure --enable-werror
|
||||
make
|
||||
make check VERBOSE=1
|
||||
|
||||
47
.github/workflows/openbsd.yml
vendored
47
.github/workflows/openbsd.yml
vendored
@ -9,32 +9,27 @@ on:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
OpenBSD:
|
||||
OpenBSD-test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
name: OpenBSD
|
||||
name: Test xz on OpenBSD
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Test in OpenBSD
|
||||
uses: vmactions/openbsd-vm@2e29de1eb150dfe1c9c97b84ff2b7896f14ca690 #v1.2.5
|
||||
with:
|
||||
usesh: true
|
||||
prepare: >
|
||||
/usr/sbin/pkg_add -I -v
|
||||
autoconf-2.72p0
|
||||
automake-1.17
|
||||
gettext-tools
|
||||
libtool
|
||||
m4
|
||||
run: |
|
||||
set -e
|
||||
export AUTOCONF_VERSION=2.72
|
||||
export AUTOMAKE_VERSION=1.17
|
||||
uname -a
|
||||
./autogen.sh --no-po4a
|
||||
./configure --disable-static --enable-debug --enable-werror --disable-nls --enable-external-sha256
|
||||
make -j4 check
|
||||
- uses: actions/checkout@v4.1.6
|
||||
- name: Test in OpenBSD
|
||||
id: test
|
||||
uses: vmactions/OpenBSD-vm@ebafa4eac4adf5e7d04e5bbb4aa764b75dd160df #v1.1.2
|
||||
with:
|
||||
usesh: true
|
||||
prepare: |
|
||||
/usr/sbin/pkg_add -I -v autoconf-2.71 automake-1.16.5 gmake gettext-tools gtar libtool m4
|
||||
run: |
|
||||
set -e
|
||||
export LC_ALL=C LANG=C
|
||||
export AUTOCONF_VERSION=2.71
|
||||
export AUTOMAKE_VERSION=1.16
|
||||
uname -a
|
||||
# OpenBSD ports lack po4a
|
||||
./autogen.sh --no-po4a
|
||||
./configure --enable-werror
|
||||
make
|
||||
make check VERBOSE=1
|
||||
|
||||
38
.github/workflows/solaris.yml
vendored
38
.github/workflows/solaris.yml
vendored
@ -9,26 +9,24 @@ on:
|
||||
branches: [ master ]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
Solaris:
|
||||
solaris-test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
name: Solaris
|
||||
name: Test xz on Solaris
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Test in Solaris
|
||||
uses: vmactions/solaris-vm@47bea106d03acaf91084e52548ee460556011602 #v1.1.8
|
||||
with:
|
||||
release: 11.4-gcc
|
||||
usesh: true
|
||||
run: |
|
||||
set -e
|
||||
uname -a
|
||||
# /usr/xpg4/bin isn't in PATH by default.
|
||||
echo "Environment variable PATH: $PATH"
|
||||
./autogen.sh --no-po4a
|
||||
./configure --disable-static --enable-debug --enable-werror
|
||||
make check
|
||||
- uses: actions/checkout@v4.1.6
|
||||
- name: Test in Solaris
|
||||
id: test
|
||||
uses: vmactions/solaris-vm@960d7483ffd6ac03397964cf6423a2f41332c9c8 #v1.0.9
|
||||
with:
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install bash libtool automake gnu-m4 tree wget gcc autoconf //solaris/text/gawk pkg://solaris/text/gnu-diffutils pkg://solaris/text/gnu-grep pkg://solaris/text/gnu-sed
|
||||
run: |
|
||||
set -e
|
||||
export LC_ALL=C LANG=C
|
||||
uname -a
|
||||
./autogen.sh --no-po4a
|
||||
./configure --enable-werror
|
||||
make
|
||||
make check VERBOSE=1
|
||||
|
||||
124
.github/workflows/windows-ci.yml
vendored
Normal file
124
.github/workflows/windows-ci.yml
vendored
Normal file
@ -0,0 +1,124 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Author: Jia Tan
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
name: Windows-CI
|
||||
|
||||
# Only run the Windows CI manually since it takes much longer than the others.
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
POSIX:
|
||||
strategy:
|
||||
matrix:
|
||||
# Test different environments since the code may change between
|
||||
# them and we want to ensure that we support all potential users.
|
||||
# clang64 builds are currently broken when building static libraries
|
||||
# due to a bug in ldd search path:
|
||||
# https://github.com/llvm/llvm-project/issues/67779
|
||||
# TODO - re-enable clang64 when this is resolved.
|
||||
msys2_env: [mingw64, mingw32, ucrt64, msys]
|
||||
build_system: [autotools, cmake]
|
||||
|
||||
# Set the shell to be msys2 as a default to avoid setting it for
|
||||
# every individual run command.
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
#####################
|
||||
# Setup Environment #
|
||||
#####################
|
||||
|
||||
# Rely on the msys2 GitHub Action to set up the msys2 environment.
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@cc11e9188b693c2b100158c3322424c4cc1dadea #v2.22.0
|
||||
with:
|
||||
msystem: ${{ matrix.msys2_env }}
|
||||
update: true
|
||||
install: pactoys make
|
||||
|
||||
- name: Checkout code
|
||||
# Need to explicitly set the shell here since we set the default
|
||||
# shell as msys2 earlier. This avoids an extra msys2 dependency on
|
||||
# git.
|
||||
shell: powershell
|
||||
# Avoid Windows line endings. Otherwise test_scripts.sh will fail
|
||||
# because the expected output is stored in the test framework as a
|
||||
# text file and will not match the output from xzgrep.
|
||||
run: git config --global core.autocrlf false
|
||||
|
||||
- uses: actions/checkout@v4.1.6
|
||||
|
||||
|
||||
########################
|
||||
# Install Dependencies #
|
||||
########################
|
||||
|
||||
# The pacman repository has a different naming scheme for default
|
||||
# msys packages than the others. The pacboy tool allows installing
|
||||
# the packages possible in matrix setup without a burdensome amount
|
||||
# of ifs.
|
||||
- name: Install Dependencies
|
||||
if: ${{ matrix.msys2_env == 'msys' && matrix.build_system == 'autotools' }}
|
||||
run: pacman --noconfirm -S --needed autotools base-devel doxygen gettext-devel gcc
|
||||
|
||||
- name: Install Dependencies
|
||||
if: ${{ matrix.msys2_env != 'msys' && matrix.build_system == 'autotools' }}
|
||||
run: pacboy --noconfirm -S --needed autotools:p toolchain:p doxygen:p
|
||||
|
||||
- name: Install Dependencies
|
||||
if: ${{ matrix.msys2_env == 'msys' && matrix.build_system == 'cmake' }}
|
||||
run: pacman --noconfirm -S --needed cmake base-devel gcc
|
||||
|
||||
- name: Install Dependencies
|
||||
if: ${{ matrix.msys2_env != 'msys' && matrix.build_system == 'cmake' }}
|
||||
run: pacboy --noconfirm -S --needed cmake:p toolchain:p
|
||||
|
||||
##################
|
||||
# Build and Test #
|
||||
##################
|
||||
|
||||
- name: Build with full features
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -p build
|
||||
- name: Test with full features
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -p test -n full_features
|
||||
|
||||
- name: Build without threads
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d threads,shared -p build
|
||||
- name: Test without threads
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d threads,shared -p test -n no_threads
|
||||
|
||||
- name: Build without encoders
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d encoders,shared -p build
|
||||
- name: Test without encoders
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d encoders,shared -p test -n no_encoders
|
||||
|
||||
- name: Build without decoders
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d decoders,shared -p build
|
||||
- name: Test without decoders
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d decoders,shared -p test -n no_decoders
|
||||
|
||||
- name: Build with only crc32 check
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -c crc32 -d shared,nls -p build
|
||||
- name: Test with only crc32 check
|
||||
run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -c crc32 -d shared,nls -p test -n crc32_only
|
||||
|
||||
|
||||
###############
|
||||
# Upload Logs #
|
||||
###############
|
||||
|
||||
# Upload the test logs as artifacts if any step has failed.
|
||||
- uses: actions/upload-artifact@v4.3.3
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: ${{ matrix.msys2_env }} ${{ matrix.build_system }} Test Logs
|
||||
path: build-aux/artifacts
|
||||
@ -77,7 +77,7 @@
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.20...4.2 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.20...3.31 FATAL_ERROR)
|
||||
|
||||
include(CMakePushCheckState)
|
||||
include(CheckIncludeFile)
|
||||
@ -85,7 +85,6 @@ include(CheckSymbolExists)
|
||||
include(CheckStructHasMember)
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckLinkerFlag)
|
||||
include(cmake/tuklib_large_file_support.cmake)
|
||||
include(cmake/tuklib_integer.cmake)
|
||||
include(cmake/tuklib_cpucores.cmake)
|
||||
@ -449,7 +448,6 @@ if(CMAKE_C_COMPILER_ID MATCHES GNU|Clang)
|
||||
-Wdocumentation
|
||||
-Wduplicate-enum
|
||||
-Wempty-translation-unit
|
||||
-Wextra-semi-stmt
|
||||
-Wflexible-array-extensions
|
||||
-Wmissing-variable-declarations
|
||||
-Wnewline-eof
|
||||
@ -486,7 +484,7 @@ if(NOT WIN32)
|
||||
# auto Autodetect between no, generic, and linux
|
||||
# yes Force on by autodetecting between linux and generic
|
||||
# no Disable symbol versioning
|
||||
# generic FreeBSD, some Linux/glibc systems, and GNU/Hurd
|
||||
# generic FreeBSD, most Linux/glibc systems, and GNU/Hurd
|
||||
# linux Linux/glibc with extra symbol versions for compatibility
|
||||
# with binaries that have been linked against a liblzma version
|
||||
# that has been patched with "xz-5.2.2-compat-libs.patch" from
|
||||
@ -543,7 +541,7 @@ symbol versioning (${SUPPORTED_SYMBOL_VERSIONING_VARIANTS})")
|
||||
# somewhere in the string).
|
||||
#
|
||||
# NVIDIA HPC Compiler doesn't support symbol versioning but
|
||||
# it uses the linker from the system so the linker script
|
||||
# it uses the linked from the system so the linker script
|
||||
# can still be used to get the generic symbol versioning.
|
||||
set(SYMBOL_VERSIONING "generic")
|
||||
|
||||
@ -558,21 +556,6 @@ symbol versioning (${SUPPORTED_SYMBOL_VERSIONING_VARIANTS})")
|
||||
set(SYMBOL_VERSIONING "generic")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT SYMBOL_VERSIONING STREQUAL "no")
|
||||
# If features are disabled in liblzma, some symbols may be missing.
|
||||
# LLVM's lld defaults to --no-undefined-version and the build breaks
|
||||
# if not all symbols in the version script exist. That is good for
|
||||
# catching errors like typos, but in our case the downside is too big.
|
||||
# Avoid the problem by using --undefined-version if the linker
|
||||
# supports it.
|
||||
#
|
||||
# GNU ld has had --no-undefined-version for a long time but it's not
|
||||
# the default. The opposite option --undefined-version was only added
|
||||
# in 2022, thus we must use --undefined-version conditionally.
|
||||
check_linker_flag(C "-Wl,--undefined-version"
|
||||
HAVE_LINKER_FLAG_UNDEFINED_VERSION)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(LIBLZMA_API_HEADERS
|
||||
@ -1380,13 +1363,6 @@ if(XZ_ARM64_CRC32)
|
||||
check_symbol_exists(getauxval sys/auxv.h HAVE_GETAUXVAL)
|
||||
tuklib_add_definition_if(liblzma HAVE_GETAUXVAL)
|
||||
|
||||
# With getauxval() we also need HWCAP_CRC32 which was
|
||||
# added in glibc 2.24.
|
||||
if(HAVE_GETAUXVAL)
|
||||
check_symbol_exists(HWCAP_CRC32 sys/auxv.h HAVE_HWCAP_CRC32)
|
||||
tuklib_add_definition_if(liblzma HAVE_HWCAP_CRC32)
|
||||
endif()
|
||||
|
||||
# elf_aux_info() is supported on FreeBSD and OpenBSD >= 7.6.
|
||||
check_symbol_exists(elf_aux_info sys/auxv.h HAVE_ELF_AUX_INFO)
|
||||
tuklib_add_definition_if(liblzma HAVE_ELF_AUX_INFO)
|
||||
@ -1504,9 +1480,6 @@ elseif(BUILD_SHARED_LIBS AND SYMBOL_VERSIONING STREQUAL "linux")
|
||||
# NOTE: Set it explicitly to 1 to make it clear that versioning is
|
||||
# done unconditionally in the C files.
|
||||
target_compile_definitions(liblzma PRIVATE HAVE_SYMBOL_VERSIONS_LINUX=1)
|
||||
if(HAVE_LINKER_FLAG_UNDEFINED_VERSION)
|
||||
target_link_options(liblzma PRIVATE "-Wl,--undefined-version")
|
||||
endif()
|
||||
target_link_options(liblzma PRIVATE
|
||||
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_linux.map"
|
||||
)
|
||||
@ -1514,9 +1487,6 @@ elseif(BUILD_SHARED_LIBS AND SYMBOL_VERSIONING STREQUAL "linux")
|
||||
LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_linux.map"
|
||||
)
|
||||
elseif(BUILD_SHARED_LIBS AND SYMBOL_VERSIONING STREQUAL "generic")
|
||||
if(HAVE_LINKER_FLAG_UNDEFINED_VERSION)
|
||||
target_link_options(liblzma PRIVATE "-Wl,--undefined-version")
|
||||
endif()
|
||||
target_link_options(liblzma PRIVATE
|
||||
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_generic.map"
|
||||
)
|
||||
@ -2201,13 +2171,8 @@ this many MiB of RAM if xz cannot determine the amount at runtime")
|
||||
tuklib_progname(xz)
|
||||
tuklib_mbstr(xz)
|
||||
|
||||
if(HAVE_GETOPT_LONG)
|
||||
check_symbol_exists(optreset getopt.h HAVE_OPTRESET)
|
||||
tuklib_add_definition_if(xz HAVE_OPTRESET)
|
||||
endif()
|
||||
|
||||
check_symbol_exists(getrlimit sys/resource.h HAVE_GETRLIMIT)
|
||||
tuklib_add_definition_if(xz HAVE_GETRLIMIT)
|
||||
check_symbol_exists(optreset getopt.h HAVE_OPTRESET)
|
||||
tuklib_add_definition_if(xz HAVE_OPTRESET)
|
||||
|
||||
check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
|
||||
tuklib_add_definition_if(xz HAVE_POSIX_FADVISE)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
<https://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@ -304,7 +304,8 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
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, see <https://www.gnu.org/licenses/>.
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@ -328,8 +329,8 @@ necessary. Here is a sample; alter the names:
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Moe Ghoul>, 1 April 1989
|
||||
Moe Ghoul, President of Vice
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
<https://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@ -484,7 +484,8 @@ convey the exclusion of warranty; and each file should have at least the
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, see <https://www.gnu.org/licenses/>.
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
@ -495,7 +496,7 @@ necessary. Here is a sample; alter the names:
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Moe Ghoul>, 1 April 1990
|
||||
Moe Ghoul, President of Vice
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
72
NEWS
72
NEWS
@ -2,78 +2,6 @@
|
||||
XZ Utils Release Notes
|
||||
======================
|
||||
|
||||
5.8.2 (2025-12-17)
|
||||
|
||||
* liblzma:
|
||||
|
||||
- Fix the build on ARM64 on glibc versions older than
|
||||
2.24 (2016). They don't have HWCAP_CRC32 in <sys/auxv.h>.
|
||||
|
||||
- Disable CLMUL CRC code when building for 32-bit x86 with
|
||||
old MSVC versions. This avoids a compiler bug. The exact
|
||||
compiler version in which the issue was fixed is unknown,
|
||||
but VS 2022 17.13 (MSVC 19.43.34808) is known to work, so
|
||||
CLMUL CRC on 32-bit x86 is disabled with MSVC versions
|
||||
older than that.
|
||||
|
||||
* xz:
|
||||
|
||||
- Add a workaround for Red Hat Enterprise Linux 9 kernel bug
|
||||
which made xz fail with "xz: Failed to enable the sandbox".
|
||||
It only occurs with xz 5.8.0 and 5.8.1 binaries built for
|
||||
other distros. For example, running Debian 13 in a container
|
||||
on RHEL/CentOS 9 would trigger the issue.
|
||||
|
||||
The bug was introduced in RHEL 9 kernel 5.14.0-603.el9
|
||||
(2025-07-30) and fixed in 5.14.0-648.el9 (2025-12-05).
|
||||
However, as of writing, the fixed kernel isn't available
|
||||
to RHEL 9 users yet, so including the workaround in this
|
||||
xz release seems reasonable. The workaround will be removed
|
||||
when it's no longer needed.
|
||||
|
||||
xzdec was also affected by this issue.
|
||||
|
||||
- On AIX, don't use fsync() on directories because it fails.
|
||||
|
||||
- Fix the build on Emscripten.
|
||||
|
||||
- Fix the build on clang-cl on Windows.
|
||||
|
||||
- Take resource limits (RLIMIT_DATA, RLIMIT_AS, and RLIMIT_VMEM)
|
||||
into account when determining the default memory usage limit
|
||||
for multithreaded mode. This should prevent xz from failing
|
||||
when a resource limit has been set to a value that is less
|
||||
than 1/4 of total RAM. Other memory limits can still trigger
|
||||
the same issue, for example, Linux cgroup v2 memory.max.
|
||||
|
||||
* Build systems:
|
||||
|
||||
- When symbol versioning is enabled, pass --undefined-version
|
||||
to the linker if the option is supported. This fixes the
|
||||
build when using LLVM's lld and some liblzma features have
|
||||
been disabled at build time.
|
||||
|
||||
- ARM64: Fix autodetection of fast unaligned memory access when
|
||||
using GCC and -mstrict-align is in effect. Previously the
|
||||
build systems would incorrectly guess that unaligned access
|
||||
is fast, which would result in much slower binaries than
|
||||
needed. The fix is a workaround for GCC bug 111555;
|
||||
autodetection already worked with Clang.
|
||||
|
||||
- LoongArch: Autodetect if fast unaligned memory access is
|
||||
supported. This can improve compression speed by 15 % (but
|
||||
not decompression speed).
|
||||
|
||||
* Translations:
|
||||
|
||||
- Update the Spanish translation.
|
||||
|
||||
- Add Swedish man page translations.
|
||||
|
||||
- Update Italian, Korean, Romanian, Serbian, and Ukrainian
|
||||
man page translations.
|
||||
|
||||
|
||||
5.8.1 (2025-04-03)
|
||||
|
||||
IMPORTANT: This includes a security fix for CVE-2025-31115 which
|
||||
|
||||
434
THANKS
434
THANKS
@ -3,243 +3,225 @@ Thanks
|
||||
======
|
||||
|
||||
Some people have helped more, some less, but nevertheless everyone's help
|
||||
has been important. :-)
|
||||
- Adam Borowski
|
||||
- Adam Walling
|
||||
- Adrien Nader
|
||||
- Agostino Sarubbo
|
||||
- Alexander Bluhm
|
||||
- Alexander M. Greenham
|
||||
- Alexander Neumann
|
||||
- Alexandre Sauvé
|
||||
- Alexey Tourbin
|
||||
- Anders F. Björklund
|
||||
- Andraž 'ruskie' Levstik
|
||||
- Andre Noll
|
||||
- Andreas K. Hüttel
|
||||
- Andreas Müller
|
||||
- Andreas Schwab
|
||||
- Andreas Zieringer
|
||||
- Andrej Skenderija
|
||||
- Andres Freund
|
||||
- Andrew Dudman
|
||||
- Andrew Murray
|
||||
- Antoine Cœur
|
||||
- Anton Kochkov
|
||||
- Antonio Diaz Diaz
|
||||
- Arkadiusz Miskiewicz
|
||||
- Asgeir Storesund Nilsen
|
||||
- Aziz Chaudhry
|
||||
- Bela Lubkin
|
||||
- Ben Boeckel
|
||||
- Benjamin Buch
|
||||
- Benno Schulenberg
|
||||
- Bernhard Reutner-Fischer
|
||||
- Bert Wesarg
|
||||
- Bhargava Shastry
|
||||
- Bill Glessner
|
||||
- Bjarni Ingi Gislason
|
||||
- Boud Roukema
|
||||
- Brad Smith
|
||||
- Bruce Stark
|
||||
- Cary Lewis
|
||||
- Charles Wilson
|
||||
- Chenxi Mao
|
||||
- Chien Wong
|
||||
- Chris Donawa
|
||||
- Chris McCrohan
|
||||
- Christian Hesse
|
||||
- Christian Kujau
|
||||
- Christian von Roques
|
||||
- Christian Weisgerber
|
||||
- Christoph Junghans
|
||||
- Collin Funk
|
||||
- Conley Moorhous
|
||||
- Cristian Rodríguez
|
||||
- Cristiano Ceglia
|
||||
- Dan Shechter
|
||||
- Dan Stromberg
|
||||
- Dan Weiss
|
||||
- Daniel Leonard
|
||||
- Daniel Mealha Cabrita
|
||||
- Daniel Packard
|
||||
- Daniel Richard G.
|
||||
- David Burklund
|
||||
- Denis Excoffier
|
||||
- Derwin McGeary
|
||||
- Dexter Castor Döpping
|
||||
- Diederik de Haas
|
||||
- Diego Elio Pettenò
|
||||
- Dimitri Papadopoulos Orfanos
|
||||
- Dirk Müller
|
||||
- Douglas Thor
|
||||
- Ed Maste
|
||||
- Elbert Pol
|
||||
- Eli Schwartz
|
||||
- Elijah Almeida Coimbra
|
||||
- Émilie Labbé
|
||||
- Emmanuel Blot
|
||||
- Eric Lindblad
|
||||
- Eric S. Raymond
|
||||
- Étienne Mollier
|
||||
- Evan Nemerson
|
||||
- Fangrui Song
|
||||
- Felix Collin
|
||||
- Filip Palian
|
||||
- Firas Khalil Khana
|
||||
- François Etcheverry
|
||||
- Frank Busse
|
||||
- Frank Prochnow
|
||||
- Fredrik Wikstrom
|
||||
- Gabi Davar
|
||||
- Gabriela Gutierrez
|
||||
- Gilles Espinasse
|
||||
- Gregory Margo
|
||||
- Guillaume Outters
|
||||
- Guiorgy Potskhishvili
|
||||
has been important. :-) In alphabetical order:
|
||||
- Mark Adler
|
||||
- Kian-Meng Ang
|
||||
- H. Peter Anvin
|
||||
- Hajin Jang
|
||||
- Hans Jansen
|
||||
- Harri K. Koskinen
|
||||
- Hin-Tak Leung
|
||||
- H.J. Lu
|
||||
- Hongbo Ni
|
||||
- Igor Pavlov
|
||||
- İhsan Doğan
|
||||
- Ilya Kurdyukov
|
||||
- Iouri Kharon
|
||||
- İsmail Dönmez
|
||||
- Ivan A. Melnikov
|
||||
- Jakub Bogusz
|
||||
- James Buren
|
||||
- James M Leddy
|
||||
- Jan Kratochvil
|
||||
- Jan Terje Hansen
|
||||
- Jason Gorski
|
||||
- Jeff Bastian
|
||||
- Jeffrey Walton
|
||||
- Jeroen Roovers
|
||||
- Jim Meyering
|
||||
- Jim Wilcoxson
|
||||
- Joachim Henke
|
||||
- John Paul Adrian Glaubitz
|
||||
- Jonathan Nieder
|
||||
- Jonathan Stott
|
||||
- Joona Kannisto
|
||||
- Jouk Jansen
|
||||
- Juan Manuel Guerrero
|
||||
- Jukka Salmi
|
||||
- Julien Marrec
|
||||
- Jun I Jin
|
||||
- Kai Pastor
|
||||
- Nelson H. F. Beebe
|
||||
- Karl Beldan
|
||||
- Karl Berry
|
||||
- Keith Patton
|
||||
- Kelvin Lee
|
||||
- Kevin R. Bulgrien
|
||||
- Kian-Meng Ang
|
||||
- Kim Jinyeong
|
||||
- Kirill A. Korinsky
|
||||
- Kiyoshi Kanazawa
|
||||
- Lars Wirzenius
|
||||
- Li Chenggang
|
||||
- Lizandro Heredia
|
||||
- Loganaden Velvindron
|
||||
- Lorenzo De Liso
|
||||
- Lukas Braune
|
||||
- Maarten Bosmans
|
||||
- Maksym Vatsyk
|
||||
- Marcin Kowalczyk
|
||||
- Marcus Comstedt
|
||||
- Marcus Tillmanns
|
||||
- Marek Černocký
|
||||
- Mark Adler
|
||||
- Mark Wielaard
|
||||
- Markus Duft
|
||||
- Markus Rickert
|
||||
- Martin Blumenstingl
|
||||
- Martin Matuška
|
||||
- Martin Storsjö
|
||||
- Martin Väth
|
||||
- Mathieu Vachon
|
||||
- Matthew Good
|
||||
- Matthieu Rakotojaona
|
||||
- Anders F. Björklund
|
||||
- Emmanuel Blot
|
||||
- Melanie Blower
|
||||
- Michael Felt
|
||||
- Michael Fox
|
||||
- Michał Górny
|
||||
- Mike Frysinger
|
||||
- Mikko Pouru
|
||||
- Milo Casagrande
|
||||
- Mohammed Adnène Trojette
|
||||
- Nathan Moinvaziri
|
||||
- Nelson H. F. Beebe
|
||||
- Nicholas Jackson
|
||||
- Ole André Vadla Ravnås
|
||||
- Orange Tsai
|
||||
- Orgad Shaneh
|
||||
- Patrick J. Volkerding
|
||||
- Paul Eggert
|
||||
- Paul Townsend
|
||||
- Pavel Raiskup
|
||||
- Per Øyvind Karlsen
|
||||
- Peter Ivanov
|
||||
- Peter Lawler
|
||||
- Peter O'Gorman
|
||||
- Peter Pallinger
|
||||
- Peter Seiderer
|
||||
- Pierre-Yves Martin
|
||||
- Pilorz Wojciech
|
||||
- Pippijn van Steenhoven
|
||||
- Rafał Mużyło
|
||||
- Rainer Müller
|
||||
- Ralf Wildenhues
|
||||
- Rich Prohaska
|
||||
- Richard Koch
|
||||
- Richard W.M. Jones
|
||||
- Robert Elz
|
||||
- Robert Readman
|
||||
- Alexander Bluhm
|
||||
- Martin Blumenstingl
|
||||
- Ben Boeckel
|
||||
- Jakub Bogusz
|
||||
- Adam Borowski
|
||||
- Maarten Bosmans
|
||||
- Roel Bouckaert
|
||||
- Ron Desmond
|
||||
- Ruarí Ødegaard
|
||||
- Rui Paulo
|
||||
- Ryan Colyer
|
||||
- Ryan Young
|
||||
- Sam James
|
||||
- Scott McAllister
|
||||
- Sean Fenian
|
||||
- Sebastian Andrzej Siewior
|
||||
- Sergey Kosukhin
|
||||
- Simon Josefsson
|
||||
- Siteshwar Vashisht
|
||||
- Steffen Nurpmeso
|
||||
- Stephan Kulow
|
||||
- Stephen Sachs
|
||||
- Stuart Shelton
|
||||
- Taiki Tsunekawa
|
||||
- Thomas Klausner
|
||||
- Tobias Lahrmann Hansen
|
||||
- Tobias Stoeckmann
|
||||
- Tomasz Gajc
|
||||
- Tomer Chachamu
|
||||
- Torsten Rupp
|
||||
- Trần Ngọc Quân
|
||||
- Lukas Braune
|
||||
- Benjamin Buch
|
||||
- Trent W. Buck
|
||||
- Victoria Alexia
|
||||
- Vijay Sarvepalli
|
||||
- Ville Koskinen
|
||||
- Ville Skyttä
|
||||
- Vincent Cruz
|
||||
- Vincent Fazio
|
||||
- Vincent Lefevre
|
||||
- Vincent Torri
|
||||
- Vincent Wixsom
|
||||
- Vincenzo Innocente
|
||||
- Kevin R. Bulgrien
|
||||
- James Buren
|
||||
- David Burklund
|
||||
- Frank Busse
|
||||
- Daniel Mealha Cabrita
|
||||
- Milo Casagrande
|
||||
- Cristiano Ceglia
|
||||
- Marek Černocký
|
||||
- Tomer Chachamu
|
||||
- Vitaly Chikunov
|
||||
- Antoine Cœur
|
||||
- Elijah Almeida Coimbra
|
||||
- Felix Collin
|
||||
- Ryan Colyer
|
||||
- Marcus Comstedt
|
||||
- Vincent Cruz
|
||||
- Gabi Davar
|
||||
- Ron Desmond
|
||||
- İhsan Doğan
|
||||
- Chris Donawa
|
||||
- Andrew Dudman
|
||||
- Markus Duft
|
||||
- İsmail Dönmez
|
||||
- Dexter Castor Döpping
|
||||
- Paul Eggert
|
||||
- Robert Elz
|
||||
- Gilles Espinasse
|
||||
- Denis Excoffier
|
||||
- Vincent Fazio
|
||||
- Michael Felt
|
||||
- Sean Fenian
|
||||
- Michael Fox
|
||||
- Andres Freund
|
||||
- Mike Frysinger
|
||||
- Collin Funk
|
||||
- Daniel Richard G.
|
||||
- Tomasz Gajc
|
||||
- Bjarni Ingi Gislason
|
||||
- John Paul Adrian Glaubitz
|
||||
- Bill Glessner
|
||||
- Matthew Good
|
||||
- Michał Górny
|
||||
- Jason Gorski
|
||||
- Alexander M. Greenham
|
||||
- Juan Manuel Guerrero
|
||||
- Gabriela Gutierrez
|
||||
- Diederik de Haas
|
||||
- Jan Terje Hansen
|
||||
- Tobias Lahrmann Hansen
|
||||
- Joachim Henke
|
||||
- Lizandro Heredia
|
||||
- Christian Hesse
|
||||
- Vincenzo Innocente
|
||||
- Peter Ivanov
|
||||
- Nicholas Jackson
|
||||
- Sam James
|
||||
- Hajin Jang
|
||||
- Hans Jansen
|
||||
- Jouk Jansen
|
||||
- Jun I Jin
|
||||
- Christoph Junghans
|
||||
- Kiyoshi Kanazawa
|
||||
- Joona Kannisto
|
||||
- Per Øyvind Karlsen
|
||||
- Firas Khalil Khana
|
||||
- Iouri Kharon
|
||||
- Kim Jinyeong
|
||||
- Thomas Klausner
|
||||
- Richard Koch
|
||||
- Anton Kochkov
|
||||
- Harri K. Koskinen
|
||||
- Ville Koskinen
|
||||
- Sergey Kosukhin
|
||||
- Marcin Kowalczyk
|
||||
- Jan Kratochvil
|
||||
- Christian Kujau
|
||||
- Stephan Kulow
|
||||
- Ilya Kurdyukov
|
||||
- Peter Lawler
|
||||
- James M Leddy
|
||||
- Kelvin Lee
|
||||
- Vincent Lefevre
|
||||
- Hin-Tak Leung
|
||||
- Andraž 'ruskie' Levstik
|
||||
- Cary Lewis
|
||||
- Wim Lewis
|
||||
- Xi Ruoyao
|
||||
- Xin Li
|
||||
- Yifeng Li
|
||||
- Eric Lindblad
|
||||
- Lorenzo De Liso
|
||||
- H.J. Lu
|
||||
- Bela Lubkin
|
||||
- Chenxi Mao
|
||||
- Gregory Margo
|
||||
- Julien Marrec
|
||||
- Pierre-Yves Martin
|
||||
- Ed Maste
|
||||
- Martin Matuška
|
||||
- Scott McAllister
|
||||
- Chris McCrohan
|
||||
- Derwin McGeary
|
||||
- Ivan A. Melnikov
|
||||
- Jim Meyering
|
||||
- Arkadiusz Miskiewicz
|
||||
- Nathan Moinvaziri
|
||||
- Étienne Mollier
|
||||
- Conley Moorhous
|
||||
- Dirk Müller
|
||||
- Rainer Müller
|
||||
- Andrew Murray
|
||||
- Rafał Mużyło
|
||||
- Adrien Nader
|
||||
- Evan Nemerson
|
||||
- Alexander Neumann
|
||||
- Hongbo Ni
|
||||
- Jonathan Nieder
|
||||
- Asgeir Storesund Nilsen
|
||||
- Andre Noll
|
||||
- Ruarí Ødegaard
|
||||
- Peter O'Gorman
|
||||
- Dimitri Papadopoulos Orfanos
|
||||
- Daniel Packard
|
||||
- Filip Palian
|
||||
- Peter Pallinger
|
||||
- Kai Pastor
|
||||
- Keith Patton
|
||||
- Rui Paulo
|
||||
- Igor Pavlov
|
||||
- Diego Elio Pettenò
|
||||
- Elbert Pol
|
||||
- Guiorgy Potskhishvili
|
||||
- Mikko Pouru
|
||||
- Frank Prochnow
|
||||
- Rich Prohaska
|
||||
- Trần Ngọc Quân
|
||||
- Pavel Raiskup
|
||||
- Matthieu Rakotojaona
|
||||
- Ole André Vadla Ravnås
|
||||
- Eric S. Raymond
|
||||
- Robert Readman
|
||||
- Bernhard Reutner-Fischer
|
||||
- Markus Rickert
|
||||
- Cristian Rodríguez
|
||||
- Jeroen Roovers
|
||||
- Christian von Roques
|
||||
- Boud Roukema
|
||||
- Torsten Rupp
|
||||
- Stephen Sachs
|
||||
- Jukka Salmi
|
||||
- Agostino Sarubbo
|
||||
- Vijay Sarvepalli
|
||||
- Alexandre Sauvé
|
||||
- Benno Schulenberg
|
||||
- Andreas Schwab
|
||||
- Eli Schwartz
|
||||
- Peter Seiderer
|
||||
- Bhargava Shastry
|
||||
- Dan Shechter
|
||||
- Stuart Shelton
|
||||
- Sebastian Andrzej Siewior
|
||||
- Andrej Skenderija
|
||||
- Ville Skyttä
|
||||
- Brad Smith
|
||||
- Bruce Stark
|
||||
- Pippijn van Steenhoven
|
||||
- Tobias Stoeckmann
|
||||
- Martin Storsjö
|
||||
- Jonathan Stott
|
||||
- Dan Stromberg
|
||||
- Douglas Thor
|
||||
- Vincent Torri
|
||||
- Alexey Tourbin
|
||||
- Paul Townsend
|
||||
- Mohammed Adnène Trojette
|
||||
- Orange Tsai
|
||||
- Taiki Tsunekawa
|
||||
- Mathieu Vachon
|
||||
- Maksym Vatsyk
|
||||
- Loganaden Velvindron
|
||||
- Patrick J. Volkerding
|
||||
- Martin Väth
|
||||
- Adam Walling
|
||||
- Jeffrey Walton
|
||||
- Christian Weisgerber
|
||||
- Dan Weiss
|
||||
- Bert Wesarg
|
||||
- Mark Wielaard
|
||||
- Fredrik Wikstrom
|
||||
- Jim Wilcoxson
|
||||
- Ralf Wildenhues
|
||||
- Charles Wilson
|
||||
- Lars Wirzenius
|
||||
- Vincent Wixsom
|
||||
- Pilorz Wojciech
|
||||
- Chien Wong
|
||||
- Xi Ruoyao
|
||||
- Ryan Young
|
||||
- Andreas Zieringer
|
||||
- 榆柳松 (ZhengSen Wang)
|
||||
|
||||
Companies:
|
||||
|
||||
@ -43,7 +43,6 @@ NATIVE_LANG_SUPPORT="y"
|
||||
SMALL="n"
|
||||
CLMUL="y"
|
||||
SANDBOX="y"
|
||||
DOXYGEN="y"
|
||||
SRC_DIR="$ABS_DIR/../"
|
||||
DEST_DIR="$SRC_DIR/../xz_build"
|
||||
PHASE="all"
|
||||
@ -92,7 +91,6 @@ while getopts a:b:c:d:l:m:n:s:p:f:w:h opt; do
|
||||
small) SMALL="y";;
|
||||
clmul) CLMUL="n";;
|
||||
sandbox) SANDBOX="n";;
|
||||
doxygen) DOXYGEN="n";;
|
||||
*) echo "Invalid disable value: $disable_arg"; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
@ -115,10 +113,6 @@ while getopts a:b:c:d:l:m:n:s:p:f:w:h opt; do
|
||||
;;
|
||||
w) WRAPPER="$OPTARG"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported option: $opt"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -213,8 +207,7 @@ then
|
||||
add_extra_option "$NATIVE_LANG_SUPPORT" "" "--disable-nls"
|
||||
add_extra_option "$SMALL" "--enable-small" ""
|
||||
add_extra_option "$CLMUL" "" "--disable-clmul-crc"
|
||||
add_extra_option "$SANDBOX" "" "--disable-sandbox"
|
||||
add_extra_option "$DOXYGEN" "--enable-doxygen" ""
|
||||
add_extra_option "$SANDBOX" "" "--enable-sandbox=no"
|
||||
|
||||
# Workaround a bug in too old config.guess. Version with
|
||||
# timestamp='2022-05-08' would be needed but the autotools-dev
|
||||
@ -248,9 +241,7 @@ then
|
||||
# CMake disables the shared library by default.
|
||||
add_extra_option "$SHARED" "-DBUILD_SHARED_LIBS=ON" ""
|
||||
|
||||
add_extra_option "$NATIVE_LANG_SUPPORT" "" "-DXZ_NLS=OFF"
|
||||
add_extra_option "$SMALL" "-DXZ_SMALL=ON" ""
|
||||
add_extra_option "$DOXYGEN" "-DXZ_DOXYGEN=ON" ""
|
||||
|
||||
# Remove old cache file to clear previous settings.
|
||||
rm -f "CMakeCache.txt"
|
||||
|
||||
@ -42,12 +42,12 @@ case $FORMAT in
|
||||
groff -t -mandoc -Tutf8 -P-c | col -bx
|
||||
;;
|
||||
ps)
|
||||
sed "$SED_PD" | groff -dpaper="$PAPER" -t -mandoc \
|
||||
-rC1 -rS"$FONT" -Tps -P-p"$PAPER"
|
||||
sed "$SED_PD" | groff -dpaper=$PAPER -t -mandoc \
|
||||
-rC1 -rS$FONT -Tps -P-p$PAPER
|
||||
;;
|
||||
pdf)
|
||||
sed "$SED_PD" | groff -dpaper="$PAPER" -t -mandoc \
|
||||
-rC1 -rS"$FONT" -Tps -P-p"$PAPER" | ps2pdf - -
|
||||
sed "$SED_PD" | groff -dpaper=$PAPER -t -mandoc \
|
||||
-rC1 -rS$FONT -Tps -P-p$PAPER | ps2pdf - -
|
||||
;;
|
||||
*)
|
||||
echo 'Invalid arguments' >&2
|
||||
|
||||
@ -14,69 +14,6 @@ include(CheckCSourceCompiles)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckSymbolExists)
|
||||
|
||||
# An internal helper for tuklib_integer that attempts to detect if
|
||||
# -mstrict-align or -mno-strict-align is in effect. This sets the
|
||||
# cache variable TUKLIB_INTEGER_STRICT_ALIGN to ON if OBJDUMP_REGEX
|
||||
# matches the objdump output of a check program. Otherwise it is set to OFF.
|
||||
function(tuklib_integer_internal_strict_align OBJDUMP_REGEX)
|
||||
if(NOT DEFINED TUKLIB_INTEGER_STRICT_ALIGN)
|
||||
# Build a static library because then the function won't be optimized
|
||||
# away, and there won't be any unrelated startup code either.
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
|
||||
# CMake >= 3.25 wouldn't require us to create a temporary file,
|
||||
# but the following method is compatible with 3.20.
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/tuklib_integer_strict_align.c" "
|
||||
#include <string.h>
|
||||
unsigned int check_strict_align(const void *p)
|
||||
{
|
||||
unsigned int i;
|
||||
memcpy(&i, p, sizeof(i));
|
||||
return i;
|
||||
}
|
||||
")
|
||||
|
||||
# Force -O2 because memcpy() won't be optimized out if optimizations
|
||||
# are disabled.
|
||||
try_compile(
|
||||
TRY_COMPILE_RESULT
|
||||
"${CMAKE_BINARY_DIR}"
|
||||
"${CMAKE_BINARY_DIR}/tuklib_integer_strict_align.c"
|
||||
COMPILE_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}"
|
||||
CMAKE_FLAGS "-DCOMPILE_DEFINITIONS=${CMAKE_REQUIRED_FLAGS} -O2"
|
||||
COPY_FILE "${CMAKE_BINARY_DIR}/tuklib_integer_strict_align.a"
|
||||
)
|
||||
|
||||
if(NOT TRY_COMPILE_RESULT)
|
||||
message(FATAL_ERROR
|
||||
"Compilation of the strict align check failed. "
|
||||
"Either the specified compiler flags are broken "
|
||||
"or ${CMAKE_CURRENT_FUNCTION_LIST_FILE} has a bug.")
|
||||
endif()
|
||||
|
||||
# Use WORKING_DIRECTORY instead of passing the full path to objdump.
|
||||
# This ensures that the pathname won't affect the objdump output,
|
||||
# which could result in an unwanted regex match in the next step.
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_OBJDUMP}" -d "tuklib_integer_strict_align.a"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||
OUTPUT_VARIABLE OBJDUMP_OUTPUT
|
||||
RESULT_VARIABLE OBJDUMP_RESULT
|
||||
)
|
||||
|
||||
# FIXME? Should we remove the temporary files here?
|
||||
|
||||
# Look for instructions that load unsigned bytes. If none are found,
|
||||
# assume that -mno-strict-align is in effect.
|
||||
if(OBJDUMP_RESULT STREQUAL "0" AND
|
||||
OBJDUMP_OUTPUT MATCHES "${OBJDUMP_REGEX}")
|
||||
set(TUKLIB_INTEGER_STRICT_ALIGN ON CACHE INTERNAL "")
|
||||
else()
|
||||
set(TUKLIB_INTEGER_STRICT_ALIGN OFF CACHE INTERNAL "")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(tuklib_integer TARGET_OR_ALL)
|
||||
# Check for endianness. Unlike the Autoconf's AC_C_BIGENDIAN, this doesn't
|
||||
# support Apple universal binaries. The CMake module will leave the
|
||||
@ -123,145 +60,61 @@ function(tuklib_integer TARGET_OR_ALL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Autodetect if unaligned memory access is fast when the cache variable
|
||||
# TUKLIB_FAST_UNALIGNED_ACCESS isn't set. The result is stored in
|
||||
# FAST_UNALIGNED_GUESS. Assume that unaligned access shouldn't be used.
|
||||
# Initialize the variable here so that it's never undefined in the
|
||||
# option() command after the if()...endif() block.
|
||||
# Guess that unaligned access is fast on these archs:
|
||||
# - 32/64-bit x86 / x86-64
|
||||
# - 32/64-bit big endian PowerPC
|
||||
# - 64-bit little endian PowerPC
|
||||
# - Some 32-bit ARM
|
||||
# - Some 64-bit ARM64 (AArch64)
|
||||
# - Some 32/64-bit RISC-V
|
||||
#
|
||||
# CMake doesn't provide a standardized/normalized list of processor arch
|
||||
# names. For example, x86-64 may be "x86_64" (Linux), "AMD64" (Windows),
|
||||
# or even "EM64T" (64-bit WinXP).
|
||||
set(FAST_UNALIGNED_GUESS OFF)
|
||||
if(NOT DEFINED TUKLIB_FAST_UNALIGNED_ACCESS)
|
||||
message(CHECK_START "Check if unaligned memory access should be used")
|
||||
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" PROCESSOR)
|
||||
|
||||
# Guess that unaligned access is fast on these archs:
|
||||
# - 32/64-bit x86 / x86-64
|
||||
# - 32/64-bit big endian PowerPC
|
||||
# - 64-bit little endian PowerPC
|
||||
# - 32/64-bit Loongarch (*)
|
||||
# - Some 32-bit ARM
|
||||
# - Some 64-bit ARM64 (AArch64)
|
||||
# - Some 32/64-bit RISC-V
|
||||
#
|
||||
# (*) See sections 7.4, 8.1, and 8.2:
|
||||
# https://github.com/loongson/la-softdev-convention/blob/v0.2/la-softdev-convention.adoc
|
||||
#
|
||||
# That is, desktop and server processors likely support
|
||||
# unaligned access in hardware but embedded processors
|
||||
# might not. GCC defaults to -mno-strict-align and so
|
||||
# do majority of GNU/Linux distributions. As of
|
||||
# GCC 15.2, there is no predefined macro to detect
|
||||
# if -mstrict-align or -mno-strict-align is in effect.
|
||||
# We use heuristics based on compiler output.
|
||||
#
|
||||
# CMake < 4.1 doesn't provide a standardized/normalized list of arch
|
||||
# names. For example, x86-64 may be "x86_64" (Linux),
|
||||
# "AMD64" (Windows), or even "EM64T" (64-bit WinXP).
|
||||
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" PROCESSOR)
|
||||
# There is no ^ in the first regex branch to allow "i" at the beginning
|
||||
# so it can match "i386" to "i786", and "x86_64".
|
||||
if(PROCESSOR MATCHES "[x34567]86|^x64|^amd64|^em64t")
|
||||
set(FAST_UNALIGNED_GUESS ON)
|
||||
|
||||
# CMake 4.1 made CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID useful on many
|
||||
# targets. In earlier versions it's still useful with MSVC with which
|
||||
# CMAKE_SYSTEM_PROCESSOR can refer to the build machine.
|
||||
if(NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "")
|
||||
# CMake 4.2.0 docs say that the list typically has only one entry
|
||||
# except possibly on macOS. On macOS, most (all?) archs support
|
||||
# unaligned access. Just pick the first one from the list.
|
||||
list(GET CMAKE_C_COMPILER_ARCHITECTURE_ID 0 PROCESSOR)
|
||||
string(TOLOWER "${PROCESSOR}" PROCESSOR)
|
||||
endif()
|
||||
|
||||
# There is no ^ in the first regex branch to allow "i" at
|
||||
# the beginning so it can match "i386" to "i786", and "x86_64".
|
||||
if(PROCESSOR MATCHES "[x34567]86|^x64|^amd64|^em64t")
|
||||
elseif(PROCESSOR MATCHES "^powerpc|^ppc")
|
||||
if(WORDS_BIGENDIAN OR PROCESSOR MATCHES "64")
|
||||
set(FAST_UNALIGNED_GUESS ON)
|
||||
|
||||
elseif(PROCESSOR MATCHES "^powerpc|^ppc")
|
||||
if(WORDS_BIGENDIAN OR PROCESSOR MATCHES "64")
|
||||
set(FAST_UNALIGNED_GUESS ON)
|
||||
endif()
|
||||
|
||||
elseif(PROCESSOR MATCHES "^arm|^riscv" AND
|
||||
NOT PROCESSOR MATCHES "^arm64")
|
||||
# On 32-bit ARM, GCC and Clang # #define __ARM_FEATURE_UNALIGNED
|
||||
# if and only if unaligned access is supported.
|
||||
#
|
||||
# RISC-V C API Specification says that if
|
||||
# __riscv_misaligned_fast is defined then
|
||||
# unaligned access is known to be fast.
|
||||
#
|
||||
# MSVC is handled as a special case: We assume that
|
||||
# 32-bit ARM supports fast unaligned access.
|
||||
# If MSVC gets RISC-V support then this will assume
|
||||
# fast unaligned access on RISC-V too.
|
||||
check_c_source_compiles("
|
||||
#if !defined(__ARM_FEATURE_UNALIGNED) \
|
||||
&& !defined(__riscv_misaligned_fast) \
|
||||
&& !defined(_MSC_VER)
|
||||
compile error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
"
|
||||
TUKLIB_FAST_UNALIGNED_DEFINED_BY_PREPROCESSOR)
|
||||
if(TUKLIB_FAST_UNALIGNED_DEFINED_BY_PREPROCESSOR)
|
||||
set(FAST_UNALIGNED_GUESS ON)
|
||||
endif()
|
||||
|
||||
elseif(PROCESSOR MATCHES "^aarch64|^arm64")
|
||||
# On ARM64, Clang defines __ARM_FEATURE_UNALIGNED if and only if
|
||||
# unaligned access is supported. However, GCC (at least up to 15.2.0)
|
||||
# defines it even when using -mstrict-align, so autodetection with
|
||||
# this macro doesn't work with GCC on ARM64. (It does work on
|
||||
# 32-bit ARM.) See:
|
||||
#
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555
|
||||
#
|
||||
# We need three checks:
|
||||
#
|
||||
# 1. If __ARM_FEATURE_UNALIGNED is defined and the
|
||||
# compiler isn't GCC, unaligned access is enabled.
|
||||
# If the compiler is MSVC, unaligned access is
|
||||
# enabled even without __ARM_FEATURE_UNALIGNED.
|
||||
check_c_source_compiles("
|
||||
#if defined(__ARM_FEATURE_UNALIGNED) \
|
||||
&& (!defined(__GNUC__) || defined(__clang__))
|
||||
#elif defined(_MSC_VER)
|
||||
#else
|
||||
compile error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
"
|
||||
TUKLIB_FAST_UNALIGNED_DEFINED_BY_PREPROCESSOR)
|
||||
if(TUKLIB_FAST_UNALIGNED_DEFINED_BY_PREPROCESSOR)
|
||||
set(FAST_UNALIGNED_GUESS ON)
|
||||
else()
|
||||
# 2. If __ARM_FEATURE_UNALIGNED is not defined,
|
||||
# unaligned access is disabled.
|
||||
check_c_source_compiles("
|
||||
#ifdef __ARM_FEATURE_UNALIGNED
|
||||
compile error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
"
|
||||
TUKLIB_FAST_UNALIGNED_NOT_DEFINED_BY_PREPROCESSOR)
|
||||
if(NOT TUKLIB_FAST_UNALIGNED_NOT_DEFINED_BY_PREPROCESSOR)
|
||||
# 3. Use heuristics to detect if -mstrict-align is
|
||||
# in effect when building with GCC.
|
||||
tuklib_integer_internal_strict_align("[ \t]ldrb[ \t]")
|
||||
if(NOT TUKLIB_INTEGER_STRICT_ALIGN)
|
||||
set(FAST_UNALIGNED_GUESS ON)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
elseif(PROCESSOR MATCHES "^loongarch")
|
||||
tuklib_integer_internal_strict_align("[ \t]ld\\.bu[ \t]")
|
||||
if(NOT TUKLIB_INTEGER_STRICT_ALIGN)
|
||||
set(FAST_UNALIGNED_GUESS ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FAST_UNALIGNED_GUESS)
|
||||
message(CHECK_PASS "yes")
|
||||
else()
|
||||
message(CHECK_PASS "no")
|
||||
elseif(PROCESSOR MATCHES "^arm|^aarch64|^riscv")
|
||||
# On 32-bit and 64-bit ARM, GCC and Clang
|
||||
# #define __ARM_FEATURE_UNALIGNED if
|
||||
# unaligned access is supported.
|
||||
#
|
||||
# Exception: GCC at least up to 13.2.0
|
||||
# defines it even when using -mstrict-align
|
||||
# so in that case this autodetection goes wrong.
|
||||
# Most of the time -mstrict-align isn't used so it
|
||||
# shouldn't be a common problem in practice. See:
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555
|
||||
#
|
||||
# RISC-V C API Specification says that if
|
||||
# __riscv_misaligned_fast is defined then
|
||||
# unaligned access is known to be fast.
|
||||
#
|
||||
# MSVC is handled as a special case: We assume that
|
||||
# 32/64-bit ARM supports fast unaligned access.
|
||||
# If MSVC gets RISC-V support then this will assume
|
||||
# fast unaligned access on RISC-V too.
|
||||
check_c_source_compiles("
|
||||
#if !defined(__ARM_FEATURE_UNALIGNED) \
|
||||
&& !defined(__riscv_misaligned_fast) \
|
||||
&& !defined(_MSC_VER)
|
||||
compile error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
"
|
||||
TUKLIB_FAST_UNALIGNED_DEFINED_BY_PREPROCESSOR)
|
||||
if(TUKLIB_FAST_UNALIGNED_DEFINED_BY_PREPROCESSOR)
|
||||
set(FAST_UNALIGNED_GUESS ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
34
configure.ac
34
configure.ac
@ -758,7 +758,6 @@ fi
|
||||
# --with-pic and --without-pic though. As long as neither --with-pic nor
|
||||
# --without-pic is used then we can use #ifdef PIC to detect if the file is
|
||||
# being built for a shared library.
|
||||
LINKER_FLAG_UNDEFINED_VERSION=
|
||||
AS_IF([test "x$enable_symbol_versions" = xno], [
|
||||
enable_symbol_versions=no
|
||||
AC_MSG_RESULT([no])
|
||||
@ -832,34 +831,12 @@ AS_IF([test "x$enable_symbol_versions" = xno], [
|
||||
AC_MSG_ERROR([unknown symbol versioning variant '$enable_symbol_versions'])
|
||||
fi
|
||||
AC_MSG_RESULT([yes ($enable_symbol_versions)])
|
||||
|
||||
# If features are disabled in liblzma, some symbols may be missing.
|
||||
# LLVM's lld defaults to --no-undefined-version and the build breaks
|
||||
# if not all symbols in the version script exist. That is good for
|
||||
# catching errors like typos, but in our case the downside is too big.
|
||||
# Avoid the problem by using --undefined-version if the linker
|
||||
# supports it.
|
||||
#
|
||||
# GNU ld has had --no-undefined-version for a long time but it's not
|
||||
# the default. The opposite option --undefined-version was only added
|
||||
# in 2022, thus we must use --undefined-version conditionally.
|
||||
AC_MSG_CHECKING([if linker supports --undefined-version])
|
||||
OLD_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,--undefined-version"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void) { return 0; }]])], [
|
||||
LINKER_FLAG_UNDEFINED_VERSION=-Wl,--undefined-version
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
LDFLAGS=$OLD_LDFLAGS
|
||||
])
|
||||
|
||||
AM_CONDITIONAL([COND_SYMVERS_LINUX],
|
||||
[test "x$enable_symbol_versions" = xlinux])
|
||||
AM_CONDITIONAL([COND_SYMVERS_GENERIC],
|
||||
[test "x$enable_symbol_versions" = xgeneric])
|
||||
AC_SUBST([LINKER_FLAG_UNDEFINED_VERSION])
|
||||
|
||||
|
||||
###############################################################################
|
||||
@ -1008,8 +985,8 @@ AC_CHECK_DECL([CLOCK_MONOTONIC], [AC_DEFINE([HAVE_CLOCK_MONOTONIC], [1],
|
||||
# Find the best function to set timestamps.
|
||||
AC_CHECK_FUNCS([futimens futimes futimesat utimes _futime utime], [break])
|
||||
|
||||
# These are nice to have but not mandatory.
|
||||
AC_CHECK_FUNCS([getrlimit posix_fadvise])
|
||||
# This is nice to have but not mandatory.
|
||||
AC_CHECK_FUNCS([posix_fadvise])
|
||||
|
||||
TUKLIB_PROGNAME
|
||||
TUKLIB_INTEGER
|
||||
@ -1168,8 +1145,7 @@ int main(void)
|
||||
|
||||
# Check for ARM64 CRC32 instruction runtime detection.
|
||||
#
|
||||
# - getauxval() is supported on Linux. We also need HWCAP_CRC32 which was
|
||||
# added in glibc 2.24.
|
||||
# - getauxval() is supported on Linux.
|
||||
#
|
||||
# - elf_aux_info() is supported on FreeBSD and OpenBSD >= 7.6.
|
||||
#
|
||||
@ -1181,9 +1157,6 @@ int main(void)
|
||||
#
|
||||
AS_IF([test "x$enable_arm64_crc32" = xyes], [
|
||||
AC_CHECK_FUNCS([getauxval elf_aux_info sysctlbyname], [break])
|
||||
AC_CHECK_DECL([HWCAP_CRC32], [AC_DEFINE([HAVE_HWCAP_CRC32], [1],
|
||||
[Define to 1 if 'HWCAP_CRC32' is declared in <sys/auxv.h>.])],
|
||||
[], [[#include <sys/auxv.h>]])
|
||||
])
|
||||
|
||||
|
||||
@ -1360,7 +1333,6 @@ AS_IF([test "$GCC" = yes], [
|
||||
-Wdocumentation \
|
||||
-Wduplicate-enum \
|
||||
-Wempty-translation-unit \
|
||||
-Wextra-semi-stmt \
|
||||
-Wflexible-array-extensions \
|
||||
-Wmissing-variable-declarations \
|
||||
-Wnewline-eof \
|
||||
|
||||
@ -234,16 +234,3 @@ b523c5e47d1490338c5121bdf2a6ecca2bcf0dce05a83ad40a830029cbe6679b xz-5.8.0.tar.g
|
||||
05ecad9e71919f4fca9f19fbbc979ea28e230188ed123dc6f06b98031ea14542 xz-5.8.0.tar.xz
|
||||
397165cedccb8e16700b8fdd026c3fd7ff2d18923e28cfbf7d0c5f89cd6a50af xz-5.8.0-windows.zip
|
||||
078caa9d406018d4d43df343455f57811e9ba69c1340670a85a0ae6341d42ba3 xz-5.8.0-windows.7z
|
||||
ee188eabc3220684422f62df7a385541a86d2a5c385407f9d8fd94d49b251c4e xz-cve-2025-31115.patch
|
||||
c9789682496d124fd214e665f6aa2f6d3d9e8527a7f0e120f9180c531d322bd6 xz-5.8.1.tar
|
||||
5965c692c4c8800cd4b33ce6d0f6ac9ac9d6ab227b17c512b6561bce4f08d47e xz-5.8.1.tar.bz2
|
||||
507825b599356c10dca1cd720c9d0d0c9d5400b9de300af00e4d1ea150795543 xz-5.8.1.tar.gz
|
||||
0b54f79df85912504de0b14aec7971e3f964491af1812d83447005807513cd9e xz-5.8.1.tar.xz
|
||||
62fdfde73d5c5d293bbb4a96211b29d09adbd56bc6736976e4c9fc9942ae3c67 xz-5.8.1-windows.zip
|
||||
8ed1403fe6c971a2a6ac85fb7b27c8438b83175bc6f3bc49fec06540c904c84d xz-5.8.1-windows.7z
|
||||
b4c8a939220546e275456fac3d19540b152a85dfdb13d6e36289ed8fb49cb700 xz-5.8.2.tar
|
||||
60345d7c0b9c8d7ffa469e96898c300def3669f5047fc76219b819340839f3d8 xz-5.8.2.tar.bz2
|
||||
ce09c50a5962786b83e5da389c90dd2c15ecd0980a258dd01f70f9e7ce58a8f1 xz-5.8.2.tar.gz
|
||||
890966ec3f5d5cc151077879e157c0593500a522f413ac50ba26d22a9a145214 xz-5.8.2.tar.xz
|
||||
c90c4044b9562594d2125409dd4969ce0e281b9db60d2224c2f4a5419c7e2a4e xz-5.8.2-windows.zip
|
||||
a64996b3219461bd959735376eb413fecfe71a6247bcdb870a7be30bf2040fd8 xz-5.8.2-windows.7z
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
# - Instead of API docs, docs of XZ Utils internals may be built.
|
||||
# - Change the output directory for out-of-tree builds.
|
||||
#
|
||||
# These options were tested with Doxygen 1.9.8 and 1.13.2.
|
||||
# These options were tested with Doxygen 1.10.0.
|
||||
|
||||
PROJECT_NAME = "liblzma (XZ Utils)"
|
||||
OUTPUT_DIRECTORY = ../doc
|
||||
@ -19,8 +19,6 @@ RECURSIVE = YES
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
EXTRACT_STATIC = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
WARN_IF_UNDOCUMENTED = NO
|
||||
WARN_AS_ERROR = FAIL_ON_WARNINGS
|
||||
SOURCE_TOOLTIPS = NO
|
||||
VERBATIM_HEADERS = NO
|
||||
ALPHABETICAL_INDEX = NO
|
||||
@ -39,7 +37,3 @@ PREDEFINED = LZMA_API(type)=type \
|
||||
tuklib_attr_noreturn= \
|
||||
lzma_attribute(attr)= \
|
||||
lzma_attr_alloc_size(size)=
|
||||
|
||||
# Debian and Ubuntu patch Doxygen so that HAVE_DOT = YES is the default.
|
||||
# Set HAVE_DOT explicitly to get consistent behavior across distributions.
|
||||
HAVE_DOT = NO
|
||||
|
||||
@ -62,58 +62,6 @@ main(void)
|
||||
fi
|
||||
])
|
||||
|
||||
# On archs that we use tuklib_integer_strict_align() (see below), we need
|
||||
# objdump to detect support for unaligned access. (Libtool needs objdump
|
||||
# too, so Libtool does this same tool check as well.)
|
||||
AC_CHECK_TOOL([OBJDUMP], [objdump], [false])
|
||||
|
||||
# An internal helper that attempts to detect if -mstrict-align or
|
||||
# -mno-strict-align is in effect. This sets enable_unaligned_access=yes
|
||||
# if compilation succeeds and the regex passed as an argument does *not*
|
||||
# match the objdump output of a check program. Otherwise this sets
|
||||
# enable_unaligned_access=no.
|
||||
tuklib_integer_strict_align ()
|
||||
{
|
||||
# First guess no.
|
||||
enable_unaligned_access=no
|
||||
|
||||
# Force -O2 because without optimizations the memcpy()
|
||||
# won't be optimized out.
|
||||
tuklib_integer_saved_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -O2"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <string.h>
|
||||
unsigned int check_strict_align(const void *p)
|
||||
{
|
||||
unsigned int i;
|
||||
memcpy(&i, p, sizeof(i));
|
||||
return i;
|
||||
}
|
||||
]])], [
|
||||
# Disassemble the test function from the object file.
|
||||
if $OBJDUMP -d conftest.$ac_objext > conftest.s ; then
|
||||
# This function should be passed a regex that
|
||||
# matches if there are instructions that load
|
||||
# unsigned bytes. Such instructions indicate
|
||||
# that -mstrict-align is in effect.
|
||||
#
|
||||
# NOTE: Use braces to avoid M4 parameter
|
||||
# expansion.
|
||||
if grep -- "${1}" conftest.s > /dev/null ; then
|
||||
:
|
||||
else
|
||||
# No single-byte unsigned load
|
||||
# instructions were found,
|
||||
# so it seems that -mno-strict-align
|
||||
# is in effect.
|
||||
# Override our earlier guess.
|
||||
enable_unaligned_access=yes
|
||||
fi
|
||||
fi
|
||||
])
|
||||
CFLAGS=$tuklib_integer_saved_CFLAGS
|
||||
}
|
||||
|
||||
AC_MSG_CHECKING([if unaligned memory access should be used])
|
||||
AC_ARG_ENABLE([unaligned-access], AS_HELP_STRING([--enable-unaligned-access],
|
||||
[Enable if the system supports *fast* unaligned memory access
|
||||
@ -130,90 +78,34 @@ if test "x$enable_unaligned_access" = xauto ; then
|
||||
i?86|x86_64|powerpc|powerpc64|powerpc64le)
|
||||
enable_unaligned_access=yes
|
||||
;;
|
||||
arm*|riscv*)
|
||||
# On 32-bit ARM, GCC and Clang
|
||||
# #define __ARM_FEATURE_UNALIGNED
|
||||
# if and only if unaligned access is supported.
|
||||
arm*|aarch64*|riscv*)
|
||||
# On 32-bit and 64-bit ARM, GCC and Clang
|
||||
# #define __ARM_FEATURE_UNALIGNED if
|
||||
# unaligned access is supported.
|
||||
#
|
||||
# Exception: GCC at least up to 13.2.0
|
||||
# defines it even when using -mstrict-align
|
||||
# so in that case this autodetection goes wrong.
|
||||
# Most of the time -mstrict-align isn't used so it
|
||||
# shouldn't be a common problem in practice. See:
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555
|
||||
#
|
||||
# RISC-V C API Specification says that if
|
||||
# __riscv_misaligned_fast is defined then
|
||||
# unaligned access is known to be fast.
|
||||
#
|
||||
# MSVC is handled as a special case: We assume that
|
||||
# 32-bit ARM supports fast unaligned access.
|
||||
# 32/64-bit ARM supports fast unaligned access.
|
||||
# If MSVC gets RISC-V support then this will assume
|
||||
# fast unaligned access on RISC-V too.
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
#if !defined(__ARM_FEATURE_UNALIGNED) \
|
||||
&& !defined(__riscv_misaligned_fast) \
|
||||
&& !defined(_MSC_VER)
|
||||
compile error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
])],
|
||||
[enable_unaligned_access=yes],
|
||||
[enable_unaligned_access=no])
|
||||
;;
|
||||
aarch64*)
|
||||
# On ARM64, Clang defines __ARM_FEATURE_UNALIGNED
|
||||
# if and only if unaligned access is supported.
|
||||
# However, GCC (at least up to 15.2.0) defines it
|
||||
# even when using -mstrict-align, so autodetection
|
||||
# with this macro doesn't work with GCC on ARM64.
|
||||
# (It does work on 32-bit ARM.) See:
|
||||
#
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555
|
||||
#
|
||||
# We need three checks:
|
||||
#
|
||||
# 1. If __ARM_FEATURE_UNALIGNED is defined and the
|
||||
# compiler isn't GCC, unaligned access is enabled.
|
||||
# If the compiler is MSVC, unaligned access is
|
||||
# enabled even without __ARM_FEATURE_UNALIGNED.
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
#if defined(__ARM_FEATURE_UNALIGNED) \
|
||||
&& (!defined(__GNUC__) \
|
||||
|| defined(__clang__))
|
||||
#elif defined(_MSC_VER)
|
||||
#else
|
||||
compile error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
])], [enable_unaligned_access=yes])
|
||||
|
||||
# 2. If __ARM_FEATURE_UNALIGNED is not defined,
|
||||
# unaligned access is disabled.
|
||||
if test "x$enable_unaligned_access" = xauto ; then
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
#ifdef __ARM_FEATURE_UNALIGNED
|
||||
compile error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
])], [enable_unaligned_access=no])
|
||||
fi
|
||||
|
||||
# 3. Use heuristics to detect if -mstrict-align is
|
||||
# in effect when building with GCC.
|
||||
if test "x$enable_unaligned_access" = xauto ; then
|
||||
[tuklib_integer_strict_align \
|
||||
'[[:blank:]]ldrb[[:blank:]]']
|
||||
fi
|
||||
;;
|
||||
loongarch*)
|
||||
# See sections 7.4, 8.1, and 8.2:
|
||||
# https://github.com/loongson/la-softdev-convention/blob/v0.2/la-softdev-convention.adoc
|
||||
#
|
||||
# That is, desktop and server processors likely support
|
||||
# unaligned access in hardware but embedded processors
|
||||
# might not. GCC defaults to -mno-strict-align and so
|
||||
# do majority of GNU/Linux distributions. As of
|
||||
# GCC 15.2, there is no predefined macro to detect
|
||||
# if -mstrict-align or -mno-strict-align is in effect.
|
||||
# Use heuristics based on compiler output.
|
||||
[
|
||||
tuklib_integer_strict_align \
|
||||
'[[:blank:]]ld\.bu[[:blank:]]'
|
||||
]
|
||||
#if !defined(__ARM_FEATURE_UNALIGNED) \
|
||||
&& !defined(__riscv_misaligned_fast) \
|
||||
&& !defined(_MSC_VER)
|
||||
compile error
|
||||
#endif
|
||||
int main(void) { return 0; }
|
||||
])], [enable_unaligned_access=yes], [enable_unaligned_access=no])
|
||||
;;
|
||||
*)
|
||||
enable_unaligned_access=no
|
||||
|
||||
1
po/.gitignore
vendored
1
po/.gitignore
vendored
@ -5,7 +5,6 @@ Rules-quot
|
||||
boldquot.sed
|
||||
en@boldquot.header
|
||||
en@quot.header
|
||||
insert-header.sed
|
||||
insert-header.sin
|
||||
quot.sed
|
||||
remove-potcdate.sin
|
||||
|
||||
@ -10,7 +10,6 @@ src/xz/main.c
|
||||
src/xz/message.c
|
||||
src/xz/mytime.c
|
||||
src/xz/options.c
|
||||
src/xz/sandbox.c
|
||||
src/xz/signals.c
|
||||
src/xz/suffix.c
|
||||
src/xz/util.c
|
||||
|
||||
10
po/es.po
10
po/es.po
@ -1,16 +1,16 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
#
|
||||
# Spanish translation for xz-5.8.0-pre1.
|
||||
# Spanish translation for xz-5.7.1-dev1.
|
||||
# Copyright (C) 2024, 2025 The XZ Utils authors and contributors
|
||||
# This file is published under the BSD Zero Clause License.
|
||||
# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2022, 2023, 2024, 2025.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz 5.8.0-pre1\n"
|
||||
"Project-Id-Version: xz 5.7.1-dev1\n"
|
||||
"Report-Msgid-Bugs-To: xz@tukaani.org\n"
|
||||
"POT-Creation-Date: 2025-01-29 20:59+0200\n"
|
||||
"PO-Revision-Date: 2025-05-14 14:23-0600\n"
|
||||
"PO-Revision-Date: 2025-01-24 09:25-0600\n"
|
||||
"Last-Translator: Cristian Othón Martínez Vera <cfuga@cfuga.mx>\n"
|
||||
"Language-Team: Spanish <es@tp.org.es>\n"
|
||||
"Language: es\n"
|
||||
@ -1169,7 +1169,7 @@ msgstr "Los sufijos válidos son 'KiB' (2^10), 'MiB' (2^20), y 'GiB' (2^30)."
|
||||
#: src/xz/util.c
|
||||
#, c-format
|
||||
msgid "Value of the option '%s' must be in the range [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr "El valor de la opción '%s' debe estar en el intervalo [%<PRIu64>, %<PRIu64>]"
|
||||
msgstr "El valor de la opción '%s' debe estar en el rango [%<PRIu64>, %<PRIu64>]"
|
||||
|
||||
#: src/xz/util.c
|
||||
msgid "Compressed data cannot be read from a terminal"
|
||||
@ -1223,7 +1223,7 @@ msgstr "El valor de la opción no puede estar vacío"
|
||||
|
||||
#: src/liblzma/common/string_conversion.c
|
||||
msgid "Value out of range"
|
||||
msgstr "Valor fuera de intervalo"
|
||||
msgstr "Valor fuera de rango"
|
||||
|
||||
#: src/liblzma/common/string_conversion.c
|
||||
msgid "This option does not support any multiplier suffixes"
|
||||
|
||||
15
po4a/it.po
15
po4a/it.po
@ -6,9 +6,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-man 5.8.2-pre1\n"
|
||||
"POT-Creation-Date: 2025-10-31 13:23+0200\n"
|
||||
"PO-Revision-Date: 2025-11-01 11:04+0200\n"
|
||||
"Project-Id-Version: xz-man 5.8.0-pre1\n"
|
||||
"POT-Creation-Date: 2025-03-08 14:50+0200\n"
|
||||
"PO-Revision-Date: 2025-03-10 08:02+0000\n"
|
||||
"Last-Translator: Luca Vercelli <luca.vercelli.to@gmail.com>\n"
|
||||
"Language-Team: Italian <tp@lists.linux.it>\n"
|
||||
"Language: it\n"
|
||||
@ -586,8 +586,13 @@ msgstr "Accetta solo file B<.lz> per la decompressione. La compressione non è s
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "The B<.lz> format versions 0 and 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18. B<lzip> 1.4 and later create files in the format version 1."
|
||||
msgstr "Sono supportate le versioni 0 e 1 del formato B<.lz>. I file in versione 0 sono stati prodotti da B<lzip> 1.3 e precedenti. Questi file non sono comuni, ma possono essere trovati negli archivi di file, perché alcuni pacchetti sorgente erano stati rilasciati in questo formato. Qualcuno potrebbe anche avere vecchi file personali in questo formato. Il supporto alla decompressione per la versione di formato 0 è stato rimosso in B<lzip> 1.18. B<lzip> 1.4 e successivi creano i file nella versione di formato 1."
|
||||
msgid "The B<.lz> format version 0 and the unextended version 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18."
|
||||
msgstr "Sono supportati il formato B<.lz> versione 0 e la versione 1 non estesa. I file della versione 0 sono stati prodotti da B<lzip> 1.3 e precedenti. Tali file non sono comuni, ma possono essere trovati negli archivi di file poiché alcuni pacchetti sorgente sono stati rilasciati in questo formato. Anche alcune persone potrebbero avere vecchi file personali in questo formato. Il supporto alla decompressione per il formato versione 0 è stato rimosso in B<lzip> 1.18."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "B<lzip> 1.4 and later create files in the format version 1. The sync flush marker extension to the format version 1 was added in B<lzip> 1.6. This extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt input)."
|
||||
msgstr "B<lzip> 1.4 e successivi creano file nel formato v1. L'estensione del marcatore di scaricamento sincronizzazione al formato v1 è stata aggiunta in B<lzip> 1.6. Questa estensione è utilizzata raramente e non è supportata da B<xz>(viene segnalata come input corrotto)."
|
||||
|
||||
#. type: TP
|
||||
#: ../src/xz/xz.1
|
||||
|
||||
17
po4a/ko.po
17
po4a/ko.po
@ -5,9 +5,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-man 5.8.2-pre1\n"
|
||||
"POT-Creation-Date: 2025-10-31 13:23+0200\n"
|
||||
"PO-Revision-Date: 2025-11-01 23:14+0900\n"
|
||||
"Project-Id-Version: xz-man 5.8.0-pre1\n"
|
||||
"POT-Creation-Date: 2025-03-08 14:50+0200\n"
|
||||
"PO-Revision-Date: 2025-03-11 01:03+0900\n"
|
||||
"Last-Translator: Seong-ho Cho <darkcircle.0426@gmail.com>\n"
|
||||
"Language-Team: Korean <translation-team-ko@googlegroups.com>\n"
|
||||
"Language: ko\n"
|
||||
@ -16,7 +16,7 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"X-Generator: Poedit 3.7\n"
|
||||
"X-Generator: Poedit 3.5\n"
|
||||
|
||||
#. type: TH
|
||||
#: ../src/xz/xz.1
|
||||
@ -580,8 +580,13 @@ msgstr "압축 해제시 B<.lz> 파일만 받아들입니다. 압축은 지원
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "The B<.lz> format versions 0 and 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18. B<lzip> 1.4 and later create files in the format version 1."
|
||||
msgstr "B<.lz> 형식 버전 0과 1을 지원합니다. 버전 0파일은 B<lzip> 1.3 이전에서만 만듭니다. 일반적이진 않지만 일부 파일의 경우 이 형식의 원본 패키지로 보관한 파일을 찾을 수도 있습니다. 개인적으로 이 형식으로 압축한 오래된 개인 파일을 가지고 있을 수도 있습니다. 형식 버전 0 압축 해제 지원은 B<lzip> 1.18에서 제거했습니다. B<lzip> 1.4 이후의 버전에서는 버전 1 형식 파일을 만듭니다."
|
||||
msgid "The B<.lz> format version 0 and the unextended version 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18."
|
||||
msgstr "B<.lz> 형식 버전 0과 비확장 버전 1을 지원합니다. 버전 0파일은 B<lzip> 1.3 이전에서만 만듭니다. 일반적이진 않지만 일부 파일의 경우 이 형식과 관련된 원본 패키지로 보관한 파일을 찾을 수도 있습니다. 개인적으로 이 형식으로 압축한 오래된 개인 파일을 가지고 있을 수도 있습니다. 형식 버전 0 압축 해제 지원은 B<lzip> 1.18에서 제거했습니다."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "B<lzip> 1.4 and later create files in the format version 1. The sync flush marker extension to the format version 1 was added in B<lzip> 1.6. This extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt input)."
|
||||
msgstr "B<lzip> 1.4 이상에서는 버전 1형식의 파일을 만듭니다. 형식 버전 1로의 동기화 제거 마커 확장은 B<lzip> 1.6에 추가했습니다. 이 확장은 거의 쓰지 않으며 B<xz> 에서 조차도 지원하지 않습니다(손상된 입력 파일로 진단함)."
|
||||
|
||||
#. type: TP
|
||||
#: ../src/xz/xz.1
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
# to get a new .po file. After translating the .po file, run
|
||||
# "update-po" again to generate the translated man pages.
|
||||
|
||||
[po4a_langs] de fr it ko pt_BR ro sr sv uk
|
||||
[po4a_langs] de fr it ko pt_BR ro sr uk
|
||||
[po4a_paths] xz-man.pot $lang:$lang.po
|
||||
|
||||
[type: man] ../src/xz/xz.1 $lang:man/$lang/xz.1 add_$lang:?$lang.po.authors
|
||||
|
||||
18
po4a/ro.po
18
po4a/ro.po
@ -15,14 +15,13 @@
|
||||
# Actualizare a traducerii pentru versiunea 5.6.0-pre2, făcută de R-GC, feb-2024.
|
||||
# Actualizare a traducerii pentru versiunea 5.7.1-dev1, făcută de R-GC, ian-2025.
|
||||
# Actualizare a traducerii pentru versiunea 5.8.0-pre1, făcută de R-GC, mar-2025.
|
||||
# Actualizare a traducerii pentru versiunea 5.8.2-pre1, făcută de R-GC, oct-2025.
|
||||
# Actualizare a traducerii pentru versiunea Y, făcută de X, Z(luna-anul).
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-man 5.8.2-pre1\n"
|
||||
"POT-Creation-Date: 2025-10-31 13:23+0200\n"
|
||||
"PO-Revision-Date: 2025-10-31 18:03+0100\n"
|
||||
"Project-Id-Version: xz-man 5.8.0-pre1\n"
|
||||
"POT-Creation-Date: 2025-03-08 14:50+0200\n"
|
||||
"PO-Revision-Date: 2025-03-09 20:57+0100\n"
|
||||
"Last-Translator: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>\n"
|
||||
"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
|
||||
"Language: ro\n"
|
||||
@ -31,7 +30,7 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: plural=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2);\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"X-Generator: Poedit 3.6\n"
|
||||
"X-Generator: Poedit 3.5\n"
|
||||
|
||||
#. type: TH
|
||||
#: ../src/xz/xz.1
|
||||
@ -601,8 +600,13 @@ msgstr "Acceptă numai fișierele B<.lz> când decomprimă. Comprimarea nu este
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "The B<.lz> format versions 0 and 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18. B<lzip> 1.4 and later create files in the format version 1."
|
||||
msgstr "Sunt acceptate versiunile 0 și 1 ale formatului B<.lz>. Fișierele versiunii 0 au fost create cu B<lzip> 1.3 și versiuni mai vechi. Astfel de fișiere nu sunt comune, dar pot fi găsite în arhivele de fișiere, deoarece câteva pachete sursă au fost lansate în acest format. Este posibil ca oamenii să aibă și fișiere personale vechi în acest format. Suportul pentru decomprimare pentru versiunea 0 a formatului a fost eliminat în B<lzip> 1.18. B<lzip> 1.4 și versiunile ulterioare creează fișiere în versiunea 1 a formatului."
|
||||
msgid "The B<.lz> format version 0 and the unextended version 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18."
|
||||
msgstr "Formatul B<.lz> versiunea 0 și versiunea neextinsă 1 sunt acceptate. Fișierele versiunea 0 au fost produse de B<lzip> cu versiunea 1.3 sau mai veche. Astfel de fișiere nu sunt obișnuite, dar pot fi găsite în arhivele de fișiere, deoarece câteva pachete sursă au fost lansate în acest format. Oamenii ar putea avea și fișiere personale vechi în acest format. Suportul de decomprimare pentru versiunea de format 0 a fost eliminat în B<lzip> 1.18."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "B<lzip> 1.4 and later create files in the format version 1. The sync flush marker extension to the format version 1 was added in B<lzip> 1.6. This extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt input)."
|
||||
msgstr "B<lzip> 1.4 și versiunile ulterioare creează fișiere în formatul versiunea 1. Extensia „sync flush marker” pentru versiunea 1 de format a fost adăugată în B<lzip> 1.6. Această extensie este folosită rar și nu este acceptată de B<xz> (diagnosticată ca intrare coruptă)."
|
||||
|
||||
#. type: TP
|
||||
#: ../src/xz/xz.1
|
||||
|
||||
83
po4a/sr.po
83
po4a/sr.po
@ -7,9 +7,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-man 5.8.2-pre1\n"
|
||||
"POT-Creation-Date: 2025-10-31 13:23+0200\n"
|
||||
"PO-Revision-Date: 2025-11-02 19:22+0100\n"
|
||||
"Project-Id-Version: xz-man 5.7.1-dev1\n"
|
||||
"POT-Creation-Date: 2025-03-25 12:28+0200\n"
|
||||
"PO-Revision-Date: 2025-03-02 17:46+0100\n"
|
||||
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
|
||||
"Language-Team: Serbian <(nothing)>\n"
|
||||
"Language: sr\n"
|
||||
@ -18,7 +18,7 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Bugs: Report translation errors to the Language-Team address.\n"
|
||||
"X-Generator: Poedit 3.6\n"
|
||||
"X-Generator: Poedit 3.5\n"
|
||||
|
||||
#. type: TH
|
||||
#: ../src/xz/xz.1
|
||||
@ -28,9 +28,10 @@ msgstr "XZ"
|
||||
|
||||
#. type: TH
|
||||
#: ../src/xz/xz.1
|
||||
#, no-wrap
|
||||
#, fuzzy, no-wrap
|
||||
#| msgid "2025-01-05"
|
||||
msgid "2025-03-08"
|
||||
msgstr "08.03.2025."
|
||||
msgstr "05.01.2025."
|
||||
|
||||
#. type: TH
|
||||
#: ../src/xz/xz.1 ../src/xzdec/xzdec.1 ../src/lzmainfo/lzmainfo.1
|
||||
@ -582,8 +583,13 @@ msgstr "Прихвата само B<.lz> датотеке приликом ра
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "The B<.lz> format versions 0 and 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18. B<lzip> 1.4 and later create files in the format version 1."
|
||||
msgstr "Формат B<.lz> издања 0 и 1 је подржан. Датотеке издања 0 су настале са B<lzip> 1.3 и старијим. Такве датотеке нису уобичајене али се могу наћи у архивама датотека јер је неколико пакета извора издато у овом формату. Такође можда неко има старе личне датотеке у овом формату. Подршка распакивања за формат издања 0 је уклоњена у B<lzip> 1.18. B<lzip> 1.4 и новији ствара датотеке у формату издања 1."
|
||||
msgid "The B<.lz> format version 0 and the unextended version 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18."
|
||||
msgstr "Формат B<.lz> издање 0 и непроширено издање 1 су подржани. Датотеке издања 0 су настале са B<lzip> 1.3 и старијим. Такве датотеке нису уобичајене али се могу наћи у архивама датотека јер је неколико пакета извора издато у овом формату. Такође можда неко има старе личне датотеке у овом формату. Подршка распакивања за формат издања 0 је уклоњена у B<lzip> 1.18."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "B<lzip> 1.4 and later create files in the format version 1. The sync flush marker extension to the format version 1 was added in B<lzip> 1.6. This extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt input)."
|
||||
msgstr "B<lzip> 1.4 и новији праве датотеке у формату издања 1. Проширење означавача испирања усклађивања за формат издања 1 додато је у B<lzip> 1.6. Ово проширење се ретко користи и не подржава га B<xz> (препознаје се као оштећени улаз)."
|
||||
|
||||
#. type: TP
|
||||
#: ../src/xz/xz.1
|
||||
@ -1555,7 +1561,7 @@ msgstr "B<preset=>I<предподешавање>"
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "Reset all LZMA1 or LZMA2 I<options> to I<preset>. I<Preset> consist of an integer, which may be followed by single-letter preset modifiers. The integer can be from B<0> to B<9>, matching the command line options B<-0> \\&...\\& B<-9>. The only supported modifier is currently B<e>, which matches B<--extreme>. If no B<preset> is specified, the default values of LZMA1 or LZMA2 I<options> are taken from the preset B<6>."
|
||||
msgstr "Враћа све LZMA1 или LZMA2 I<опције> на I<предподешеност>. I<Предпдешеност> се састоји од целог броја, за којим може да следи једнословни измењивач предподешености. Цео број може бити од B<0> до B<9>, поклапајући опције линије наредби B<-0> \\&...\\& B<-9>. Једини тренутно подржани измењивач је B<e>, који се поклапа са B<--extreme>. Ако B<preset> није наведено, основне вредности LZMA1 или LZMA2 I<опција> се узимају из предподешености B<6>."
|
||||
msgstr "Враћа све LZMA1 или LZMA2 I<опције> на I<предподешеност>. I<Предпдешеност> се састоји од целог броја, за којим може да следи једнословни измењивач предподешености. Цео број може бити од B<0> до B<9>, поклапајући опције линије наредби B<-0> \\&...\\& B<-9>. Једини тренутно подржани измењивач је B<e>, који се поклапа са B<--extreme>. Ако B<предподешеност> није наведена, основне вредности LZMA1 или LZMA2 I<опција> се узимају из предподешености B<6>."
|
||||
|
||||
#. type: TP
|
||||
#: ../src/xz/xz.1
|
||||
@ -2640,7 +2646,7 @@ msgstr "Број датотека. Ту се држи поредак раниј
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "If B<--verbose> was specified twice, additional columns are included on the B<totals> line:"
|
||||
msgstr "Ако је B<--verbose> наведено два пута, додатне колоне су укључене у реду B<totals>:"
|
||||
msgstr "Ако је B<--verbose> наведено два пута, додатне колоне су укључене у реду B<укупности>:"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
@ -2896,7 +2902,7 @@ msgstr "B<xz> обрађује размаком одвојени списак о
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "B<Warning:> By setting these environment variables, one is effectively modifying programs and scripts that run B<xz>. Most of the time it is safe to set memory usage limits, number of threads, and compression options via the environment variables. However, some options can break scripts. An obvious example is B<--help> which makes B<xz> show the help text instead of compressing or decompressing a file. More subtle examples are B<--quiet> and B<--verbose>. In many cases it works well to enable the progress indicator using B<--verbose>, but in some situations the extra messages create problems. The verbosity level also affects the behavior of B<--list>."
|
||||
msgstr "B<Упозорење:> Постављањем ових променљивих окружења, ефективно мењате програме и скрипте које покреће B<xz>. У већини случајева је безбедно поставити ограничење коришћења, број нити и опција паковања путем променљивих окружења. Међутим, неке опције могу да уруше скрипте. Очигледан пример је B<--help> која чини да B<xz> прикаже текст помоћи уместо да запакује или распакује датотеку. Суптилнији примери су B<--quiet> и B<--verbose>. У многим случајевима добро функционише омогућавање указивача напредовања коришћењем B<--verbose>, али у неким ситуацијама додатне поруке стварају проблеме. Ниво опширности такође утиче на понашање B<--list>"
|
||||
msgstr ""
|
||||
|
||||
#. type: TP
|
||||
#: ../src/xz/xz.1
|
||||
@ -2906,8 +2912,10 @@ msgstr "B<XZ_DEFAULTS>"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
#, fuzzy
|
||||
#| msgid "User-specific or system-wide default options. Typically this is set in a shell initialization script to enable B<xz>'s memory usage limiter by default. Excluding shell initialization scripts and similar special cases, scripts must never set or unset B<XZ_DEFAULTS>."
|
||||
msgid "User-specific or system-wide default options. Typically this is set in a shell initialization script to enable B<xz>'s memory usage limiter by default or set the default number of threads. Excluding shell initialization scripts and similar special cases, scripts should never set or unset B<XZ_DEFAULTS>."
|
||||
msgstr "Кориснику специфичне или свеопште системске основне опције. Обично је ово постављено у скрипти покретања конзоле за укључивање B<xz> ограничавача коришћења меморије по основи или за постављање основног броја нити. Искључивање скрипти покретања конзоле и сличних специјалних случајева, скрипте не смеју никада да поставе или пониште B<XZ_DEFAULTS>."
|
||||
msgstr "Кориснику специфичне или свеопште системске основне опције. Обично је ово постављено у скрипти покретања конзоле за укључивање B<xz> ограничавача коришћења меморије по основи. Искључивање скрипти покретања конзоле и сличних специјалних случајева, скрипте не смеју никада да поставе или пониште B<XZ_DEFAULTS>."
|
||||
|
||||
#. type: TP
|
||||
#: ../src/xz/xz.1
|
||||
@ -3583,9 +3591,10 @@ msgstr "XZDIFF"
|
||||
#. type: TH
|
||||
#: ../src/scripts/xzdiff.1 ../src/scripts/xzgrep.1 ../src/scripts/xzless.1
|
||||
#: ../src/scripts/xzmore.1
|
||||
#, no-wrap
|
||||
#, fuzzy, no-wrap
|
||||
#| msgid "2025-01-05"
|
||||
msgid "2025-03-06"
|
||||
msgstr "06.03.2025."
|
||||
msgstr "05.01.2025."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzdiff.1
|
||||
@ -3604,13 +3613,17 @@ msgstr "B<xzdiff> \\&..."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzdiff.1
|
||||
#, fuzzy
|
||||
#| msgid "B<lzcmp> \\&..."
|
||||
msgid "B<lzcmp> \\&... (DEPRECATED)"
|
||||
msgstr "B<lzcmp> \\&... (ЗАСТАРЕЛО)"
|
||||
msgstr "B<lzcmp> \\&..."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzdiff.1
|
||||
#, fuzzy
|
||||
#| msgid "B<lzdiff> \\&..."
|
||||
msgid "B<lzdiff> \\&... (DEPRECATED)"
|
||||
msgstr "B<lzdiff> \\&... (ЗАСТАРЕЛО)"
|
||||
msgstr "B<lzdiff> \\&..."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzdiff.1
|
||||
@ -3629,8 +3642,10 @@ msgstr "Ако је достављен само један назив датот
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzdiff.1
|
||||
#, fuzzy
|
||||
#| msgid "The commands B<lzcmp> and B<lzdiff> are provided for backward compatibility with LZMA Utils."
|
||||
msgid "The commands B<lzcmp> and B<lzdiff> are provided for backward compatibility with LZMA Utils. They are deprecated and will be removed in a future version."
|
||||
msgstr "Наредбе B<lzcmp> и B<lzdiff> се достављају зарад назадне сагласности са LZMA Utils. Застареле су и биће уклоњене у будућем издању."
|
||||
msgstr "Наредбе B<lzcmp> и B<lzdiff> се достављају зарад назадне сагласности са LZMA Utils."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzdiff.1
|
||||
@ -3670,23 +3685,29 @@ msgstr "B<xzfgrep> \\&..."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzgrep.1
|
||||
#, fuzzy
|
||||
#| msgid "B<lzgrep> \\&..."
|
||||
msgid "B<lzgrep> \\&... (DEPRECATED)"
|
||||
msgstr "B<lzgrep> \\&... (ЗАСТАРЕЛО)"
|
||||
msgstr "B<lzgrep> \\&..."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzgrep.1
|
||||
#, fuzzy
|
||||
#| msgid "B<lzegrep> \\&..."
|
||||
msgid "B<lzegrep> \\&... (DEPRECATED)"
|
||||
msgstr "B<lzegrep> \\&... (ЗАСТАРЕЛО)"
|
||||
msgstr "B<lzegrep> \\&..."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzgrep.1
|
||||
#, fuzzy
|
||||
#| msgid "B<lzfgrep> \\&..."
|
||||
msgid "B<lzfgrep> \\&... (DEPRECATED)"
|
||||
msgstr "B<lzfgrep> \\&... (ЗАСТАРЕЛО)"
|
||||
msgstr "B<lzfgrep> \\&..."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzgrep.1
|
||||
msgid "B<xzgrep> invokes B<grep>(1) on uncompressed contents of files. The formats of the I<files> are determined from the filename suffixes. Any I<file> with a suffix supported by B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), or B<lz4>(1) will be decompressed; all other files are assumed to be uncompressed."
|
||||
msgstr "B<xzgrep> призива B<grep>(1) на незапакованим садржајима датотека. Формати I<датотека> се одређују из суфикса назива датотека. Било која I<датотека> са суфиксом подржаним од стране B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1) или B<lz4>(1) биће распакована; све остале датотеке се подразумевају да нису запаковане."
|
||||
msgstr "B<xzgrep> призива B<grep>(1) на незапакованим садржајима датотека. Формати I<датотека> се одређују из суфикса назива датотека. Било која I<датотека> са суфиксом подржаним од стране B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1) или B<lz4>(1) биће распакована; све остале датотеке се подразумевају да нису запаковане"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzgrep.1
|
||||
@ -3750,8 +3771,10 @@ msgstr "B<xzegrep> је алијас за B<xzgrep -E>. B<xzfgrep> је али
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzgrep.1
|
||||
#, fuzzy
|
||||
#| msgid "The commands B<lzgrep>, B<lzegrep>, and B<lzfgrep> are provided for backward compatibility with LZMA Utils."
|
||||
msgid "The commands B<lzgrep>, B<lzegrep>, and B<lzfgrep> are provided for backward compatibility with LZMA Utils. They are deprecated and will be removed in a future version."
|
||||
msgstr "Наредбе B<lzgrep>, B<lzegrep> и B<lzfgrep> се достављају зарад назадне сагласности са LZMA Utils. Застареле су и биће уклоњене у будућем издању."
|
||||
msgstr "Наредбе B<lzgrep>, B<lzegrep> и B<lzfgrep> се достављају зарад назадне сагласности са LZMA Utils."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzgrep.1
|
||||
@ -3808,8 +3831,10 @@ msgstr "B<xzless> [I<датотека>...]"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzless.1
|
||||
#, fuzzy
|
||||
#| msgid "B<lzless> [I<file>...]"
|
||||
msgid "B<lzless> [I<file>...] (DEPRECATED)"
|
||||
msgstr "B<lzless> [I<датотека>...] (ЗАСТАРЕЛО)"
|
||||
msgstr "B<lzless> [I<датотека>...]"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzless.1
|
||||
@ -3823,8 +3848,10 @@ msgstr "B<xzless> користи B<less>(1) да представи свој и
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzless.1
|
||||
#, fuzzy
|
||||
#| msgid "The command named B<lzless> is provided for backward compatibility with LZMA Utils."
|
||||
msgid "The command named B<lzless> is provided for backward compatibility with LZMA Utils. It is deprecated and will be removed in a future version."
|
||||
msgstr "Наредба B<lzless> се доставља зарад назадне сагласности са LZMA Utils. Застарела је и биће уклоњена у будућем издању."
|
||||
msgstr "Наредба B<lzless> се доставља зарад назадне сагласности са LZMA Utils."
|
||||
|
||||
#. type: TP
|
||||
#: ../src/scripts/xzless.1
|
||||
@ -3871,8 +3898,10 @@ msgstr "B<xzmore> [I<датотека>...]"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzmore.1
|
||||
#, fuzzy
|
||||
#| msgid "B<lzmore> [I<file>...]"
|
||||
msgid "B<lzmore> [I<file>...] (DEPRECATED)"
|
||||
msgstr "B<lzmore> [I<датотека>...] (ЗАСТАРЕЛО)"
|
||||
msgstr "B<lzmore> [I<датотека>...]"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzmore.1
|
||||
@ -3886,8 +3915,10 @@ msgstr "Знајте да клизање уназад можда неће бит
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/scripts/xzmore.1
|
||||
#, fuzzy
|
||||
#| msgid "The command B<lzmore> is provided for backward compatibility with LZMA Utils."
|
||||
msgid "The command B<lzmore> is provided for backward compatibility with LZMA Utils. It is deprecated and will be removed in a future version."
|
||||
msgstr "Наредба B<lzmore> се доставља зарад назадне сагласности са LZMA Utils. Застарела је и биће уклоњена у будућем издању."
|
||||
msgstr "Наредба B<lzmore> се доставља зарад назадне сагласности са LZMA Utils."
|
||||
|
||||
#. TRANSLATORS: Don't translate the uppercase PAGER.
|
||||
#. It is a name of an environment variable.
|
||||
|
||||
3904
po4a/sv.po
3904
po4a/sv.po
File diff suppressed because it is too large
Load Diff
15
po4a/uk.po
15
po4a/uk.po
@ -7,9 +7,9 @@
|
||||
# Yuri Chornoivan <yurchor@ukr.net>, 2019, 2022, 2023, 2024, 2025.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: xz-man-5.8.2-pre1\n"
|
||||
"POT-Creation-Date: 2025-10-31 13:23+0200\n"
|
||||
"PO-Revision-Date: 2025-10-31 20:48+0200\n"
|
||||
"Project-Id-Version: xz-man-5.8.0-pre1\n"
|
||||
"POT-Creation-Date: 2025-03-08 14:50+0200\n"
|
||||
"PO-Revision-Date: 2025-03-09 20:04+0200\n"
|
||||
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
|
||||
"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
|
||||
"Language: uk\n"
|
||||
@ -582,8 +582,13 @@ msgstr "Приймати лише файли B<.lz> при розпакуван
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "The B<.lz> format versions 0 and 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18. B<lzip> 1.4 and later create files in the format version 1."
|
||||
msgstr "Передбачено підтримку версії формату B<.lz> 0 та 1. Файли версії 0 було створено B<lzip> 1.3 та старішими версіями. Такі файли не є поширеними, але їх можна знайти у файлових архівах, оскільки певну незначну кількість пакунків із початковим кодом було випущено у цьому форматі. Також можуть існувати особисті файли у цьому форматі. Підтримку розпаковування для формату версії 0 було вилучено у B<lzip> 1.18. Версія B<lzip> 1.4 і новіші версії створюють файли у форматі версії 1."
|
||||
msgid "The B<.lz> format version 0 and the unextended version 1 are supported. Version 0 files were produced by B<lzip> 1.3 and older. Such files aren't common but may be found from file archives as a few source packages were released in this format. People might have old personal files in this format too. Decompression support for the format version 0 was removed in B<lzip> 1.18."
|
||||
msgstr "Передбачено підтримку версії формату B<.lz> 0 та нерозширеної версії 1. Файли версії 0 було створено B<lzip> 1.3 та старішими версіями. Такі файли не є поширеними, але їх можна знайти у файлових архівах, оскільки певну незначну кількість пакунків із початковим кодом було випущено у цьому форматі. Також можуть існувати особисті файли у цьому форматі. Підтримку розпаковування для формату версії 0 було вилучено у B<lzip> 1.18."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../src/xz/xz.1
|
||||
msgid "B<lzip> 1.4 and later create files in the format version 1. The sync flush marker extension to the format version 1 was added in B<lzip> 1.6. This extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt input)."
|
||||
msgstr "B<lzip> 1.4 і пізніші версії створюють файли у форматі версії 1. Розширення синхронізації позначки витирання до формату версії 1 було додано у B<lzip> 1.6. Це розширення використовують не часто, його підтримки у B<xz> не передбачено (програма повідомлятиме про пошкоджені вхідні дані)."
|
||||
|
||||
#. type: TP
|
||||
#: ../src/xz/xz.1
|
||||
|
||||
@ -82,7 +82,7 @@ po4a --force --verbose \
|
||||
|
||||
# Remove the *.po.authors files that were generated above.
|
||||
# This way they won't get included in distribution tarballs.
|
||||
rm -f -- *.po.authors
|
||||
rm -f *.po.authors
|
||||
|
||||
# Add the customized POT header which contains the SPDX license
|
||||
# identifier and spells out the license name instead of saying
|
||||
|
||||
@ -4,10 +4,6 @@
|
||||
//
|
||||
/// \file my_landlock.h
|
||||
/// \brief Linux Landlock sandbox helper functions
|
||||
///
|
||||
/// \note This uses static variables to cache the Landlock ABI version.
|
||||
/// Only one file in an application should include this header.
|
||||
/// Only one thread should call these functions.
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
@ -21,7 +17,6 @@
|
||||
#include <linux/landlock.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
|
||||
/// \brief Initialize Landlock ruleset attributes to forbid everything
|
||||
@ -37,38 +32,8 @@ my_landlock_ruleset_attr_forbid_all(struct landlock_ruleset_attr *attr)
|
||||
{
|
||||
memzero(attr, sizeof(*attr));
|
||||
|
||||
// Cache the Landlock ABI version:
|
||||
// 0 = not checked yet
|
||||
// -1 = Landlock not supported
|
||||
// >0 = Landlock ABI version
|
||||
static int abi_version = 0;
|
||||
|
||||
#ifdef LANDLOCK_SCOPE_SIGNAL
|
||||
// Red Hat Enterprise Linux 9 kernel since 5.14.0-603.el9 (2025-07-30)
|
||||
// claims ABI version 6 support, but as of 5.14.0-643.el9 (2025-11-22)
|
||||
// it lacks LANDLOCK_SCOPE_SIGNAL. ABI version 6 was added in upstream
|
||||
// Linux 6.12 while RHEL 9 has Linux 5.14 with lots of backports.
|
||||
// We assume that any kernel version 5.14 with ABI version 6 is buggy.
|
||||
static bool is_rhel9 = false;
|
||||
#endif
|
||||
|
||||
if (abi_version == 0) {
|
||||
abi_version = syscall(SYS_landlock_create_ruleset,
|
||||
const int abi_version = syscall(SYS_landlock_create_ruleset,
|
||||
(void *)NULL, 0, LANDLOCK_CREATE_RULESET_VERSION);
|
||||
|
||||
#ifdef LANDLOCK_SCOPE_SIGNAL
|
||||
if (abi_version == 6) {
|
||||
static const char rel[] = "5.14.";
|
||||
const size_t rel_len = sizeof(rel) - 1;
|
||||
|
||||
struct utsname un;
|
||||
if (uname(&un) == 0 && strncmp(
|
||||
un.release, rel, rel_len) == 0)
|
||||
is_rhel9 = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (abi_version <= 0)
|
||||
return -1;
|
||||
|
||||
@ -144,14 +109,6 @@ my_landlock_ruleset_attr_forbid_all(struct landlock_ruleset_attr *attr)
|
||||
#endif
|
||||
FALLTHROUGH;
|
||||
|
||||
case 6:
|
||||
#ifdef LANDLOCK_SCOPE_SIGNAL
|
||||
if (is_rhel9)
|
||||
attr->scoped &= ~LANDLOCK_SCOPE_SIGNAL;
|
||||
#endif
|
||||
|
||||
FALLTHROUGH;
|
||||
|
||||
default:
|
||||
// We only know about the features of the ABIs 1-6.
|
||||
break;
|
||||
|
||||
@ -78,8 +78,7 @@ do { \
|
||||
} while (0)
|
||||
|
||||
|
||||
#if !(defined(_WIN32) && !defined(__CYGWIN__)) \
|
||||
&& (!defined(__wasm__) || defined(__EMSCRIPTEN__))
|
||||
#if !(defined(_WIN32) && !defined(__CYGWIN__)) && !defined(__wasm__)
|
||||
// Use sigprocmask() to set the signal mask in single-threaded programs.
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
@ -20,17 +20,15 @@ liblzma_la_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/liblzma/simple \
|
||||
-I$(top_srcdir)/src/common \
|
||||
-DTUKLIB_SYMBOL_PREFIX=lzma_
|
||||
liblzma_la_LDFLAGS = -no-undefined -version-info 13:2:8
|
||||
liblzma_la_LDFLAGS = -no-undefined -version-info 13:1:8
|
||||
|
||||
EXTRA_DIST += liblzma_generic.map liblzma_linux.map validate_map.sh
|
||||
if COND_SYMVERS_GENERIC
|
||||
liblzma_la_LDFLAGS += \
|
||||
$(LINKER_FLAG_UNDEFINED_VERSION) \
|
||||
-Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma_generic.map
|
||||
endif
|
||||
if COND_SYMVERS_LINUX
|
||||
liblzma_la_LDFLAGS += \
|
||||
$(LINKER_FLAG_UNDEFINED_VERSION) \
|
||||
-Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma_linux.map
|
||||
endif
|
||||
|
||||
|
||||
@ -450,9 +450,7 @@ typedef struct {
|
||||
* \param opaque lzma_allocator.opaque (see below)
|
||||
* \param ptr Pointer returned by lzma_allocator.alloc(),
|
||||
* or when it is set to NULL, a pointer returned
|
||||
* by the standard malloc(). In addition, NULL
|
||||
* is a possible value. The function should do
|
||||
* nothing when ptr == NULL.
|
||||
* by the standard malloc().
|
||||
*/
|
||||
void (LZMA_API_CALL *free)(void *opaque, void *ptr);
|
||||
|
||||
@ -563,7 +561,7 @@ typedef struct {
|
||||
* \brief New seek input position for LZMA_SEEK_NEEDED
|
||||
*
|
||||
* When lzma_code() returns LZMA_SEEK_NEEDED, the new input position
|
||||
* needed by liblzma will be available in seek_pos. The value is
|
||||
* needed by liblzma will be available seek_pos. The value is
|
||||
* guaranteed to not exceed the file size that was specified when
|
||||
* this lzma_stream was initialized.
|
||||
*
|
||||
|
||||
@ -843,7 +843,8 @@ extern LZMA_API(lzma_ret) lzma_alone_decoder(
|
||||
/**
|
||||
* \brief Initialize .lz (lzip) decoder (a foreign file format)
|
||||
*
|
||||
* This decoder supports the .lz format versions 0 and 1:
|
||||
* This decoder supports the .lz format version 0 and the unextended .lz
|
||||
* format version 1:
|
||||
*
|
||||
* - Files in the format version 0 were produced by lzip 1.3 and older.
|
||||
* Such files aren't common but may be found from file archives
|
||||
@ -852,27 +853,28 @@ extern LZMA_API(lzma_ret) lzma_alone_decoder(
|
||||
* support for the format version 0 was removed in lzip 1.18.
|
||||
*
|
||||
* - lzip 1.3 added decompression support for .lz format version 1 files.
|
||||
* Compression support was added in lzip 1.4.
|
||||
*
|
||||
* - lzlib extends version 1 format with the Sync Flush marker. This
|
||||
* extension is only meant for lzlib use; it's not valid in normal .lz
|
||||
* files. This extension is not supported by liblzma. lzma_code() will
|
||||
* return LZMA_DATA_ERROR at the location of the Sync Flush marker.
|
||||
* Compression support was added in lzip 1.4. In lzip 1.6 the .lz format
|
||||
* version 1 was extended to support the Sync Flush marker. This extension
|
||||
* is not supported by liblzma. lzma_code() will return LZMA_DATA_ERROR
|
||||
* at the location of the Sync Flush marker. In practice files with
|
||||
* the Sync Flush marker are very rare and thus liblzma can decompress
|
||||
* almost all .lz files.
|
||||
*
|
||||
* Just like with lzma_stream_decoder() for .xz files, LZMA_CONCATENATED
|
||||
* should be used when decompressing normal standalone .lz files.
|
||||
*
|
||||
* If LZMA_CONCATENATED is used and there is non-.lz data after at least one
|
||||
* valid .lz member, lzma_code() leaves lzma_stream.next_in pointing to the
|
||||
* first byte of the non-.lz data and returns LZMA_STREAM_END. That is, one
|
||||
* can append custom data at the end of a .lz file and the decoder will
|
||||
* ignore it. An exception to this is if the first 1-3 bytes of the non-.lz
|
||||
* data are identical to the .lz magic bytes (0x4C, 0x5A, 0x49, 0x50; "LZIP"
|
||||
* in US-ASCII). In such a case the 1-3 bytes are consumed by lzma_code().
|
||||
* If one wishes to locate the non-.lz data reliably, one must ensure that
|
||||
* the first byte isn't 0x4C. It's best if none of the first four bytes of
|
||||
* trailing data are equal to the magic bytes because if two or three bytes
|
||||
* are, lzip >= 1.20 diagnoses it as a corrupt member header by default.
|
||||
* The .lz format allows putting non-.lz data at the end of a file after at
|
||||
* least one valid .lz member. That is, one can append custom data at the end
|
||||
* of a .lz file and the decoder is required to ignore it. In liblzma this
|
||||
* is relevant only when LZMA_CONCATENATED is used. In that case lzma_code()
|
||||
* will return LZMA_STREAM_END and leave lzma_stream.next_in pointing to
|
||||
* the first byte of the non-.lz data. An exception to this is if the first
|
||||
* 1-3 bytes of the non-.lz data are identical to the .lz magic bytes
|
||||
* (0x4C, 0x5A, 0x49, 0x50; "LZIP" in US-ASCII). In such a case the 1-3 bytes
|
||||
* will have been ignored by lzma_code(). If one wishes to locate the non-.lz
|
||||
* data reliably, one must ensure that the first byte isn't 0x4C. Actually
|
||||
* one should ensure that none of the first four bytes of trailing data are
|
||||
* equal to the magic bytes because lzip >= 1.20 requires it by default.
|
||||
*
|
||||
* \param strm Pointer to lzma_stream that is at least initialized
|
||||
* with LZMA_STREAM_INIT.
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define LZMA_VERSION_MINOR 8
|
||||
|
||||
/** \brief Patch version number of the liblzma release. */
|
||||
#define LZMA_VERSION_PATCH 2
|
||||
#define LZMA_VERSION_PATCH 1
|
||||
|
||||
/**
|
||||
* \brief Version stability marker
|
||||
|
||||
@ -23,8 +23,7 @@
|
||||
// If both versions are going to be built, we need runtime detection
|
||||
// to check if the instructions are supported.
|
||||
#if defined(CRC32_GENERIC) && defined(CRC32_ARCH_OPTIMIZED)
|
||||
# if (defined(HAVE_GETAUXVAL) && defined(HAVE_HWCAP_CRC32)) \
|
||||
|| defined(HAVE_ELF_AUX_INFO)
|
||||
# if defined(HAVE_GETAUXVAL) || defined(HAVE_ELF_AUX_INFO)
|
||||
# include <sys/auxv.h>
|
||||
# elif defined(_WIN32)
|
||||
# include <processthreadsapi.h>
|
||||
@ -104,7 +103,7 @@ crc32_arch_optimized(const uint8_t *buf, size_t size, uint32_t crc)
|
||||
static inline bool
|
||||
is_arch_extension_supported(void)
|
||||
{
|
||||
#if defined(HAVE_GETAUXVAL) && defined(HAVE_HWCAP_CRC32)
|
||||
#if defined(HAVE_GETAUXVAL)
|
||||
return (getauxval(AT_HWCAP) & HWCAP_CRC32) != 0;
|
||||
|
||||
#elif defined(HAVE_ELF_AUX_INFO)
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc32_fast.c
|
||||
/// \file crc32.c
|
||||
/// \brief CRC32 calculation
|
||||
//
|
||||
// Authors: Lasse Collin
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
/// \file crc64_fast.c
|
||||
/// \file crc64.c
|
||||
/// \brief CRC64 calculation
|
||||
//
|
||||
// Authors: Lasse Collin
|
||||
@ -146,6 +146,14 @@ crc64_dispatch(const uint8_t *buf, size_t size, uint64_t crc)
|
||||
extern LZMA_API(uint64_t)
|
||||
lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
|
||||
{
|
||||
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__clang__) \
|
||||
&& defined(_M_IX86) && defined(CRC64_ARCH_OPTIMIZED)
|
||||
// VS2015-2022 might corrupt the ebx register on 32-bit x86 when
|
||||
// the CLMUL code is enabled. This hack forces MSVC to store and
|
||||
// restore ebx. This is only needed here, not in lzma_crc32().
|
||||
__asm mov ebx, ebx
|
||||
#endif
|
||||
|
||||
#if defined(CRC64_GENERIC) && defined(CRC64_ARCH_OPTIMIZED)
|
||||
return crc64_func(buf, size, crc);
|
||||
|
||||
|
||||
@ -89,8 +89,7 @@ extern const uint64_t lzma_crc64_table[4][256];
|
||||
// ARM64
|
||||
//
|
||||
// Keep this in sync with changes to crc32_arm64.h
|
||||
#if defined(_WIN32) \
|
||||
|| (defined(HAVE_GETAUXVAL) && defined(HAVE_HWCAP_CRC32)) \
|
||||
#if defined(_WIN32) || defined(HAVE_GETAUXVAL) \
|
||||
|| defined(HAVE_ELF_AUX_INFO) \
|
||||
|| (defined(__APPLE__) && defined(HAVE_SYSCTLBYNAME))
|
||||
# define CRC_ARM64_RUNTIME_DETECTION 1
|
||||
@ -135,20 +134,10 @@ extern const uint64_t lzma_crc64_table[4][256];
|
||||
// built and runtime detection is used even if compiler flags
|
||||
// were set to allow CLMUL unconditionally.
|
||||
//
|
||||
// - The unconditional use doesn't work with MSVC as I don't know
|
||||
// how to detect the features here.
|
||||
// - This doesn't work with MSVC as I don't know how to detect
|
||||
// the features here.
|
||||
//
|
||||
// Don't enable CLMUL at all on old MSVC that targets 32-bit x86.
|
||||
// There seems to be a compiler bug that produces broken code
|
||||
// in optimized (Release) builds. It results in crashing tests.
|
||||
// It is known that VS 2019 16.11 (MSVC 19.29.30158) is broken
|
||||
// and that VS 2022 17.13 (MSVC 19.43.34808) works.
|
||||
# if defined(_MSC_FULL_VER) && _MSC_FULL_VER < 194334808 \
|
||||
&& !defined(__INTEL_COMPILER) && !defined(__clang__) \
|
||||
&& defined(_M_IX86)
|
||||
// Old MSVC targeting 32-bit x86: Don't enable CLMUL at all.
|
||||
# elif (defined(__SSSE3__) && defined(__SSE4_1__) \
|
||||
&& defined(__PCLMUL__) \
|
||||
# if (defined(__SSSE3__) && defined(__SSE4_1__) && defined(__PCLMUL__) \
|
||||
&& !defined(HAVE_CRC_X86_ASM)) \
|
||||
|| (defined(__e2k__) && __iset__ >= 6)
|
||||
# define CRC32_ARCH_OPTIMIZED 1
|
||||
|
||||
@ -128,10 +128,8 @@ alone_decode(void *coder_ptr, const lzma_allocator *allocator,
|
||||
lzma_set_ext_size(coder->options, coder->uncompressed_size);
|
||||
|
||||
// Calculate the memory usage so that it is ready
|
||||
// for SEQ_CODER_INIT. We know that lc/lp/pb are valid
|
||||
// so we can use the _nocheck variant.
|
||||
coder->memusage
|
||||
= lzma_lzma_decoder_memusage_nocheck(&coder->options)
|
||||
// for SEQ_CODER_INIT.
|
||||
coder->memusage = lzma_lzma_decoder_memusage(&coder->options)
|
||||
+ LZMA_MEMUSAGE_BASE;
|
||||
|
||||
coder->pos = 0;
|
||||
|
||||
@ -213,8 +213,8 @@ lzma_filters_copy(const lzma_filter *src, lzma_filter *real_dest,
|
||||
|
||||
error:
|
||||
// Free the options which we have already allocated.
|
||||
while (i > 0)
|
||||
lzma_free(dest[--i].options, allocator);
|
||||
while (i-- > 0)
|
||||
lzma_free(dest[i].options, allocator);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -212,8 +212,7 @@ lzip_decode(void *coder_ptr, const lzma_allocator *allocator,
|
||||
coder->options.pb = LZIP_PB;
|
||||
|
||||
// Calculate the memory usage.
|
||||
coder->memusage
|
||||
= lzma_lzma_decoder_memusage_nocheck(&coder->options)
|
||||
coder->memusage = lzma_lzma_decoder_memusage(&coder->options)
|
||||
+ LZMA_MEMUSAGE_BASE;
|
||||
|
||||
// Initialization is a separate step because if we return
|
||||
|
||||
@ -188,7 +188,6 @@ extern bool lzma_outq_is_readable(const lzma_outq *outq);
|
||||
/// \brief Read finished data
|
||||
///
|
||||
/// \param outq Pointer to an output queue
|
||||
/// \param allocator lzma_allocator for custom allocator functions
|
||||
/// \param out Beginning of the output buffer
|
||||
/// \param out_pos The next byte will be written to
|
||||
/// out[*out_pos].
|
||||
|
||||
@ -33,6 +33,26 @@ typedef enum {
|
||||
} worker_state;
|
||||
|
||||
|
||||
typedef enum {
|
||||
/// Partial updates (storing of worker thread progress
|
||||
/// to lzma_outbuf) are disabled.
|
||||
PARTIAL_DISABLED,
|
||||
|
||||
/// Main thread requests partial updates to be enabled but
|
||||
/// no partial update has been done by the worker thread yet.
|
||||
///
|
||||
/// Changing from PARTIAL_DISABLED to PARTIAL_START requires
|
||||
/// use of the worker-thread mutex. Other transitions don't
|
||||
/// need a mutex.
|
||||
PARTIAL_START,
|
||||
|
||||
/// Partial updates are enabled and the worker thread has done
|
||||
/// at least one partial update.
|
||||
PARTIAL_ENABLED,
|
||||
|
||||
} partial_update_mode;
|
||||
|
||||
|
||||
struct worker_thread {
|
||||
/// Worker state is protected with our mutex.
|
||||
worker_state state;
|
||||
@ -84,18 +104,10 @@ struct worker_thread {
|
||||
/// happen if all worker threads were frequently locking the main
|
||||
/// mutex to update their outbuf->pos.
|
||||
///
|
||||
/// When partial_update_enabled is true, this worker thread will
|
||||
/// update outbuf->pos and outbuf->decoder_in_pos after each call
|
||||
/// to the Block decoder. This is initially false. Main thread may
|
||||
/// set this to true.
|
||||
bool partial_update_enabled;
|
||||
|
||||
/// Once the main thread has set partial_updated_enabled = true,
|
||||
/// we will do the first partial update as soon as we can and
|
||||
/// set partial_update_started = true. After the first update,
|
||||
/// we only update if we have made progress. This avoids useless
|
||||
/// locking of thr->coder->mutex.
|
||||
bool partial_update_started;
|
||||
/// Only when partial_update is something else than PARTIAL_DISABLED,
|
||||
/// this worker thread will update outbuf->pos after each call to
|
||||
/// the Block decoder.
|
||||
partial_update_mode partial_update;
|
||||
|
||||
/// Block decoder
|
||||
lzma_next_coder block_decoder;
|
||||
@ -323,7 +335,7 @@ worker_enable_partial_update(void *thr_ptr)
|
||||
struct worker_thread *thr = thr_ptr;
|
||||
|
||||
mythread_sync(thr->mutex) {
|
||||
thr->partial_update_enabled = true;
|
||||
thr->partial_update = PARTIAL_START;
|
||||
mythread_cond_signal(&thr->cond);
|
||||
}
|
||||
}
|
||||
@ -334,7 +346,7 @@ worker_decoder(void *thr_ptr)
|
||||
{
|
||||
struct worker_thread *thr = thr_ptr;
|
||||
size_t in_filled;
|
||||
bool partial_update_enabled;
|
||||
partial_update_mode partial_update;
|
||||
lzma_ret ret;
|
||||
|
||||
next_loop_lock:
|
||||
@ -366,16 +378,14 @@ next_loop_unlocked:
|
||||
thr->progress_out = thr->out_pos;
|
||||
|
||||
// If we don't have any new input, wait for a signal from the main
|
||||
// thread except if partial output has just been enabled
|
||||
// (partial_update_enabled is true but _started is false). In that
|
||||
// thread except if partial output has just been enabled. In that
|
||||
// case we will do one normal run so that the partial output info
|
||||
// gets passed to the main thread. The call to block_decoder.code()
|
||||
// is useless but harmless as it can occur only once per Block.
|
||||
in_filled = thr->in_filled;
|
||||
partial_update_enabled = thr->partial_update_enabled;
|
||||
partial_update = thr->partial_update;
|
||||
|
||||
if (in_filled == thr->in_pos && !(partial_update_enabled
|
||||
&& !thr->partial_update_started)) {
|
||||
if (in_filled == thr->in_pos && partial_update != PARTIAL_START) {
|
||||
mythread_cond_wait(&thr->cond, &thr->mutex);
|
||||
goto next_loop_unlocked;
|
||||
}
|
||||
@ -397,21 +407,23 @@ next_loop_unlocked:
|
||||
thr->outbuf->allocated, LZMA_RUN);
|
||||
|
||||
if (ret == LZMA_OK) {
|
||||
if (partial_update_enabled) {
|
||||
// Remember that we have done at least one partial
|
||||
// update. After the first update we won't do updates
|
||||
// unless we have made progress.
|
||||
thr->partial_update_started = true;
|
||||
if (partial_update != PARTIAL_DISABLED) {
|
||||
// The main thread uses thr->mutex to change from
|
||||
// PARTIAL_DISABLED to PARTIAL_START. The main thread
|
||||
// doesn't care about this variable after that so we
|
||||
// can safely change it here to PARTIAL_ENABLED
|
||||
// without a mutex.
|
||||
thr->partial_update = PARTIAL_ENABLED;
|
||||
|
||||
// The main thread is reading decompressed data
|
||||
// from thr->outbuf. Tell the main thread about
|
||||
// our progress.
|
||||
//
|
||||
// NOTE: It's possible that we consumed input without
|
||||
// producing any new output so it's possible that only
|
||||
// in_pos has changed. If thr->partial_update_started
|
||||
// was false, it is possible that neither in_pos nor
|
||||
// out_pos has changed.
|
||||
// producing any new output so it's possible that
|
||||
// only in_pos has changed. In case of PARTIAL_START
|
||||
// it is possible that neither in_pos nor out_pos has
|
||||
// changed.
|
||||
mythread_sync(thr->coder->mutex) {
|
||||
thr->outbuf->pos = thr->out_pos;
|
||||
thr->outbuf->decoder_in_pos = thr->in_pos;
|
||||
@ -633,8 +645,7 @@ get_thread(struct lzma_stream_coder *coder, const lzma_allocator *allocator)
|
||||
coder->thr->progress_in = 0;
|
||||
coder->thr->progress_out = 0;
|
||||
|
||||
coder->thr->partial_update_enabled = false;
|
||||
coder->thr->partial_update_started = false;
|
||||
coder->thr->partial_update = PARTIAL_DISABLED;
|
||||
|
||||
return LZMA_OK;
|
||||
}
|
||||
@ -805,12 +816,12 @@ read_output_and_wait(struct lzma_stream_coder *coder,
|
||||
// keeps calling lzma_code() without providing more
|
||||
// input, it will eventually get LZMA_BUF_ERROR.
|
||||
//
|
||||
// NOTE: We can read partial_update_enabled and
|
||||
// in_filled without thr->mutex as only the main thread
|
||||
// NOTE: We can read partial_update and in_filled
|
||||
// without thr->mutex as only the main thread
|
||||
// modifies these variables. decoder_in_pos requires
|
||||
// coder->mutex which we are already holding.
|
||||
if (coder->thr != NULL &&
|
||||
coder->thr->partial_update_enabled) {
|
||||
if (coder->thr != NULL && coder->thr->partial_update
|
||||
!= PARTIAL_DISABLED) {
|
||||
// There is exactly one outbuf in the queue.
|
||||
assert(coder->thr->outbuf == coder->outq.head);
|
||||
assert(coder->thr->outbuf == coder->outq.tail);
|
||||
|
||||
@ -38,7 +38,7 @@ lzma_vli_decode(lzma_vli *restrict vli, size_t *vli_pos,
|
||||
// Validate the arguments.
|
||||
if (*vli_pos >= LZMA_VLI_BYTES_MAX
|
||||
|| (*vli >> (*vli_pos * 7)) != 0)
|
||||
return LZMA_PROG_ERROR;
|
||||
return LZMA_PROG_ERROR;;
|
||||
|
||||
if (*in_pos >= in_size)
|
||||
return LZMA_BUF_ERROR;
|
||||
|
||||
@ -88,14 +88,14 @@ typedef enum {
|
||||
#define update_literal_normal(state) \
|
||||
state = ((state) <= STATE_SHORTREP_LIT_LIT \
|
||||
? STATE_LIT_LIT \
|
||||
: (state) - 3)
|
||||
: (state) - 3);
|
||||
|
||||
/// Like update_literal(state) but when it is already known that
|
||||
/// is_literal_state(state) is false.
|
||||
#define update_literal_matched(state) \
|
||||
state = ((state) <= STATE_LIT_SHORTREP \
|
||||
? (state) - 3 \
|
||||
: (state) - 6)
|
||||
: (state) - 6);
|
||||
|
||||
/// Indicate that the latest state was a match.
|
||||
#define update_match(state) \
|
||||
|
||||
@ -23,12 +23,6 @@ extern lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next,
|
||||
|
||||
extern uint64_t lzma_lzma_decoder_memusage(const void *options);
|
||||
|
||||
/// Gets memory usage without validating lc/lp/pb. This is used by LZMA2
|
||||
/// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb. Also
|
||||
/// alone_decoder.c and lzip_decoder.c use this because there lc/lp/pb
|
||||
/// are known to be valid.
|
||||
extern uint64_t lzma_lzma_decoder_memusage_nocheck(const void *options);
|
||||
|
||||
extern lzma_ret lzma_lzma_props_decode(
|
||||
void **options, const lzma_allocator *allocator,
|
||||
const uint8_t *props, size_t props_size);
|
||||
@ -48,6 +42,11 @@ extern bool lzma_lzma_lclppb_decode(
|
||||
extern lzma_ret lzma_lzma_decoder_create(
|
||||
lzma_lz_decoder *lz, const lzma_allocator *allocator,
|
||||
const lzma_options_lzma *opt, lzma_lz_options *lz_options);
|
||||
|
||||
/// Gets memory usage without validating lc/lp/pb. This is used by LZMA2
|
||||
/// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb.
|
||||
extern uint64_t lzma_lzma_decoder_memusage_nocheck(const void *options);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -246,14 +246,14 @@ do { \
|
||||
#define rc_bit(prob, action0, action1) \
|
||||
rc_bit_last(prob, \
|
||||
symbol <<= 1; action0, \
|
||||
symbol = (symbol << 1) + 1; action1)
|
||||
symbol = (symbol << 1) + 1; action1);
|
||||
|
||||
|
||||
#define rc_bit_safe(prob, action0, action1, seq) \
|
||||
rc_bit_last_safe(prob, \
|
||||
symbol <<= 1; action0, \
|
||||
symbol = (symbol << 1) + 1; action1, \
|
||||
seq)
|
||||
seq);
|
||||
|
||||
// Unroll fixed-sized bittree decoding.
|
||||
//
|
||||
@ -327,7 +327,7 @@ do { \
|
||||
#define rc_bit_add_if_1(probs, dest, value_to_add_if_1) \
|
||||
rc_bit(probs[symbol], \
|
||||
, \
|
||||
dest += value_to_add_if_1)
|
||||
dest += value_to_add_if_1);
|
||||
|
||||
|
||||
// Matched literal
|
||||
|
||||
@ -86,7 +86,7 @@ export LC_ALL
|
||||
|
||||
STATUS=0
|
||||
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Get the list of symbols that aren't defined in liblzma_generic.map.
|
||||
SYMS=$(sed -n 's/^extern LZMA_API([^)]*) \([a-z0-9_]*\)(.*$/\1;/p' \
|
||||
@ -95,7 +95,7 @@ SYMS=$(sed -n 's/^extern LZMA_API([^)]*) \([a-z0-9_]*\)(.*$/\1;/p' \
|
||||
| grep -Fve "$(sed '/[{}:*]/d;/^$/d;s/^ //' liblzma_generic.map)")
|
||||
|
||||
# Check that there are no old alpha or beta versions listed.
|
||||
VER=$(cd ../.. && sh build-aux/version.sh) || exit 1
|
||||
VER=$(cd ../.. && sh build-aux/version.sh)
|
||||
NAMES=
|
||||
case $VER in
|
||||
*alpha | *beta)
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# shellcheck shell=sh disable=SC1003,SC2016
|
||||
|
||||
@enable_path_for_scripts@
|
||||
#SET_PATH - This line is a placeholder to ease patching this script.
|
||||
|
||||
@ -65,7 +63,7 @@ done
|
||||
cmp="$cmp --"
|
||||
|
||||
for file; do
|
||||
test "X$file" = X- || true < "$file" || exit 2
|
||||
test "X$file" = X- || <"$file" || exit 2
|
||||
done
|
||||
|
||||
# xz needs -qQ to ignore warnings like unsupported check type.
|
||||
@ -92,8 +90,6 @@ if test $# -eq 1; then
|
||||
printf '%s\n' "$0: $1: Unknown compressed file name suffix" >&2
|
||||
exit 2;;
|
||||
esac
|
||||
# The FILE variable is used with eval, and shellcheck doesn't see that.
|
||||
# shellcheck disable=SC2034
|
||||
case $1 in
|
||||
*[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *[-.]lzo | *[-.]zst | *[-.]lz4)
|
||||
FILE=`expr "X$1" : 'X\(.*\)[-.][abglmostxzZ24]*$'`;;
|
||||
|
||||
@ -19,8 +19,6 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# shellcheck shell=sh disable=SC1003,SC2016
|
||||
|
||||
@enable_path_for_scripts@
|
||||
#SET_PATH - This line is a placeholder to ease patching this script.
|
||||
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# shellcheck shell=sh disable=SC2089,SC2090
|
||||
|
||||
@enable_path_for_scripts@
|
||||
#SET_PATH - This line is a placeholder to ease patching this script.
|
||||
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# shellcheck shell=sh
|
||||
|
||||
@enable_path_for_scripts@
|
||||
#SET_PATH - This line is a placeholder to ease patching this script.
|
||||
|
||||
@ -60,7 +58,7 @@ if test $# = 0; then
|
||||
else
|
||||
FIRST=1
|
||||
for FILE; do
|
||||
true < "$FILE" || continue
|
||||
< "$FILE" || continue
|
||||
if test $FIRST -eq 0; then
|
||||
printf "%s--More--(Next file: %s)" "" "$FILE"
|
||||
stty $cb -echo 2>/dev/null
|
||||
|
||||
@ -480,6 +480,7 @@ parse_real(args_info *args, int argc, char **argv)
|
||||
case OPT_FILTERS_HELP:
|
||||
// This doesn't return.
|
||||
message_filters_help();
|
||||
break;
|
||||
|
||||
case OPT_X86:
|
||||
coder_add_filter(LZMA_FILTER_X86,
|
||||
|
||||
@ -493,8 +493,7 @@ io_sync_dest(file_pair *pair)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if !defined(TUKLIB_DOSLIKE) && !defined(_AIX)
|
||||
// On AIX, this would fail with EBADF.
|
||||
#ifndef TUKLIB_DOSLIKE
|
||||
if (fsync(pair->dir_fd)) {
|
||||
message_error(_("%s: Synchronizing the directory of "
|
||||
"the file failed: %s"),
|
||||
|
||||
@ -11,10 +11,6 @@
|
||||
|
||||
#include "private.h"
|
||||
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
|
||||
/// Maximum number of worker threads. This can be set with
|
||||
/// the --threads=NUM command line option.
|
||||
@ -325,74 +321,6 @@ hardware_init(void)
|
||||
// /proc/meminfo as the starting point.
|
||||
memlimit_mt_default = total_ram / 4;
|
||||
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
// Try to set the default multithreaded memory usage limit so that
|
||||
// we won't exceed resource limits. Exceeding the limits would result
|
||||
// in allocation failures, which currently make liblzma and xz fail
|
||||
// (instead of continuing by reducing the number of threads).
|
||||
const int resources[] = {
|
||||
RLIMIT_DATA,
|
||||
# ifdef RLIMIT_AS
|
||||
RLIMIT_AS, // OpenBSD 7.8 doesn't have RLIMIT_AS.
|
||||
# endif
|
||||
# if defined(RLIMIT_VMEM) && RLIMIT_VMEM != RLIMIT_AS
|
||||
RLIMIT_VMEM, // For Solaris. On FreeBSD this is an alias.
|
||||
# endif
|
||||
};
|
||||
|
||||
// The resource limits cannot be passed to liblzma directly;
|
||||
// some margin is required:
|
||||
// - The memory usage limit counts only liblzma's memory usage,
|
||||
// but xz itself needs some memory (including gettext usage etc.).
|
||||
// - Memory allocation has some overhead.
|
||||
// - Address space limit counts code size too.
|
||||
//
|
||||
// The following value is a guess based on quick testing on Linux.
|
||||
const rlim_t margin = 64 << 20;
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(resources); ++i) {
|
||||
// glibc: When GNU extensions are enabled, <sys/resource.h>
|
||||
// declares getrlimit() so that the first argument is an enum
|
||||
// instead of int as in POSIX. GCC and Clang use unsigned int
|
||||
// for enums when possible, so a sign conversion occurs when
|
||||
// resources[i] is convert to the enum type. Clang warns about
|
||||
// this with -Wsign-conversion but GCC doesn't.
|
||||
#ifdef __clang__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsign-conversion"
|
||||
#endif
|
||||
// RLIM_SAVED_* might be used on some 32-bit OSes
|
||||
// (AIX at least) when the limit doesn't fit in a 32-bit
|
||||
// unsigned integer. Thus, for us these are the same thing
|
||||
// as no limit at all.
|
||||
struct rlimit rl;
|
||||
if (getrlimit(resources[i], &rl) == 0
|
||||
&& rl.rlim_cur != RLIM_INFINITY
|
||||
&& rl.rlim_cur != RLIM_SAVED_CUR
|
||||
&& rl.rlim_cur != RLIM_SAVED_MAX) {
|
||||
#ifdef __clang__
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
// Subtract the margin from the current resource
|
||||
// limit, but avoid negative results. Avoid also 0
|
||||
// because hardware_memlimit_show() (--info-memory)
|
||||
// treats it specially. In practice, 1 byte is
|
||||
// effectively 0 anyway.
|
||||
//
|
||||
// SUSv2 and POSIX.1-2024 require rlimit_t to be
|
||||
// unsigned. A cast is needed to silence a compiler
|
||||
// warning still because, for historical reasons,
|
||||
// rlim_t is intentionally signed on FreeBSD 14.
|
||||
const uint64_t rl_with_margin = rl.rlim_cur > margin
|
||||
? (uint64_t)(rl.rlim_cur - margin) : 1;
|
||||
|
||||
// Lower the memory usage limit if needed.
|
||||
if (memlimit_mt_default > rl_with_margin)
|
||||
memlimit_mt_default = rl_with_margin;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SIZE_MAX == UINT32_MAX
|
||||
// A too high value may cause 32-bit xz to run out of address space.
|
||||
// Use a conservative maximum value here. A few typical address space
|
||||
|
||||
@ -655,8 +655,6 @@ parse_check_value(file_pair *pair, const lzma_index_iter *iter)
|
||||
/// be printed.
|
||||
/// \param bhi Pointer to structure where to store the information
|
||||
/// about the Block Header field.
|
||||
/// \param xfi Pointer to structure where to store the information
|
||||
/// about the entire .xz file.
|
||||
///
|
||||
/// \return False on success, true on error. If an error occurs,
|
||||
/// the error message is printed too so the caller doesn't
|
||||
|
||||
@ -144,10 +144,6 @@ extern void message_filename(const char *src_name);
|
||||
/// given *strm becomes invalid.
|
||||
///
|
||||
/// \param strm Pointer to lzma_stream used for the coding.
|
||||
/// \param is_passthru
|
||||
/// If true, we are copying input to output without
|
||||
/// encoding or decoding, and thus cannot use
|
||||
/// lzma_get_progress().
|
||||
/// \param in_size Size of the input file, or zero if unknown.
|
||||
///
|
||||
extern void message_progress_start(lzma_stream *strm,
|
||||
|
||||
@ -4,15 +4,6 @@
|
||||
//
|
||||
/// \file sandbox.c
|
||||
/// \brief Sandbox support
|
||||
///
|
||||
/// \note When sandbox_init() is called, gettext hasn't been
|
||||
/// initialized yet, and thus wrapping error messages
|
||||
/// in _("...") is pointless in that function. In other
|
||||
/// functions gettext can be used, but the only error message
|
||||
/// we have is "Failed to enable the sandbox" which should
|
||||
/// (almost) never occur. If it does occur anyway, leaving
|
||||
/// the message untranslated can make it easier to find
|
||||
/// bug reports about the issue.
|
||||
//
|
||||
// Author: Lasse Collin
|
||||
//
|
||||
@ -80,8 +71,11 @@ prepare_for_strict_sandbox(void)
|
||||
extern void
|
||||
sandbox_init(void)
|
||||
{
|
||||
if (pledge("stdio rpath wpath cpath fattr", ""))
|
||||
if (pledge("stdio rpath wpath cpath fattr", "")) {
|
||||
// gettext hasn't been initialized yet so
|
||||
// there's no point to call it here.
|
||||
message_fatal("Failed to enable the sandbox");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@ -93,7 +87,7 @@ sandbox_enable_read_only(void)
|
||||
// We will be opening files for reading but
|
||||
// won't create or remove any files.
|
||||
if (pledge("stdio rpath", ""))
|
||||
message_fatal("Failed to enable the sandbox");
|
||||
message_fatal(_("Failed to enable the sandbox"));
|
||||
|
||||
return;
|
||||
}
|
||||
@ -109,7 +103,7 @@ sandbox_enable_strict_if_allowed(int src_fd lzma_attribute((__unused__)),
|
||||
|
||||
// All files that need to be opened have already been opened.
|
||||
if (pledge("stdio", ""))
|
||||
message_fatal("Failed to enable the sandbox");
|
||||
message_fatal(_("Failed to enable the sandbox"));
|
||||
|
||||
return;
|
||||
}
|
||||
@ -145,7 +139,7 @@ enable_landlock(uint64_t required_rights)
|
||||
const int ruleset_fd = my_landlock_create_ruleset(
|
||||
&attr, sizeof(attr), 0);
|
||||
if (ruleset_fd < 0)
|
||||
message_fatal("Failed to enable the sandbox");
|
||||
message_fatal(_("Failed to enable the sandbox"));
|
||||
|
||||
// All files we need should have already been opened. Thus,
|
||||
// we don't need to add any rules using landlock_add_rule(2)
|
||||
@ -160,7 +154,7 @@ enable_landlock(uint64_t required_rights)
|
||||
// prctl(PR_SET_NO_NEW_PRIVS, ...) was already called in
|
||||
// sandbox_init() so we don't do it here again.
|
||||
if (my_landlock_restrict_self(ruleset_fd, 0) != 0)
|
||||
message_fatal("Failed to enable the sandbox");
|
||||
message_fatal(_("Failed to enable the sandbox"));
|
||||
|
||||
(void)close(ruleset_fd);
|
||||
return;
|
||||
@ -280,7 +274,7 @@ sandbox_enable_strict_if_allowed(
|
||||
|
||||
// If not reading from stdin, remove all capabilities from it.
|
||||
if (src_fd != STDIN_FILENO && cap_rights_limit(
|
||||
STDIN_FILENO, cap_rights_init(&rights)))
|
||||
STDIN_FILENO, cap_rights_clear(&rights)))
|
||||
goto error;
|
||||
|
||||
if (cap_rights_limit(STDOUT_FILENO, cap_rights_init(&rights,
|
||||
@ -311,7 +305,7 @@ error:
|
||||
if (errno == ENOSYS)
|
||||
return;
|
||||
|
||||
message_fatal("Failed to enable the sandbox");
|
||||
message_fatal(_("Failed to enable the sandbox"));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -31,6 +31,9 @@ static sigset_t hooked_signals;
|
||||
/// signals_unblock() are called before signals_init() has been called.
|
||||
static bool signals_are_initialized = false;
|
||||
|
||||
/// signals_block() and signals_unblock() can be called recursively.
|
||||
static size_t signals_block_count = 0;
|
||||
|
||||
|
||||
static void
|
||||
signal_handler(int sig)
|
||||
@ -134,10 +137,6 @@ signals_init(void)
|
||||
|
||||
|
||||
#ifndef __VMS
|
||||
/// signals_block() and signals_unblock() can be called recursively.
|
||||
static size_t signals_block_count = 0;
|
||||
|
||||
|
||||
extern void
|
||||
signals_block(void)
|
||||
{
|
||||
@ -187,14 +186,8 @@ signals_exit(void)
|
||||
sa.sa_handler = SIG_DFL;
|
||||
sigfillset(&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
|
||||
// This shouldn't fail, but check it anyway.
|
||||
if (sigaction(sig, &sa, NULL) == 0)
|
||||
raise(sig);
|
||||
|
||||
// We shouldn't get here, but just in case we do,
|
||||
// make main() exit with E_ERROR.
|
||||
set_exit_status(E_ERROR);
|
||||
sigaction(sig, &sa, NULL);
|
||||
raise(sig);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -12,10 +12,6 @@
|
||||
#include "private.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
|
||||
/// Buffers for uint64_to_str() and uint64_to_nicestr()
|
||||
static char bufs[4][128];
|
||||
|
||||
@ -615,7 +615,7 @@ Compression is not supported.
|
||||
.IP ""
|
||||
The
|
||||
.B .lz
|
||||
format versions 0 and 1 are supported.
|
||||
format version 0 and the unextended version 1 are supported.
|
||||
Version 0 files were produced by
|
||||
.B lzip
|
||||
1.3 and older.
|
||||
@ -625,8 +625,15 @@ People might have old personal files in this format too.
|
||||
Decompression support for the format version 0 was removed in
|
||||
.B lzip
|
||||
1.18.
|
||||
.IP ""
|
||||
.B lzip
|
||||
1.4 and later create files in the format version 1.
|
||||
The sync flush marker extension to the format version 1 was added in
|
||||
.B lzip
|
||||
1.6.
|
||||
This extension is rarely used and isn't supported by
|
||||
.B xz
|
||||
(diagnosed as corrupt input).
|
||||
.TP
|
||||
.B raw
|
||||
Compress or uncompress a raw stream (no headers).
|
||||
|
||||
@ -321,7 +321,7 @@ sandbox_enter(int src_fd)
|
||||
|
||||
// If not reading from stdin, remove all capabilities from it.
|
||||
if (src_fd != STDIN_FILENO && cap_rights_limit(
|
||||
STDIN_FILENO, cap_rights_init(&rights)))
|
||||
STDIN_FILENO, cap_rights_clear(&rights)))
|
||||
goto error;
|
||||
|
||||
if (cap_rights_limit(STDOUT_FILENO, cap_rights_init(&rights,
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
[libfuzzer]
|
||||
dict = fuzz_xz.dict
|
||||
@ -27,7 +27,7 @@ test_exact_size(void)
|
||||
"is disabled");
|
||||
|
||||
// Something to be compressed
|
||||
const uint8_t in[16] = "0123456789ABCDE";
|
||||
const uint8_t in[16] = "0123456789ABCDEF";
|
||||
|
||||
// in[] after compression
|
||||
uint8_t compressed[1024];
|
||||
|
||||
@ -27,7 +27,7 @@ do { \
|
||||
memzero(&(block), sizeof(lzma_block)); \
|
||||
(block).filters = filters_; \
|
||||
(block).check = LZMA_CHECK_CRC32; \
|
||||
} while (0)
|
||||
} while (0);
|
||||
|
||||
|
||||
#ifdef HAVE_ENCODERS
|
||||
|
||||
@ -118,8 +118,8 @@ else
|
||||
fi
|
||||
|
||||
# Create two temporary files to be used with --files and --files0.
|
||||
printf '%s\n' "$SUFFIX_INPUT" > "$SUFFIX_INPUT_FILES"
|
||||
printf '%s\0' "$SUFFIX_INPUT" > "$SUFFIX_INPUT_FILES0"
|
||||
printf "$SUFFIX_INPUT\n" > "$SUFFIX_INPUT_FILES"
|
||||
printf "$SUFFIX_INPUT\0" > "$SUFFIX_INPUT_FILES0"
|
||||
|
||||
# Test proper handling of --files/--files0 when no suffix is set. This
|
||||
# must result in an error because xz does not know how to rename the output
|
||||
|
||||
@ -231,8 +231,8 @@ done
|
||||
VER=$(sh build-aux/version.sh)
|
||||
if [ -x "$SEVENZ" ]; then
|
||||
cd pkg
|
||||
"$SEVENZ" a -tzip "../xz-$VER-windows.zip" *
|
||||
"$SEVENZ" a "../xz-$VER-windows.7z" *
|
||||
"$SEVENZ" a -tzip ../xz-$VER-windows.zip *
|
||||
"$SEVENZ" a ../xz-$VER-windows.7z *
|
||||
else
|
||||
echo
|
||||
echo "NOTE: 7z was not found. xz-$VER-windows.zip"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user