]> git.ipfire.org Git - thirdparty/xz.git/log
thirdparty/xz.git
2 years agoxz: Validate --flush-timeout for all specified filter chains.
Jia Tan [Wed, 10 May 2023 16:09:41 +0000 (00:09 +0800)] 
xz: Validate --flush-timeout for all specified filter chains.

2 years agoxz: Allows --block-list filters to scale down memory usage.
Jia Tan [Sat, 13 May 2023 11:54:33 +0000 (19:54 +0800)] 
xz: Allows --block-list filters to scale down memory usage.

Previously, only the default filter chain could have its memory usage
adjusted. The filter chains specified with --filtersX were not checked
for memory usage. Now, all used filter chains will be adjusted if
necessary.

2 years agoxz: Do not include block splitting if encoders are disabled.
Jia Tan [Wed, 10 May 2023 13:50:33 +0000 (21:50 +0800)] 
xz: Do not include block splitting if encoders are disabled.

The block splitting logic and split_block() function are not needed if
encoders are disabled. This will help slightly reduce the binary size
when built without encoders and allow split_block() to use functions
that require encoders being enabled.

2 years agoxz: Free filters[] in debug mode.
Jia Tan [Wed, 10 May 2023 14:38:59 +0000 (22:38 +0800)] 
xz: Free filters[] in debug mode.

This will only free filter chains created with --filters1-9 since the
default filter chain may be set from a static function variable. The
complexity to free the default filter chain is not worth the burden on
code maintenance.

2 years agoxz: Add a message if --block-list is used outside of xz compresssion.
Jia Tan [Sat, 13 May 2023 11:28:23 +0000 (19:28 +0800)] 
xz: Add a message if --block-list is used outside of xz compresssion.

--block-list is only supported with compression in xz format. This avoids
silently ignoring when --block-list is unused.

2 years agoxz: Create command line options for filters[1-9].
Jia Tan [Tue, 18 Apr 2023 12:29:09 +0000 (20:29 +0800)] 
xz: Create command line options for filters[1-9].

The new command line options are meant to be combined with --block-list.
They work as an optional extension to --block-list to specify a custom
filter chain for each block listed. The new options allow the creation
of up to 9 reusable filter chains. For instance:

xz --block-list=1:10MiB,3:5MiB,,2:5MiB,1:0 --filters1=delta--lzma2 \
--filters2=x86--lzma2 --filters3=arm64--lzma2

Will create the following blocks:
1. A block of size 10 MiB with filter chain delta, lzma2.
2. A block of size 5 MiB with filter chain arm64, lzma2.
3. A block of size 5 MiB with filter chain arm64, lzma2.
4. A block of size 5 MiB with filter chain x86, lzma2.
5. A block containing the rest of the file contents with filter chain
   delta, lzma2.

2 years agoxz: Use lzma_filters_free() in forget_filter_chain().
Jia Tan [Sat, 13 May 2023 11:36:09 +0000 (19:36 +0800)] 
xz: Use lzma_filters_free() in forget_filter_chain().

This is a little cleaner than the previous implementation of
forget_filter_chain(). It is also more consistent since
lzma_str_to_filters() will always terminate the filter chain so there
is no need to terminate it later in coder_set_compression_settings().

2 years agoxz: Separate string to filter conversion into a helper function.
Jia Tan [Mon, 17 Apr 2023 14:22:45 +0000 (22:22 +0800)] 
xz: Separate string to filter conversion into a helper function.

Converting from string to filter will also need to be done for block
specific filter chains.

2 years agoTests: Use new --filters option in test_compress.sh
Jia Tan [Thu, 5 Jan 2023 16:03:35 +0000 (00:03 +0800)] 
Tests: Use new --filters option in test_compress.sh

2 years agoxz: Update --long-help and man page for new --filters option.
Jia Tan [Thu, 5 Jan 2023 16:03:06 +0000 (00:03 +0800)] 
xz: Update --long-help and man page for new --filters option.

2 years agoxz: Add --filters option to CLI.
Jia Tan [Thu, 5 Jan 2023 16:02:29 +0000 (00:02 +0800)] 
xz: Add --filters option to CLI.

The --filters option uses the new lzma_str_to_filters() function
to convert a string into a full filter chain. Using this option
will reset all previous filters set by --preset, --[filter], or
--filters.

2 years agoTests: Improve feature testing for skipping.
Jia Tan [Fri, 14 Jul 2023 13:30:25 +0000 (21:30 +0800)] 
Tests: Improve feature testing for skipping.

Fixed a bug where test_compress_* would all fail if arm64 or armthumb
filters were enabled for compression but arm was disabled. Since the
grep tests only checked for "define HAVE_ENCODER_ARM", this would match
on HAVE_ENCODER_ARM64 or HAVE_ENCODER_ARMTHUMB.

Now the config.h feature test requires " 1" at the end to prevent the
prefix problem. have_feature() was also updated for this even though
there were known current bugs affecting it. This is just in case future
features have a similar prefix problem.

2 years agoTranslations: Update the Chinese (traditional) translation.
Jia Tan [Mon, 10 Jul 2023 12:56:28 +0000 (20:56 +0800)] 
Translations: Update the Chinese (traditional) translation.

2 years agoliblzma: Remove non-portable empty initializer.
Jia Tan [Sat, 8 Jul 2023 13:24:19 +0000 (21:24 +0800)] 
liblzma: Remove non-portable empty initializer.

Commit 78704f36e74205857c898a351c757719a6c8b666 added an empty
initializer {} to prevent a warning. The empty initializer is a GNU
extension and results in a build failure on MSVC. The -wpedantic flag
warns about empty initializers.

2 years agoTranslations: Update the Vietnamese translation.
Jia Tan [Sat, 8 Jul 2023 12:03:59 +0000 (20:03 +0800)] 
Translations: Update the Vietnamese translation.

2 years agoTests: Fix memory leaks in test_index.
Jia Tan [Wed, 28 Jun 2023 12:46:31 +0000 (20:46 +0800)] 
Tests: Fix memory leaks in test_index.

Several tests were missing calls to lzma_index_end() to clean up the
lzma_index structs. The memory leaks were discovered by using
-fsanitize=address with GCC.

2 years agoTests: Fix memory leaks in test_block_header.
Jia Tan [Wed, 28 Jun 2023 12:43:29 +0000 (20:43 +0800)] 
Tests: Fix memory leaks in test_block_header.

test_block_header was not properly freeing the filter options between
calls to lzma_block_header_decode(). The memory leaks were discovered by
using -fsanitize=address with GCC.

2 years agoliblzma: Prevent uninitialzed warning in mt stream encoder.
Jia Tan [Wed, 28 Jun 2023 12:31:11 +0000 (20:31 +0800)] 
liblzma: Prevent uninitialzed warning in mt stream encoder.

This change only impacts the compiler warning since it was impossible
for the wait_abs struct in stream_encode_mt() to be used before it was
initialized since mythread_condtime_set() will always be called before
mythread_cond_timedwait().

Since the mythread.h code is different between the POSIX and
Windows versions, this warning was only present on Windows builds.

Thanks to Arthur S for reporting the warning and providing an initial
patch.

2 years agoliblzma: Prevent warning for MSYS2 Windows build.
Jia Tan [Wed, 28 Jun 2023 12:22:38 +0000 (20:22 +0800)] 
liblzma: Prevent warning for MSYS2 Windows build.

In lzma_memcmplen(), the <intrin.h> header file is only included if
_MSC_VER and _M_X64 are both defined but _BitScanForward64() was
previously used if _M_X64 was defined. GCC for MSYS2 defines _M_X64 but
not _MSC_VER so _BitScanForward64() was used without including
<intrin.h>.

Now, lzma_memcmplen() will use __builtin_ctzll() for MSYS2 GCC builds as
expected.

2 years agoCI: Add test with -fsanitize=address,undefined.
Jia Tan [Wed, 28 Jun 2023 13:01:22 +0000 (21:01 +0800)] 
CI: Add test with -fsanitize=address,undefined.

ci_build.sh was updated to accept disabling of __attribute__ ifunc
and CLMUL. This will allow -fsanitize=address to pass because ifunc
is incompatible with -fsanitize=address. The CLMUL implementation has
optimizations that potentially read past the buffer and mask out the
unwanted bytes.

This test will only run on Autotools Linux.

2 years agoCI: Upgrade checkout action from v2 to v3.
Jia Tan [Wed, 28 Jun 2023 12:16:04 +0000 (20:16 +0800)] 
CI: Upgrade checkout action from v2 to v3.

2 years agoUpdate THANKS.
Jia Tan [Tue, 27 Jun 2023 15:38:32 +0000 (23:38 +0800)] 
Update THANKS.

2 years agoDocs: Document the configure option --disable-ifunc in INSTALL.
Jia Tan [Tue, 27 Jun 2023 14:27:09 +0000 (17:27 +0300)] 
Docs: Document the configure option --disable-ifunc in INSTALL.

2 years agoMinor tweaks to style and comments.
Lasse Collin [Tue, 27 Jun 2023 14:24:49 +0000 (17:24 +0300)] 
Minor tweaks to style and comments.

2 years agoCMake: Rename CHECK_ATTR_IFUNC to ALLOW_ATTR_IFUNC.
Lasse Collin [Tue, 27 Jun 2023 14:19:49 +0000 (17:19 +0300)] 
CMake: Rename CHECK_ATTR_IFUNC to ALLOW_ATTR_IFUNC.

It's so that there's a clear difference in wording compared
to liblzma's integrity check types.

2 years agoliblzma: Add ifunc implementation to crc64_fast.c.
Lasse Collin [Tue, 27 Jun 2023 14:05:23 +0000 (17:05 +0300)] 
liblzma: Add ifunc implementation to crc64_fast.c.

The ifunc method avoids indirection via the function pointer
crc64_func. This works on GNU/Linux and probably on FreeBSD too.
The previous __attribute((__constructor__)) method is kept for
compatibility with ELF platforms which do support ifunc.

The ifunc method has some limitations, for example, building
liblzma with -fsanitize=address will result in segfaults.
The configure option --disable-ifunc must be used for such builds.

Thanks to Hans Jansen for the original patch.
Closes: https://github.com/tukaani-project/xz/pull/53
2 years agoAdd ifunc check to CMakeLists.txt
Hans Jansen [Thu, 22 Jun 2023 17:49:30 +0000 (19:49 +0200)] 
Add ifunc check to CMakeLists.txt

CMake build system will now verify if __attribute__((__ifunc__())) can be
used in the build system. If so, HAVE_FUNC_ATTRIBUTE_IFUNC will be
defined to 1.

2 years agoAdd ifunc check to configure.ac
Hans Jansen [Thu, 22 Jun 2023 17:46:55 +0000 (19:46 +0200)] 
Add ifunc check to configure.ac

configure.ac will now verify if __attribute__((__ifunc__())) can be used in
the build system. If so, HAVE_FUNC_ATTRIBUTE_IFUNC will be defined to 1.

2 years agoCI: Add apt update command before installing dependencies.
Jia Tan [Tue, 6 Jun 2023 16:18:30 +0000 (00:18 +0800)] 
CI: Add apt update command before installing dependencies.

Without the extra command, all of the CI tests were automatically
failing because the Ubuntu servers could not be reached properly.

2 years agoUpdate THANKS.
Jia Tan [Tue, 6 Jun 2023 16:10:38 +0000 (00:10 +0800)] 
Update THANKS.

2 years agoCMake: Protects against double find_package
Benjamin Buch [Tue, 6 Jun 2023 13:32:45 +0000 (15:32 +0200)] 
CMake: Protects against double find_package

Boost iostream uses `find_package` in quiet mode and then again uses
`find_package` with required. This second call triggers a
`add_library cannot create imported target "ZLIB::ZLIB" because another
target with the same name already exists.`

This can simply be fixed by skipping the alias part on secondary
`find_package` runs.

2 years agoTranslations: Update the Esperanto translation.
Jia Tan [Wed, 31 May 2023 12:26:42 +0000 (20:26 +0800)] 
Translations: Update the Esperanto translation.

2 years agoTranslations: Update the Croatian translation.
Jia Tan [Wed, 31 May 2023 12:25:00 +0000 (20:25 +0800)] 
Translations: Update the Croatian translation.

2 years agoTranslations: Update the Chinese (simplified) translation.
Jia Tan [Wed, 31 May 2023 12:15:53 +0000 (20:15 +0800)] 
Translations: Update the Chinese (simplified) translation.

2 years agoTranslations: Update German translation of man pages.
Jia Tan [Wed, 17 May 2023 15:12:13 +0000 (23:12 +0800)] 
Translations: Update German translation of man pages.

2 years agoTranslations: Update the German translation.
Jia Tan [Wed, 17 May 2023 15:09:18 +0000 (23:09 +0800)] 
Translations: Update the German translation.

2 years agoTranslations: Update the Croatian translation.
Jia Tan [Wed, 17 May 2023 12:30:01 +0000 (20:30 +0800)] 
Translations: Update the Croatian translation.

2 years agoTranslations: Update Korean translation of man pages.
Jia Tan [Wed, 17 May 2023 12:26:54 +0000 (20:26 +0800)] 
Translations: Update Korean translation of man pages.

2 years agoTranslations: Update the Korean translation.
Jia Tan [Wed, 17 May 2023 12:13:01 +0000 (20:13 +0800)] 
Translations: Update the Korean translation.

2 years agoTranslations: Update the Spanish translation.
Jia Tan [Tue, 16 May 2023 15:49:09 +0000 (23:49 +0800)] 
Translations: Update the Spanish translation.

2 years agoTranslations: Update the Romanian translation.
Jia Tan [Tue, 16 May 2023 15:47:23 +0000 (23:47 +0800)] 
Translations: Update the Romanian translation.

2 years agoTranslations: Update Romanian translation of man pages.
Jia Tan [Tue, 16 May 2023 15:45:43 +0000 (23:45 +0800)] 
Translations: Update Romanian translation of man pages.

2 years agoTranslations: Update Ukrainian translation of man pages.
Jia Tan [Tue, 16 May 2023 15:43:51 +0000 (23:43 +0800)] 
Translations: Update Ukrainian translation of man pages.

2 years agoTranslations: Update the Ukrainian translation.
Jia Tan [Tue, 16 May 2023 15:37:54 +0000 (23:37 +0800)] 
Translations: Update the Ukrainian translation.

2 years agoTranslations: Update the Polish translation.
Jia Tan [Tue, 16 May 2023 15:07:35 +0000 (23:07 +0800)] 
Translations: Update the Polish translation.

2 years agoTranslations: Update the Swedish translation.
Jia Tan [Tue, 16 May 2023 14:52:14 +0000 (22:52 +0800)] 
Translations: Update the Swedish translation.

2 years agoTranslations: Update the Esperanto translation.
Jia Tan [Tue, 16 May 2023 13:21:38 +0000 (21:21 +0800)] 
Translations: Update the Esperanto translation.

2 years agoliblzma: Slightly rewords lzma_str_list_filters() documentation.
Jia Tan [Sat, 13 May 2023 13:21:54 +0000 (21:21 +0800)] 
liblzma: Slightly rewords lzma_str_list_filters() documentation.

Reword "options required" to "supported options". The previous may have
suggested that the options listed were all required anytime a filter is
used for encoding or decoding. The reword makes this more clear that
adjusting the options is optional.

2 years agoliblzma: Adds lzma_nothrow to MicroLZMA API functions.
Jia Tan [Thu, 11 May 2023 15:49:23 +0000 (23:49 +0800)] 
liblzma: Adds lzma_nothrow to MicroLZMA API functions.

None of the liblzma functions may throw an exception, so this
attribute should be applied to all liblzma API functions.

2 years agoliblzma: Exports lzma_mt_block_size() as an API function.
Jia Tan [Tue, 9 May 2023 12:20:06 +0000 (20:20 +0800)] 
liblzma: Exports lzma_mt_block_size() as an API function.

The lzma_mt_block_size() was previously just an internal function for
the multithreaded .xz encoder. It is used to provide a recommended Block
size for a given filter chain.

This function is helpful to determine the maximum Block size for the
multithreaded .xz encoder when one wants to change the filters between
blocks. Then, this determined Block size can be provided to
lzma_stream_encoder_mt() in the lzma_mt options parameter when
intializing the coder. This requires one to know all the filter chains
they are using before starting to encode (or at least the filter chain
that will need the largest Block size), but that isn't a bad limitation.

2 years agoliblzma: Creates IS_ENC_DICT_SIZE_VALID() macro.
Jia Tan [Mon, 8 May 2023 14:58:09 +0000 (22:58 +0800)] 
liblzma: Creates IS_ENC_DICT_SIZE_VALID() macro.

This creates an internal liblzma macro to test if the dictionary size
is valid for encoding.

2 years agoAdd NEWS for 5.4.3.
Jia Tan [Tue, 2 May 2023 12:39:56 +0000 (20:39 +0800)] 
Add NEWS for 5.4.3.

2 years agoAdd NEWS for 5.2.12.
Jia Tan [Tue, 2 May 2023 12:39:37 +0000 (20:39 +0800)] 
Add NEWS for 5.2.12.

2 years agoTranslations: Update the Croatian translation.
Jia Tan [Thu, 4 May 2023 12:38:52 +0000 (20:38 +0800)] 
Translations: Update the Croatian translation.

2 years agotuklib_integer.h: Reverts previous commit.
Jia Tan [Thu, 4 May 2023 12:30:25 +0000 (20:30 +0800)] 
tuklib_integer.h: Reverts previous commit.

Previous commit 6be460dde07113fe3f08f814b61ddc3264125a96 would cause an
error if the integer size was 32 bit.

2 years agotuklib_integer.h: Changes two other UINT_MAX == UINT32_MAX to >=.
Jia Tan [Thu, 4 May 2023 11:25:20 +0000 (19:25 +0800)] 
tuklib_integer.h: Changes two other UINT_MAX == UINT32_MAX to >=.

2 years agotuklib_integer.h: Fix a recent copypaste error in Clang detection.
Lasse Collin [Wed, 3 May 2023 19:46:42 +0000 (22:46 +0300)] 
tuklib_integer.h: Fix a recent copypaste error in Clang detection.

Wrong line was changed in 7062348bf35c1e4cbfee00ad9fffb4a21aa6eff7.
Also, this has >= instead of == since ints larger than 32 bits would
work too even if not relevant in practice.

2 years agoCI: Adds a build and test for small configuration.
Jia Tan [Tue, 25 Apr 2023 12:06:15 +0000 (20:06 +0800)] 
CI: Adds a build and test for small configuration.

2 years agoCI: ci_build.sh allows configuring small build.
Jia Tan [Tue, 25 Apr 2023 12:05:26 +0000 (20:05 +0800)] 
CI: ci_build.sh allows configuring small build.

2 years agoUpdate THANKS.
Jia Tan [Thu, 20 Apr 2023 12:15:00 +0000 (20:15 +0800)] 
Update THANKS.

2 years agoWindows: Include <intrin.h> when needed.
Jia Tan [Wed, 19 Apr 2023 14:22:16 +0000 (22:22 +0800)] 
Windows: Include <intrin.h> when needed.

Legacy Windows did not need to #include <intrin.h> to use the MSVC
intrinsics. Newer versions likely just issue a warning, but the MSVC
documentation says to include the header file for the intrinsics we use.

GCC and Clang can "pretend" to be MSVC on Windows, so extra checks are
needed in tuklib_integer.h to only include <intrin.h> when it will is
actually needed.

2 years agotuklib_integer: Use __builtin_clz() with Clang.
Jia Tan [Wed, 19 Apr 2023 13:59:03 +0000 (21:59 +0800)] 
tuklib_integer: Use __builtin_clz() with Clang.

Clang has support for __builtin_clz(), but previously Clang would
fallback to either the MSVC intrinsic or the regular C code. This was
discovered due to a bug where a new version of Clang required the
<intrin.h> header file in order to use the MSVC intrinsics.

Thanks to Anton Kochkov for notifying us about the bug.

2 years agoliblzma: Update project maintainers in lzma.h.
Lasse Collin [Fri, 14 Apr 2023 15:42:33 +0000 (18:42 +0300)] 
liblzma: Update project maintainers in lzma.h.

AUTHORS was updated earlier, lzma.h was simply forgotten.

2 years agoliblzma: Cleans up old commented out code.
Jia Tan [Thu, 13 Apr 2023 12:45:19 +0000 (20:45 +0800)] 
liblzma: Cleans up old commented out code.

2 years agoDocs: Add missing word to SECURITY.md.
Jia Tan [Fri, 7 Apr 2023 12:46:41 +0000 (20:46 +0800)] 
Docs: Add missing word to SECURITY.md.

2 years agoUpdate THANKS.
Jia Tan [Fri, 7 Apr 2023 12:43:22 +0000 (20:43 +0800)] 
Update THANKS.

2 years agoDocs: Minor edits to SECURITY.md.
Jia Tan [Fri, 7 Apr 2023 12:42:12 +0000 (20:42 +0800)] 
Docs: Minor edits to SECURITY.md.

2 years agoDocs: Create SECURITY.md
Gabriela Gutierrez [Fri, 7 Apr 2023 12:08:30 +0000 (12:08 +0000)] 
Docs: Create SECURITY.md

Signed-off-by: Gabriela Gutierrez <gabigutierrez@google.com>
2 years agoCI: Tests for disabling threading on CMake builds.
Jia Tan [Tue, 28 Mar 2023 14:48:24 +0000 (22:48 +0800)] 
CI: Tests for disabling threading on CMake builds.

2 years agoCI: Removes CMakeCache.txt between builds.
Jia Tan [Tue, 28 Mar 2023 14:45:42 +0000 (22:45 +0800)] 
CI: Removes CMakeCache.txt between builds.

If the cache file is not removed, CMake will not reset configurations
back to their default values. In order to make the tests independent, it
is simplest to purge the cache. Unfortunatly, this will slow down the
tests a little and repeat some checks.

2 years agoCMake: Update liblzma-config.cmake generation.
Jia Tan [Tue, 28 Mar 2023 14:32:40 +0000 (22:32 +0800)] 
CMake: Update liblzma-config.cmake generation.

Now that the threading is configurable, the liblzma CMake package only
needs the threading library when using POSIX threads.

2 years agoCMake: Allows setting thread method.
Jia Tan [Tue, 28 Mar 2023 14:25:33 +0000 (22:25 +0800)] 
CMake: Allows setting thread method.

The thread method is now configurable for the CMake build. It matches
the Autotools build by allowing ON (pick the best threading method),
OFF (no threading), posix, win95, and vista. If both Windows and
posix threading are both available, then ON will choose Windows
threading. Windows threading will also not use:

target_link_libraries(liblzma Threads::Threads)

since on systems like MinGW-w64 it would link the posix threads
without purpose.

2 years agoCI: Runs CMake feature tests.
Jia Tan [Fri, 24 Mar 2023 15:05:48 +0000 (23:05 +0800)] 
CI: Runs CMake feature tests.

Now, CMake will run similar feature disable tests that the Autotools
version did before. In order to do this without repeating lines in
ci.yml, it now makes sense to use the GitHub Workflow matrix to create
a loop.

2 years agoCI: ci_build.sh allows CMake features to be configured.
Jia Tan [Fri, 24 Mar 2023 12:35:11 +0000 (20:35 +0800)] 
CI: ci_build.sh allows CMake features to be configured.

Also included various clean ups for style and helper functions for
repeated work.

2 years agoCI: Change ci_build.sh to use bash instead of sh.
Jia Tan [Fri, 24 Mar 2023 12:06:33 +0000 (20:06 +0800)] 
CI: Change ci_build.sh to use bash instead of sh.

This script is only meant to be run as part of the CI build/test process
on machines that are known to have bash (Ubuntu and MacOS). If this
assumption changes in the future, then the bash specific commands will
need to be replaced with a more portable option. For now, it is
convenient to use bash commands.

2 years agoCMake: Only build xzdec if decoders are enabled.
Jia Tan [Fri, 24 Mar 2023 12:05:59 +0000 (20:05 +0800)] 
CMake: Only build xzdec if decoders are enabled.

2 years agoBuild: Removes redundant check for LZMA1 filter support.
Jia Tan [Wed, 22 Mar 2023 07:42:04 +0000 (15:42 +0800)] 
Build: Removes redundant check for LZMA1 filter support.

2 years agoCMake: Bump maximum policy version to 3.26.
Lasse Collin [Thu, 23 Mar 2023 13:14:29 +0000 (15:14 +0200)] 
CMake: Bump maximum policy version to 3.26.

It adds only one new policy related to FOLDERS which we don't use.
This makes it clear that the code is compatible with the policies
up to 3.26.

2 years agoCMake: Conditionally build xz list.* files if decoders are enabled.
Jia Tan [Tue, 21 Mar 2023 15:36:00 +0000 (23:36 +0800)] 
CMake: Conditionally build xz list.* files if decoders are enabled.

2 years agoCMake: Allow configuring features as cache variables.
Jia Tan [Sat, 25 Feb 2023 03:46:50 +0000 (11:46 +0800)] 
CMake: Allow configuring features as cache variables.

This allows users to change the features they build either in
CMakeCache.txt or by using a CMake GUI. The sources built for
liblzma are affected by this too, so only the necessary files
will be compiled.

2 years agoBuild: Add a comment that AC_PROG_CC_C99 is needed for Autoconf 2.69.
Lasse Collin [Tue, 21 Mar 2023 12:07:51 +0000 (14:07 +0200)] 
Build: Add a comment that AC_PROG_CC_C99 is needed for Autoconf 2.69.

It's obsolete in Autoconf >= 2.70 and just an alias for AC_PROG_CC
but Autoconf 2.69 requires AC_PROG_CC_C99 to get a C99 compiler.

2 years agoBuild: configure.ac: Use AS_IF and AS_CASE where required.
Lasse Collin [Tue, 21 Mar 2023 12:04:37 +0000 (14:04 +0200)] 
Build: configure.ac: Use AS_IF and AS_CASE where required.

This makes no functional difference in the generated configure
(at least with the Autotools versions I have installed) but this
change might prevent future bugs like the one that was just
fixed in the commit 5a5bd7f871818029d5ccbe189f087f591258c294.

2 years agoUpdate THANKS.
Lasse Collin [Tue, 21 Mar 2023 11:12:03 +0000 (13:12 +0200)] 
Update THANKS.

2 years agoBuild: Fix --disable-threads breaking the building of shared libs.
Lasse Collin [Tue, 21 Mar 2023 11:11:49 +0000 (13:11 +0200)] 
Build: Fix --disable-threads breaking the building of shared libs.

This is broken in the releases 5.2.6 to 5.4.2. A workaround
for these releases is to pass EGREP='grep -E' as an argument
to configure in addition to --disable-threads.

The problem appeared when m4/ax_pthread.m4 was updated in
the commit 6629ed929cc7d45a11e385f357ab58ec15e7e4ad which
introduced the use of AC_EGREP_CPP. AC_EGREP_CPP calls
AC_REQUIRE([AC_PROG_EGREP]) to set the shell variable EGREP
but this was only executed if POSIX threads were enabled.
Libtool code also has AC_REQUIRE([AC_PROG_EGREP]) but Autoconf
omits it as AC_PROG_EGREP has already been required earlier.
Thus, if not using POSIX threads, the shell variable EGREP
would be undefined in the Libtool code in configure.

ax_pthread.m4 is fine. The bug was in configure.ac which called
AX_PTHREAD conditionally in an incorrect way. Using AS_CASE
ensures that all AC_REQUIREs get always run.

Thanks to Frank Busse for reporting the bug.
Fixes: https://github.com/tukaani-project/xz/issues/45
2 years agoliblzma: Silence -Wsign-conversion in SSE2 code in memcmplen.h.
Lasse Collin [Sun, 19 Mar 2023 20:45:59 +0000 (22:45 +0200)] 
liblzma: Silence -Wsign-conversion in SSE2 code in memcmplen.h.

Thanks to Christian Hesse for reporting the issue.
Fixes: https://github.com/tukaani-project/xz/issues/44
2 years agoAdd NEWS for 5.4.2.
Jia Tan [Sat, 18 Mar 2023 14:10:57 +0000 (22:10 +0800)] 
Add NEWS for 5.4.2.

2 years agoAdd NEWS for 5.2.11.
Jia Tan [Sat, 18 Mar 2023 14:10:12 +0000 (22:10 +0800)] 
Add NEWS for 5.2.11.

2 years agoUpdate the copy of GNU GPLv3 from gnu.org to COPYING.GPLv3.
Lasse Collin [Sat, 18 Mar 2023 14:00:54 +0000 (16:00 +0200)] 
Update the copy of GNU GPLv3 from gnu.org to COPYING.GPLv3.

2 years agoChange a few HTTP URLs to HTTPS.
Lasse Collin [Sat, 18 Mar 2023 13:51:57 +0000 (15:51 +0200)] 
Change a few HTTP URLs to HTTPS.

The xz man page timestamp was intentionally left unchanged.

2 years agoCMake: Fix typo in a comment.
Jia Tan [Fri, 17 Mar 2023 16:40:28 +0000 (00:40 +0800)] 
CMake: Fix typo in a comment.

2 years agoWindows: build.bash: Copy liblzma API docs to the output package.
Lasse Collin [Fri, 17 Mar 2023 16:36:22 +0000 (18:36 +0200)] 
Windows: build.bash: Copy liblzma API docs to the output package.

2 years agoWindows: Add microlzma_*.c to the VS project files.
Lasse Collin [Fri, 17 Mar 2023 06:53:38 +0000 (08:53 +0200)] 
Windows: Add microlzma_*.c to the VS project files.

These should have been included in 5.3.2alpha already.

2 years agoCMake: Add microlzma_*.c to the build.
Lasse Collin [Fri, 17 Mar 2023 06:43:51 +0000 (08:43 +0200)] 
CMake: Add microlzma_*.c to the build.

These should have been included in 5.3.2alpha already.

2 years agoBuild: Update comments about unaligned access to mention 64-bit.
Lasse Collin [Fri, 17 Mar 2023 06:41:36 +0000 (08:41 +0200)] 
Build: Update comments about unaligned access to mention 64-bit.

2 years agoTests: Update .gitignore.
Lasse Collin [Thu, 16 Mar 2023 22:02:30 +0000 (00:02 +0200)] 
Tests: Update .gitignore.

2 years agopo4a/update-po: Display the script name consistently in error messages.
Lasse Collin [Tue, 14 Mar 2023 18:04:03 +0000 (20:04 +0200)] 
po4a/update-po: Display the script name consistently in error messages.

2 years agoDoc: Rename Doxygen HTML doc directory name liblzma => api.
Jia Tan [Thu, 16 Mar 2023 17:30:36 +0000 (01:30 +0800)] 
Doc: Rename Doxygen HTML doc directory name liblzma => api.

When the docs are installed, calling the directory "liblzma" is
confusing since multiple other files in the doc directory are for
liblzma. This should also make it more natural for distros when they
package the documentation.

2 years agoliblzma: Remove note from lzma_options_bcj about the ARM64 exception.
Jia Tan [Thu, 16 Mar 2023 14:07:15 +0000 (22:07 +0800)] 
liblzma: Remove note from lzma_options_bcj about the ARM64 exception.

This was left in by mistake since an early version of the ARM64 filter
used a different struct for its options.

2 years agoCI: Add doxygen as a dependency.
Jia Tan [Thu, 16 Mar 2023 13:44:02 +0000 (21:44 +0800)] 
CI: Add doxygen as a dependency.

Autogen now requires --no-doxygen or having doxygen installed to run
without errors.

2 years agoCOPYING: Add a note about the included Doxygen-generated HTML.
Lasse Collin [Wed, 15 Mar 2023 17:19:13 +0000 (19:19 +0200)] 
COPYING: Add a note about the included Doxygen-generated HTML.