]> git.ipfire.org Git - thirdparty/xz.git/log
thirdparty/xz.git
15 months agoCI: Use only the active CPUs on macOS 108/head
Ryan Carsten Schmidt [Sat, 13 Apr 2024 00:31:13 +0000 (19:31 -0500)] 
CI: Use only the active CPUs on macOS

hw.ncpu counts all CPUs including inactive ones. hw.activecpu counts
only the active CPUs.

15 months agoci: rename ci_build.sh -> ci_build.bash
Sam James [Wed, 10 Apr 2024 17:33:55 +0000 (18:33 +0100)] 
ci: rename ci_build.sh -> ci_build.bash

We discussed the name and it's less cognitive load to just call it '.bash'
so you don't have an immediate question about if bashisms are OK.

15 months agoci: build in parallel by default
Sam James [Wed, 10 Apr 2024 16:42:23 +0000 (17:42 +0100)] 
ci: build in parallel by default

15 months agoci: default to -O2
Sam James [Wed, 10 Apr 2024 14:41:08 +0000 (15:41 +0100)] 
ci: default to -O2

We need this for when we're passing sanitizer flags or -gdwarf-4 for Clang
with Valgrind. Just always start with -O2 if CFLAGS isn't set in the
environment and append what was passed on the command line.

15 months agoci: make automake's test runner verbose on failures
Sam James [Wed, 10 Apr 2024 14:17:47 +0000 (15:17 +0100)] 
ci: make automake's test runner verbose on failures

This is a lot easier to work with than the save-logs thing the action
tries to do...

15 months agoci: make UBSAN abort on errors
Sam James [Wed, 10 Apr 2024 11:38:51 +0000 (12:38 +0100)] 
ci: make UBSAN abort on errors

Unfortunately, UBSAN doesn't do this by default. See also the change
I made in Meson for this in October [0].

[0] https://github.com/mesonbuild/meson/commit/7b7d2e060b447de9c2642848847370a58711ac1c

15 months agoci: test Valgrind
Sam James [Wed, 10 Apr 2024 10:43:10 +0000 (11:43 +0100)] 
ci: test Valgrind

Using `--trace-children=yes` has a trade-off here, as it makes
`test_scripts.sh` pretty slow when calling various non-xz utilities.

But I also feel like it's not useless to have Valgrind used there and it's
not easy to exclude Valgrind just for that one test...

I did consider using AX_VALGRIND_CHECK [0][1] but I couldn't get it working
immediately with some conditionally-built tests and I wondered if it was
worth spending time on at least while we're debating xz's future build
system situation.

[0] https://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html
[1] https://tecnocode.co.uk/2014/12/23/automatically-valgrinding-code-with-ax_valgrind_check/

15 months agoliblzma: CRC: Simplify table omission macros
Lasse Collin [Wed, 10 Apr 2024 20:20:02 +0000 (23:20 +0300)] 
liblzma: CRC: Simplify table omission macros

A macro is useful to prevent a single #if directive from
getting too ugly but only one macro is needed for all archs.

15 months agoliblzma: ARM64 CRC: Fix omission of CRC32 table
Lasse Collin [Wed, 10 Apr 2024 20:09:40 +0000 (23:09 +0300)] 
liblzma: ARM64 CRC: Fix omission of CRC32 table

The macro name had an odd typo so the table wasn't omitted
when it should have.

Fixes: 1940f0ec28f08c0ac72c1413d9706fb82eabe6ad
15 months agoBuild: If ARM64 feature detection func is found, stop looking for others
Lasse Collin [Wed, 10 Apr 2024 19:21:51 +0000 (22:21 +0300)] 
Build: If ARM64 feature detection func is found, stop looking for others

This can speed up configure a tiny bit.

Fixes: c5f6d79cc9515a7f22d7ea4860c6cc394b295732
15 months agoliblzma: ARM64 CRC32: Change style of the macOS code to match FreeBSD
Lasse Collin [Wed, 10 Apr 2024 19:04:27 +0000 (22:04 +0300)] 
liblzma: ARM64 CRC32: Change style of the macOS code to match FreeBSD

I didn't test this but it shouldn't change any functionality.

Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575
15 months agoliblzma: ARM64 CRC32: Add error checking to FreeBSD-specific code
Lasse Collin [Wed, 10 Apr 2024 18:59:27 +0000 (21:59 +0300)] 
liblzma: ARM64 CRC32: Add error checking to FreeBSD-specific code

Also add parenthesis to the return statement.

I didn't test this.

Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575
15 months agoliblzma: ARM64 CRC32: Use negation instead of subtracting from 8
Lasse Collin [Wed, 10 Apr 2024 18:56:33 +0000 (21:56 +0300)] 
liblzma: ARM64 CRC32: Use negation instead of subtracting from 8

Subtracting from 0 is negation, this just keeps warnings away.

Fixes: 761f5b69a4c778c8bcb09279b845b07c28790575
15 months agoliblzma: ARM64 CRC32: Tweak coding style and comments
Lasse Collin [Wed, 10 Apr 2024 18:55:10 +0000 (21:55 +0300)] 
liblzma: ARM64 CRC32: Tweak coding style and comments

15 months agoUpdate SECURITY.md.
Lasse Collin [Tue, 9 Apr 2024 18:55:01 +0000 (21:55 +0300)] 
Update SECURITY.md.

15 months agoCI: Remove ifunc support.
Lasse Collin [Tue, 9 Apr 2024 14:47:01 +0000 (17:47 +0300)] 
CI: Remove ifunc support.

15 months agoliblzma: Remove ifunc support.
Lasse Collin [Tue, 9 Apr 2024 14:43:16 +0000 (17:43 +0300)] 
liblzma: Remove ifunc support.

This is *NOT* done for security reasons even though the backdoor
relied on the ifunc code. Instead, the reason is that in this
project ifunc provides little benefits but it's quite a bit of
extra code to support it. The only case where ifunc *might* matter
for performance is if the CRC functions are used directly by an
application. In normal compression use it's completely irrelevant.

15 months agotests/files/README: Update the main heading.
Lasse Collin [Mon, 8 Apr 2024 19:04:41 +0000 (22:04 +0300)] 
tests/files/README: Update the main heading.

15 months agotests/files/README: Explain how to recreate the ARM64 test files.
Lasse Collin [Mon, 8 Apr 2024 19:02:45 +0000 (22:02 +0300)] 
tests/files/README: Explain how to recreate the ARM64 test files.

15 months agodebug: Add generator for the ARM64 test file data.
Lasse Collin [Mon, 8 Apr 2024 18:51:55 +0000 (21:51 +0300)] 
debug: Add generator for the ARM64 test file data.

15 months agoxz man page: Use .ft CR instead of CW to silence warnings from groff.
Lasse Collin [Mon, 8 Apr 2024 18:19:38 +0000 (21:19 +0300)] 
xz man page: Use .ft CR instead of CW to silence warnings from groff.

15 months agoFix NEWS for 5.6.0 and 5.6.1.
Lasse Collin [Mon, 8 Apr 2024 16:28:35 +0000 (19:28 +0300)] 
Fix NEWS for 5.6.0 and 5.6.1.

15 months agoRemove the XZ logo.
Lasse Collin [Mon, 8 Apr 2024 16:22:26 +0000 (19:22 +0300)] 
Remove the XZ logo.

15 months agoUpdate maintainer and author info.
Lasse Collin [Mon, 8 Apr 2024 15:27:39 +0000 (18:27 +0300)] 
Update maintainer and author info.

The other maintainer suddenly disappeared.

15 months agoDocs: Update .xz file format specification to 1.2.1.
Lasse Collin [Mon, 8 Apr 2024 15:05:32 +0000 (18:05 +0300)] 
Docs: Update .xz file format specification to 1.2.1.

This only reverts the XZ URL changes.

15 months agoUpdate website URLs back to tukaani.org.
Lasse Collin [Mon, 8 Apr 2024 14:33:56 +0000 (17:33 +0300)] 
Update website URLs back to tukaani.org.

The XZ projects were moved back to their original URLs.

15 months agoxzdec: Tweak coding style and comments.
Lasse Collin [Mon, 8 Apr 2024 14:07:08 +0000 (17:07 +0300)] 
xzdec: Tweak coding style and comments.

15 months agotests/ossfuzz: Tiny fix to a comment.
Lasse Collin [Mon, 8 Apr 2024 12:53:46 +0000 (15:53 +0300)] 
tests/ossfuzz: Tiny fix to a comment.

15 months agoUpdate THANKS.
Lasse Collin [Tue, 9 Apr 2024 15:22:16 +0000 (18:22 +0300)] 
Update THANKS.

15 months agoRemove the backdoor found in 5.6.0 and 5.6.1 (CVE-2024-3094).
Lasse Collin [Mon, 8 Apr 2024 12:32:58 +0000 (15:32 +0300)] 
Remove the backdoor found in 5.6.0 and 5.6.1 (CVE-2024-3094).

While the backdoor was inactive (and thus harmless) without inserting
a small trigger code into the build system when the source package was
created, it's good to remove this anyway:

  - The executable payloads were embedded as binary blobs in
    the test files. This was a blatant violation of the
    Debian Free Software Guidelines.

  - On machines that see lots bots poking at the SSH port, the backdoor
    noticeably increased CPU load, resulting in degraded user experience
    and thus overwhelmingly negative user feedback.

  - The maintainer who added the backdoor has disappeared.

  - Backdoors are bad for security.

This reverts the following without making any other changes:

6e636819 Tests: Update two test files.
a3a29bbd Tests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz.
0b4ccc91 Tests: Update RISC-V test files.
8c9b8b20 liblzma: Fix typos in crc32_fast.c and crc64_fast.c.
82ecc538 liblzma: Fix false Valgrind error report with GCC.
cf44e4b7 Tests: Add a few test files.
3060e107 Tests: Use smaller dictionary size in RISC-V test files.
e2870db5 Tests: Add two RISC-V Filter test files.

The RISC-V test files also have real content that tests the filter
but the real content would fit into much smaller files. A generator
program would need to be available as well.

Thanks to Andres Freund for finding and reporting it and making
it public quickly so others could act without a delay.
See: https://www.openwall.com/lists/oss-security/2024/03/29/4

16 months agoCMake: Fix sabotaged Landlock sandbox check.
Lasse Collin [Sat, 30 Mar 2024 12:36:28 +0000 (14:36 +0200)] 
CMake: Fix sabotaged Landlock sandbox check.

It never enabled it.

16 months agoDocs: Simplify SECURITY.md.
Jia Tan [Mon, 25 Mar 2024 17:50:02 +0000 (01:50 +0800)] 
Docs: Simplify SECURITY.md.

16 months agoliblzma: memcmplen.h: Add a comment why subtraction is used.
Lasse Collin [Fri, 22 Mar 2024 15:46:30 +0000 (17:46 +0200)] 
liblzma: memcmplen.h: Add a comment why subtraction is used.

16 months agoINSTALL: Document arguments of --enable-symbol-versions.
Lasse Collin [Fri, 15 Mar 2024 15:43:39 +0000 (17:43 +0200)] 
INSTALL: Document arguments of --enable-symbol-versions.

16 months agoBuild: Use only the generic symbol versioning with NVIDIA HPC Compiler.
Lasse Collin [Fri, 15 Mar 2024 15:15:50 +0000 (17:15 +0200)] 
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 5a5bd7f871818029d5ccbe189f087f591258c294.

16 months agoCMake: Use only the generic symbol versioning with NVIDIA HPC Compiler.
Lasse Collin [Fri, 15 Mar 2024 14:36:35 +0000 (16:36 +0200)] 
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.

16 months agoUpdate THANKS.
Lasse Collin [Wed, 13 Mar 2024 19:38:24 +0000 (21:38 +0200)] 
Update THANKS.

16 months agoliblzma: Minor comment edits.
Lasse Collin [Wed, 13 Mar 2024 19:30:18 +0000 (21:30 +0200)] 
liblzma: Minor comment edits.

16 months agoliblzma: Fix building with NVHPC (NVIDIA HPC SDK).
Sergey Kosukhin [Wed, 13 Mar 2024 12:07:13 +0000 (13:07 +0100)] 
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 cannot handle the assembler code in range_decoder.h
    (LZMA_RANGE_DECODER_CONFIG has to be set to zero);
  - 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.

16 months agoCMake: Disable symbol versioning on non-glibc Linux.
Lasse Collin [Wed, 13 Mar 2024 19:17:10 +0000 (21:17 +0200)] 
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.

16 months agoCMake: Make symbol versioning configurable.
Lasse Collin [Wed, 13 Mar 2024 18:32:46 +0000 (20:32 +0200)] 
CMake: Make symbol versioning configurable.

16 months agoBuild: Style tweaks to configure.ac.
Lasse Collin [Wed, 13 Mar 2024 17:47:36 +0000 (19:47 +0200)] 
Build: Style tweaks to configure.ac.

The AC_MSG_ERROR line is overlong anyway as are a few other
AC_MSG_ERROR lines already.

16 months agoBuild: Let the users override the symbol versioning variant.
Sergey Kosukhin [Tue, 12 Mar 2024 19:03:49 +0000 (20:03 +0100)] 
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.

16 months agoAdd NEWS for 5.6.1
Jia Tan [Sat, 9 Mar 2024 03:27:27 +0000 (11:27 +0800)] 
Add NEWS for 5.6.1

16 months agoTranslations: Add missing --riscv option to man page translations.
Jia Tan [Sat, 9 Mar 2024 02:43:20 +0000 (10:43 +0800)] 
Translations: Add missing --riscv option to man page translations.

16 months agoTests: Update two test files.
Jia Tan [Sat, 9 Mar 2024 02:18:29 +0000 (10:18 +0800)] 
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.

16 months agoTests: Test --single-stream can decompress bad-3-corrupt_lzma2.xz.
Jia Tan [Sat, 9 Mar 2024 02:08:32 +0000 (10:08 +0800)] 
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.

16 months agoTests: Update RISC-V test files.
Jia Tan [Sat, 9 Mar 2024 02:05:32 +0000 (10:05 +0800)] 
Tests: Update RISC-V test files.

This increases code coverage and tests for possible shifting bugs.

16 months agoliblzma: Fix typos in crc32_fast.c and crc64_fast.c.
Jia Tan [Sat, 9 Mar 2024 01:52:32 +0000 (09:52 +0800)] 
liblzma: Fix typos in crc32_fast.c and crc64_fast.c.

16 months agoTests: Replace HAVE_MICROLZMA usage in CMake and Autotools builds.
Jia Tan [Sat, 9 Mar 2024 01:49:55 +0000 (09:49 +0800)] 
Tests: Replace HAVE_MICROLZMA usage in CMake and Autotools builds.

This reverts commit adaacafde6661496ca2814b1e94a3ba5186428cb.

16 months agoliblzma: Fix false Valgrind error report with GCC.
Jia Tan [Sat, 9 Mar 2024 01:20:57 +0000 (09:20 +0800)] 
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.

17 months agoliblzma: Fix a typo in a comment in the RISC-V filter.
Lasse Collin [Tue, 5 Mar 2024 21:21:26 +0000 (23:21 +0200)] 
liblzma: Fix a typo in a comment in the RISC-V filter.

17 months agoliblzma: Use attribute no_profile_instrument_function with ifunc.
Jia Tan [Mon, 4 Mar 2024 16:34:46 +0000 (00:34 +0800)] 
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.

17 months agoBuild: Require attribute no_profile_instrument_function for ifunc usage.
Jia Tan [Mon, 4 Mar 2024 16:27:31 +0000 (00:27 +0800)] 
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

17 months agoliblzma: Fix a comment in the RISC-V filter.
Lasse Collin [Mon, 4 Mar 2024 17:23:18 +0000 (19:23 +0200)] 
liblzma: Fix a comment in the RISC-V filter.

17 months agoCMake: Warn if translated man pages are missing.
Lasse Collin [Thu, 29 Feb 2024 14:35:52 +0000 (16:35 +0200)] 
CMake: Warn if translated man pages are missing.

17 months agoCMake: Warn if gettext tools and pre-created .gmo files are missing.
Lasse Collin [Thu, 29 Feb 2024 14:35:52 +0000 (16:35 +0200)] 
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

17 months agoxz: Add comments.
Lasse Collin [Wed, 28 Feb 2024 16:26:25 +0000 (18:26 +0200)] 
xz: Add comments.

17 months agoxz: Change logging level for thread reduction to highest verbosity only.
Jia Tan [Tue, 27 Feb 2024 15:42:41 +0000 (23:42 +0800)] 
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.

17 months agoFix sorting in THANKS.
Lasse Collin [Mon, 26 Feb 2024 21:06:13 +0000 (23:06 +0200)] 
Fix sorting in THANKS.

17 months agoUpdate THANKS.
Jia Tan [Mon, 26 Feb 2024 15:39:29 +0000 (23:39 +0800)] 
Update THANKS.

17 months agoxz: Add missing RISC-V on the filter list in the man page
Chien Wong [Sun, 25 Feb 2024 13:38:13 +0000 (21:38 +0800)] 
xz: Add missing RISC-V on the filter list in the man page

Signed-off-by: Chien Wong <m@xv97.com>
17 months agoBuild: Fix Linux Landlock feature test in Autotools and CMake builds.
Jia Tan [Mon, 26 Feb 2024 15:02:06 +0000 (23:02 +0800)] 
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.

17 months agoTests: Add test_microlzma to .gitignore and CMakeLists.txt.
Jia Tan [Mon, 26 Feb 2024 12:06:10 +0000 (20:06 +0800)] 
Tests: Add test_microlzma to .gitignore and CMakeLists.txt.

17 months agoTests: Correct license header in test_microlzma.c.
Jia Tan [Mon, 26 Feb 2024 11:56:25 +0000 (19:56 +0800)] 
Tests: Correct license header in test_microlzma.c.

17 months agoFix typos in NEWS and CMakeLists.
Jia Tan [Sun, 25 Feb 2024 13:41:55 +0000 (21:41 +0800)] 
Fix typos in NEWS and CMakeLists.

17 months agoBump version and soname for 5.7.0alpha. v5.7.0alpha
Jia Tan [Sat, 24 Feb 2024 08:30:06 +0000 (16:30 +0800)] 
Bump version and soname for 5.7.0alpha.

Like 5.5.0alpha, 5.7.0alpha won't be released, it's just to mark that
the branch is not stable.

Once again there is no API/ABI stability for new features in devel
versions. The major soname won't be bumped even if API/ABI of new
features breaks between devel releases.

17 months agoAdd NEWS for 5.6.0.
Jia Tan [Sat, 24 Feb 2024 07:50:36 +0000 (15:50 +0800)] 
Add NEWS for 5.6.0.

17 months agoTranslations: Remove obsolete and fuzzy matches from some translations.
Jia Tan [Thu, 22 Feb 2024 14:27:01 +0000 (22:27 +0800)] 
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.

17 months agoTranslations: Patch man pages to avoid fuzzy matches.
Jia Tan [Tue, 20 Feb 2024 16:31:54 +0000 (00:31 +0800)] 
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.

17 months agoxzmore: Fix typo in xzmore.1.
Jia Tan [Tue, 20 Feb 2024 16:30:43 +0000 (00:30 +0800)] 
xzmore: Fix typo in xzmore.1.

Thanks to Yuri Chornoivan.

17 months agoTranslations: Update the Vietnamese translation.
Jia Tan [Sat, 24 Feb 2024 04:12:16 +0000 (12:12 +0800)] 
Translations: Update the Vietnamese translation.

17 months agoTranslations: Update the Esperanto translation.
Jia Tan [Sat, 24 Feb 2024 04:06:40 +0000 (12:06 +0800)] 
Translations: Update the Esperanto translation.

17 months agoTests: Add a few test files.
Jia Tan [Fri, 23 Feb 2024 15:09:59 +0000 (23:09 +0800)] 
Tests: Add a few test files.

17 months agoTests: Add MicroLZMA test.
Jia Tan [Fri, 23 Feb 2024 12:58:36 +0000 (20:58 +0800)] 
Tests: Add MicroLZMA test.

17 months agoBuild: Define HAVE_MICROLZMA when it is configured.
Jia Tan [Fri, 23 Feb 2024 12:57:59 +0000 (20:57 +0800)] 
Build: Define HAVE_MICROLZMA when it is configured.

17 months agoxz: Fix Capsicum sandbox compile error.
Jia Tan [Fri, 23 Feb 2024 12:27:15 +0000 (20:27 +0800)] 
xz: Fix Capsicum sandbox compile error.

user_abort_pipe[] was still being used instead of the parameters.

17 months agoBuild: Fix ARM64 CRC32 instruction feature test.
Jia Tan [Fri, 23 Feb 2024 08:12:32 +0000 (16:12 +0800)] 
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.

17 months agoCMake: Add LOCALEDIR to the windres workaround.
Lasse Collin [Thu, 22 Feb 2024 17:16:35 +0000 (19:16 +0200)] 
CMake: Add LOCALEDIR to the windres workaround.

LOCALEDIR may contain spaces like in "C:\Program Files".

17 months agoxz: Landlock: Fix error message if input file is a directory.
Lasse Collin [Thu, 22 Feb 2024 13:18:25 +0000 (15:18 +0200)] 
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.

17 months agoliblzma: Disable branchless C version in range decoder.
Lasse Collin [Thu, 22 Feb 2024 12:41:29 +0000 (14:41 +0200)] 
liblzma: Disable branchless C version in range decoder.

Thanks to Sebastian Andrzej Siewior and Sam James for
benchmarking on various systems.

17 months agoINSTALL: Clarify that --disable-assembler affects only 32-bit x86.
Lasse Collin [Wed, 21 Feb 2024 15:41:32 +0000 (17:41 +0200)] 
INSTALL: Clarify that --disable-assembler affects only 32-bit x86.

17 months agoWindows: build.bash: Include COPYING.0BSD in the package.
Lasse Collin [Mon, 19 Feb 2024 16:41:37 +0000 (18:41 +0200)] 
Windows: build.bash: Include COPYING.0BSD in the package.

17 months agoWindows: build.bash: include liblzma-crt-mixing.txt in the package.
Lasse Collin [Sun, 18 Feb 2024 15:59:46 +0000 (17:59 +0200)] 
Windows: build.bash: include liblzma-crt-mixing.txt in the package.

17 months agoWindows: Major update to Windows build instructions.
Lasse Collin [Sun, 18 Feb 2024 15:17:43 +0000 (17:17 +0200)] 
Windows: Major update to Windows build instructions.

17 months agoWindows: Update windows/README-Windows.txt.
Lasse Collin [Sun, 18 Feb 2024 13:15:04 +0000 (15:15 +0200)] 
Windows: Update windows/README-Windows.txt.

It's for binary packages built with windows/build.bash.

17 months agoWindows: Update windows/build.bash.
Lasse Collin [Sun, 18 Feb 2024 13:15:04 +0000 (15:15 +0200)] 
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.

17 months agoTranslations: Update the Romanian man page translations.
Jia Tan [Tue, 20 Feb 2024 15:32:22 +0000 (23:32 +0800)] 
Translations: Update the Romanian man page translations.

17 months agoTranslations: Update the Korean man page translations.
Jia Tan [Tue, 20 Feb 2024 15:30:25 +0000 (23:30 +0800)] 
Translations: Update the Korean man page translations.

17 months agoTranslations: Update the Spanish translation.
Jia Tan [Tue, 20 Feb 2024 13:03:53 +0000 (21:03 +0800)] 
Translations: Update the Spanish translation.

17 months agoTranslations: Update the Romanian translation.
Jia Tan [Tue, 20 Feb 2024 12:18:07 +0000 (20:18 +0800)] 
Translations: Update the Romanian translation.

17 months agoTranslations: Update the Croatian translation.
Jia Tan [Tue, 20 Feb 2024 12:15:50 +0000 (20:15 +0800)] 
Translations: Update the Croatian translation.

17 months agoTranslations: Update the German man page translations.
Jia Tan [Tue, 20 Feb 2024 12:05:44 +0000 (20:05 +0800)] 
Translations: Update the German man page translations.

17 months agoTranslations: Update the German translation.
Jia Tan [Tue, 20 Feb 2024 11:58:25 +0000 (19:58 +0800)] 
Translations: Update the German translation.

17 months agoTranslations: Update the Hungarian translation.
Jia Tan [Tue, 20 Feb 2024 11:56:52 +0000 (19:56 +0800)] 
Translations: Update the Hungarian translation.

17 months agoCMake: Fix building of lzmainfo when translations are enabled.
Lasse Collin [Mon, 19 Feb 2024 14:48:05 +0000 (16:48 +0200)] 
CMake: Fix building of lzmainfo when translations are enabled.

17 months agoCMake: Don't assume that -fvisibility=hidden is supported outside Windows.
Lasse Collin [Mon, 19 Feb 2024 11:38:42 +0000 (13:38 +0200)] 
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.

CMake doesn't support Solaris Studio's -xldscope=hidden.
If it ever does, things should still work with this commit
as Solaris Studio supports not only its own __global but also
the GNU C __attribute__((visibility("default"))). Support for the
attribute was added in 2007 to Sun Studio 12 compiler version 5.9.

17 months agoCMake: Revise the component splitting.
Lasse Collin [Mon, 19 Feb 2024 10:20:59 +0000 (12:20 +0200)] 
CMake: Revise the component splitting.

17 months agoCMake: Update the main comment and document CMAKE_BUILD_TYPE=Release.
Lasse Collin [Sat, 17 Feb 2024 19:45:07 +0000 (21:45 +0200)] 
CMake: Update the main comment and document CMAKE_BUILD_TYPE=Release.

17 months agoCMake: Use -O2 instead of -O3 in CMAKE_BUILD_TYPE=Release.
Lasse Collin [Sat, 17 Feb 2024 19:27:48 +0000 (21:27 +0200)] 
CMake: Use -O2 instead of -O3 in CMAKE_BUILD_TYPE=Release.

-O3 doesn't seem useful for speed but it makes the code bigger.
CMake makes is difficult for users to simply override the
optimization level: CFLAGS / CMAKE_C_FLAGS aren't helpful because
they go before CMAKE_C_FLAGS_RELEASE. Of course, users can override
CMAKE_C_FLAGS_RELEASE directly but then they have to remember to
add also -DNDEBUG to disable assertions.

This commit changes -O3 to -O2 in CMAKE_C_FLAGS_RELEASE if and only if
CMAKE_C_FLAGS_RELEASE cache variable doesn't already exist. So if
a custom value is passed on the command line (or reconfiguring an
already-configured build), the cache variable won't be modified.