Commit Graph

2330 Commits

Author SHA1 Message Date
Jia Tan fd1b975b78 Bump version and soname for 5.6.1. 2024-03-09 11:42:50 +08:00
Jia Tan a2cda57249 Add NEWS for 5.6.1 2024-03-09 11:27:27 +08:00
Jia Tan 8583c60211 Translations: Add missing --riscv option to man page translations. 2024-03-09 10:43:20 +08:00
Jia Tan 74b138d2a6 Tests: Update two test files.
The original files were generated with random local to my machine.
To better reproduce these files in the future, a constant seed was used
to recreate these files.
2024-03-09 10:18:29 +08:00
Jia Tan 3ec6dfd656 Tests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz.
The first stream in this file is valid, so this tests that xz properly
stops after decompressing it.
2024-03-09 10:08:32 +08:00
Jia Tan a67dcce610 Tests: Update RISC-V test files.
This increases code coverage and tests for possible shifting bugs.
2024-03-09 10:05:32 +08:00
Jia Tan 058337b0f1 liblzma: Fix typos in crc32_fast.c and crc64_fast.c. 2024-03-09 09:52:32 +08:00
Jia Tan cd5de9c1bb Tests: Replace HAVE_MICROLZMA usage in CMake and Autotools builds.
This reverts commit adaacafde6.
2024-03-09 09:49:55 +08:00
Jia Tan 651a1545c8 liblzma: Fix false Valgrind error report with GCC.
With GCC and a certain combination of flags, Valgrind will falsely
trigger an invalid write. This appears to be due to the omission of
instructions to properly save, set up, and restore the frame pointer.

The IFUNC resolver is a leaf function since it only calls a function
that is inlined. So sometimes GCC omits the frame pointer instructions
in the resolver unless this optimization is explictly disabled.

This fixes https://bugzilla.redhat.com/show_bug.cgi?id=2267598.
2024-03-09 09:20:57 +08:00
Lasse Collin 6e97b299f1 liblzma: Fix a typo in a comment in the RISC-V filter. 2024-03-05 23:21:26 +02:00
Jia Tan 4e1c97052b liblzma: Use attribute no_profile_instrument_function with ifunc.
Thanks to Sam James for determining this was the attribute needed to
workaround the GCC bug and for his version of the patch in Gentoo.
2024-03-05 00:34:46 +08:00
Jia Tan ed957d3942 Build: Require attribute no_profile_instrument_function for ifunc usage.
Using __attribute__((__no_profile_instrument_function__)) on the ifunc
resolver works around a bug in GCC -fprofile-generate:
it adds profiling code even to ifunc resolvers which can make
the ifunc resolver crash at program startup. This attribute
was not introduced until GCC 7 and Clang 13, so ifunc won't
be used with prior versions of these compilers.

This bug was brought to our attention by:

    https://bugs.gentoo.org/925415

And was reported to upstream GCC by:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11411
2024-03-05 00:27:31 +08:00
Lasse Collin e98ddaf85a liblzma: Fix a comment in the RISC-V filter. 2024-03-04 19:23:18 +02:00
Lasse Collin 319cec142f CMake: Warn if translated man pages are missing. 2024-02-29 16:35:52 +02:00
Lasse Collin 46c3e113d8 CMake: Warn if gettext tools and pre-created .gmo files are missing.
It's only done with CMake >= 3.20 and if library support
for translation was already found.

Sort of fixes: https://github.com/tukaani-project/xz/issues/82
2024-02-29 16:35:52 +02:00
Lasse Collin 86bec8334b xz: Add comments. 2024-02-28 18:33:34 +02:00
Jia Tan 5c91b454c2 xz: Change logging level for thread reduction to highest verbosity only.
Now that multi threaded encoding is the default, users do not need to
see a warning message everytime the number of threads is reduced. On
some machines, this could happen very often. It is not unreasonable for
users to need to set double verbose mode to see this kind of
information.

To see these warning messages -vv or --verbose --verbose must be passed
to set xz into the highest possible verbosity mode.

These warnings had caused automated testing frameworks to fail when they
expected no output to stderr.

Thanks to Sebastian Andrzej Siewior for reporting this and for the
initial version of the patch.
2024-02-28 18:31:04 +02:00
Lasse Collin d0e57b2f15 Fix sorting in THANKS. 2024-02-28 18:31:04 +02:00
Jia Tan d416be55ac Update THANKS. 2024-02-28 18:31:04 +02:00
Chien Wong f06b33edd2 xz: Add missing RISC-V on the filter list in the man page
Signed-off-by: Chien Wong <m@xv97.com>
2024-02-28 18:31:04 +02:00
Jia Tan a100f9111c Build: Fix Linux Landlock feature test in Autotools and CMake builds.
The previous Linux Landlock feature test assumed that having the
linux/landlock.h header file was enough. The new feature tests also
requires that prctl() and the required Landlock system calls are
supported.
2024-02-28 18:31:04 +02:00
Jia Tan d85efdc891 Tests: Add test_microlzma to .gitignore and CMakeLists.txt. 2024-02-28 18:31:04 +02:00
Jia Tan 42ee425673 Tests: Correct license header in test_microlzma.c. 2024-02-28 18:31:04 +02:00
Jia Tan c83349dfd9 Fix typos in NEWS and CMakeLists. 2024-02-28 18:31:04 +02:00
Jia Tan 2d7d862e3f Bump version and soname for 5.6.0. 2024-02-24 15:55:08 +08:00
Jia Tan a18fb1edef Add NEWS for 5.6.0. 2024-02-24 15:50:36 +08:00
Jia Tan 24355c5280 Translations: Remove obsolete and fuzzy matches from some translations.
The French and Brazilian Portuguese man page translations have not been
updated since the switch from public domain to 0BSD. The old GPLv2
strings have now been removed from these files.
2024-02-22 22:27:01 +08:00
Jia Tan 02ca4a7d7b Translations: Patch man pages to avoid fuzzy matches.
This will be fixed in the next round of translations, but this avoids
having a fuzzy match or not fixing the English version.
2024-02-21 00:31:54 +08:00
Jia Tan 898aad9fc7 xzmore: Fix typo in xzmore.1.
Thanks to Yuri Chornoivan.
2024-02-21 00:30:43 +08:00
Jia Tan 5631aa206c Translations: Update the Vietnamese translation. 2024-02-24 12:12:16 +08:00
Jia Tan a65fd7ce9d Translations: Update the Esperanto translation. 2024-02-24 12:06:40 +08:00
Jia Tan cf44e4b7f5 Tests: Add a few test files. 2024-02-23 23:09:59 +08:00
Jia Tan 39f4a1a86a Tests: Add MicroLZMA test. 2024-02-23 20:58:36 +08:00
Jia Tan adaacafde6 Build: Define HAVE_MICROLZMA when it is configured. 2024-02-23 20:57:59 +08:00
Jia Tan eea78216d2 xz: Fix Capsicum sandbox compile error.
user_abort_pipe[] was still being used instead of the parameters.
2024-02-23 20:27:15 +08:00
Jia Tan 32b0a3ce19 Build: Fix ARM64 CRC32 instruction feature test.
Old versions of Clang reported the unsupported function attribute and
__crc32d() function as warnings instead of errors, so the feature test
passed when it shouldn't have, causing a compile error at build time.
-Werror was added to this feature test to fix this. The change is not
needed for CMake because check_c_source_compiles() also performs
linking and the error is caught then.

Thanks to Sebastian Andrzej Siewior for reporting this.
2024-02-23 16:12:32 +08:00
Lasse Collin 4c81c9611f CMake: Add LOCALEDIR to the windres workaround.
LOCALEDIR may contain spaces like in "C:\Program Files".
2024-02-22 19:16:35 +02:00
Lasse Collin de4337fd89 xz: Landlock: Fix error message if input file is a directory.
If xz is given a directory, it should look like this:

    $ xz /usr/bin
    xz: /usr/bin: Is a directory, skipping

The Landlock rules didn't allow opening directories for reading:

    $ xz /usr/bin
    xz: /usr/bin: Permission denied

The simplest fix was to allow opening directories for reading.
While it's a bit silly to allow it solely for the error message,
it shouldn't make the sandbox significantly weaker.

The single-file use case (like when called from GNU tar) is
still as strict as possible: all Landlock restrictions are
enabled before (de)compression starts.
2024-02-22 15:18:25 +02:00
Lasse Collin 120da10ae1 liblzma: Disable branchless C version in range decoder.
Thanks to Sebastian Andrzej Siewior and Sam James for
benchmarking on various systems.
2024-02-22 14:41:29 +02:00
Lasse Collin 00440f52be INSTALL: Clarify that --disable-assembler affects only 32-bit x86. 2024-02-21 17:41:32 +02:00
Lasse Collin 11405be84e Windows: build.bash: Include COPYING.0BSD in the package. 2024-02-21 16:57:20 +02:00
Lasse Collin c27cf64e3e Windows: build.bash: include liblzma-crt-mixing.txt in the package. 2024-02-21 16:57:20 +02:00
Lasse Collin 8d38941bae Windows: Major update to Windows build instructions. 2024-02-21 16:57:20 +02:00
Lasse Collin 4b5b0d3523 Windows: Update windows/README-Windows.txt.
It's for binary packages built with windows/build.bash.
2024-02-21 16:57:20 +02:00
Lasse Collin 1ee716f740 Windows: Update windows/build.bash.
Support for the old MinGW was dropped. Only MinGW-w64 with GCC
is supported now.

The script now supports also cross-compilation from GNU/Linux
(tests are not run). MSYS2 and also the old MSYS 1.0.11 work
for building on Windows. The i686 and x86_64 toolchains must
be in PATH to build both 32-bit and 64-bit versions.

Parallel builds are done if "nproc" from GNU coreutils is available.

MinGW-w64 runtime copyright information file was renamed from
COPYING-Windows.txt to COPYING.MinGW-w64-runtime.txt which
is the filename used by MinGW-w64 itself. Its existence
is now mandatory, it's checked at the beginning of the script.

The file TODO is no longer copied to the package.
2024-02-20 21:04:29 +02:00
Jia Tan 60462e4260 Translations: Update the Romanian man page translations. 2024-02-20 23:32:22 +08:00
Jia Tan 10d733e5b8 Translations: Update the Korean man page translations. 2024-02-20 23:30:25 +08:00
Jia Tan 797a34b72a Translations: Update the Spanish translation. 2024-02-20 21:03:53 +08:00
Jia Tan 5c3751d019 Translations: Update the Romanian translation. 2024-02-20 20:18:07 +08:00
Jia Tan e2d31154ec Translations: Update the Croatian translation. 2024-02-20 20:15:50 +08:00