Compare commits

..

4 Commits

Author SHA1 Message Date
Lasse Collin a338f62471 CMake: Don't assume that -fvisibility=hidden is supported outside Windows.
The original code was good enough for supporting GNU/Linux
and a few others but it wasn't very portable.
2023-10-15 21:48:43 +03:00
Lasse Collin 34a48239ed Build: Fix silently-ignored attribute problem on CompCert 3.12.
Tested on godbolt.org only.
2023-10-15 18:19:09 +03:00
Lasse Collin 68c4cfc40c Build: Remove the FIXME about -Werror checks. 2023-10-15 18:19:09 +03:00
Lasse Collin 2fcb4085fd Build: If using a GCC compatible compiler, ensure that -Werror works.
The check can be skipped by passing SKIP_WERROR_CHECK=yes to configure.
It won't be documented anywhere else than in the error message.

Ways to test:

    ./configure CC=gcc CFLAGS=-Wunused-macros
    ./configure CC=clang CFLAGS=-Weverything
    ./configure CC=clang CFLAGS=-Weverything SKIP_WERROR_CHECK=yes
2023-10-15 18:19:03 +03:00
394 changed files with 14609 additions and 26298 deletions

10
.github/SECURITY.md vendored
View File

@ -4,7 +4,7 @@
We provide security updates to the development branch and the stable
branches. Security patches for old releases are available on the
[project website](https://xz.tukaani.org/xz-utils/).
[project website](https://tukaani.org/xz).
## Reporting a Vulnerability
@ -16,7 +16,13 @@ the chance that the exploit will be used before a patch is released.
You may submit a report by emailing us at
[xz@tukaani.org](mailto:xz@tukaani.org), or through
[Security Advisories](https://github.com/tukaani-project/xz/security/advisories/new).
While both options are available, we prefer email.
While both options are available, we prefer email. In any case, please
provide a clear description of the vulnerability including:
- Affected versions of XZ Utils
- Estimated severity (low, moderate, high, critical)
- Steps to recreate the vulnerability
- All relevant files (core dumps, build logs, input files, etc.)
This project is maintained by a team of volunteers on a reasonable-effort
basis. As such, please give us 90 days to work on a fix before

View File

@ -1,9 +1,10 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# Author: Jia Tan
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
name: CI
@ -37,7 +38,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake build-essential po4a autopoint gcc-multilib doxygen musl-tools
sudo apt-get install -y autoconf automake build-essential po4a autopoint gcc-multilib doxygen
# Install Autotools on Mac
- name: Install Dependencies
@ -49,7 +50,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'cmake' }}
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake musl-tools
sudo apt-get install -y build-essential cmake
# Install CMake on Mac
- name: Install Dependencies
@ -79,34 +80,15 @@ jobs:
# ifunc must be disabled for this test because __attribute__ ifunc is
# incompatible with -fsanitize=address.
#
# The sandbox must also be disabled because it will prevent access to
# the /proc/ filesystem on Linux, which is used by the sanitizer's
# instrumentation.
- name: Build with -fsanitize=address,undefined
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
run: ./build-aux/ci_build.sh -b autotools -p build -f "-fsanitize=address,undefined" -d ifunc,sandbox
run: ./build-aux/ci_build.sh -b autotools -p build -f "-fsanitize=address,undefined" -d ifunc
- name: Test with -fsanitize=address,undefined
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
run: |
./build-aux/ci_build.sh -b autotools -p test -f "-fsanitize=address,undefined" -d ifunc,sandbox
./build-aux/ci_build.sh -b autotools -p test -f "-fsanitize=address,undefined" -d ifunc
cd ../xz_build && make distclean
# musl libc has some slight differences compared to glibc, including
# the lack of ifunc support. This tests if the ifunc detection
# functions properly since musl-gcc can compile with ifunc support,
# but will fail at runtime.
- name: Build with musl libc
if: ${{ matrix.os == 'ubuntu-latest'}}
run: ./build-aux/ci_build.sh -b ${{ matrix.build_system }} -p build -m "/usr/bin/musl-gcc"
- name: Test with musl libc
if: ${{ matrix.os == 'ubuntu-latest'}}
run: |
./build-aux/ci_build.sh -b ${{ matrix.build_system }} -p test -m "/usr/bin/musl-gcc"
- name: Clean up musl libc run
if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }}
run: cd ../xz_build && make distclean
- name: Build with full features
run: ./build-aux/ci_build.sh -b ${{ matrix.build_system }} -p build
- name: Test with full features
@ -153,7 +135,7 @@ jobs:
run: ./build-aux/ci_build.sh -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@c7d193f32edcb7bfad88892161225aeda64e9392 #v4.0.0
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
if: ${{ failure() }}
with:
name: ${{ matrix.os }} ${{ matrix.build_system }} Test Logs

View File

@ -1,9 +1,10 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# Author: Jia Tan
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
name: Windows-CI
@ -117,7 +118,7 @@ jobs:
###############
# Upload the test logs as artifacts if any step has failed.
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 #v4.0.0
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3
if: ${{ failure() }}
with:
name: ${{ matrix.msys2_env }} ${{ matrix.build_system }} Test Logs

1
.gitignore vendored
View File

@ -67,7 +67,6 @@ coverage
/tests/test_index
/tests/test_index_hash
/tests/test_lzip_decoder
/tests/test_microlzma
/tests/test_memlimit
/tests/test_stream_flags
/tests/test_vli

40
AUTHORS
View File

@ -9,13 +9,15 @@ Authors of XZ Utils
specifically the LZMA SDK <https://7-zip.org/sdk.html>. Without
this code, XZ Utils wouldn't exist.
The SHA-256 implementation in liblzma is based on code written by
Wei Dai in Crypto++ Library <https://www.cryptopp.com/>.
The SHA-256 implementation in liblzma is based on the code found from
7-Zip <https://7-zip.org/>, which has a modified version of the SHA-256
code found from Crypto++ <https://www.cryptopp.com/>. The SHA-256 code
in Crypto++ was written by Kevin Springle and Wei Dai.
A few scripts have been adapted from GNU gzip. The original
versions were written by Jean-loup Gailly, Charles Levert, and
Paul Eggert. Andrew Dudman helped adapting the scripts and their
man pages for XZ Utils.
Some scripts have been adapted from gzip. The original versions
were written by Jean-loup Gailly, Charles Levert, and Paul Eggert.
Andrew Dudman helped adapting the scripts and their man pages for
XZ Utils.
The initial version of the threaded .xz decompressor was written
by Sebastian Andrzej Siewior.
@ -23,31 +25,15 @@ Authors of XZ Utils
The initial version of the .lz (lzip) decoder was written
by Michał Górny.
Architecture-specific CRC optimizations were contributed by
Ilya Kurdyukov, Hans Jansen, and Chenxi Mao.
CLMUL-accelerated CRC code was contributed by Ilya Kurdyukov.
Other authors:
- Jonathan Nieder
- Joachim Henke
Many people have contributed improvements or reported bugs.
Most of these people are mentioned in the file THANKS.
The GNU Autotools-based build system contains files from many authors,
which I'm not trying to list here.
The translations of the command line tools and man pages have been
contributed by many people via the Translation Project:
- https://translationproject.org/domain/xz.html
- https://translationproject.org/domain/xz-man.html
The authors of the translated man pages are in the header comments
of the man page files. In the source package, the authors of the
translations are in po/*.po and po4a/*.po files.
Third-party code whose authors aren't listed here:
- GNU getopt_long() in the 'lib' directory is included for
platforms that don't have a usable getopt_long().
- The build system files from GNU Autoconf, GNU Automake,
GNU Libtool, GNU Gettext, Autoconf Archive, and related files.
Several people have contributed fixes or reported bugs. Most of them
are mentioned in the file THANKS.

File diff suppressed because it is too large Load Diff

110
COPYING
View File

@ -6,95 +6,71 @@ XZ Utils Licensing
is a rough summary of which licenses apply to which parts of this
package (but check the individual files to be sure!):
- liblzma is under the BSD Zero Clause License (0BSD).
- liblzma is in the public domain.
- The command line tools xz, xzdec, lzmadec, and lzmainfo are
under 0BSD except that, on systems that don't have a usable
getopt_long, GNU getopt_long is compiled and linked in from the
'lib' directory. The getopt_long code is under GNU LGPLv2.1+.
- xz, xzdec, and lzmadec command line tools are in the public
domain unless GNU getopt_long had to be compiled and linked
in from the lib directory. The getopt_long code is under
GNU LGPLv2.1+.
- The scripts to grep, diff, and view compressed files have been
adapted from GNU gzip. These scripts (xzgrep, xzdiff, xzless,
and xzmore) are under GNU GPLv2+. The man pages of the scripts
are under 0BSD; they aren't based on the man pages of GNU gzip.
adapted from gzip. These scripts and their documentation are
under GNU GPLv2+.
- Most of the XZ Utils specific documentation that is in
plain text files (like README, INSTALL, PACKAGERS, NEWS,
and ChangeLog) are under 0BSD unless stated otherwise in
the file itself. The files xz-file-format.txt and
lzma-file-format.xt are in the public domain but may
be distributed under the terms of 0BSD too.
- Doxygen-generated HTML version of the liblzma API documentation:
While Doxygen is under the GNU GPLv2, the license information
in Doxygen includes the following exception:
Documents produced by doxygen are derivative works
derived from the input used in their production;
they are not affected by this license.
- All the documentation in the doc directory and most of the
XZ Utils specific documentation files in other directories
are in the public domain.
Note: The JavaScript files (under the MIT license) have
been removed from the Doxygen output.
been removed from the Doxygen-generated HTML version of the
liblzma API documentation. Doxygen itself is under the GNU GPL
but the remaining files generated by Doxygen are not affected
by the licenses used in Doxygen because Doxygen licensing has
the following exception:
- The XZ logo (xz-logo.png) included in the Doxygen-generated
documentation is under the Creative Commons BY-SA 4.0 license.
"Documents produced by doxygen are derivative works
derived from the input used in their production;
they are not affected by this license."
- Translated messages and man pages are under 0BSD except that
some old translations are in the public domain.
- Translated messages are in the public domain.
- Test files and test code in the 'tests' directory, and
debugging utilities in the 'debug' directory are under
the BSD Zero Clause License (0BSD).
- The build system contains public domain files, and files that
are under GNU GPLv2+ or GNU GPLv3+. None of these files end up
in the binaries being built.
- The GNU Autotools based build system contains files that are
under GNU GPLv2+, GNU GPLv3+, and a few permissive licenses.
These files don't affect the licensing of the binaries being
built.
- Test files and test code in the tests directory, and debugging
utilities in the debug directory are in the public domain.
- The extra directory contain files that are under various
free software licenses.
- The extra directory may contain public domain files, and files
that are under various free software licenses.
For the files under the BSD Zero Clause License (0BSD), if
a copyright notice is needed, the following is sufficient:
You can do whatever you want with the files that have been put into
the public domain. If you find public domain legally problematic,
take the previous sentence as a license grant. If you still find
the lack of copyright legally problematic, you have too many
lawyers.
Copyright (C) The XZ Utils authors and contributors
As usual, this software is provided "as is", without any warranty.
If you copy significant amounts of 0BSD-licensed code from XZ Utils
If you copy significant amounts of public domain code from XZ Utils
into your project, acknowledging this somewhere in your software is
polite (especially if it is proprietary, non-free software), but
it is not legally required by the license terms. Here is an example
of a good notice to put into "about box" or into documentation:
naturally it is not legally required. Here is an example of a good
notice to put into "about box" or into documentation:
This software includes code from XZ Utils
<https://xz.tukaani.org/xz-utils/>.
This software includes code from XZ Utils <https://tukaani.org/xz/>.
The following license texts are included in the following files:
- COPYING.0BSD: BSD Zero Clause License
- COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1
- COPYING.GPLv2: GNU General Public License version 2
- COPYING.GPLv3: GNU General Public License version 3
- COPYING.CC-BY-SA-4.0: Creative Commons Attribution-ShareAlike 4.0
International Public License
A note about old XZ Utils releases:
Note that the toolchain (compiler, linker etc.) may add some code
pieces that are copyrighted. Thus, it is possible that e.g. liblzma
binary wouldn't actually be in the public domain in its entirety
even though it contains no copyrighted code from the XZ Utils source
package.
XZ Utils releases 5.4.6 and older and 5.5.1alpha have a
significant amount of code put into the public domain and
that obviously remains so. The switch from public domain to
0BSD for newer releases was made in Febrary 2024 because
public domain has (real or perceived) legal ambiguities in
some jurisdictions.
There is very little *practical* difference between public
domain and 0BSD. The main difference likely is that one
shouldn't claim that 0BSD-licensed code is in the public
domain; 0BSD-licensed code is copyrighted but available under
an extremely permissive license. Neither 0BSD nor public domain
require retaining or reproducing author, copyright holder, or
license notices when distributing the software. (Compare to,
for example, BSD 2-Clause "Simplified" License which does have
such requirements.)
If you have questions, don't hesitate to ask for more information.
The contact information is in the README file.
If you have questions, don't hesitate to ask the author(s) for more
information.

View File

@ -1,11 +0,0 @@
Permission to use, copy, modify, and/or distribute this
software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@ -1,427 +0,0 @@
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.

View File

@ -1,6 +1,6 @@
See the commit log in the git repository:
git clone https://github.com/tukaani-project/xz
git clone https://git.tukaani.org/xz.git
Note that "make dist" doesn't put this tiny file into the package.
Instead, the git commit log is used as ChangeLog. See dist-hook in

200
INSTALL
View File

@ -143,37 +143,43 @@ XZ Utils Installation
1.2.7. Windows
The "windows" directory contains instructions for a few types
of builds:
If it is enough to build liblzma (no command line tools):
- INSTALL-MinGW-w64_with_CMake.txt
Simple instructions how to build XZ Utils natively on
Windows using only CMake and a prebuilt toolchain
(GCC + MinGW-w64 or Clang/LLVM + MinGW-w64).
- There is CMake support. It should be good enough to build
static liblzma or liblzma.dll with Visual Studio. The CMake
support may work with MinGW or MinGW-w64. Read the comment
in the beginning of CMakeLists.txt before running CMake!
- INSTALL-MinGW-w64_with_Autotools.txt
Native build under MSYS2 or cross-compilation from
GNU/Linux using a bash script that creates a .zip
and .7z archives of the binaries and documentation.
The related file README-Windows.txt is for the
resulting binary package.
- There are Visual Studio project files under the "windows"
directory. See windows/INSTALL-MSVC.txt. In the future the
project files will be removed when CMake support is good
enough. Thus, please test the CMake version and help fix
possible issues.
- INSTALL-MSVC.txt
Building with MSVC / Visual Studio and CMake.
To build also the command line tools:
- liblzma-crt-mixing.txt
Documentation what to take into account as a programmer
if liblzma.dll and the application don't use the same
CRT (MSVCRT or UCRT).
- MinGW-w64 + MSYS (32-bit and 64-bit x86): This is used
for building the official binary packages for Windows.
There is windows/build.bash to ease packaging XZ Utils with
MinGW(-w64) + MSYS into a redistributable .zip or .7z file.
See windows/INSTALL-MinGW.txt for more information.
Other choices:
- MinGW + MSYS (32-bit x86): I haven't recently tested this.
- Cygwin: https://cygwin.com/
Building on Cygwin can be done like on many POSIX operating
systems. XZ Utils >= 5.2.0 isn't compatible with Cygwin older
than 1.7.35 (data loss!). 1.7.35 was released on 2015-03-04.
- Cygwin 1.7.35 and later: NOTE that using XZ Utils >= 5.2.0
under Cygwin older than 1.7.35 can lead to DATA LOSS! If
you must use an old Cygwin version, stick to XZ Utils 5.0.x
which is safe under older Cygwin versions. You can check
the Cygwin version with the command "cygcheck -V".
- MSYS2: https://www.msys2.org/
It may be possible to build liblzma with other toolchains too, but
that will probably require writing a separate makefile. Building
the command line tools with non-GNU toolchains will be harder than
building only liblzma.
Even if liblzma is built with MinGW(-w64), the resulting DLL can
be used by other compilers and linkers, including MSVC. See
windows/README-Windows.txt for details.
1.2.8. DOS
@ -353,20 +359,20 @@ XZ Utils Installation
with --docdir=DIR.
--disable-assembler
This disables CRC32 and CRC64 assembly code on
32-bit x86. This option currently does nothing
on other architectures (not even on x86-64).
liblzma includes some assembler optimizations. Currently
there is only assembler code for CRC32 and CRC64 for
32-bit x86.
The 32-bit x86 assembly is position-independent code
which is suitable for use in shared libraries and
position-independent executables. It uses only i386
instructions but the code is optimized for i686 class
CPUs. If you are compiling liblzma exclusively for
All the assembler code in liblzma is position-independent
code, which is suitable for use in shared libraries and
position-independent executables. So far only i386
instructions are used, but the code is optimized for i686
class CPUs. If you are compiling liblzma exclusively for
pre-i686 systems, you may want to disable the assembler
code.
--disable-clmul-crc
Disable the use of carryless multiplication for CRC
Disable the use carryless multiplication for CRC
calculation even if compiler support for it is detected.
The code uses runtime detection of SSSE3, SSE4.1, and
CLMUL instructions on x86. On 32-bit x86 this currently
@ -377,15 +383,13 @@ XZ Utils Installation
required extensions (-msse4.1 -mpclmul) then runtime
detection isn't used and the generic code is omitted.
--disable-arm64-crc32
Disable the use of the ARM64 CRC32 instruction extension
even if compiler support for it is detected. The code will
detect support for the instruction at runtime.
--disable-ifunc
Disable the use of __attribute__((__ifunc__())) for
function dispatching even if support is detected.
If using compiler options that unconditionally allow the
required extensions (-march=armv8-a+crc or -march=armv8.1-a
and later) then runtime detection isn't used and the
generic code is omitted.
The ifunc attribute is incompatible with
-fsanitize=address so it may need to be disabled in
debug builds with extra instrumentation.
--enable-unaligned-access
Allow liblzma to use unaligned memory access for 16-bit,
@ -396,43 +400,8 @@ XZ Utils Installation
slow. This option shouldn't be used on systems that
rely on such emulation.
Unaligned access is enabled by default on these:
- 32-bit x86
- 64-bit x86-64
- 32-bit big endian PowerPC
- 64-bit big endian PowerPC
- 64-bit little endian PowerPC
- some RISC-V [1]
- some 32-bit ARM [2]
- some 64-bit ARM64 [2] (NOTE: Autodetection bug
if using GCC -mstrict-align, see below.)
[1] Unaligned access is enabled by default if
configure sees that the C compiler
#defines __riscv_misaligned_fast.
[2] Unaligned access is enabled by default if
configure sees that the C compiler
#defines __ARM_FEATURE_UNALIGNED:
- ARMv7 + GCC or Clang: It works. The options
-munaligned-access and -mno-unaligned-access
affect this macro correctly.
- ARM64 + Clang: It works. The options
-munaligned-access, -mno-unaligned-access,
and -mstrict-align affect this macro correctly.
Clang >= 17 supports -mno-strict-align too.
- ARM64 + GCC: It partially works. The macro
is always #defined by GCC versions at least
up to 13.2, even when using -mstrict-align.
If building for strict-align ARM64, the
configure option --disable-unaligned-access
should be used if using a GCC version that has
this issue because otherwise the performance
may be degraded. It likely won't crash due to
how unaligned access is done in the C code.
Unaligned access is enabled by default on x86, x86-64,
big endian PowerPC, some ARM, and some ARM64 systems.
--enable-unsafe-type-punning
This enables use of code like
@ -518,25 +487,14 @@ XZ Utils Installation
calls any liblzma functions from more than
one thread, something bad may happen.
--enable-ifunc
Use __attribute__((__ifunc__())) in liblzma. This is
enabled by default on GNU/Linux and FreeBSD.
The ifunc attribute is incompatible with
-fsanitize=address. --disable-ifunc must be used
if any -fsanitize= option is specified in CFLAGS.
--enable-sandbox=METHOD
There is limited sandboxing support in the xz and xzdec
tools. If built with sandbox support, xz uses it
automatically when (de)compressing exactly one file to
standard output when the options --files or --files0 aren't
used. This is a common use case, for example,
(de)compressing .tar.xz files via GNU tar. The sandbox is
also used for single-file 'xz --test' or 'xz --list'.
xzdec always uses the sandbox, except when more than one
file are decompressed. In this case it will enable the
sandbox for the last file that is decompressed.
There is limited sandboxing support in the xz tool. If
built with sandbox support, it's used automatically when
(de)compressing exactly one file to standard output and
the options --files or --files0 weren't used. This is a
common use case, for example, (de)compressing .tar.xz
files via GNU tar. The sandbox is also used for
single-file 'xz --test' or 'xz --list'.
Supported METHODs:
@ -548,7 +506,7 @@ XZ Utils Installation
no Disable sandboxing support.
capsicum
Use Capsicum (FreeBSD >= 10.2) for
Use Capsicum (FreeBSD >= 10) for
sandboxing. If no Capsicum support
is found, configure will give an error.
@ -556,50 +514,10 @@ XZ Utils Installation
sandboxing. If pledge(2) isn't found,
configure will give an error.
landlock
Use Landlock (Linux >= 5.13) for
sandboxing. If no Landlock support
is found, configure will give an error.
--enable-symbol-versions[=VARIANT]
Use symbol versioning for liblzma shared library.
This is enabled by default on GNU/Linux (glibc only),
other GNU-based systems, and FreeBSD.
Symbol versioning is never used for static liblzma. This
option is ignored when not building a shared library.
Supported VARIANTs:
no Disable symbol versioning. This is the
same as using --disable-symbol-versions.
auto Autodetect between "no", "linux",
and "generic".
yes Autodetect between "linux" and
"generic". This forces symbol
versioning to be used when
building a shared library.
generic Generic version is the default for
FreeBSD and GNU/Linux on MicroBlaze.
This is also used on GNU/Linux when
building with NVIDIA HPC Compiler
because the compiler doesn't support
the features required for the "linux"
variant below.
linux Special version for GNU/Linux (glibc
only). This adds a few 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
RHEL/CentOS 7. That patch was used
by some build tools outside of
RHEL/CentOS 7 too.
--enable-symbol-versions
Use symbol versioning for liblzma. This is enabled by
default on GNU/Linux, other GNU-based systems, and
FreeBSD.
--enable-debug
This enables the assert() macro and possibly some other

View File

@ -1,5 +1,9 @@
## SPDX-License-Identifier: 0BSD
##
## Author: Lasse Collin
##
## This file has been put into the public domain.
## You can do whatever you want with this file.
##
# Use -n to prevent gzip from adding a timestamp to the .gz headers.
GZIP_ENV = -9n
@ -17,11 +21,11 @@ if COND_DOC
dist_doc_DATA = \
AUTHORS \
COPYING \
COPYING.0BSD \
COPYING.GPLv2 \
NEWS \
README \
THANKS \
TODO \
doc/faq.txt \
doc/history.txt \
doc/xz-file-format.txt \
@ -34,9 +38,13 @@ dist_examples_DATA = \
doc/examples/02_decompress.c \
doc/examples/03_compress_custom.c \
doc/examples/04_compress_easy_mt.c \
doc/examples/11_file_info.c \
doc/examples/Makefile
examplesolddir = $(docdir)/examples_old
dist_examplesold_DATA = \
doc/examples_old/xz_pipe_comp.c \
doc/examples_old/xz_pipe_decomp.c
# Install the Doxygen generated documentation if they were built.
install-data-local:
if test -d "$(srcdir)/doc/api" ; then \
@ -51,25 +59,22 @@ uninstall-local:
endif
EXTRA_DIST = \
cmake \
po4a \
extra \
dos \
doxygen \
extra \
po4a \
windows \
macosx \
cmake \
CMakeLists.txt \
COPYING.CC-BY-SA-4.0 \
autogen.sh \
COPYING.GPLv2 \
COPYING.GPLv3 \
COPYING.LGPLv2.1 \
INSTALL.generic \
PACKAGERS \
TODO \
autogen.sh \
build-aux/manconv.sh \
build-aux/version.sh \
doc/xz-logo.png \
po/xz.pot-header
build-aux/version.sh
ACLOCAL_AMFLAGS = -I m4
@ -88,7 +93,7 @@ manfiles = \
dist-hook:
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
( cd "$(srcdir)" && git log --date=iso --stat \
b69da6d4bb6bb11fc0cf066920791990d2b22a06^..HEAD ) \
6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6^..HEAD ) \
> "$(distdir)/ChangeLog"; \
fi
if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \

409
NEWS
View File

@ -2,415 +2,6 @@
XZ Utils Release Notes
======================
5.6.1 (2024-03-09)
* liblzma: Fixed two bugs relating to GNU indirect function (IFUNC)
with GCC. The more serious bug caused a program linked with
liblzma to crash on start up if the flag -fprofile-generate was
used to build liblzma. The second bug caused liblzma to falsely
report an invalid write to Valgrind when loading liblzma.
* xz: Changed the messages for thread reduction due to memory
constraints to only appear under the highest verbosity level.
* Build:
- Fixed a build issue when the header file <linux/landlock.h>
was present on the system but the Landlock system calls were
not defined in <sys/syscall.h>.
- The CMake build now warns and disables NLS if both gettext
tools and pre-created .gmo files are missing. Previously,
this caused the CMake build to fail.
* Minor improvements to man pages.
* Minor improvements to tests.
5.6.0 (2024-02-24)
This bumps the minor version of liblzma because new features were
added. The API and ABI are still backward compatible with liblzma
5.4.x and 5.2.x and 5.0.x.
NOTE: As described in the NEWS for 5.5.2beta, the core components
are now under the BSD Zero Clause License (0BSD).
Since 5.5.2beta:
* liblzma:
- Disabled the branchless C variant in the LZMA decoder based
on the benchmark results from the community.
- Disabled x86-64 inline assembly on x32 to fix the build.
* Sandboxing support in xz:
- Landlock is now used even when xz needs to create files.
In this case the sandbox has to be more permissive than
when no files need to be created. A similar thing was
already in use with pledge(2) since 5.3.4alpha.
- Landlock and pledge(2) are now stricter when reading from
more than one input file and only writing to standard output.
- Added support for Landlock ABI version 4.
* CMake:
- Default to -O2 instead of -O3 with CMAKE_BUILD_TYPE=Release.
-O3 is not useful for speed and makes the code larger.
- Now builds lzmainfo and lzmadec.
- xzdiff, xzgrep, xzless, xzmore, and their symlinks are now
installed. The scripts are also tested during "make test".
- Added translation support for xz, lzmainfo, and the
man pages.
- Applied the symbol versioning workaround for MicroBlaze that
is used in the Autotools build.
- The general XZ Utils and liblzma API documentation is now
installed.
- The CMake component names were changed a little and several
were added. liblzma_Runtime and liblzma_Development are
unchanged.
- Minimum required CMake version is now 3.14. However,
translation support is disabled with CMake versions
older than 3.20.
- The CMake-based build is now close to feature parity with the
Autotools-based build. Most importantly a few tests aren't
run yet. Testing the CMake-based build on different operating
systems would be welcome now. See the comment at the top of
CMakeLists.txt.
* Fixed a bug in the Autotools feature test for ARM64 CRC32
instruction support for old versions of Clang. This did not
affect the CMake build.
* Windows:
- The build instructions in INSTALL and windows/INSTALL*.txt
were revised completely.
- windows/build-with-cmake.bat along with the instructions
in windows/INSTALL-MinGW-w64_with_CMake.txt should make
it very easy to build liblzma.dll and xz.exe on Windows
using CMake and MinGW-w64 with either GCC or Clang/LLVM.
- windows/build.bash was updated. It now works on MSYS2 and
on GNU/Linux (cross-compiling) to create a .zip and .7z
package for 32-bit and 64-bit x86 using GCC + MinGW-w64.
* The TODO file is no longer installed as part of the
documentation. The file is out of date and does not reflect
the actual tasks that will be completed in the future.
* Translations:
- Translated lzmainfo man pages are now installed. These
had been forgotten in earlier versions.
- Updated Croatian, Esperanto, German, Hungarian, Korean,
Polish, Romanian, Spanish, Swedish, Vietnamese, and Ukrainian
translations.
- Updated German, Korean, Romanian, and Ukrainian man page
translations.
* Added a few tests.
Summary of new features added in the 5.5.x development releases:
* liblzma:
- LZMA decoder: Speed optimizations to the C code and
added GCC & Clang compatible inline assembly for x86-64.
- Added lzma_mt_block_size() to recommend a Block size for
multithreaded encoding.
- Added CLMUL-based CRC32 on x86-64 and E2K with runtime
processor detection. Similar to CRC64, on 32-bit x86 it
isn't available unless --disable-assembler is used.
- Optimized the CRC32 calculation on ARM64 platforms using the
CRC32 instructions. Runtime detection for the instruction is
used on GNU/Linux, FreeBSD, Windows, and macOS. If the
compiler flags indicate unconditional CRC32 instruction
support (+crc) then the generic version is not built.
- Added definitions of mask values like
LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
* xz:
- Multithreaded mode is now the default. This improves
compression speed and creates .xz files that can be
decompressed in multithreaded mode. The downsides are
increased memory usage and slightly worse compression ratio.
- Added a new command line option --filters to set the filter
chain using the liblzma filter string syntax.
- Added new command line options --filters1 ... --filters9 to
set additional filter chains using the liblzma filter string
syntax. The --block-list option now allows specifying filter
chains that were set using these new options.
- Ported the command line tools to Windows MSVC.
Visual Studio 2015 or later is required.
* Added lz4 support to xzdiff/xzcmp and xzgrep.
5.5.2beta (2024-02-14)
* Licensing change: The core components are now under the
BSD Zero Clause License (0BSD). In XZ Utils 5.4.6 and older
and 5.5.1alpha these components are in the public domain and
obviously remain so; the change affects the new releases only.
0BSD is an extremely permissive license which doesn't require
retaining or reproducing copyright or license notices when
distributing the code, thus in practice there is extremely
little difference to public domain.
* liblzma
- Significant speed optimizations to the LZMA decoder were
made. There are now three variants that can be chosen at
build time:
* Basic C version: This is a few percent faster than
5.4.x due to some new optimizations.
* Branchless C: This is currently the default on platforms
for which there is no assembly code. This should be a few
percent faster than the basic C version.
* x86-64 inline assembly. This works with GCC and Clang.
The default choice can currently be overridden by setting
LZMA_RANGE_DECODER_CONFIG in CPPFLAGS: 0 means the basic
version and 3 means that branchless C version.
- Optimized the CRC32 calculation on ARM64 platforms using the
CRC32 instructions. The instructions are optional in ARMv8.0
and are required in ARMv8.1 and later. Runtime detection for
the instruction is used on GNU/Linux, FreeBSD, Windows, and
macOS. If the compiler flags indicate unconditional CRC32
instruction support (+crc) then the generic version is not
built.
* Added lz4 support to xzdiff/xzcmp and xzgrep.
* Man pages of xzdiff/xzcmp, xzgrep, and xzmore were rewritten
to simplify licensing of the man page translations.
* Translations:
- Updated Chinese (simplified), German, Korean, Polish,
Romanian, Spanish, Swedish, and Ukrainian translations.
- Updated German, Korean, Romanian, and Ukrainian man page
translations.
* Small improvements to the tests.
* Added doc/examples/11_file_info.c. It was added to the Git
repository in 2017 but forgotten to be added into distribution
tarballs.
* Removed doc/examples_old. These were from 2012.
* Removed the macos/build.sh script. It had not been updated
since 2013.
5.5.1alpha (2024-01-26)
* Added a new filter for RISC-V binaries. The filter can be used
for 32-bit and 64-bit binaries with either little or big
endianness. In liblzma, the Filter ID is LZMA_FILTER_RISCV (0x0B)
and the xz option is --riscv. liblzma filter string syntax
recognizes this filter as "riscv".
* liblzma:
- Added lzma_mt_block_size() to recommend a Block size for
multithreaded encoding
- Added CLMUL-based CRC32 on x86-64 and E2K with runtime
processor detection. Similar to CRC64, on 32-bit x86 it
isn't available unless --disable-assembler is used.
- Implemented GNU indirect function (IFUNC) as a runtime
function dispatching method for CRC32 and CRC64 fast
implementations on x86. Only GNU/Linux (glibc) and FreeBSD
builds will use IFUNC, unless --enable-ifunc is specified to
configure.
- Added definitions of mask values like
LZMA_INDEX_CHECK_MASK_CRC32 to <lzma/index.h>.
- The XZ logo is now included in the Doxygen generated
documentation. It is licensed under Creative Commons
Attribution-ShareAlike 4.0.
* xz:
- Multithreaded mode is now the default. This improves
compression speed and creates .xz files that can be
decompressed multithreaded at the cost of increased memory
usage and slightly worse compression ratio.
- Added new command line option --filters to set the filter
chain using liblzma filter string syntax.
- Added new command line options --filters1 ... --filters9 to
set additional filter chains using liblzma filter string
syntax. The --block-list option now allows specifying filter
chains that were set using these new options.
- Added support for Linux Landlock as a sandboxing method.
- xzdec now supports pledge(2), Capsicum, and Linux Landlock as
sandboxing methods.
- Progress indicator time stats remain accurate after pausing
xz with SIGTSTP.
- Ported xz and xzdec to Windows MSVC. Visual Studio 2015 or
later is required.
* CMake Build:
- Supports pledge(2), Capsicum, and Linux Landlock sandboxing
methods.
- Replacement functions for getopt_long() are used on platforms
that do not have it.
* Enabled unaligned access by default on PowerPC64LE and on RISC-V
targets that define __riscv_misaligned_fast.
* Tests:
- Added two new fuzz targets to OSS-Fuzz.
- Implemented Continuous Integration (CI) testing using
GitHub Actions.
* Changed quoting style from `...' to '...' in all messages,
scripts, and documentation.
* Added basic Codespell support to help catch typo errors.
5.4.6 (2024-01-26)
* Fixed a bug involving internal function pointers in liblzma not
being initialized to NULL. The bug can only be triggered if
lzma_filters_update() is called on a LZMA1 encoder, so it does
not affect xz or any application known to us that uses liblzma.
* xz:
- Fixed a regression introduced in 5.4.2 that caused encoding
in the raw format to unnecessarily fail if --suffix was not
used. For instance, the following command no longer reports
that --suffix must be used:
echo foo | xz --format=raw --lzma2 | wc -c
- Fixed an issue on MinGW-w64 builds that prevented reading
from or writing to non-terminal character devices like NUL.
* Added a new test.
5.4.5 (2023-11-31)
* liblzma:
- Use __attribute__((__no_sanitize_address__)) to avoid address
sanitization with CRC64 CLMUL. It uses 16-byte-aligned reads
which can extend past the bounds of the input buffer and
inherently trigger address sanitization errors. This isn't
a bug.
- Fixed an assertion failure that could be triggered by a large
unpadded_size argument. It was verified that there was no
other bug than the assertion failure.
- Fixed a bug that prevented building with Windows Vista
threading when __attribute__((__constructor__)) is not
supported.
* xz now properly handles special files such as "con" or "nul" on
Windows. Before this fix, the following wrote "foo" to the
console and deleted the input file "con_xz":
echo foo | xz > con_xz
xz --suffix=_xz --decompress con_xz
* Build systems:
- Allow builds with Windows win95 threading and small mode when
__attribute__((__constructor__)) is supported.
- Added a new line to liblzma.pc for MSYS2 (Windows):
Cflags.private: -DLZMA_API_STATIC
When compiling code that will link against static liblzma,
the LZMA_API_STATIC macro needs to be defined on Windows.
- CMake specific changes:
* Fixed a bug that allowed CLOCK_MONOTONIC to be used even
if the check for it failed.
* Fixed a bug where configuring CMake multiple times
resulted in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC
not being set.
* Fixed the build with MinGW-w64-based Clang/LLVM 17.
llvm-windres now has more accurate GNU windres emulation
so the GNU windres workaround from 5.4.1 is needed with
llvm-windres version 17 too.
* The import library on Windows is now properly named
"liblzma.dll.a" instead of "libliblzma.dll.a"
* Fixed a bug causing the Ninja Generator to fail on
UNIX-like systems. This bug was introduced in 5.4.0.
* Added a new option to disable CLMUL CRC64.
* A module-definition (.def) file is now created when
building liblzma.dll with MinGW-w64.
* The pkg-config liblzma.pc file is now installed on all
builds except when using MSVC on Windows.
* Added large file support by default for platforms that
need it to handle files larger than 2 GiB. This includes
MinGW-w64, even 64-bit builds.
* Small fixes and improvements to the tests.
* Updated translations: Chinese (simplified) and Esperanto.
5.4.4 (2023-08-02)
* liblzma and xzdec can now build against WASI SDK when threading

View File

@ -124,15 +124,14 @@ Information to packagers of XZ Utils
If the package manager supports a license field, you probably should
put GPLv2+ there (GNU GPL v2 or later). The interesting parts of
XZ Utils are under the BSD Zero Clause License (0BSD), but some less
important files ending up into the binary package are under GPLv2+.
So it is simplest to just say GPLv2+ if you cannot specify
"BSD0 and GPLv2+".
XZ Utils are in the public domain, but some less important files
ending up into the binary package are under GPLv2+. So it is simplest
to just say GPLv2+ if you cannot specify "public domain and GPLv2+".
If you split XZ Utils into multiple packages as described earlier
in this file, liblzma and liblzma-dev packages will contain only
0BSD-licensed code from XZ Utils (compiler or linker may add some
third-party code which may have other licenses).
public domain code (from XZ Utils at least; compiler or linker may
add some third-party code, which may be copyrighted).
4. configure options

37
README
View File

@ -67,27 +67,24 @@ XZ Utils
1.1. Overall documentation
README This file
README This file
INSTALL.generic Generic install instructions for those not
familiar with packages using GNU Autotools
INSTALL Installation instructions specific to XZ Utils
PACKAGERS Information to packagers of XZ Utils
INSTALL.generic Generic install instructions for those not familiar
with packages using GNU Autotools
INSTALL Installation instructions specific to XZ Utils
PACKAGERS Information to packagers of XZ Utils
COPYING XZ Utils copyright and license information
COPYING.0BSD BSD Zero Clause License
COPYING.GPLv2 GNU General Public License version 2
COPYING.GPLv3 GNU General Public License version 3
COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1
COPYING.CC-BY-SA-4.0 Creative Commons Attribution-ShareAlike 4.0
International Public License
COPYING XZ Utils copyright and license information
COPYING.GPLv2 GNU General Public License version 2
COPYING.GPLv3 GNU General Public License version 3
COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1
AUTHORS The main authors of XZ Utils
THANKS Incomplete list of people who have helped making
this software
NEWS User-visible changes between XZ Utils releases
ChangeLog Detailed list of changes (commit log)
TODO Known bugs and some sort of to-do list
AUTHORS The main authors of XZ Utils
THANKS Incomplete list of people who have helped making
this software
NEWS User-visible changes between XZ Utils releases
ChangeLog Detailed list of changes (commit log)
TODO Known bugs and some sort of to-do list
Note that only some of the above files are included in binary
packages.
@ -290,11 +287,11 @@ XZ Utils
XZ Embedded is a limited implementation written for use in the Linux
kernel, but it is also suitable for other embedded use.
https://xz.tukaani.org/xz-embedded/
https://tukaani.org/xz/embedded.html
XZ for Java is a complete implementation written in pure Java.
https://xz.tukaani.org/xz-for-java/
https://tukaani.org/xz/java.html
6. Contact information

8
THANKS
View File

@ -5,7 +5,6 @@ Thanks
Some people have helped more, some less, but nevertheless everyone's help
has been important. :-) In alphabetical order:
- Mark Adler
- Kian-Meng Ang
- H. Peter Anvin
- Jeff Bastian
- Nelson H. F. Beebe
@ -52,7 +51,6 @@ has been important. :-) In alphabetical order:
- Bjarni Ingi Gislason
- John Paul Adrian Glaubitz
- Bill Glessner
- Matthew Good
- Michał Górny
- Jason Gorski
- Juan Manuel Guerrero
@ -76,7 +74,6 @@ has been important. :-) In alphabetical order:
- Richard Koch
- Anton Kochkov
- Ville Koskinen
- Sergey Kosukhin
- Marcin Kowalczyk
- Jan Kratochvil
- Christian Kujau
@ -95,7 +92,6 @@ has been important. :-) In alphabetical order:
- Lorenzo De Liso
- H.J. Lu
- Bela Lubkin
- Chenxi Mao
- Gregory Margo
- Julien Marrec
- Ed Maste
@ -153,11 +149,10 @@ has been important. :-) In alphabetical order:
- Dan Stromberg
- Jia Tan
- Vincent Torri
- Alexey Tourbin
- Paul Townsend
- Mohammed Adnène Trojette
- Alexey Tourbin
- Taiki Tsunekawa
- Maksym Vatsyk
- Loganaden Velvindron
- Patrick J. Volkerding
- Martin Väth
@ -172,7 +167,6 @@ has been important. :-) In alphabetical order:
- Charles Wilson
- Lars Wirzenius
- Pilorz Wojciech
- Chien Wong
- Ryan Young
- Andreas Zieringer

View File

@ -1,10 +1,12 @@
#!/bin/sh
# SPDX-License-Identifier: 0BSD
###############################################################################
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
###############################################################################
set -e -x

View File

@ -1,6 +1,5 @@
#!/bin/bash
# SPDX-License-Identifier: 0BSD
#
#############################################################################
#
# Script meant to be used for Continuous Integration automation for POSIX
@ -10,6 +9,9 @@
#
# Author: Jia Tan
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
set -e
@ -18,10 +20,9 @@ USAGE="Usage: $0
-a [autogen flags]
-b [autotools|cmake]
-c [crc32|crc64|sha256]
-d [encoders|decoders|bcj|delta|threads|shared|nls|small|ifunc|clmul|sandbox]
-d [encoders|decoders|bcj|delta|threads|shared|nls|small|ifunc|clmul]
-f [CFLAGS]
-l [destdir]
-m [compiler]
-n [ARTIFACTS_DIR_NAME]
-p [all|build|test]
-s [srcdir]"
@ -43,7 +44,6 @@ NATIVE_LANG_SUPPORT="y"
SMALL="n"
IFUNC="y"
CLMUL="y"
SANDBOX="y"
SRC_DIR="$ABS_DIR/../"
DEST_DIR="$SRC_DIR/../xz_build"
PHASE="all"
@ -54,7 +54,7 @@ ARTIFACTS_DIR_NAME="output"
# Parse arguments #
###################
while getopts a:b:c:d:l:m:n:s:p:f:h opt; do
while getopts a:b:c:d:l:n:s:p:f:h opt; do
# b option can have either value "autotools" OR "cmake"
case ${opt} in
h)
@ -89,17 +89,12 @@ while getopts a:b:c:d:l:m:n:s:p:f:h opt; do
small) SMALL="y";;
ifunc) IFUNC="n";;
clmul) CLMUL="n";;
sandbox) SANDBOX="n";;
*) echo "Invalid disable value: $disable_arg"; exit 1 ;;
esac
done
;;
l) DEST_DIR="$OPTARG"
;;
m)
CC="$OPTARG"
export CC
;;
n) ARTIFACTS_DIR_NAME="$OPTARG"
;;
s) SRC_DIR="$OPTARG"
@ -202,7 +197,7 @@ then
cd "$DEST_DIR"
add_to_filter_list "$BCJ" ",x86,powerpc,ia64,arm,armthumb,arm64,sparc,riscv"
add_to_filter_list "$BCJ" ",x86,powerpc,ia64,arm,armthumb,arm64,sparc"
add_to_filter_list "$DELTA" ",delta"
add_extra_option "$ENCODERS" "--enable-encoders=$FILTER_LIST" "--disable-encoders"
@ -213,7 +208,6 @@ then
add_extra_option "$SMALL" "--enable-small" ""
add_extra_option "$IFUNC" "" "--disable-ifunc"
add_extra_option "$CLMUL" "" "--disable-clmul-crc"
add_extra_option "$SANDBOX" "" "--enable-sandbox=no"
# Run configure script
"$SRC_DIR"/configure --enable-werror --enable-checks="$CHECK_TYPE" $EXTRA_OPTIONS --config-cache
@ -224,7 +218,7 @@ then
cmake)
cd "$DEST_DIR"
add_to_filter_list "$BCJ" ";x86;powerpc;ia64;arm;armthumb;arm64;sparc;riscv"
add_to_filter_list "$BCJ" ";x86;powerpc;ia64;arm;armthumb;arm64;sparc"
add_to_filter_list "$DELTA" ";delta"
add_extra_option "$THREADS" "-DENABLE_THREADS=ON" "-DENABLE_THREADS=OFF"
@ -240,10 +234,6 @@ then
add_extra_option "$SMALL" "-DHAVE_SMALL=ON" ""
if test -n "$CC" ; then
EXTRA_OPTIONS="$EXTRA_OPTIONS -DCMAKE_C_COMPILER=$CC"
fi
# Remove old cache file to clear previous settings.
rm -f "CMakeCache.txt"
cmake "$SRC_DIR/CMakeLists.txt" -B "$DEST_DIR" $EXTRA_OPTIONS -DADDITIONAL_CHECK_TYPES="$CHECK_TYPE" -G "Unix Makefiles"

View File

@ -1,6 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: 0BSD
#
###############################################################################
#
# Wrapper for GNU groff to convert man pages to a few formats
@ -18,6 +17,9 @@
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
###############################################################################
FORMAT=$1

View File

@ -1,6 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: 0BSD
#
#############################################################################
#
# Get the version string from version.h and print it out without
@ -10,6 +9,9 @@
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
sed -n 's/LZMA_VERSION_STABILITY_ALPHA/alpha/

View File

@ -1,25 +0,0 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# remove-ordinals.cmake
#
# Removes the ordinal numbers from a DEF file that has been created by
# GNU ld or LLVM lld option --output-def (when creating a Windows DLL).
# This should be equivalent: sed 's/ \+@ *[0-9]\+//'
#
# Usage:
#
# cmake -DINPUT_FILE=infile.def.in \
# -DOUTPUT_FILE=outfile.def \
# -P remove-ordinals.cmake
#
#############################################################################
#
# Author: Lasse Collin
#
#############################################################################
file(READ "${INPUT_FILE}" STR)
string(REGEX REPLACE " +@ *[0-9]+" "" STR "${STR}")
file(WRITE "${OUTPUT_FILE}" "${STR}")

View File

@ -1,12 +1,11 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# tuklib_common.cmake - common functions and macros for tuklib_*.cmake files
#
# Author: Lasse Collin
#
#############################################################################
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
function(tuklib_add_definitions TARGET_OR_ALL DEFINITIONS)
# DEFINITIONS may be an empty string/list but it's fine here. There is

View File

@ -1,12 +1,11 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# tuklib_cpucores.cmake - see tuklib_cpucores.m4 for description and comments
#
# Author: Lasse Collin
#
#############################################################################
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(CheckCSourceCompiles)

View File

@ -1,12 +1,11 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# tuklib_integer.cmake - see tuklib_integer.m4 for description and comments
#
# Author: Lasse Collin
#
#############################################################################
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(TestBigEndian)
@ -60,64 +59,25 @@ function(tuklib_integer TARGET_OR_ALL)
endif()
endif()
# 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
# Unaligned access is fast on x86(-64), big endian PowerPC, and usually on
# 32/64-bit ARM too. There are others too and ARM could be a false match.
#
# 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).
# Guess the default value for the option.
# CMake's ability to give info about the target arch seems bad.
# The the same arch can have different name depending on the OS.
#
# FIXME: The regex is based on guessing, not on factual information!
#
# NOTE: Compared to the Autoconf test, this lacks the GCC/Clang test
# on ARM and always assumes that unaligned is fast on ARM.
set(FAST_UNALIGNED_GUESS OFF)
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)
elseif(PROCESSOR MATCHES "^powerpc|^ppc")
if(WORDS_BIGENDIAN OR PROCESSOR MATCHES "64")
set(FAST_UNALIGNED_GUESS ON)
endif()
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)
if(CMAKE_SYSTEM_PROCESSOR MATCHES
"[Xx3456]86|^[Xx]64|^[Aa][Mm][Dd]64|^[Aa][Rr][Mm]|^aarch|^powerpc|^ppc")
if(NOT WORDS_BIGENDIAN OR
NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc|^ppc")
set(FAST_UNALIGNED_GUESS ON)
endif()
endif()
option(TUKLIB_FAST_UNALIGNED_ACCESS
"Enable if the system supports *fast* unaligned memory access \
with 16-bit, 32-bit, and 64-bit integers."

View File

@ -1,53 +0,0 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# tuklib_large_file_support.cmake
#
# If off_t is less than 64 bits by default and -D_FILE_OFFSET_BITS=64
# makes off_t become 64-bit, the CMake option LARGE_FILE_SUPPORT is
# provided (ON by default) and -D_FILE_OFFSET_BITS=64 is added to
# the compile definitions if LARGE_FILE_SUPPORT is ON.
#
# Author: Lasse Collin
#
#############################################################################
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(CheckCSourceCompiles)
function(tuklib_large_file_support TARGET_OR_ALL)
# MSVC must be handled specially in the C code.
if(MSVC)
return()
endif()
set(TUKLIB_LARGE_FILE_SUPPORT_TEST
"#include <sys/types.h>
int foo[sizeof(off_t) >= 8 ? 1 : -1];
int main(void) { return 0; }")
check_c_source_compiles("${TUKLIB_LARGE_FILE_SUPPORT_TEST}"
TUKLIB_LARGE_FILE_SUPPORT_BY_DEFAULT)
if(NOT TUKLIB_LARGE_FILE_SUPPORT_BY_DEFAULT)
cmake_push_check_state()
# This needs -D.
list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_FILE_OFFSET_BITS=64")
check_c_source_compiles("${TUKLIB_LARGE_FILE_SUPPORT_TEST}"
TUKLIB_LARGE_FILE_SUPPORT_WITH_FOB64)
cmake_pop_check_state()
endif()
if(TUKLIB_LARGE_FILE_SUPPORT_WITH_FOB64)
# Show the option only when _FILE_OFFSET_BITS=64 affects sizeof(off_t).
option(LARGE_FILE_SUPPORT
"Use -D_FILE_OFFSET_BITS=64 to support files larger than 2 GiB."
ON)
if(LARGE_FILE_SUPPORT)
# This must not use -D.
tuklib_add_definitions("${TARGET_OR_ALL}" "_FILE_OFFSET_BITS=64")
endif()
endif()
endfunction()

View File

@ -1,12 +1,11 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# tuklib_mbstr.cmake - see tuklib_mbstr.m4 for description and comments
#
# Author: Lasse Collin
#
#############################################################################
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(CheckSymbolExists)

View File

@ -1,6 +1,3 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# tuklib_physmem.cmake - see tuklib_physmem.m4 for description and comments
#
@ -9,7 +6,9 @@
#
# Author: Lasse Collin
#
#############################################################################
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(CheckCSourceCompiles)

View File

@ -1,12 +1,11 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# tuklib_progname.cmake - see tuklib_progname.m4 for description and comments
#
# Author: Lasse Collin
#
#############################################################################
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(CheckSymbolExists)

View File

@ -1,12 +1,13 @@
# -*- Autoconf -*-
# SPDX-License-Identifier: 0BSD
# Process this file with autoconf to produce a configure script.
###############################################################################
#
# Process this file with autoconf to produce a configure script.
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
###############################################################################
# NOTE: Don't add useless checks. autoscan detects this and that, but don't
@ -17,7 +18,7 @@
AC_PREREQ([2.69])
AC_INIT([XZ Utils], m4_esyscmd([/bin/sh build-aux/version.sh]),
[xz@tukaani.org], [xz], [https://xz.tukaani.org/xz-utils/])
[xz@tukaani.org], [xz], [https://tukaani.org/xz/])
AC_CONFIG_SRCDIR([src/liblzma/common/common.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
@ -78,8 +79,8 @@ fi
# Filters #
###########
m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc,riscv])dnl
m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,arm64,sparc,riscv])
m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc])dnl
m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,arm64,sparc])
m4_define([LZ_FILTERS], [lzma1,lzma2])
m4_foreach([NAME], [SUPPORTED_FILTERS],
@ -379,16 +380,6 @@ AC_ARG_ENABLE([clmul-crc], AS_HELP_STRING([--disable-clmul-crc],
[], [enable_clmul_crc=yes])
############################
# ARM64 CRC32 Instructions #
############################
AC_ARG_ENABLE([arm64-crc32], AS_HELP_STRING([--disable-arm64-crc32],
[Do not use ARM64 CRC32 instructions even if support for it
is detected.]),
[], [enable_arm64_crc32=yes])
#####################
# Size optimization #
#####################
@ -528,24 +519,20 @@ AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno])
AC_MSG_CHECKING([if sandboxing should be used])
AC_ARG_ENABLE([sandbox], [AS_HELP_STRING([--enable-sandbox=METHOD],
[Sandboxing METHOD can be
'auto', 'no', 'capsicum', 'pledge', or 'landlock'.
'auto', 'no', 'capsicum', or 'pledge'.
The default is 'auto' which enables sandboxing if
a supported sandboxing method is found.])],
[], [enable_sandbox=auto])
case $enable_xzdec-$enable_xz-$enable_sandbox in
no-no-*)
enable_sandbox=no
AC_MSG_RESULT([no, --disable-xz and --disable-xzdec was used])
;;
*-*-auto)
case $enable_sandbox in
auto)
AC_MSG_RESULT([maybe (autodetect)])
;;
*-*-no | *-*-capsicum | *-*-pledge | *-*-landlock)
no | capsicum | pledge)
AC_MSG_RESULT([$enable_sandbox])
;;
*)
AC_MSG_RESULT([])
AC_MSG_ERROR([--enable-sandbox only accepts 'auto', 'no', 'capsicum', 'pledge', or 'landlock'.])
AC_MSG_ERROR([--enable-sandbox only accepts 'auto', 'no', 'capsicum', or 'pledge'.])
;;
esac
@ -619,6 +606,32 @@ AM_PROG_CC_C_O
AM_PROG_AS
AC_USE_SYSTEM_EXTENSIONS
# If using GCC or compatible compiler, verify that CFLAGS doesn't contain
# something that makes -Werror unhappy. It's important to check this after
# the above check for system extensions. It adds macros that can trigger,
# for example, -Wunused-macros.
if test "$GCC" = yes && test "x$SKIP_WERROR_CHECK" != xyes ; then
AC_MSG_CHECKING([if the -Werror option is usable])
OLD_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[extern int foo; int foo;]])], [
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
AC_MSG_ERROR([
CFLAGS contains something that makes -Werror complain (see config.log).
This would break certain checks in 'configure'. It is strongly
recommended to modify CFLAGS to fix this. If you want to use noisy
warning options, for example, -Weverything, it is still possible to
add them later when running 'make': make CFLAGS+=-Weverything
In case you really want to continue with the current CFLAGS, pass
'SKIP_WERROR_CHECK=yes' as an argument to 'configure'.
])
])
CFLAGS=$OLD_CFLAGS
fi
AS_CASE([$enable_threads],
[posix], [
echo
@ -635,10 +648,21 @@ AS_CASE([$enable_threads],
AC_DEFINE([MYTHREAD_POSIX], [1],
[Define to 1 when using POSIX threads (pthreads).])
# This is nice to have but not mandatory.
# These are nice to have but not mandatory.
#
# FIXME: xz uses clock_gettime if it is available and can do
# it even when threading is disabled. Moving this outside
# of pthread detection may be undesirable because then
# liblzma may get linked against librt even when librt isn't
# needed by liblzma.
OLD_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
AC_CHECK_FUNCS([pthread_condattr_setclock])
AC_SEARCH_LIBS([clock_gettime], [rt])
AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock])
AC_CHECK_DECL([CLOCK_MONOTONIC], [AC_DEFINE(
[HAVE_CLOCK_MONOTONIC], [1], [Define to 1 if
`CLOCK_MONOTONIC' is declared in <time.h>.])], [],
[[#include <time.h>]])
CFLAGS=$OLD_CFLAGS
],
[win95], [
@ -709,80 +733,61 @@ 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.
AS_IF([test "x$enable_symbol_versions" = xno], [
if test "x$enable_symbol_versions" = xno ; then
enable_symbol_versions=no
AC_MSG_RESULT([no])
], [test "x$enable_shared" = xno], [
elif test "x$enable_shared" = xno ; then
enable_symbol_versions=no
AC_MSG_RESULT([no (not building a shared library)])
], [
# "yes" means that symbol version are to be used but we need to
# autodetect which variant to use.
if test "x$enable_symbol_versions" = xyes ; then
case "$host_cpu-$host_os" in
microblaze*)
# GCC 12 on MicroBlaze doesn't support
# __symver__ attribute. It's simplest and
# safest to use the generic version on that
# platform since then only the linker script
# is needed. The RHEL/CentOS 7 compatibility
# symbols don't matter on MicroBlaze.
enable_symbol_versions=generic
;;
*-linux*)
# NVIDIA HPC Compiler doesn't support symbol
# versioning but the linker script can still
# be used.
AC_EGREP_CPP([use_generic_symbol_versioning],
[#ifdef __NVCOMPILER
use_generic_symbol_versioning
#endif],
[enable_symbol_versions=generic],
[enable_symbol_versions=linux])
;;
*)
enable_symbol_versions=generic
;;
esac
fi
if test "x$enable_symbol_versions" = xlinux ; then
case "$pic_mode-$enable_static" in
default-*)
# Use symvers if PIC is defined.
have_symbol_versions_linux=2
;;
*-no)
# Not building static library.
# Use symvers unconditionally.
have_symbol_versions_linux=1
;;
*)
AC_MSG_RESULT([])
AC_MSG_ERROR([
else
case "$host_cpu-$host_os" in
microblaze*)
# GCC 12 on MicroBlaze doesn't support __symver__
# attribute. It's simplest and safest to use the
# generic version on that platform since then only
# the linker script is needed. The RHEL/CentOS 7
# compatibility symbols don't matter on MicroBlaze.
enable_symbol_versions=generic
;;
*-linux*)
case "$pic_mode-$enable_static" in
default-*)
# Use symvers if PIC is defined.
have_symbol_versions_linux=2
;;
*-no)
# Not building static library.
# Use symvers unconditionally.
have_symbol_versions_linux=1
;;
*)
AC_MSG_RESULT([])
AC_MSG_ERROR([
On GNU/Linux, building both shared and static library at the same time
is not supported if --with-pic or --without-pic is used.
Use either --disable-shared or --disable-static to build one type
of library at a time. If both types are needed, build one at a time,
possibly picking only src/liblzma/.libs/liblzma.a from the static build.])
;;
esac
AC_DEFINE_UNQUOTED([HAVE_SYMBOL_VERSIONS_LINUX],
[$have_symbol_versions_linux],
[Define to 1 to if GNU/Linux-specific details
are unconditionally wanted for symbol
versioning. Define to 2 to if these are wanted
only if also PIC is defined (allows building
both shared and static liblzma at the same
time with Libtool if neither --with-pic nor
--without-pic is used). This define must be
used together with liblzma_linux.map.])
elif test "x$enable_symbol_versions" != xgeneric ; then
AC_MSG_RESULT([])
AC_MSG_ERROR([unknown symbol versioning variant '$enable_symbol_versions'])
fi
;;
esac
enable_symbol_versions=linux
AC_DEFINE_UNQUOTED([HAVE_SYMBOL_VERSIONS_LINUX],
[$have_symbol_versions_linux],
[Define to 1 to if GNU/Linux-specific details
are unconditionally wanted for symbol
versioning. Define to 2 to if these are wanted
only if also PIC is defined (allows building
both shared and static liblzma at the same
time with Libtool if neither --with-pic nor
--without-pic is used). This define must be
used together with liblzma_linux.map.])
;;
*)
enable_symbol_versions=generic
;;
esac
AC_MSG_RESULT([yes ($enable_symbol_versions)])
])
fi
AM_CONDITIONAL([COND_SYMVERS_LINUX],
[test "x$enable_symbol_versions" = xlinux])
@ -854,13 +859,6 @@ AC_C_BIGENDIAN
# __attribute__((__constructor__)) can be used for one-time initializations.
# Use -Werror because some compilers accept unknown attributes and just
# give a warning.
#
# FIXME? Unfortunately -Werror can cause trouble if CFLAGS contains options
# that produce warnings for unrelated reasons. For example, GCC and Clang
# support -Wunused-macros which will warn about "#define _GNU_SOURCE 1"
# which will be among the #defines that Autoconf inserts to the beginning of
# the test program. There seems to be no nice way to prevent Autoconf from
# inserting the any defines to the test program.
AC_MSG_CHECKING([if __attribute__((__constructor__)) can be used])
have_func_attribute_constructor=no
OLD_CFLAGS="$CFLAGS"
@ -868,6 +866,13 @@ CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
__attribute__((__constructor__))
static void my_constructor_func(void) { return; }
/*
* CompCert 3.12 silently ignores unsupported attributes
* if the function appears to be unused. It doesn't consider
* that the unknown attribute might make the function used.
*/
void call_func(void);
void call_func(void) { my_constructor_func(); }
]])], [
AC_DEFINE([HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR], [1],
[Define to 1 if __attribute__((__constructor__))
@ -885,91 +890,55 @@ CFLAGS="$OLD_CFLAGS"
# win95, and the compiler does not support attribute constructor, then we
# would end up with a multithreaded build that is thread-unsafe. As a
# result this configuration is not allowed.
if test "x$enable_small$enable_threads$have_func_attribute_constructor" \
if test "x$enable_small$enable_threads$have_func_attribute_constructor"\
= xyeswin95no; then
AC_MSG_ERROR([
--enable-threads=win95 and --enable-small cannot be used
at the same time with a compiler that doesn't support
__attribute__((__constructor__))])
AC_MSG_ERROR([--enable-threads=win95 and --enable-small cannot be
used at the same time with a compiler that doesn't support
__attribute__((__constructor__))])
fi
# __attribute__((__ifunc__())) can be used to choose between different
# implementations of the same function at runtime. This is slightly more
# efficient than using __attribute__((__constructor__)) and setting
# a function pointer.
AC_ARG_ENABLE([ifunc], [AS_HELP_STRING([--enable-ifunc],
[Use __attribute__((__ifunc__())). Enabled by default on
GNU/Linux (glibc) and FreeBSD.])],
[], [enable_ifunc=auto])
AC_ARG_ENABLE([ifunc], [AS_HELP_STRING([--disable-ifunc],
[do not use __attribute__((__ifunc__()))])],
[], [enable_ifunc=yes])
# When enable_ifunc is 'auto', allow the use of __attribute__((__ifunc__()))
# if compiler support is detected and we are building for GNU/Linux (glibc)
# or FreeBSD. uClibc and musl don't support ifunc in their dynamic linkers
# but some compilers still accept the attribute when compiling for these
# C libraries, which results in broken binaries. That's why we need to
# check which libc is being used.
if test "x$enable_ifunc" = xauto ; then
if test "x$enable_ifunc" = xyes ; then
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_MSG_CHECKING([if __attribute__((__ifunc__())) can be used])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
/*
* Force a compilation error when not using glibc on Linux
* or if we are not using FreeBSD. uClibc will define
* __GLIBC__ but does not support ifunc, so we must have
* an extra check to disable with uClibc.
*/
#if defined(__linux__)
# include <features.h>
# if !defined(__GLIBC__) || defined(__UCLIBC__)
compile error
# endif
#elif !defined(__FreeBSD__)
compile error
#endif
static void func(void) { return; }
/*
* The attribute __no_profile_instrument_function__ is
* needed with GCC to prevent improper instrumentation in
* the ifunc resolver.
*/
__attribute__((__no_profile_instrument_function__))
static void (*resolve_func (void)) (void) { return func; }
void func_ifunc (void)
__attribute__((__ifunc__("resolve_func")));
/*
* CompCert 3.12 silently ignores unsupported attributes
* if the function appears to be unused. It doesn't consider
* that the unknown attribute might make the function used.
*
* 'clang -Wall' incorrectly warns that resolve_func is
* unused (-Wunused-function). Correct assembly output is
* still produced. This problem exists at least in Clang
* versions 4 to 17. The following silences the bogus warning:
* versions 4 to 17.
*
* The following make CompCert diagnose the unsupported
* attribute and silences the bogus Clang warning:
*/
void make_clang_quiet(void);
void make_clang_quiet(void) { resolve_func()(); }
void call_funcs(void);
void call_funcs(void) { resolve_func()(); func_ifunc(); }
]])], [
enable_ifunc=yes
], [
enable_ifunc=no
])
AC_MSG_RESULT([$enable_ifunc])
CFLAGS="$OLD_CFLAGS"
fi
if test "x$enable_ifunc" = xyes ; then
AC_DEFINE([HAVE_FUNC_ATTRIBUTE_IFUNC], [1],
AC_DEFINE([HAVE_FUNC_ATTRIBUTE_IFUNC], [1],
[Define to 1 if __attribute__((__ifunc__()))
is supported for functions.])
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
])
# ifunc explicitly does not work with -fsanitize=address.
# If configured, it will result in a liblzma build that will fail
# when liblzma is loaded at runtime (when the ifunc resolver
# executes).
AS_CASE([$CFLAGS], [*-fsanitize=*], [AC_MSG_ERROR([
CFLAGS contains '-fsanitize=' which is incompatible with ifunc.
Use --disable-ifunc when using '-fsanitize'.])])
CFLAGS="$OLD_CFLAGS"
fi
@ -980,22 +949,6 @@ fi
# Gnulib replacements as needed
gl_GETOPT
# If clock_gettime() is available, liblzma with pthreads may use it, and
# xz may use it even when threading support is disabled. In XZ Utils 5.4.x
# and older, configure checked for clock_gettime() only when using pthreads.
# This way non-threaded builds of liblzma didn't get a useless dependency on
# librt which further had a dependency on libpthread. Avoiding these was
# useful when a small build was needed, for example, for initramfs use.
#
# The above reasoning is thoroughly obsolete: On GNU/Linux, librt hasn't
# been needed for clock_gettime() since glibc 2.17 (2012-12-25).
# Solaris 10 needs librt but Solaris 11 doesn't anymore.
AC_SEARCH_LIBS([clock_gettime], [rt])
AC_CHECK_FUNCS([clock_gettime])
AC_CHECK_DECL([CLOCK_MONOTONIC], [AC_DEFINE([HAVE_CLOCK_MONOTONIC], [1],
[Define to 1 if 'CLOCK_MONOTONIC' is declared in <time.h>.])], [],
[[#include <time.h>]])
# Find the best function to set timestamps.
AC_CHECK_FUNCS([futimens futimes futimesat utimes _futime utime], [break])
@ -1115,121 +1068,21 @@ __m128i my_clmul(__m128i a)
[Define to 1 if _mm_set_epi64x and
_mm_clmulepi64_si128 are usable.
See configure.ac for details.])
enable_clmul_crc=yes
AC_MSG_RESULT([yes])
], [
enable_clmul_crc=no
AC_MSG_RESULT([no])
])
AC_MSG_RESULT([$enable_clmul_crc])
])
# ARM64 C Language Extensions define CRC32 functions in arm_acle.h.
# These are supported by at least GCC and Clang which both need
# __attribute__((__target__("+crc"))), unless the needed compiler flags
# are used to support the CRC instruction.
AC_MSG_CHECKING([if ARM64 CRC32 instruction is usable])
AS_IF([test "x$enable_arm64_crc32" = xno], [
AC_MSG_RESULT([no, --disable-arm64-crc32 was used])
], [
# Set -Werror here because some versions of Clang (14 and older)
# do not report the unsupported __attribute__((__target__("+crc")))
# or __crc32d() as an error, only as a warning. This does not need
# to be done with CMake because tests will attempt to link and the
# error will be reported then.
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <arm_acle.h>
#include <stdint.h>
#if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__)
__attribute__((__target__("+crc")))
#endif
uint32_t my_crc(uint32_t a, uint64_t b)
{
return __crc32d(a, b);
}
]])], [
AC_DEFINE([HAVE_ARM64_CRC32], [1],
[Define to 1 if ARM64 CRC32 instruction is supported.
See configure.ac for details.])
enable_arm64_crc32=yes
], [
enable_arm64_crc32=no
])
AC_MSG_RESULT([$enable_arm64_crc32])
CFLAGS="$OLD_CFLAGS"
])
# Check for ARM64 CRC32 instruction runtime detection.
# getauxval() is supported on Linux, elf_aux_info() on FreeBSD, and
# sysctlbyname("hw.optional.armv8_crc32", ...) is supported on Darwin
# (macOS, iOS, etc.). Note that sysctlbyname() is supported on FreeBSD,
# NetBSD, and possibly others too but the string is specific to Apple OSes.
# The C code is responsible for checking defined(__APPLE__) before using
# sysctlbyname("hw.optional.armv8_crc32", ...).
AS_IF([test "x$enable_arm64_crc32" = xyes], [
AC_CHECK_FUNCS([getauxval elf_aux_info sysctlbyname])
])
# Check for sandbox support. If one is found, set enable_sandbox=found.
#
# About -fsanitize: Of our three sandbox methods, only Landlock is
# incompatible with -fsanitize. FreeBSD 13.2 with Capsicum was tested with
# -fsanitize=address,undefined and had no issues. OpenBSD (as of version
# 7.4) has minimal support for process instrumentation. OpenBSD does not
# distribute the additional libraries needed (libasan, libubsan, etc.) with
# GCC or Clang needed for runtime sanitization support and instead only
# support -fsanitize-minimal-runtime for minimal undefined behavior
# sanitization. This minimal support is compatible with our use of the
# Pledge sandbox. So only Landlock will result in a build that cannot
# compress or decompress a single file to standard out.
AS_CASE([$enable_sandbox],
[auto | capsicum], [
AC_CHECK_FUNCS([cap_rights_limit], [enable_sandbox=found])
AX_CHECK_CAPSICUM([enable_sandbox=found], [:])
]
)
AS_CASE([$enable_sandbox],
[auto | pledge], [
AC_CHECK_FUNCS([pledge], [enable_sandbox=found])
]
)
AS_CASE([$enable_sandbox],
[auto | landlock], [
AC_MSG_CHECKING([if Linux Landlock is usable])
# A compile check is done here because some systems have
# linux/landlock.h, but do not have the syscalls defined
# in order to actually use Linux Landlock.
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <linux/landlock.h>
#include <sys/syscall.h>
#include <sys/prctl.h>
void my_sandbox(void)
{
(void)prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
(void)SYS_landlock_create_ruleset;
(void)SYS_landlock_restrict_self;
(void)LANDLOCK_CREATE_RULESET_VERSION;
return;
}
]])], [
enable_sandbox=found
AS_CASE([$CFLAGS], [*-fsanitize=*], [AC_MSG_ERROR([
CFLAGS contains '-fsanitize=' which is incompatible with the Landlock
sandboxing. Use --disable-sandbox when using '-fsanitize'.])])
AC_DEFINE([HAVE_LINUX_LANDLOCK], [1],
[Define to 1 if Linux Landlock is supported.
See configure.ac for details.])
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
])
AC_CHECK_FUNCS([pledge], [enable_sandbox=found ; break])
]
)

View File

@ -1,5 +1,9 @@
## SPDX-License-Identifier: 0BSD
##
## Author: Lasse Collin
##
## This file has been put into the public domain.
## You can do whatever you want with this file.
##
EXTRA_DIST = \
translation.bash

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file crc32.c
@ -7,6 +5,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file full_flush.c
@ -7,6 +5,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file hex2bin.c
@ -7,6 +5,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file known_sizes.c
@ -11,6 +9,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file memusage.c
@ -7,6 +5,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file repeat.c
@ -11,6 +9,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file sync_flush.c
@ -7,6 +5,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"

View File

@ -1,5 +1,4 @@
#!/bin/bash
# SPDX-License-Identifier: 0BSD
###############################################################################
#
@ -21,6 +20,9 @@
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
###############################################################################
set -e

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file 01_compress_easy.c
@ -11,6 +9,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include <stdbool.h>

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file 02_decompress.c
@ -11,6 +9,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include <stdbool.h>

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file 03_compress_custom.c
@ -11,6 +9,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include <stdbool.h>

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file 04_compress_easy_mt.c
@ -11,6 +9,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include <stdbool.h>

View File

@ -1,5 +1,3 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file 11_file_info.c
@ -11,6 +9,9 @@
//
// Author: Lasse Collin
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
///////////////////////////////////////////////////////////////////////////////
#include <stdbool.h>

View File

@ -1,5 +1,9 @@
# SPDX-License-Identifier: 0BSD
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
CC = c99
CFLAGS = -g

View File

@ -0,0 +1,127 @@
/*
* xz_pipe_comp.c
* A simple example of pipe-only xz compressor implementation.
* version: 2010-07-12 - by Daniel Mealha Cabrita
* Not copyrighted -- provided to the public domain.
*
* Compiling:
* Link with liblzma. GCC example:
* $ gcc -llzma xz_pipe_comp.c -o xz_pipe_comp
*
* Usage example:
* $ cat some_file | ./xz_pipe_comp > some_file.xz
*/
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdbool.h>
#include <lzma.h>
/* COMPRESSION SETTINGS */
/* analogous to xz CLI options: -0 to -9 */
#define COMPRESSION_LEVEL 6
/* boolean setting, analogous to xz CLI option: -e */
#define COMPRESSION_EXTREME true
/* see: /usr/include/lzma/check.h LZMA_CHECK_* */
#define INTEGRITY_CHECK LZMA_CHECK_CRC64
/* read/write buffer sizes */
#define IN_BUF_MAX 4096
#define OUT_BUF_MAX 4096
/* error codes */
#define RET_OK 0
#define RET_ERROR_INIT 1
#define RET_ERROR_INPUT 2
#define RET_ERROR_OUTPUT 3
#define RET_ERROR_COMPRESSION 4
/* note: in_file and out_file must be open already */
int xz_compress (FILE *in_file, FILE *out_file)
{
uint32_t preset = COMPRESSION_LEVEL | (COMPRESSION_EXTREME ? LZMA_PRESET_EXTREME : 0);
lzma_check check = INTEGRITY_CHECK;
lzma_stream strm = LZMA_STREAM_INIT; /* alloc and init lzma_stream struct */
uint8_t in_buf [IN_BUF_MAX];
uint8_t out_buf [OUT_BUF_MAX];
size_t in_len; /* length of useful data in in_buf */
size_t out_len; /* length of useful data in out_buf */
bool in_finished = false;
bool out_finished = false;
lzma_action action;
lzma_ret ret_xz;
int ret;
ret = RET_OK;
/* initialize xz encoder */
ret_xz = lzma_easy_encoder (&strm, preset, check);
if (ret_xz != LZMA_OK) {
fprintf (stderr, "lzma_easy_encoder error: %d\n", (int) ret_xz);
return RET_ERROR_INIT;
}
while ((! in_finished) && (! out_finished)) {
/* read incoming data */
in_len = fread (in_buf, 1, IN_BUF_MAX, in_file);
if (feof (in_file)) {
in_finished = true;
}
if (ferror (in_file)) {
in_finished = true;
ret = RET_ERROR_INPUT;
}
strm.next_in = in_buf;
strm.avail_in = in_len;
/* if no more data from in_buf, flushes the
internal xz buffers and closes the xz data
with LZMA_FINISH */
action = in_finished ? LZMA_FINISH : LZMA_RUN;
/* loop until there's no pending compressed output */
do {
/* out_buf is clean at this point */
strm.next_out = out_buf;
strm.avail_out = OUT_BUF_MAX;
/* compress data */
ret_xz = lzma_code (&strm, action);
if ((ret_xz != LZMA_OK) && (ret_xz != LZMA_STREAM_END)) {
fprintf (stderr, "lzma_code error: %d\n", (int) ret_xz);
out_finished = true;
ret = RET_ERROR_COMPRESSION;
} else {
/* write compressed data */
out_len = OUT_BUF_MAX - strm.avail_out;
fwrite (out_buf, 1, out_len, out_file);
if (ferror (out_file)) {
out_finished = true;
ret = RET_ERROR_OUTPUT;
}
}
} while (strm.avail_out == 0);
}
lzma_end (&strm);
return ret;
}
int main ()
{
int ret;
ret = xz_compress (stdin, stdout);
return ret;
}

View File

@ -0,0 +1,123 @@
/*
* xz_pipe_decomp.c
* A simple example of pipe-only xz decompressor implementation.
* version: 2012-06-14 - by Daniel Mealha Cabrita
* Not copyrighted -- provided to the public domain.
*
* Compiling:
* Link with liblzma. GCC example:
* $ gcc -llzma xz_pipe_decomp.c -o xz_pipe_decomp
*
* Usage example:
* $ cat some_file.xz | ./xz_pipe_decomp > some_file
*/
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdbool.h>
#include <lzma.h>
/* read/write buffer sizes */
#define IN_BUF_MAX 4096
#define OUT_BUF_MAX 4096
/* error codes */
#define RET_OK 0
#define RET_ERROR_INIT 1
#define RET_ERROR_INPUT 2
#define RET_ERROR_OUTPUT 3
#define RET_ERROR_DECOMPRESSION 4
/* note: in_file and out_file must be open already */
int xz_decompress (FILE *in_file, FILE *out_file)
{
lzma_stream strm = LZMA_STREAM_INIT; /* alloc and init lzma_stream struct */
const uint32_t flags = LZMA_TELL_UNSUPPORTED_CHECK | LZMA_CONCATENATED;
const uint64_t memory_limit = UINT64_MAX; /* no memory limit */
uint8_t in_buf [IN_BUF_MAX];
uint8_t out_buf [OUT_BUF_MAX];
size_t in_len; /* length of useful data in in_buf */
size_t out_len; /* length of useful data in out_buf */
bool in_finished = false;
bool out_finished = false;
lzma_action action;
lzma_ret ret_xz;
int ret;
ret = RET_OK;
/* initialize xz decoder */
ret_xz = lzma_stream_decoder (&strm, memory_limit, flags);
if (ret_xz != LZMA_OK) {
fprintf (stderr, "lzma_stream_decoder error: %d\n", (int) ret_xz);
return RET_ERROR_INIT;
}
while ((! in_finished) && (! out_finished)) {
/* read incoming data */
in_len = fread (in_buf, 1, IN_BUF_MAX, in_file);
if (feof (in_file)) {
in_finished = true;
}
if (ferror (in_file)) {
in_finished = true;
ret = RET_ERROR_INPUT;
}
strm.next_in = in_buf;
strm.avail_in = in_len;
/* if no more data from in_buf, flushes the
internal xz buffers and closes the decompressed data
with LZMA_FINISH */
action = in_finished ? LZMA_FINISH : LZMA_RUN;
/* loop until there's no pending decompressed output */
do {
/* out_buf is clean at this point */
strm.next_out = out_buf;
strm.avail_out = OUT_BUF_MAX;
/* decompress data */
ret_xz = lzma_code (&strm, action);
if ((ret_xz != LZMA_OK) && (ret_xz != LZMA_STREAM_END)) {
fprintf (stderr, "lzma_code error: %d\n", (int) ret_xz);
out_finished = true;
ret = RET_ERROR_DECOMPRESSION;
} else {
/* write decompressed data */
out_len = OUT_BUF_MAX - strm.avail_out;
fwrite (out_buf, 1, out_len, out_file);
if (ferror (out_file)) {
out_finished = true;
ret = RET_ERROR_OUTPUT;
}
}
} while (strm.avail_out == 0);
}
/* Bug fix (2012-06-14): If no errors were detected, check
that the last lzma_code() call returned LZMA_STREAM_END.
If not, the file is probably truncated. */
if ((ret == RET_OK) && (ret_xz != LZMA_STREAM_END)) {
fprintf (stderr, "Input truncated or corrupt\n");
ret = RET_ERROR_DECOMPRESSION;
}
lzma_end (&strm);
return ret;
}
int main ()
{
int ret;
ret = xz_decompress (stdin, stdout);
return ret;
}

View File

@ -240,5 +240,5 @@ A: Give --enable-small to the configure script. Use also appropriate
If the result is still too big, take a look at XZ Embedded. It is
a separate project, which provides a limited but significantly
smaller XZ decoder implementation than XZ Utils. You can find it
at <https://xz.tukaani.org/xz-embedded/>.
at <https://tukaani.org/xz/embedded.html>.

View File

@ -40,11 +40,11 @@ The .lzma File Format
0.2. Changes
Last modified: 2024-01-16 18:00+0800
Last modified: 2022-07-13 21:00+0300
Compared to the previous version (2022-07-13 21:00+0300)
the section 2 was modified to change links from http to
https and to update XZ links.
Compared to the previous version (2011-04-12 11:55+0300)
the section 1.1.3 was modified to allow End of Payload Marker
with a known Uncompressed Size.
1. File Format
@ -157,17 +157,17 @@ The .lzma File Format
2. References
LZMA SDK - The original LZMA implementation
https://7-zip.org/sdk.html
http://7-zip.org/sdk.html
7-Zip
https://7-zip.org/
http://7-zip.org/
LZMA Utils - LZMA adapted to POSIX-like systems
https://tukaani.org/lzma/
http://tukaani.org/lzma/
XZ Utils - The next generation of LZMA Utils
https://xz.tukaani.org/xz-utils/
http://tukaani.org/xz/
The .xz file format - The successor of the .lzma format
https://xz.tukaani.org/format/xz-file-format.txt
http://tukaani.org/xz/xz-file-format.txt

View File

@ -2,7 +2,7 @@
The .xz File Format
===================
Version 1.2.0 (2024-01-19)
Version 1.1.0 (2022-12-11)
0. Preface
@ -81,22 +81,18 @@ Version 1.2.0 (2024-01-19)
0.2. Getting the Latest Version
The latest official version of this document can be downloaded
from <https://xz.tukaani.org/format/xz-file-format.txt>.
from <http://tukaani.org/xz/xz-file-format.txt>.
Specific versions of this document have a filename
xz-file-format-X.Y.Z.txt where X.Y.Z is the version number.
For example, the version 1.0.0 of this document is available
at <https://xz.tukaani.org/format/xz-file-format-1.0.0.txt>.
at <http://tukaani.org/xz/xz-file-format-1.0.0.txt>.
0.3. Version History
Version Date Description
1.2.0 2024-01-19 Added RISC-V filter and updated URLs in
Sections 0.2 and 7. The URL of this
specification was changed.
1.1.0 2022-12-11 Added ARM64 filter and clarified 32-bit
ARM endianness in Section 5.3.2,
language improvements in Section 5.4
@ -927,7 +923,6 @@ Version 1.2.0 (2024-01-19)
0x08 2 bytes ARM Thumb filter [1]
0x09 4 bytes SPARC filter
0x0A 4 bytes ARM64 filter [2]
0x0B 2 bytes RISC-V filter
[1] These are for little endian instruction encoding.
This must not be confused with data endianness.
@ -1141,30 +1136,30 @@ Version 1.2.0 (2024-01-19)
7. References
LZMA SDK - The original LZMA implementation
https://7-zip.org/sdk.html
http://7-zip.org/sdk.html
LZMA Utils - LZMA adapted to POSIX-like systems
https://tukaani.org/lzma/
http://tukaani.org/lzma/
XZ Utils - The next generation of LZMA Utils
https://xz.tukaani.org/xz-utils/
http://tukaani.org/xz/
[RFC-1952]
GZIP file format specification version 4.3
https://www.ietf.org/rfc/rfc1952.txt
http://www.ietf.org/rfc/rfc1952.txt
- Notation of byte boxes in section "2.1. Overall conventions"
[RFC-2119]
Key words for use in RFCs to Indicate Requirement Levels
https://www.ietf.org/rfc/rfc2119.txt
http://www.ietf.org/rfc/rfc2119.txt
[GNU-tar]
GNU tar 1.35 manual
https://www.gnu.org/software/tar/manual/html_node/Blocking-Factor.html
GNU tar 1.21 manual
http://www.gnu.org/software/tar/manual/html_node/Blocking-Factor.html
- Node 9.4.2 "Blocking Factor", paragraph that begins
"gzip will complain about trailing garbage"
- Note that this URL points to the latest version of the
manual, and may some day not contain the note which is in
1.35. For the exact version of the manual, download GNU
tar 1.35: ftp://ftp.gnu.org/pub/gnu/tar/tar-1.35.tar.gz
1.21. For the exact version of the manual, download GNU
tar 1.21: ftp://ftp.gnu.org/pub/gnu/tar/tar-1.21.tar.gz

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -1,11 +1,12 @@
# SPDX-License-Identifier: 0BSD
###############################################################################
#
# Makefile to build XZ Utils using DJGPP
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
###############################################################################
# For debugging, set comment "#define NDEBUG 1" from config.h to enable

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: 0BSD */
/* How many MiB of RAM to assume if the real amount cannot be determined. */
#define ASSUME_RAM 32
@ -145,7 +143,7 @@
#define PACKAGE_NAME "XZ Utils"
/* Define to the home page for this package. */
#define PACKAGE_URL "https://xz.tukaani.org/xz-utils/"
#define PACKAGE_URL "https://tukaani.org/xz/"
/* The size of 'size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4

View File

@ -61,7 +61,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
PROJECT_LOGO = ../doc/xz-logo.png
PROJECT_LOGO =
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
@ -1246,7 +1246,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER = footer.html
HTML_FOOTER =
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of
@ -1286,7 +1286,7 @@ HTML_EXTRA_STYLESHEET =
# files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_FILES = ../COPYING.CC-BY-SA-4.0
HTML_EXTRA_FILES =
# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
# should be rendered with a dark or light theme.

View File

@ -1,13 +0,0 @@
<hr class="footer"/>
<p style="text-align: right;padding-right: 12px;">
XZ logo &copy; 2023 by Jia Tan is licensed under
<a href="COPYING.CC-BY-SA-4.0"
rel="license"
style="display:inline-block;">
CC BY-SA 4.0
</a>
</p>
</body>
</html>

View File

@ -1,6 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: 0BSD
#
#############################################################################
#
# Updates the Doxygen generated documentation files in the source tree.
@ -17,6 +16,9 @@
# Authors: Jia Tan
# Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
set -e

View File

@ -1,6 +1,5 @@
#!/bin/bash
# SPDX-License-Identifier: 0BSD
#
#############################################################################
#
# 7z2lzma.bash is very primitive .7z to .lzma converter. The input file must
@ -18,6 +17,9 @@
#
# Author: Lasse Collin <lasse.collin@tukaani.org>
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
# You can use 7z or 7za, both will work.

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
scanlzma, scan for lzma compressed data in stdin and echo it to stdout.
Copyright (C) 2006 Timo Lindfors

View File

@ -1,5 +1,3 @@
## SPDX-License-Identifier: GPL-2.0-or-later
##
## Copyright (C) 2004-2007 Free Software Foundation, Inc.
##

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* getopt-on-non-glibc compatibility macros.
Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of gnulib.

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Declarations for getopt (basic, portable features only).
Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Declarations for getopt (GNU extensions).
Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* getopt (basic, portable features) gnulib wrapper header.
Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of gnulib.

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* getopt (GNU extensions) gnulib wrapper header.
Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of gnulib.

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Getopt for GNU.
Copyright (C) 1987-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Declarations for getopt.
Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of gnulib.

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.

View File

@ -1,5 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/* Internal declarations for getopt.
Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.

1
m4/.gitignore vendored
View File

@ -1,4 +1,3 @@
build-to-host.m4
codeset.m4
extern-inline.m4
fcntl-o.m4

85
m4/ax_check_capsicum.m4 Normal file
View File

@ -0,0 +1,85 @@
# -*- Autoconf -*-
# SYNOPSIS
#
# AX_CHECK_CAPSICUM([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro searches for an installed Capsicum header and library,
# and if found:
# - AC_DEFINE([HAVE_CAPSICUM]) is called.
# - AC_DEFINE([HAVE_SYS_CAPSICUM_H]) is called if <sys/capsicum.h>
# is present (otherwise <sys/capability.h> must be used).
# - CAPSICUM_LIB is set to the -l option needed to link Capsicum support,
# and AC_SUBST([CAPSICUM_LIB]) is called.
# - The shell commands in ACTION-IF-FOUND are run. The default
# ACTION-IF-FOUND prepends ${CAPSICUM_LIB} into LIBS. If you don't
# want to modify LIBS and don't need to run any other commands either,
# use a colon as ACTION-IF-FOUND.
#
# If Capsicum support isn't found:
# - The shell commands in ACTION-IF-NOT-FOUND are run. The default
# ACTION-IF-NOT-FOUND calls AC_MSG_WARN to print a warning that
# Capsicum support wasn't found.
#
# You should use autoheader to include a definition for the symbols above
# in a config.h file.
#
# Sample usage in a C/C++ source is as follows:
#
# #ifdef HAVE_CAPSICUM
# # ifdef HAVE_SYS_CAPSICUM_H
# # include <sys/capsicum.h>
# # else
# # include <sys/capability.h>
# # endif
# #endif /* HAVE_CAPSICUM */
#
# LICENSE
#
# Copyright (c) 2014 Google Inc.
# Copyright (c) 2015 Lasse Collin <lasse.collin@tukaani.org>
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
#serial 2
AC_DEFUN([AX_CHECK_CAPSICUM], [
# On FreeBSD >= 11.x and Linux, Capsicum is uses <sys/capsicum.h>.
# If this header is found, it is assumed to be the right one.
capsicum_header_found=no
AC_CHECK_HEADERS([sys/capsicum.h], [capsicum_header_found=yes])
if test "$capsicum_header_found" = no ; then
# On FreeBSD 10.x Capsicum uses <sys/capability.h>. Such a header exists
# on Linux too but it describes POSIX.1e capabilities. Look for the
# declaration of cap_rights_limit to check if <sys/capability.h> is
# a Capsicum header.
AC_CHECK_DECL([cap_rights_limit], [capsicum_header_found=yes], [],
[#include <sys/capability.h>])
fi
capsicum_lib_found=no
CAPSICUM_LIB=
if test "$capsicum_header_found" = yes ; then
AC_LANG_PUSH([C])
# FreeBSD >= 10.x has Capsicum functions in libc.
AC_LINK_IFELSE([AC_LANG_CALL([], [cap_rights_limit])],
[capsicum_lib_found=yes], [])
# Linux has Capsicum functions in libcaprights.
AC_CHECK_LIB([caprights], [cap_rights_limit],
[CAPSICUM_LIB=-lcaprights
capsicum_lib_found=yes], [])
AC_LANG_POP([C])
fi
AC_SUBST([CAPSICUM_LIB])
if test "$capsicum_lib_found" = yes ; then
AC_DEFINE([HAVE_CAPSICUM], [1], [Define to 1 if Capsicum is available.])
m4_default([$1], [LIBS="${CAPSICUM_LIB} $LIBS"])
else
m4_default([$2], [AC_MSG_WARN([Capsicum support not found])])
fi])

View File

@ -1,5 +1,3 @@
dnl SPDX-License-Identifier: GPL-3.0-or-later WITH Autoconf-exception-macro
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
# ===========================================================================

View File

@ -1,5 +1,3 @@
dnl SPDX-License-Identifier: FSFULLR
# getopt.m4 serial 49 (modified version)
dnl Copyright (C) 2002-2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation

View File

@ -1,5 +1,3 @@
dnl SPDX-License-Identifier: FSFULLR
# Find a POSIX-conforming shell.
# Copyright (C) 2007-2008 Free Software Foundation, Inc.

View File

@ -1,6 +1,3 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# SYNOPSIS
#
@ -10,11 +7,13 @@
#
# Common checks for tuklib.
#
#############################################################################
# COPYING
#
# Author: Lasse Collin
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
AC_DEFUN_ONCE([TUKLIB_COMMON], [
AC_REQUIRE([AC_CANONICAL_HOST])

View File

@ -1,6 +1,3 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# SYNOPSIS
#
@ -20,11 +17,13 @@
# GetSystemInfo() is used on Cygwin)
# - pstat_getdynamic(): HP-UX
#
#############################################################################
# COPYING
#
# Author: Lasse Collin
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
AC_DEFUN_ONCE([TUKLIB_CPUCORES], [
AC_REQUIRE([TUKLIB_COMMON])

View File

@ -1,6 +1,3 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# SYNOPSIS
#
@ -14,11 +11,13 @@
# - Does the hardware support fast unaligned access to 16-bit, 32-bit,
# and 64-bit integers
#
#############################################################################
# COPYING
#
# Author: Lasse Collin
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
AC_DEFUN_ONCE([TUKLIB_INTEGER], [
AC_REQUIRE([TUKLIB_COMMON])
@ -66,42 +65,22 @@ 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
with 16-bit, 32-bit, and 64-bit integers. By default,
this is enabled on x86, x86-64,
32/64-bit big endian PowerPC,
64-bit little endian PowerPC,
and some ARM, ARM64, and RISC-V systems.]),
this is enabled only on x86, x86_64, big endian PowerPC,
and some ARM systems.]),
[], [enable_unaligned_access=auto])
if test "x$enable_unaligned_access" = xauto ; then
# NOTE: There might be other architectures on which unaligned access
# is fast.
# TODO: There may be other architectures, on which unaligned access
# is OK.
case $host_cpu in
i?86|x86_64|powerpc|powerpc64|powerpc64le)
i?86|x86_64|powerpc|powerpc64)
enable_unaligned_access=yes
;;
arm*|aarch64*|riscv*)
arm*|aarch64*)
# 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.
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#if !defined(__ARM_FEATURE_UNALIGNED) \
&& !defined(__riscv_misaligned_fast) \
&& !defined(_MSC_VER)
#ifndef __ARM_FEATURE_UNALIGNED
compile error
#endif
int main(void) { return 0; }

View File

@ -1,6 +1,3 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# SYNOPSIS
#
@ -18,11 +15,13 @@
# functions, but each function is put into a separate .c file so
# that it is possible to pick only what is strictly needed.
#
#############################################################################
# COPYING
#
# Author: Lasse Collin
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
AC_DEFUN_ONCE([TUKLIB_MBSTR], [
AC_REQUIRE([TUKLIB_COMMON])

View File

@ -1,6 +1,3 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# SYNOPSIS
#
@ -32,11 +29,13 @@
# - sysinfo() works on Linux/dietlibc and probably on other Linux
# systems whose libc may lack sysconf().
#
#############################################################################
# COPYING
#
# Author: Lasse Collin
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
AC_DEFUN_ONCE([TUKLIB_PHYSMEM], [
AC_REQUIRE([TUKLIB_COMMON])

View File

@ -1,6 +1,3 @@
# SPDX-License-Identifier: 0BSD
#############################################################################
#
# SYNOPSIS
#
@ -14,11 +11,13 @@
# This .m4 file is needed allow this module to use glibc's
# program_invocation_name.
#
#############################################################################
# COPYING
#
# Author: Lasse Collin
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
AC_DEFUN_ONCE([TUKLIB_PROGNAME], [
AC_REQUIRE([TUKLIB_COMMON])

View File

@ -1,5 +1,3 @@
dnl SPDX-License-Identifier: FSFULLR
# visibility.m4 serial 8
dnl Copyright (C) 2005, 2008, 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation

113
macosx/build.sh Executable file
View File

@ -0,0 +1,113 @@
#!/bin/sh
###############################################################################
# Author: Anders F Björklund <afb@users.sourceforge.net>
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
###############################################################################
mkdir -p Root
mkdir -p Resources
# Abort immediately if something goes wrong.
set -e
GCC="gcc-4.2"
SDK="/Developer/SDKs/MacOSX10.5.sdk"
MDT="10.5"
GTT=i686-apple-darwin9
ARCHES1="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
ARCHES2="-arch ppc -arch i386"
PKGFORMAT="10.5" # xar
# avoid "unknown required load command: 0x80000022" from linking on Snow Leopard
uname -r | grep ^1 >/dev/null && LDFLAGS="$LDFLAGS -Wl,-no_compact_linkedit"
# Clean up if it was already configured.
[ -f Makefile ] && make distclean
# Build the regular fat program
CC="$GCC" \
CFLAGS="-O2 -g $ARCHES1 -isysroot $SDK -mmacosx-version-min=$MDT" \
../configure --disable-dependency-tracking --disable-xzdec --disable-lzmadec $GTT
make
make check
make DESTDIR=`pwd`/Root install
make distclean
# Build the size-optimized program
CC="$GCC" \
CFLAGS="-Os -g $ARCHES2 -isysroot $SDK -mmacosx-version-min=$MDT" \
../configure --disable-dependency-tracking --disable-shared --disable-nls --disable-encoders --enable-small --disable-threads $GTT
make -C src/liblzma
make -C src/xzdec
make -C src/xzdec DESTDIR=`pwd`/Root install
cp -a ../extra Root/usr/local/share/doc/xz
make distclean
# Move development files to different package
test -d liblzma && rm -r liblzma
mkdir -p liblzma/usr/local
mv Root/usr/local/include liblzma/usr/local
mv Root/usr/local/lib liblzma/usr/local
mkdir -p Root/usr/local/lib
cp -p liblzma/usr/local/lib/liblzma.5.dylib Root/usr/local/lib
mkdir -p liblzma/usr/local/share/doc/xz
mv Root/usr/local/share/doc/xz/examples* liblzma/usr/local/share/doc/xz
# Strip debugging symbols and make relocatable
for bin in xz lzmainfo xzdec lzmadec; do
strip -S Root/usr/local/bin/$bin
install_name_tool -change /usr/local/lib/liblzma.5.dylib @executable_path/../lib/liblzma.5.dylib Root/usr/local/bin/$bin
done
for lib in liblzma.5.dylib; do
strip -S Root/usr/local/lib/$lib
install_name_tool -id @executable_path/../lib/liblzma.5.dylib Root/usr/local/lib/$lib
done
# Create tarball, but without the HFS+ attrib
rmdir debug lib po src/liblzma/api src/liblzma src/lzmainfo src/scripts src/xz src/xzdec src tests
( cd Root/usr/local; COPY_EXTENDED_ATTRIBUTES_DISABLE=true COPYFILE_DISABLE=true tar cvjf ../../../XZ.tbz * )
( cd liblzma; COPY_EXTENDED_ATTRIBUTES_DISABLE=true COPYFILE_DISABLE=true tar cvjf ../liblzma.tbz ./usr/local )
# Include documentation files for package
cp -p ../README Resources/ReadMe.txt
cp -p ../COPYING Resources/License.txt
# Make an Installer.app package
ID="org.tukaani.xz"
VERSION=`cd ..; sh build-aux/version.sh`
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
$PACKAGEMAKER -r Root/usr/local -l /usr/local -e Resources -i $ID -n $VERSION -t XZ -o XZ.pkg -g $PKGFORMAT --verbose
$PACKAGEMAKER -r liblzma -w -k -i $ID.liblzma -n $VERSION -o liblzma.pkg -g $PKGFORMAT --verbose
# Put the package in a disk image
if [ "$PKGFORMAT" != "10.5" ]; then
hdiutil create -fs HFS+ -format UDZO -quiet -srcfolder XZ.pkg -ov XZ.dmg
hdiutil internet-enable -yes -quiet XZ.dmg
fi
echo
echo "Build completed successfully."
echo

View File

@ -1,10 +1,4 @@
# SPDX-License-Identifier: FSFUL
# Makefile variables for PO directory in any package using GNU gettext.
#
# Copyright (C) 2003-2019 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation gives
# unlimited permission to use, copy, distribute, and modify it.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
@ -14,7 +8,7 @@ subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --no-wrap --package-name='XZ Utils'
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
@ -24,14 +18,7 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --no-wrap --package-name='XZ Utils'
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = The XZ Utils authors and contributors
# This tells whether or not to prepend "GNU " prefix to the package
# name that gets inserted into the header of the $(DOMAIN).pot file.
# Possible values are "yes", "no", or empty. If it is empty, try to
# detect it automatically by scanning the files in $(top_srcdir) for
# "GNU packagename" string.
PACKAGE_GNU = no
COPYRIGHT_HOLDER =
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
@ -53,35 +40,7 @@ MSGID_BUGS_ADDRESS =
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context. Possible values are "yes" and "no". Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = no
# These options get passed to msgmerge.
# Useful options are in particular:
# --previous to keep previous msgids of translated messages,
# --quiet to reduce the verbosity.
MSGMERGE_OPTIONS = --no-wrap
# These options get passed to msginit.
# If you want to disable line wrapping when writing PO files, add
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
# MSGINIT_OPTIONS.
#
# Although one may need slightly wider terminal than 80 chars, it is
# much nicer to edit the output of --help when --no-wrap is set.
MSGINIT_OPTIONS = --no-wrap
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
# has changed. Possible values are "yes" and "no". Set this to no if
# the POT file is checked in the repository and the version control
# program ignores timestamps.
PO_DEPENDS_ON_POT = yes
# This tells whether or not to forcibly update $(DOMAIN).pot and
# regenerate PO files on "make dist". Possible values are "yes" and
# "no". Set this to no if the POT file and PO files are maintained
# externally.
DIST_DEPENDS_ON_UPDATE_PO = yes
# Although you may need slightly wider terminal than 80 chars, it is
# much nicer to edit the output of --help when this is set.
XGETTEXT_OPTIONS += --no-wrap
MSGMERGE += --no-wrap

View File

@ -1,5 +1,3 @@
# SPDX-License-Identifier: 0BSD
# List of source files which contain translatable strings.
src/xz/args.c
src/xz/coder.c
@ -8,10 +6,8 @@ src/xz/hardware.c
src/xz/list.c
src/xz/main.c
src/xz/message.c
src/xz/mytime.c
src/xz/options.c
src/xz/signals.c
src/xz/suffix.c
src/xz/util.c
src/lzmainfo/lzmainfo.c
src/common/tuklib_exit.c

469
po/de.po

File diff suppressed because it is too large Load Diff

502
po/eo.po

File diff suppressed because it is too large Load Diff

506
po/es.po

File diff suppressed because it is too large Load Diff

632
po/fr.po

File diff suppressed because it is too large Load Diff

652
po/hr.po

File diff suppressed because it is too large Load Diff

556
po/hu.po

File diff suppressed because it is too large Load Diff

597
po/ko.po

File diff suppressed because it is too large Load Diff

481
po/pl.po

File diff suppressed because it is too large Load Diff

532
po/ro.po

File diff suppressed because it is too large Load Diff

498
po/sv.po

File diff suppressed because it is too large Load Diff

509
po/uk.po

File diff suppressed because it is too large Load Diff

511
po/vi.po

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
# SPDX-License-Identifier: 0BSD
#
# SOME DESCRIPTIVE TITLE.
# Copyright (C) The XZ Utils authors and contributors
# This file is published under the BSD Zero Clause License.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#

View File

@ -1,14 +1,14 @@
# Chinese translations for xz package
# xz 软件包的简体中文翻译。
# This file is put in the public domain.
# Boyuan Yang <073plan@gmail.com>, 2019, 2022, 2023, 2024.
# Boyuan Yang <073plan@gmail.com>, 2019, 2022, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: xz 5.6.0-pre1\n"
"Project-Id-Version: xz 5.4.4-pre1\n"
"Report-Msgid-Bugs-To: xz@tukaani.org\n"
"POT-Creation-Date: 2024-01-26 19:40+0800\n"
"PO-Revision-Date: 2024-02-05 15:15-0500\n"
"POT-Creation-Date: 2023-07-18 23:34+0800\n"
"PO-Revision-Date: 2023-07-19 14:24-0400\n"
"Last-Translator: Boyuan Yang <073plan@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
@ -17,181 +17,144 @@ 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.4.2\n"
"X-Generator: Poedit 3.2.2\n"
#: src/xz/args.c:78
#: src/xz/args.c:77
#, c-format
msgid "%s: Invalid argument to --block-list"
msgstr "%s--block-list 的无效参数"
#: src/xz/args.c:88
#: src/xz/args.c:87
#, c-format
msgid "%s: Too many arguments to --block-list"
msgstr "%s--block-list 得到过多参数"
#: src/xz/args.c:125
#, c-format
msgid "In --block-list, block size is missing after filter chain number '%c:'"
msgstr "在 --block-list 中,块大小在过滤器链编号 '%c:' 之后缺失"
#: src/xz/args.c:151
#: src/xz/args.c:116
msgid "0 can only be used as the last element in --block-list"
msgstr "0 仅可用于 --block-list 的最后一个元素"
#: src/xz/args.c:540
#: src/xz/args.c:451
#, c-format
msgid "%s: Unknown file format type"
msgstr "%s未知文件格式类型"
#: src/xz/args.c:563 src/xz/args.c:571
#: src/xz/args.c:474 src/xz/args.c:482
#, c-format
msgid "%s: Unsupported integrity check type"
msgstr "%s不支持的完整性检查类型"
#: src/xz/args.c:607
msgid "Only one file can be specified with '--files' or '--files0'."
msgstr "仅可使用 '--files' 或 '--files0' 指定单个文件。"
#: src/xz/args.c:518
msgid "Only one file can be specified with `--files' or `--files0'."
msgstr "仅可使用“--files”或“--files0”指定一个文件。"
#. TRANSLATORS: This is a translatable
#. string because French needs a space
#. before the colon ("%s : %s").
#: src/xz/args.c:622 src/xz/coder.c:1059 src/xz/coder.c:1075
#: src/xz/coder.c:1375 src/xz/coder.c:1378 src/xz/file_io.c:686
#: src/xz/file_io.c:760 src/xz/file_io.c:850 src/xz/file_io.c:1021
#: src/xz/list.c:369 src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:591
#: src/xz/list.c:600
#: src/xz/args.c:533 src/xz/coder.c:691 src/xz/coder.c:707 src/xz/coder.c:967
#: src/xz/coder.c:970 src/xz/file_io.c:605 src/xz/file_io.c:679
#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
#, c-format
msgid "%s: %s"
msgstr "%s%s"
#: src/xz/args.c:678
#: src/xz/args.c:589
#, c-format
msgid "The environment variable %s contains too many arguments"
msgstr "环境变量 %s 包含过多参数"
#: src/xz/args.c:780
#: src/xz/args.c:691
msgid "Compression support was disabled at build time"
msgstr "压缩支持已在构建时禁用"
#: src/xz/args.c:787
#: src/xz/args.c:698
msgid "Decompression support was disabled at build time"
msgstr "解压支持已在构建时禁用"
#: src/xz/args.c:793
#: src/xz/args.c:704
msgid "Compression of lzip files (.lz) is not supported"
msgstr "不支持对 lzip 文件 (.lz) 的压缩"
#: src/xz/args.c:815
msgid "--block-list is ignored unless compressing to the .xz format"
msgstr "除非压缩为 .xz 格式,--block-list 将被忽略"
#: src/xz/args.c:828 src/xz/args.c:837
#: src/xz/args.c:735
msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
msgstr "启用 --format-raw 选项时,必须指定 --suffix=.SUF 获知写入至标准输出"
#: src/xz/coder.c:141
#: src/xz/coder.c:115
msgid "Maximum number of filters is four"
msgstr "过滤器最多数量为四"
#: src/xz/coder.c:179
#, c-format
msgid "Error in --filters%s=FILTERS option:"
msgstr "在 --filters%s=过滤器 选项中出现错误:"
#: src/xz/coder.c:229
#: src/xz/coder.c:134
msgid "Memory usage limit is too low for the given filter setup."
msgstr "内存用量限制对指定过滤器设置过低。"
#: src/xz/coder.c:244
#, c-format
msgid "filter chain %u used by --block-list but not specified with --filters%u="
msgstr "--block-list 使用了过滤器链 %u但未经由 --filters%u= 指定"
#: src/xz/coder.c:375
#: src/xz/coder.c:169
msgid "Using a preset in raw mode is discouraged."
msgstr "不推荐在 raw 模式使用预设等级。"
#: src/xz/coder.c:377
#: src/xz/coder.c:171
msgid "The exact options of the presets may vary between software versions."
msgstr "各个预设等级所使用的准确选项列表在不同软件版本之间可能不同。"
#: src/xz/coder.c:403
#: src/xz/coder.c:194
msgid "The .lzma format supports only the LZMA1 filter"
msgstr ".lzma 格式只支持 LZMA1 过滤器"
#: src/xz/coder.c:411
#: src/xz/coder.c:202
msgid "LZMA1 cannot be used with the .xz format"
msgstr "LZMA1 无法用于 .xz 格式"
#: src/xz/coder.c:435
#, c-format
msgid "Filter chain %u is incompatible with --flush-timeout"
msgstr "过滤器链 %u 和 --flush-timeout 不兼容"
#: src/xz/coder.c:219
msgid "The filter chain is incompatible with --flush-timeout"
msgstr "过滤器链和 --flush-timeout 不兼容"
#: src/xz/coder.c:444
#: src/xz/coder.c:225
msgid "Switching to single-threaded mode due to --flush-timeout"
msgstr "因 --flush-timeout 而切换至单线程模式"
#: src/xz/coder.c:485
#, c-format
msgid "Unsupported options in filter chain %u"
msgstr "过滤器链 %u 中存在不支持的选项"
#: src/xz/coder.c:516
#: src/xz/coder.c:249
#, c-format
msgid "Using up to %<PRIu32> threads."
msgstr "使用最多 %<PRIu32> 个线程。"
#: src/xz/coder.c:532
#: src/xz/coder.c:265
msgid "Unsupported filter chain or filter options"
msgstr "不支持的过滤器链或过滤器选项"
#: src/xz/coder.c:553
#: src/xz/coder.c:277
#, c-format
msgid "Decompression will need %s MiB of memory."
msgstr "解压缩需要 %s MiB 的内存。"
#: src/xz/coder.c:585
#: src/xz/coder.c:309
#, c-format
msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
msgstr "已将所使用的线程数从 %s 减小为 %s以不超出 %s MiB 的内存用量限制"
#: src/xz/coder.c:605
#: src/xz/coder.c:329
#, c-format
msgid "Reduced the number of threads from %s to one. The automatic memory usage limit of %s MiB is still being exceeded. %s MiB of memory is required. Continuing anyway."
msgstr "已将所使用的线程数从 %s 减小为 1。这仍然超出了自动的内存使用限制 %s MiB。需要 %s MiB 的内存。继续操作。"
#: src/xz/coder.c:632
#: src/xz/coder.c:356
#, c-format
msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB"
msgstr "正在切换到单线程模式以不超出 %s MiB 的内存用量限制"
#: src/xz/coder.c:757
#: src/xz/coder.c:411
#, c-format
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "已调整 LZMA%c 字典大小(从 %s MiB 调整为 %s MiB以不超出 %s MiB 的内存用量限制"
#: src/xz/coder.c:767
#, fuzzy, c-format
#| msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgid "Adjusted LZMA%c dictionary size for --filters%u from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "已调整 LZMA%c 字典大小(从 %s MiB 调整为 %s MiB以不超出 %s MiB 的内存用量限制"
#: src/xz/coder.c:1141
#, c-format
msgid "Error changing to filter chain %u: %s"
msgstr "更改为过滤器链 %u 时出错:%s"
#: src/xz/file_io.c:137 src/xz/file_io.c:145
#: src/xz/file_io.c:110 src/xz/file_io.c:118
#, c-format
msgid "Error creating a pipe: %s"
msgstr "创建管道时出错:%s"
#: src/xz/file_io.c:333
#: src/xz/file_io.c:252
msgid "Failed to enable the sandbox"
msgstr "沙盒启用失败"
#: src/xz/file_io.c:375
#: src/xz/file_io.c:294
#, c-format
msgid "%s: poll() failed: %s"
msgstr "%spoll() 失败:%s"
@ -206,111 +169,111 @@ msgstr "%spoll() 失败:%s"
#. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously
#. shouldn't be removed.
#: src/xz/file_io.c:442
#: src/xz/file_io.c:361
#, c-format
msgid "%s: File seems to have been moved, not removing"
msgstr "%s文件似乎已移动不再进行删除操作"
#: src/xz/file_io.c:449 src/xz/file_io.c:1005
#: src/xz/file_io.c:368 src/xz/file_io.c:924
#, c-format
msgid "%s: Cannot remove: %s"
msgstr "%s无法删除%s"
#: src/xz/file_io.c:475
#: src/xz/file_io.c:394
#, c-format
msgid "%s: Cannot set the file owner: %s"
msgstr "%s无法设置文件所有者%s"
#: src/xz/file_io.c:488
#: src/xz/file_io.c:407
#, c-format
msgid "%s: Cannot set the file group: %s"
msgstr "%s无法设置文件所有组%s"
#: src/xz/file_io.c:507
#: src/xz/file_io.c:426
#, c-format
msgid "%s: Cannot set the file permissions: %s"
msgstr "%s无法设置文件权限%s"
#: src/xz/file_io.c:633
#: src/xz/file_io.c:552
#, c-format
msgid "Error getting the file status flags from standard input: %s"
msgstr "从标准输入获取文件状态标志出错:%s"
#: src/xz/file_io.c:691 src/xz/file_io.c:753
#: src/xz/file_io.c:610 src/xz/file_io.c:672
#, c-format
msgid "%s: Is a symbolic link, skipping"
msgstr "%s是符号链接跳过"
#: src/xz/file_io.c:782
#: src/xz/file_io.c:701
#, c-format
msgid "%s: Is a directory, skipping"
msgstr "%s是目录跳过"
#: src/xz/file_io.c:788
#: src/xz/file_io.c:707
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr "%s不是标准文件跳过"
#: src/xz/file_io.c:805
#: src/xz/file_io.c:724
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s文件有设置用户ID或设置组ID标识跳过"
#: src/xz/file_io.c:812
#: src/xz/file_io.c:731
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr "%s文件有粘滞位标识跳过"
#: src/xz/file_io.c:819
#: src/xz/file_io.c:738
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s输入文件有多于一个硬链接跳过"
#: src/xz/file_io.c:861
#: src/xz/file_io.c:780
msgid "Empty filename, skipping"
msgstr "空文件名,跳过"
#: src/xz/file_io.c:915
#: src/xz/file_io.c:834
#, c-format
msgid "Error restoring the status flags to standard input: %s"
msgstr "回复标准输入的状态标志时出错:%s"
#: src/xz/file_io.c:963
#: src/xz/file_io.c:882
#, c-format
msgid "Error getting the file status flags from standard output: %s"
msgstr "获取标准输出的文件状态标志时出错:%s"
#: src/xz/file_io.c:1162
#: src/xz/file_io.c:1060
#, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "恢复标准输出的 O_APPEND 标志时出错:%s"
#: src/xz/file_io.c:1174
#: src/xz/file_io.c:1072
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr "%s关闭文件失败%s"
#: src/xz/file_io.c:1210 src/xz/file_io.c:1472
#: src/xz/file_io.c:1108 src/xz/file_io.c:1371
#, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "%s尝试创建稀疏文件时 seek 失败:%s"
#: src/xz/file_io.c:1310
#: src/xz/file_io.c:1209
#, c-format
msgid "%s: Read error: %s"
msgstr "%s读取错误%s"
#: src/xz/file_io.c:1340
#: src/xz/file_io.c:1239
#, c-format
msgid "%s: Error seeking the file: %s"
msgstr "%sseek 文件时出错:%s"
#: src/xz/file_io.c:1364
#: src/xz/file_io.c:1263
#, c-format
msgid "%s: Unexpected end of file"
msgstr "%s未预期的文件结束"
#: src/xz/file_io.c:1423
#: src/xz/file_io.c:1322
#, c-format
msgid "%s: Write error: %s"
msgstr "%s写入错误%s"
@ -529,63 +492,63 @@ msgstr "%s过小而不是有效的 .xz 文件"
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
#: src/xz/list.c:741
#: src/xz/list.c:731
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr " 流 块 压缩大小 解压大小 比例 校验 文件名"
#: src/xz/list.c:1036 src/xz/list.c:1214
#: src/xz/list.c:1026 src/xz/list.c:1204
msgid "Yes"
msgstr "是"
#: src/xz/list.c:1036 src/xz/list.c:1214
#: src/xz/list.c:1026 src/xz/list.c:1204
msgid "No"
msgstr "否"
#: src/xz/list.c:1038 src/xz/list.c:1216
#: src/xz/list.c:1028 src/xz/list.c:1206
#, c-format
msgid " Minimum XZ Utils version: %s\n"
msgstr " 最低 XZ Utils 版本:%s\n"
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
#: src/xz/list.c:1189
#: src/xz/list.c:1179
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
msgstr[0] "%s 文件\n"
#: src/xz/list.c:1202
#: src/xz/list.c:1192
msgid "Totals:"
msgstr "总计:"
#: src/xz/list.c:1280
#: src/xz/list.c:1270
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list 仅适用于 .xz 文件(--format=xz 或 --format=auto"
#: src/xz/list.c:1286
#: src/xz/list.c:1276
msgid "--list does not support reading from standard input"
msgstr "--list 不支持从标准输入读取"
#: src/xz/main.c:96
#: src/xz/main.c:89
#, c-format
msgid "%s: Error reading filenames: %s"
msgstr "%s读取文件名列表时出错%s"
#: src/xz/main.c:103
#: src/xz/main.c:96
#, c-format
msgid "%s: Unexpected end of input when reading filenames"
msgstr "%s读取文件名列表时遇到未预期的输入结束"
#: src/xz/main.c:127
#: src/xz/main.c:120
#, c-format
msgid "%s: Null character found when reading filenames; maybe you meant to use '--files0' instead of '--files'?"
msgstr "%s读取文件名列表时获得了空字符您可能想要使用 '--files0' 而非 '--files'"
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
msgstr "%s读取文件名列表时获得了空字符您可能想要使用“--files0”而非“--files”"
#: src/xz/main.c:207
#: src/xz/main.c:188
msgid "Compression and decompression with --robot are not supported yet."
msgstr "尚不支持带 --robot 的压缩和解压缩。"
#: src/xz/main.c:285
#: src/xz/main.c:266
msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr "无法同时从标准输入读取数据和文件名列表"
@ -593,68 +556,68 @@ msgstr "无法同时从标准输入读取数据和文件名列表"
#. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs
#. a space before a colon.
#: src/xz/message.c:671 src/xz/message.c:726
#: src/xz/message.c:670 src/xz/message.c:725
#, c-format
msgid "%s: "
msgstr "%s"
#: src/xz/message.c:798 src/xz/message.c:857
#: src/xz/message.c:797 src/xz/message.c:856
msgid "Internal error (bug)"
msgstr "内部错误bug"
#: src/xz/message.c:805
#: src/xz/message.c:804
msgid "Cannot establish signal handlers"
msgstr "无法建立信号处理器"
#: src/xz/message.c:814
#: src/xz/message.c:813
msgid "No integrity check; not verifying file integrity"
msgstr "无完整性检查;将不验证文件完整性"
#: src/xz/message.c:817
#: src/xz/message.c:816
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr "不支持的完整性检查类型;将不验证文件完整性"
#: src/xz/message.c:824
#: src/xz/message.c:823
msgid "Memory usage limit reached"
msgstr "达到内存使用限制"
#: src/xz/message.c:827
#: src/xz/message.c:826
msgid "File format not recognized"
msgstr "无法识别文件格式"
#: src/xz/message.c:830
#: src/xz/message.c:829
msgid "Unsupported options"
msgstr "不支持的选项"
#: src/xz/message.c:833
#: src/xz/message.c:832
msgid "Compressed data is corrupt"
msgstr "压缩数据已损坏"
#: src/xz/message.c:836
#: src/xz/message.c:835
msgid "Unexpected end of input"
msgstr "输入意外结束"
#: src/xz/message.c:878
#: src/xz/message.c:877
#, c-format
msgid "%s MiB of memory is required. The limiter is disabled."
msgstr "需要 %s MiB 的内存空间。限制已禁用。"
#: src/xz/message.c:906
#: src/xz/message.c:905
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "需要 %s MiB 的内存空间。限制为 %s。"
#: src/xz/message.c:925
#: src/xz/message.c:924
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s过滤器链%s\n"
#: src/xz/message.c:936
#: src/xz/message.c:935
#, c-format
msgid "Try '%s --help' for more information."
msgstr "请尝试执行 '%s --help' 来获取更多信息。"
msgid "Try `%s --help' for more information."
msgstr "请尝试执行“%s --help”来获取更多信息。"
#: src/xz/message.c:962
#: src/xz/message.c:961
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
@ -665,15 +628,15 @@ msgstr ""
"使用 .xz 格式压缩或解压缩文件。\n"
"\n"
#: src/xz/message.c:969
#: src/xz/message.c:968
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr "必选参数对长短选项同时适用。\n"
#: src/xz/message.c:973
#: src/xz/message.c:972
msgid " Operation mode:\n"
msgstr " 操作模式:\n"
#: src/xz/message.c:976
#: src/xz/message.c:975
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
@ -685,7 +648,7 @@ msgstr ""
" -t, --test 测试压缩文件完整性\n"
" -l, --list 列出 .xz 文件的信息"
#: src/xz/message.c:982
#: src/xz/message.c:981
msgid ""
"\n"
" Operation modifiers:\n"
@ -693,7 +656,7 @@ msgstr ""
"\n"
" 操作修饰符:\n"
#: src/xz/message.c:985
#: src/xz/message.c:984
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
@ -703,24 +666,16 @@ msgstr ""
" -f, --force 强制覆写输出文件和(解)压缩链接\n"
" -c, --stdout 向标准输出写入,同时不要删除输入文件"
#: src/xz/message.c:994
#: src/xz/message.c:993
msgid ""
" --single-stream decompress only the first stream, and silently\n"
" ignore possible remaining input data"
msgstr " --single-stream 仅解压缩第一个流,忽略其后可能继续出现的输入数据"
#: src/xz/message.c:997
#, fuzzy
#| msgid ""
#| " --no-sparse do not create sparse files when decompressing\n"
#| " -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
#| " --files[=FILE] read filenames to process from FILE; if FILE is\n"
#| " omitted, filenames are read from the standard input;\n"
#| " filenames must be terminated with the newline character\n"
#| " --files0[=FILE] like --files but use the null character as terminator"
#: src/xz/message.c:996
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix '.SUF' on compressed files\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
" omitted, filenames are read from the standard input;\n"
" filenames must be terminated with the newline character\n"
@ -732,7 +687,7 @@ msgstr ""
" 将从标准输入读取文件名列表;文件名必须使用换行符分隔\n"
" --files0[=文件] 类似 --files但使用空字符进行分隔"
#: src/xz/message.c:1006
#: src/xz/message.c:1005
msgid ""
"\n"
" Basic file format and compression options:\n"
@ -740,18 +695,12 @@ msgstr ""
"\n"
" 基本文件格式和压缩选项:\n"
#: src/xz/message.c:1008
#, fuzzy
#| msgid ""
#| " -F, --format=FMT file format to encode or decode; possible values are\n"
#| " `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
#| " `crc32', `crc64' (default), or `sha256'"
#: src/xz/message.c:1007
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" 'auto' (default), 'xz', 'lzma', 'lzip', and 'raw'\n"
" -C, --check=CHECK integrity check type: 'none' (use with caution),\n"
" 'crc32', 'crc64' (default), or 'sha256'"
" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
" `crc32', `crc64' (default), or `sha256'"
msgstr ""
" -F, --format=格式 要编码或解码的文件格式;可能的值包括\n"
" “auto”默认、“xz”、“lzma”、\n"
@ -759,11 +708,11 @@ msgstr ""
" -C, --check=类型 完整性检查类型“none”请谨慎使用、\n"
" “crc32”、“crc64”默认或“sha256”"
#: src/xz/message.c:1013
#: src/xz/message.c:1012
msgid " --ignore-check don't verify the integrity check when decompressing"
msgstr " --ignore-check 解压缩时不要进行完整性检查验证"
#: src/xz/message.c:1017
#: src/xz/message.c:1016
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!"
@ -771,7 +720,7 @@ msgstr ""
" -0 ... -9 压缩预设等级;默认为 6使用 7-9 的等级之前,请先考虑\n"
" 压缩和解压缩所需的内存用量!(会占用大量内存空间)"
#: src/xz/message.c:1021
#: src/xz/message.c:1020
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements"
@ -779,19 +728,15 @@ msgstr ""
" -e, --extreme 尝试使用更多 CPU 时间来改进压缩比率;\n"
" 不会影响解压缩的内存需求量"
#: src/xz/message.c:1025
#, fuzzy
#| msgid ""
#| " -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
#| " to use as many threads as there are processor cores"
#: src/xz/message.c:1024
msgid ""
" -T, --threads=NUM use at most NUM threads; the default is 0 which uses\n"
" as many threads as there are processor cores"
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
" to use as many threads as there are processor cores"
msgstr ""
" -T, --threads=数量 使用最多指定数量的线程;默认值为 1设置为 0\n"
" 可以使用与处理器内核数量相同的线程数"
#: src/xz/message.c:1030
#: src/xz/message.c:1029
msgid ""
" --block-size=SIZE\n"
" start a new .xz block after every SIZE bytes of input;\n"
@ -801,24 +746,17 @@ msgstr ""
" 输入每读取指定块大小的数据后即开始一个新的 .xz 块;\n"
" 使用该选项可以设置多线程压缩中的块大小"
#: src/xz/message.c:1034
#, fuzzy
#| msgid ""
#| " --block-list=SIZES\n"
#| " start a new .xz block after the given comma-separated\n"
#| " intervals of uncompressed data"
#: src/xz/message.c:1033
msgid ""
" --block-list=BLOCKS\n"
" --block-list=SIZES\n"
" start a new .xz block after the given comma-separated\n"
" intervals of uncompressed data; optionally, specify a\n"
" filter chain number (0-9) followed by a ':' before the\n"
" uncompressed data size"
" intervals of uncompressed data"
msgstr ""
" --block-list=块大小列表\n"
" 在所给出的未压缩数据间隔大小的数据之后开始一个新的\n"
" .xz 块(使用逗号分隔)"
#: src/xz/message.c:1040
#: src/xz/message.c:1037
msgid ""
" --flush-timeout=TIMEOUT\n"
" when compressing, if more than TIMEOUT milliseconds has\n"
@ -829,7 +767,7 @@ msgstr ""
" 进行压缩时,如果从上次刷洗输出之后经过了指定的超时时间\n"
" 且读取更多数据会被阻塞,则刷洗输出所有缓冲数据"
#: src/xz/message.c:1046
#: src/xz/message.c:1043
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
@ -848,13 +786,13 @@ msgstr ""
" 所指定限制量单位为字节,或以百分号 % 结尾表示内存比例,\n"
" 或者指定 0 取软件默认值"
#: src/xz/message.c:1055
#: src/xz/message.c:1052
msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards"
msgstr " --no-adjust 如果压缩设置超出内存用量限制,不调整设置而直接报错"
#: src/xz/message.c:1061
#: src/xz/message.c:1058
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
@ -862,27 +800,7 @@ msgstr ""
"\n"
" 用于压缩的自定义过滤器链(不使用预设等级时的备选用法):"
#: src/xz/message.c:1064
msgid ""
"\n"
" --filters=FILTERS set the filter chain using the liblzma filter string\n"
" syntax; use --filters-help for more information"
msgstr ""
#: src/xz/message.c:1070
msgid ""
" --filters1=FILTERS ... --filters9=FILTERS\n"
" set additional filter chains using the liblzma filter\n"
" string syntax to use with --block-list"
msgstr ""
#: src/xz/message.c:1076
msgid ""
" --filters-help display more information about the liblzma filter string\n"
" syntax and exit."
msgstr ""
#: src/xz/message.c:1087
#: src/xz/message.c:1067
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
@ -911,19 +829,7 @@ msgstr ""
" (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=数字 最大搜索深度; 0=自动(默认)"
#: src/xz/message.c:1102
#, fuzzy
#| msgid ""
#| "\n"
#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
#| " --arm[=OPTS] ARM BCJ filter\n"
#| " --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
#| " --arm64[=OPTS] ARM64 BCJ filter\n"
#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
#| " --sparc[=OPTS] SPARC BCJ filter\n"
#| " Valid OPTS for all BCJ filters:\n"
#| " start=NUM start offset for conversions (default=0)"
#: src/xz/message.c:1082
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
@ -933,7 +839,6 @@ msgid ""
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
" --sparc[=OPTS] SPARC BCJ filter\n"
" --riscv[=OPTS] RISC-V BCJ filter\n"
" Valid OPTS for all BCJ filters:\n"
" start=NUM start offset for conversions (default=0)"
msgstr ""
@ -948,7 +853,7 @@ msgstr ""
" 所有过滤器可用选项:\n"
" start=数字 转换的起始偏移量(默认=0"
#: src/xz/message.c:1116
#: src/xz/message.c:1095
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
@ -959,7 +864,7 @@ msgstr ""
" --delta[=选项] 增量过滤器;有效选项(有效值;默认值):\n"
" dist=NUM 相减的字节之间的距离 (1-256; 1)"
#: src/xz/message.c:1124
#: src/xz/message.c:1103
msgid ""
"\n"
" Other options:\n"
@ -967,7 +872,7 @@ msgstr ""
"\n"
" 其它选项:\n"
#: src/xz/message.c:1127
#: src/xz/message.c:1106
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"
@ -975,21 +880,21 @@ msgstr ""
" -q, --quiet 不显示警告信息;指定两次可不显示错误信息\n"
" -v, --verbose 输出详细信息;指定两次可以输出更详细的信息"
#: src/xz/message.c:1132
#: src/xz/message.c:1111
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn 使得警告信息不影响程序退出返回值"
#: src/xz/message.c:1134
#: src/xz/message.c:1113
msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr " --robot 使用机器可解析的信息(对于脚本有用)"
#: src/xz/message.c:1137
#: src/xz/message.c:1116
msgid ""
" --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit"
msgstr " --info-memory 显示 RAM 总量和当前配置的内存用量限制,然后退出"
#: src/xz/message.c:1140
#: src/xz/message.c:1119
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
@ -997,7 +902,7 @@ msgstr ""
" -h, --help 显示短帮助信息(仅列出基本选项)\n"
" -H, --long-help 显示本长帮助信息"
#: src/xz/message.c:1144
#: src/xz/message.c:1123
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
@ -1005,11 +910,11 @@ msgstr ""
" -h, --help 显示本短帮助信息并退出\n"
" -H, --long-help 显示长帮助信息(同时列出高级选项)"
#: src/xz/message.c:1149
#: src/xz/message.c:1128
msgid " -V, --version display the version number and exit"
msgstr " -V, --version 显示软件版本号并退出"
#: src/xz/message.c:1151
#: src/xz/message.c:1130
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
@ -1021,7 +926,7 @@ msgstr ""
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
#: src/xz/message.c:1157
#: src/xz/message.c:1136
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr ""
@ -1029,33 +934,19 @@ msgstr ""
"请使用中文向 TP 简体中文翻译团队 <i18n-zh@googlegroups.com>\n"
"报告软件的简体中文翻译错误。\n"
#: src/xz/message.c:1159
#: src/xz/message.c:1138
#, c-format
msgid "%s home page: <%s>\n"
msgstr "%s 主页:<%s>\n"
#: src/xz/message.c:1163
#: src/xz/message.c:1142
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
msgstr "这是开发版本,不适用于生产环境使用。"
#: src/xz/message.c:1180
msgid ""
"Filter chains are set using the --filters=FILTERS or\n"
"--filters1=FILTERS ... --filters9=FILTERS options. Each filter in the chain\n"
"can be separated by spaces or '--'. Alternatively a preset <0-9>[e] can be\n"
"specified instead of a filter chain.\n"
msgstr ""
#: src/xz/message.c:1186
#, fuzzy
#| msgid "Unsupported filter chain or filter options"
msgid "The supported filters and their options are:"
msgstr "不支持的过滤器链或过滤器选项"
#: src/xz/options.c:86
#, c-format
msgid "%s: Options must be 'name=value' pairs separated with commas"
msgstr "%s选项必须按照 '名称=值' 的格式成对出现,使用半角逗号分隔"
msgid "%s: Options must be `name=value' pairs separated with commas"
msgstr "%s选项必须按照“名称=值”的格式成对出现,使用半角逗号分隔"
#: src/xz/options.c:93
#, c-format
@ -1067,57 +958,54 @@ msgstr "%s无效的选项名称"
msgid "%s: Invalid option value"
msgstr "%s无效的选项值"
#: src/xz/options.c:248
#: src/xz/options.c:247
#, c-format
msgid "Unsupported LZMA1/LZMA2 preset: %s"
msgstr "不支持的 LZMA1/LZMA2 预设等级:%s"
#: src/xz/options.c:356
#: src/xz/options.c:355
msgid "The sum of lc and lp must not exceed 4"
msgstr "lc 和 lp 的和必须不大于 4"
#: src/xz/suffix.c:166
#: src/xz/suffix.c:160
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s文件名有未知后缀跳过"
#: src/xz/suffix.c:187
#: src/xz/suffix.c:181
#, c-format
msgid "%s: File already has '%s' suffix, skipping"
msgstr "%s文件已有 '%s' 后缀名,跳过"
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s文件已有“%s”后缀名,跳过"
#: src/xz/suffix.c:394
#: src/xz/suffix.c:388
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s无效的文件名后缀"
#: src/xz/util.c:107
#: src/xz/util.c:71
#, c-format
msgid "%s: Value is not a non-negative decimal integer"
msgstr "%s值不是非负十进制整数"
#: src/xz/util.c:149
#: src/xz/util.c:113
#, c-format
msgid "%s: Invalid multiplier suffix"
msgstr "%s无效的乘数后缀"
#: src/xz/util.c:151
#, fuzzy
#| msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
msgid "Valid suffixes are 'KiB' (2^10), 'MiB' (2^20), and 'GiB' (2^30)."
#: src/xz/util.c:115
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
msgstr "有效的后缀包括“KiB”2^10、“MiB”2^20和“GiB”2^30。"
#: src/xz/util.c:168
#, fuzzy, c-format
#| msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
msgid "Value of the option '%s' must be in the range [%<PRIu64>, %<PRIu64>]"
#: src/xz/util.c:132
#, c-format
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
msgstr "选项“%s”的值必须位于 [%<PRIu64>, %<PRIu64>] 范围内"
#: src/xz/util.c:291
#: src/xz/util.c:269
msgid "Compressed data cannot be read from a terminal"
msgstr "压缩数据不能从终端读取"
#: src/xz/util.c:304
#: src/xz/util.c:282
msgid "Compressed data cannot be written to a terminal"
msgstr "压缩数据不能向终端写入"

1
po4a/.gitignore vendored
View File

@ -1,3 +1,2 @@
/man
/xz-man.pot
/*.po.authors

2115
po4a/de.po

File diff suppressed because it is too large Load Diff

5175
po4a/fr.po

File diff suppressed because it is too large Load Diff

2606
po4a/ko.po

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More