Commit Graph

1949 Commits

Author SHA1 Message Date
Lasse Collin d15eb46891 Tests: test_filter_str: Add a few assertions
(cherry picked from commit 3ac8a9bb4c)
2024-05-22 00:12:07 +03:00
Lasse Collin 1c0dfaee63 Tests: test_filter_str: Move one assertion and add a comment
(cherry picked from commit 26c69be805)
2024-05-22 00:12:07 +03:00
Lasse Collin ef35365984 Tests: test_filter_str: Tweak comments and white space
(cherry picked from commit 4f6af853bc)
2024-05-22 00:12:07 +03:00
Lasse Collin c35e10fb37 Tests: test_filter_str: Test *error_pos more thoroughly
(cherry picked from commit b0366df1d7)
2024-05-22 00:12:07 +03:00
Lasse Collin 6364cbc63e liblzma: lzma_str_to_filters: Set *error_pos on all errors
The API docs clearly say that if error_pos isn't NULL then *error
is always set on any error. However, it wasn't touched if str == NULL
or filters == NULL or unsupported flags were specified.

Fixes: cedeeca2ea
(cherry picked from commit 70d12dd069)
2024-05-22 00:12:07 +03:00
Lasse Collin 6edc2b554f xz man page: Use .ft CR instead of CW to silence warnings from groff.
(cherry picked from commit 31ef676567)
2024-05-22 00:12:07 +03:00
Lasse Collin 077b673a8d Docs: Update .xz file format specification to 1.2.1.
This only reverts the XZ URL changes.

(cherry picked from commit 8dd03d4484)
2024-05-22 00:12:07 +03:00
Lasse Collin c5c091332c Update website URLs back to tukaani.org.
The XZ projects were moved back to their original URLs.

(cherry picked from commit 17aa2e1a79)
2024-05-22 00:12:07 +03:00
Lasse Collin 995afe4646 Update THANKS.
(cherry picked from commit db4dd74a34)
2024-05-22 00:12:07 +03:00
Lasse Collin 44a5c1374e INSTALL: Document arguments of --enable-symbol-versions.
(cherry picked from commit 8a25ba024d)
2024-05-22 00:12:07 +03:00
Lasse Collin b03139b1d2 Build: Use only the generic symbol versioning with NVIDIA HPC Compiler.
This does the previous commit with CMake.

AC_EGREP_CPP uses AC_REQUIRE so the outermost if-commands must
be changed to AS_IF to ensure that things wont break some day.
See 5a5bd7f871.

(cherry picked from commit 49324b711f)
2024-05-22 00:12:07 +03:00
Lasse Collin 08754772e8 CMake: Use only the generic symbol versioning with NVIDIA HPC Compiler.
It doesn't support the __symver__ attribute or __asm__(".symver ...").
The generic symbol versioning can still be used since it only needs
linker support.

(cherry picked from commit c273123ed0)
2024-05-22 00:12:07 +03:00
Lasse Collin 9579efdbfd Update THANKS.
(cherry picked from commit df7f487648)
2024-05-22 00:12:07 +03:00
Lasse Collin 32e256c12a liblzma: Minor comment edits.
(cherry picked from commit 3217b82b3e)
2024-05-22 00:12:07 +03:00
Sergey Kosukhin 65ac20807c liblzma: Fix building with NVHPC (NVIDIA HPC SDK).
NVHPC compiler has several issues that make it impossible to
build liblzma:
  - the compiler cannot handle unions that contain pointers that
    are not the first members;
  - the compiler fails to produce valid code for delta_decode if the
    vectorization is enabled, which results in failed tests.

This introduces NVHPC-specific workarounds that address the issues.

(This commit was contributed under 0BSD but the author confirmed
that it is fine to backport it to the public domain branches. See
https://github.com/tukaani-project/xz/pull/90#issuecomment-2100185936
and the next two messages.)

(cherry picked from commit 096bc0e3f8)
2024-05-22 00:11:58 +03:00
Lasse Collin 78a015e753 CMake: Disable symbol versioning on non-glibc Linux.
This better matches what configure.ac does. For example, musl has
only basic symbol versioning support:

https://wiki.musl-libc.org/functional-differences-from-glibc.html#Symbol_versioning

configure.ac tries to enable symbol versioning only with glibc
so now CMake does the same.

(cherry picked from commit 2ad7fad670)
2024-05-22 00:11:58 +03:00
Lasse Collin 20e590bbed CMake: Make symbol versioning configurable.
(cherry picked from commit 82f0c0d39e)
2024-05-22 00:11:58 +03:00
Lasse Collin bcac3e3aa2 CMake: Handle symbol versioning on MicroBlaze specially.
This is to match configure.ac.

(cherry picked from commit 025eb6d787)
2024-05-22 00:11:58 +03:00
Lasse Collin 9e7daa8dbd Build: Style tweaks to configure.ac.
The AC_MSG_ERROR line is overlong anyway as are a few other
AC_MSG_ERROR lines already.

(cherry picked from commit 45d33bfc45)
2024-05-22 00:11:58 +03:00
Sergey Kosukhin ce3a9fa94d Build: Let the users override the symbol versioning variant.
There are cases when the users want to decide themselves whether
they want to have the generic (even on GNU/Linux) or the linux
(even if we do not recommend that) symbol versioning variant.
The former might be needed to circumvent compiler issues (i.e.
the compiler does not support all features that are required
for the linux versioning), the latter might help in overriding
the assumptions made in the configure script.

(This commit was contributed under 0BSD but the author confirmed
that it is fine to backport it to the public domain branches. See
https://github.com/tukaani-project/xz/pull/90#issuecomment-2100185936
and the next two messages.)

(cherry picked from commit f56ed6fac6)
2024-05-22 00:11:45 +03:00
Lasse Collin a8b3fb6d2f INSTALL: Clarify that --disable-assembler affects only 32-bit x86.
(cherry picked from commit 00440f52be)
2024-05-22 00:07:08 +03:00
Lasse Collin b4b315a206 xz: Delete old commented-out code.
(cherry picked from commit 4ce300ce08)
2024-05-22 00:07:08 +03:00
Lasse Collin 9c9a3e7b3f xz: Tweak comments.
(cherry picked from commit 7312dfbb02)
2024-05-22 00:07:08 +03:00
Lasse Collin 7d3418e496 xz: Fix message_init() description.
Also explicitly initialize progress_automatic to make it clear
that it can be read before message_init() sets it. Static variable
was initialized to false by default already so this is only for
clarity.

(cherry picked from commit c701a5909a)
2024-05-22 00:07:08 +03:00
Lasse Collin fb6cf07ac7 Build: Don't install TODO.
(cherry picked from commit f3440e78c9)
2024-05-22 00:07:08 +03:00
Jia Tan e164211b09 Update m4/.gitignore.
(cherry picked from commit 4323bc3e0c)
2024-05-22 00:07:08 +03:00
Lasse Collin 46b6459c9e Tests: tuktest.h: Add a missing word to a comment.
(cherry picked from commit cce7330b9f)
2024-05-07 18:31:08 +03:00
Lasse Collin e46fcd1ed7 Tests: tuktest.h: Fix the comment about STest.
(cherry picked from commit 5dd8fc9452)
2024-05-07 18:31:08 +03:00
Lasse Collin f892ac150a Docs: Include doc/examples/11_file_info.c in tarballs.
It was added in 2017 in c2e29f06a7
but it never got into any release tarballs because it was
forgotten to be added to Makefile.am.

(cherry picked from commit dfdb60ffe9)
2024-05-07 18:27:50 +03:00
Lasse Collin 62cfb46acc xz: Fix outdated threading related info on the man page.
(cherry picked from commit 0709c2b2d7)
2024-05-07 18:27:15 +03:00
Lasse Collin 65b5ee0716 liblzma: Fix compilation of price_tablegen.c.
It is built and run only manually so this didn't matter
unless one wanted to regenerate the price_table.c.

(cherry picked from commit 8e4ec79483)
2024-05-07 18:13:03 +03:00
Lasse Collin f200c338f8 liblzma: Sync the AUTHORS fix about SHA-256 to lzma.h.
(based on commit 23de53421e)
2024-05-07 18:11:43 +03:00
Lasse Collin 402fb45c74 Fix SHA-256 authors.
The initial commit 5d018dc035
in 2007 had a comment in sha256.c that the code is based on
Crypto++ Library 5.5.1. In 2009 the Authors list in sha256.c
and the AUTHORS file was updated with information that the
code had come from Crypto++ but via 7-Zip. I know I had viewed
7-Zip's SHA-256 code but back then the C code has been identical
enough with Crypto++, so I don't why I thought the author info
would need that extra step via 7-Zip for this single file.

Another error is that I had mixed sha.* and shacal2.* files
when checking for author info in Crypto++. The shacal2.* files
aren't related to liblzma's sha256.c and thus Kevin Springle's
code in Crypto++ isn't either.

(cherry picked from commit 76946dc433)
2024-05-07 18:07:31 +03:00
Lasse Collin e5ba545f16 xzless: Use ||- in LESSOPEN with with "less" 451 and newer.
(cherry picked from commit 9860d418d2)
2024-05-07 18:06:55 +03:00
Lasse Collin 5e7a8c0869 xzless: Use --show-preproc-errors with "less" 632 and newer.
This makes "less" show a warning if a decompression error occurred.

(cherry picked from commit fd0692b052)
2024-05-07 18:06:55 +03:00
Lasse Collin c692bd42be Build: Update visibility.m4 from Gnulib
This fixes the syntax of the "serial" line and renames
a temporary variable.
2024-05-07 16:23:46 +03:00
Jia Tan 6e8732c5a3 Bump version and soname for 5.4.6. 2024-01-26 19:41:20 +08:00
Jia Tan 6532f55caa Add NEWS for 5.4.6. 2024-01-26 18:54:24 +08:00
Jia Tan 8b1a2798ad Docs: Update .xz file format specification to 1.2.0.
The new RISC-V filter was added to the specification, in addition to
updating the specification URL.
2024-01-24 21:13:55 +08:00
Jia Tan 55285900b3 xz: Update website URLs in the man pages. 2024-01-24 21:13:52 +08:00
Jia Tan a670f69521 liblzma: Update website URL. 2024-01-24 21:13:49 +08:00
Jia Tan 05aeda9612 Docs: Update website URLs. 2024-01-24 21:13:43 +08:00
Jia Tan 3cc54f1c0b Build: Update website URL. 2024-01-24 21:13:10 +08:00
Jia Tan 82f5515de6 Translations: Update the French translation. 2023-12-22 20:02:06 +08:00
Jia Tan 9e96ca8c48 xz: Add a comment to Capsicum sandbox setup.
This comment is repeated in xzdec.c to help remind us why all the
capabilities are removed from stdin in certain situations.
2023-12-22 20:02:06 +08:00
Jia Tan 8191720eac liblzma: Set all values in lzma_lz_encoder to NULL after allocation.
The first member of lzma_lz_encoder doesn't necessarily need to be set
to NULL since it will always be set before anything tries to use it.
However the function pointer members must be set to NULL since other
functions rely on this NULL value to determine if this behavior is
supported or not.

This fixes a somewhat serious bug, where the options_update() and
set_out_limit() function pointers are not set to NULL. This seems to
have been forgotten since these function pointers were added many years
after the original two (code() and end()).

The problem is that by not setting this to NULL we are relying on the
memory allocation to zero things out if lzma_filters_update() is called
on a LZMA1 encoder. The function pointer for set_out_limit() is less
serious because there is not an API function that could call this in an
incorrect way. set_out_limit() is only called by the MicroLZMA encoder,
which must use LZMA1 where set_out_limit() is always set. Its currently
not possible to call set_out_limit() on an LZMA2 encoder at this time.

So calling lzma_filters_update() on an LZMA1 encoder had undefined
behavior since its possible that memory could be manipulated so the
options_update member pointed to a different instruction sequence.

This is unlikely to be a bug in an existing application since it relies
on calling lzma_filters_update() on an LZMA1 encoder in the first place.
For instance, it does not affect xz because lzma_filters_update() can
only be used when encoding to the .xz format.
2023-12-22 20:02:06 +08:00
Jia Tan 0ba5dd7ba1 liblzma: Tweak a comment. 2023-12-22 20:02:06 +08:00
Jia Tan 27ab54af84 liblzma: Make parameter names in function definition match declaration.
lzma_raw_encoder() and lzma_raw_encoder_init() used "options" as the
parameter name instead of "filters" (used by the declaration). "filters"
is more clear since the parameter represents the list of filters passed
to the raw encoder, each of which contains filter options.
2023-12-22 20:02:06 +08:00
Jia Tan 019afd72e0 liblzma: Improve lzma encoder init function consistency.
lzma_encoder_init() did not check for NULL options, but
lzma2_encoder_init() did. This is more of a code style improvement than
anything else to help make lzma_encoder_init() and lzma2_encoder_init()
more similar.
2023-12-22 20:02:06 +08:00
Jia Tan 6af9a4cbe5 Docs: Update repository URL in Changelog. 2023-12-22 20:02:06 +08:00