]> git.ipfire.org Git - thirdparty/xz.git/log
thirdparty/xz.git
3 years agoxz: Change the coding style of the previous commit.
Lasse Collin [Wed, 27 Oct 2021 20:23:11 +0000 (23:23 +0300)] 
xz: Change the coding style of the previous commit.

It isn't any better now but it's consistent with
the rest of the code base.

3 years agoxz: Avoid fchown(2) failure.
Alexander Bluhm [Tue, 5 Oct 2021 21:33:16 +0000 (23:33 +0200)] 
xz: Avoid fchown(2) failure.

OpenBSD does not allow to change the group of a file if the user
does not belong to this group.  In contrast to Linux, OpenBSD also
fails if the new group is the same as the old one.  Do not call
fchown(2) in this case, it would change nothing anyway.

This fixes an issue with Perl Alien::Build module.
https://github.com/PerlAlien/Alien-Build/issues/62

3 years agoUpdate THANKS.
Lasse Collin [Thu, 9 Sep 2021 19:21:07 +0000 (22:21 +0300)] 
Update THANKS.

3 years agoliblzma: Use _MSVC_LANG to detect when "noexcept" can be used with MSVC.
Lasse Collin [Thu, 9 Sep 2021 18:41:51 +0000 (21:41 +0300)] 
liblzma: Use _MSVC_LANG to detect when "noexcept" can be used with MSVC.

By default, MSVC always sets __cplusplus to 199711L. The real
C++ standard version is available in _MSVC_LANG (or one could
use /Zc:__cplusplus to set __cplusplus correctly).

Fixes <https://sourceforge.net/p/lzmautils/discussion/708858/thread/f6bc3b108a/>.

Thanks to Dan Weiss.

3 years agoxzdiff: Update the man page about the exit status.
Lasse Collin [Fri, 4 Jun 2021 16:02:38 +0000 (19:02 +0300)] 
xzdiff: Update the man page about the exit status.

This was forgotten from 194029ffaf74282a81f0c299c07f73caca3232ca.

3 years agoxzless: Fix less(1) version detection when it contains a dot.
Lasse Collin [Fri, 4 Jun 2021 15:52:48 +0000 (18:52 +0300)] 
xzless: Fix less(1) version detection when it contains a dot.

Sometimes the version number from "less -V" contains a dot,
sometimes not. xzless failed detect the version number when
it does contain a dot. This fixes it.

Thanks to nick87720z for reporting this. Apparently it had been
reported here <https://bugs.gentoo.org/489362> in 2013.

3 years agoxz: Document the special memlimit case of 2000 MiB on MIPS32.
Lasse Collin [Tue, 12 Jul 2022 15:53:04 +0000 (18:53 +0300)] 
xz: Document the special memlimit case of 2000 MiB on MIPS32.

See commit 95806a8a52ae57bddf6c77dfd19cf7938a92e040.

3 years agoUpdate THANKS.
Lasse Collin [Sun, 11 Apr 2021 16:58:10 +0000 (19:58 +0300)] 
Update THANKS.

3 years agoReduce maximum possible memory limit on MIPS32
Ivan A. Melnikov [Fri, 9 Apr 2021 08:45:10 +0000 (11:45 +0300)] 
Reduce maximum possible memory limit on MIPS32

Due to architectural limitations, address space available to a single
userspace process on MIPS32 is limited to 2 GiB, not 4, even on systems
that have more physical RAM -- e.g. 64-bit systems with 32-bit
userspace, or systems that use XPA (an extension similar to x86's PAE).

So, for MIPS32, we have to impose stronger memory limits. I've chosen
2000MiB to give the process some headroom.

3 years agoCMake: Use interface library for better FindLibLZMA compatibility.
Lasse Collin [Sat, 13 Feb 2021 21:31:27 +0000 (23:31 +0200)] 
CMake: Use interface library for better FindLibLZMA compatibility.

https://www.mail-archive.com/xz-devel@tukaani.org/msg00446.html

Thanks to Markus Rickert.

3 years agoCMake: Try to improve compatibility with the FindLibLZMA module.
Lasse Collin [Sat, 30 Jan 2021 16:36:04 +0000 (18:36 +0200)] 
CMake: Try to improve compatibility with the FindLibLZMA module.

The naming conflict with FindLibLZMA module gets worse.
Not avoiding it in the first place was stupid.

Normally find_package(LibLZMA) will use the module and
find_package(liblzma 5.2.5 REQUIRED CONFIG) will use the config
file even with a case insensitive file system. However, if
CMAKE_FIND_PACKAGE_PREFER_CONFIG is TRUE and the file system
is case insensitive, find_package(LibLZMA) will find our liblzma
config file instead of using FindLibLZMA module.

One big problem with this is that FindLibLZMA uses
LibLZMA::LibLZMA and we use liblzma::liblzma as the target
name. With target names CMake happens to be case sensitive.
To workaround this, this commit adds

    add_library(LibLZMA::LibLZMA ALIAS liblzma::liblzma)

to the config file. Then both spellings work.

To make the behavior consistent between case sensitive and
insensitive file systems, the config and related files are
renamed from liblzmaConfig.cmake to liblzma-config.cmake style.
With this style CMake looks for lowercase version of the package
name so find_package(LiBLzmA 5.2.5 REQUIRED CONFIG) will work
to find our config file.

There are other differences between our config file and
FindLibLZMA so it's still possible that things break for
reasons other than the spelling of the target name. Hopefully
those situations aren't too common.

When the config file is available, it should always give as good or
better results as FindLibLZMA so this commit doesn't affect the
recommendation to use find_package(liblzma 5.2.5 REQUIRED CONFIG)
which explicitly avoids FindLibLZMA.

Thanks to Markus Rickert.

3 years agoTests: Add bad-1-lzma2-10.xz and also modify -9.xz.
Lasse Collin [Sun, 24 Jan 2021 20:32:41 +0000 (22:32 +0200)] 
Tests: Add bad-1-lzma2-10.xz and also modify -9.xz.

3 years agoTests: Add bad-1-lzma2-9.xz.
Lasse Collin [Sun, 24 Jan 2021 16:51:51 +0000 (18:51 +0200)] 
Tests: Add bad-1-lzma2-9.xz.

3 years agoTests: Add bad-1-check-crc32-2.xz.
Lasse Collin [Sun, 24 Jan 2021 15:02:00 +0000 (17:02 +0200)] 
Tests: Add bad-1-check-crc32-2.xz.

3 years agoScripts: Add zstd support to xzdiff.
Lasse Collin [Mon, 11 Jan 2021 21:57:11 +0000 (23:57 +0200)] 
Scripts: Add zstd support to xzdiff.

3 years agoScripts: Fix exit status of xzgrep.
Lasse Collin [Mon, 11 Jan 2021 21:28:52 +0000 (23:28 +0200)] 
Scripts: Fix exit status of xzgrep.

Omit the -q option from xz, gzip, and bzip2. With xz this shouldn't
matter. With gzip it's important because -q makes gzip replace SIGPIPE
with exit status 2. With bzip2 it's important because with -q bzip2
is completely silent if input is corrupt while other decompressors
still give an error message.

Avoiding exit status 2 from gzip is important because bzip2 uses
exit status 2 to indicate corrupt input. Before this commit xzgrep
didn't recognize corrupt .bz2 files because xzgrep was treating
exit status 2 as SIGPIPE for gzip compatibility.

zstd still needs -q because otherwise it is noisy in normal
operation.

The code to detect real SIGPIPE didn't check if the exit status
was due to a signal (>= 128) and so could ignore some other exit
status too.

3 years agoScripts: Fix exit status of xzdiff/xzcmp.
Lasse Collin [Mon, 11 Jan 2021 20:01:51 +0000 (22:01 +0200)] 
Scripts: Fix exit status of xzdiff/xzcmp.

This is a minor fix since this affects only the situation when
the files differ and the exit status is something else than 0.
In such case there could be SIGPIPE from a decompression tool
and that would result in exit status of 2 from xzdiff/xzcmp
while the correct behavior would be to return 1 or whatever
else diff or cmp may have returned.

This commit omits the -q option from xz/gzip/bzip2/lzop arguments.
I'm not sure why the -q was used in the first place, perhaps it
hides warnings in some situation that I cannot see at the moment.
Hopefully the removal won't introduce a new bug.

With gzip the -q option was harmful because it made gzip return 2
instead of >= 128 with SIGPIPE. Ignoring exit status 2 (warning
from gzip) isn't practical because bzip2 uses exit status 2 to
indicate corrupt input file. It's better if SIGPIPE results in
exit status >= 128.

With bzip2 the removal of -q seems to be good because with -q
it prints nothing if input is corrupt. The other tools aren't
silent in this situation even with -q. On the other hand, if
zstd support is added, it will need -q since otherwise it's
noisy in normal situations.

Thanks to Étienne Mollier and Sebastian Andrzej Siewior.

3 years agoUpdate THANKS.
Lasse Collin [Wed, 23 Dec 2020 15:15:49 +0000 (17:15 +0200)] 
Update THANKS.

3 years agoliblzma: Enable Intel CET in x86 CRC assembly codes
H.J. Lu [Wed, 23 Dec 2020 14:49:04 +0000 (06:49 -0800)] 
liblzma: Enable Intel CET in x86 CRC assembly codes

When Intel CET is enabled, we need to include <cet.h> in assembly codes
to mark Intel CET support and add _CET_ENDBR to indirect jump targets.

Tested on Intel Tiger Lake under CET enabled Linux.

3 years agoUpdate THANKS.
Lasse Collin [Wed, 16 Dec 2020 16:33:29 +0000 (18:33 +0200)] 
Update THANKS.

3 years agoBuild: Don't build bundles on Apple OSes.
Lasse Collin [Wed, 16 Dec 2020 16:30:14 +0000 (18:30 +0200)] 
Build: Don't build bundles on Apple OSes.

Thanks to Daniel Packard.

3 years agoUpdate THANKS.
Lasse Collin [Sat, 5 Dec 2020 20:44:03 +0000 (22:44 +0200)] 
Update THANKS.

3 years agoScripts: Add zstd support to xzgrep.
Adam Borowski [Fri, 25 Sep 2020 01:35:18 +0000 (03:35 +0200)] 
Scripts: Add zstd support to xzgrep.

Thanks to Adam Borowski.

3 years agoCMake: Fix compatibility with CMake 3.13.
Lasse Collin [Tue, 17 Nov 2020 18:51:48 +0000 (20:51 +0200)] 
CMake: Fix compatibility with CMake 3.13.

The syntax "if(DEFINED CACHE{FOO})" requires CMake 3.14.
In some other places the code treats the cache variables
like normal variables already (${FOO} or if(FOO) is used,
not ${CACHE{FOO}).

Thanks to ygrek for reporting the bug on IRC.

3 years agoUpdate THANKS.
Lasse Collin [Sun, 1 Nov 2020 20:56:43 +0000 (22:56 +0200)] 
Update THANKS.

3 years agoxz: Avoid unneeded \f escapes on the man page.
Lasse Collin [Sun, 1 Nov 2020 20:34:25 +0000 (22:34 +0200)] 
xz: Avoid unneeded \f escapes on the man page.

I don't want to use \c in macro arguments but groff_man(7)
suggests that \f has better portability. \f would be needed
for the .TP strings for portability reasons anyway.

Thanks to Bjarni Ingi Gislason.

3 years agoxz: Use non-breaking spaces when intentionally using more than one space.
Lasse Collin [Sun, 1 Nov 2020 17:09:53 +0000 (19:09 +0200)] 
xz: Use non-breaking spaces when intentionally using more than one space.

This silences some style checker warnings. Seems that spaces
in the beginning of a line don't need this treatment.

Thanks to Bjarni Ingi Gislason.

3 years agoxz: Protect the ellipsis (...) on the man page with \&.
Lasse Collin [Sun, 1 Nov 2020 16:49:37 +0000 (18:49 +0200)] 
xz: Protect the ellipsis (...) on the man page with \&.

This does it only when ... appears outside macro calls.

Thanks to Bjarni Ingi Gislason.

3 years agoxz: Avoid the abbreviation "e.g." on the man page.
Lasse Collin [Sun, 1 Nov 2020 16:41:21 +0000 (18:41 +0200)] 
xz: Avoid the abbreviation "e.g." on the man page.

A few are simply omitted, most are converted to "for example"
and surrounded with commas. Sounds like that this is better
style, for example, man-pages(7) recommends avoiding such
abbreviations except in parenthesis.

Thanks to Bjarni Ingi Gislason.

3 years agoxz man page: Change \- (minus) to \(en (en-dash) for a numeric range.
Lasse Collin [Sun, 12 Jul 2020 20:10:03 +0000 (23:10 +0300)] 
xz man page: Change \- (minus) to \(en (en-dash) for a numeric range.

Docs of ancient troff/nroff mention \(em (em-dash) but not \(en
and \- was used for both minus and en-dash. I don't know how
portable \(en is nowadays but it can be changed back if someone
complains. At least GNU groff and OpenBSD's mandoc support it.

Thanks to Bjarni Ingi Gislason for the patch.

3 years agoWindows: Fix building of resource files when config.h isn't used.
Lasse Collin [Sun, 12 Jul 2020 17:46:24 +0000 (20:46 +0300)] 
Windows: Fix building of resource files when config.h isn't used.

Now CMake + Visual Studio works for building liblzma.dll.

Thanks to Markus Rickert.

3 years agosrc/scripts/xzgrep.1: Filenames to xzgrep are optional.
Lasse Collin [Mon, 6 Apr 2020 16:31:50 +0000 (19:31 +0300)] 
src/scripts/xzgrep.1: Filenames to xzgrep are optional.

xzgrep --help was correct already.

3 years agoTranslations: Add Portuguese translation.
Lasse Collin [Tue, 12 Jul 2022 14:59:41 +0000 (17:59 +0300)] 
Translations: Add Portuguese translation.

Jia Tan made white-space changes and also changed "Language: pt_BR\n"
to pt. The translator wasn't reached so I'm hoping these changes
are OK and will commit it without translator's approval.

Thanks to Pedro Albuquerque and Jia Tan.

3 years agosrc/script/xzgrep.1: Remove superfluous '.RB'
Bjarni Ingi Gislason [Thu, 26 Mar 2020 22:17:31 +0000 (22:17 +0000)] 
src/script/xzgrep.1: Remove superfluous '.RB'

Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z

  [ "test-groff" is a developmental version of "groff" ]

Input file is ./src/scripts/xzgrep.1

<src/scripts/xzgrep.1>:20 (macro RB): only 1 argument, but more are expected
<src/scripts/xzgrep.1>:23 (macro RB): only 1 argument, but more are expected
<src/scripts/xzgrep.1>:26 (macro RB): only 1 argument, but more are expected
<src/scripts/xzgrep.1>:29 (macro RB): only 1 argument, but more are expected
<src/scripts/xzgrep.1>:32 (macro RB): only 1 argument, but more are expected

 "abc..." does not mean the same as "abc ...".

  The output from nroff and troff is unchanged except for the space
between "file" and "...".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
3 years agoxzgrep.1: Delete superfluous '.PP'
Bjarni Ingi Gislason [Mon, 30 Mar 2020 21:56:36 +0000 (21:56 +0000)] 
xzgrep.1: Delete superfluous '.PP'

Summary:

mandoc -T lint xzgrep.1 :
mandoc: xzgrep.1:79:2: WARNING: skipping paragraph macro: PP empty

  There is no change in the output of "nroff" and "troff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
3 years agosrc/xz/xz.1: Correct misused two-fonts macros
Bjarni Ingi Gislason [Thu, 26 Mar 2020 21:16:18 +0000 (21:16 +0000)] 
src/xz/xz.1: Correct misused two-fonts macros

Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z

  [ "test-groff" is a developmental version of "groff" ]

Input file is ./src/xz/xz.1

<src/xz/xz.1>:408 (macro BR): only 1 argument, but more are expected
<src/xz/xz.1>:1009 (macro BR): only 1 argument, but more are expected
<src/xz/xz.1>:1743 (macro BR): only 1 argument, but more are expected
<src/xz/xz.1>:1920 (macro BR): only 1 argument, but more are expected
<src/xz/xz.1>:2213 (macro BR): only 1 argument, but more are expected

  Output from nroff and troff is unchanged, except for a font change of a
full stop (.).

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
3 years agoTranslations: Add Serbian translation.
Lasse Collin [Sun, 10 Jul 2022 18:16:40 +0000 (21:16 +0300)] 
Translations: Add Serbian translation.

Quite a few white-space changes were made by Jia Tan to make
this look good. Contacting the translator didn't succeed so
I'm committing this without getting translator's approval.

Thanks to Мирослав Николић (Miroslav Nikolic) and Jia Tan.

3 years agoTranslations: Add Swedish translation.
Lasse Collin [Mon, 4 Jul 2022 20:51:36 +0000 (23:51 +0300)] 
Translations: Add Swedish translation.

Thanks to Sebastian Rasmussen and Jia Tan.

3 years agoTranslations: Add Esperanto translation.
Lasse Collin [Mon, 4 Jul 2022 20:40:27 +0000 (23:40 +0300)] 
Translations: Add Esperanto translation.

Thanks to Keith Bowes and Jia Tan.

3 years agoTranslations: Add Catalan translation.
Lasse Collin [Thu, 30 Jun 2022 21:22:33 +0000 (00:22 +0300)] 
Translations: Add Catalan translation.

Thanks to Jordi Mas and Jia Tan.

3 years agoTranslations: Add Ukrainian translation.
Lasse Collin [Thu, 30 Jun 2022 14:47:08 +0000 (17:47 +0300)] 
Translations: Add Ukrainian translation.

Thanks to Yuri Chornoivan and Jia Tan.

3 years agoTranslators: Add Romanian translation.
Lasse Collin [Thu, 30 Jun 2022 14:45:26 +0000 (17:45 +0300)] 
Translators: Add Romanian translation.

Thanks to Remus-Gabriel Chelu and Jia Tan.

3 years agoTranslations: Update Brazilian Portuguese translation.
Lasse Collin [Wed, 29 Jun 2022 15:33:32 +0000 (18:33 +0300)] 
Translations: Update Brazilian Portuguese translation.

One msgstr was changed. The diff is long due to changes
in the source code line numbers in the comments.

Thanks to Rafael Fontenelle.

3 years agoTranslations: Add Croatian translation.
Lasse Collin [Wed, 29 Jun 2022 15:04:44 +0000 (18:04 +0300)] 
Translations: Add Croatian translation.

Thanks to Božidar Putanec and Jia Tan.

3 years agoTranslations: Add Spanish translation.
Lasse Collin [Wed, 29 Jun 2022 14:58:48 +0000 (17:58 +0300)] 
Translations: Add Spanish translation.

Thanks to Cristian Othón Martínez Vera and Jia Tan.

3 years agoTranslations: Add Korean translation.
Lasse Collin [Wed, 29 Jun 2022 14:49:43 +0000 (17:49 +0300)] 
Translations: Add Korean translation.

Thanks to Seong-ho Cho and Jia Tan.

5 years agov5.2-specific typo fix from fossies.org.
Lasse Collin [Mon, 23 Mar 2020 16:09:40 +0000 (18:09 +0200)] 
v5.2-specific typo fix from fossies.org.

5 years agoTypo fixes from fossies.org.
Lasse Collin [Mon, 23 Mar 2020 16:07:50 +0000 (18:07 +0200)] 
Typo fixes from fossies.org.

https://fossies.org/linux/misc/xz-5.2.5.tar.xz/codespell.html

5 years agoBump version and soname for 5.2.5. v5.2.5
Lasse Collin [Tue, 17 Mar 2020 14:27:42 +0000 (16:27 +0200)] 
Bump version and soname for 5.2.5.

5 years agoUpdate NEWS for 5.2.5.
Lasse Collin [Tue, 17 Mar 2020 14:26:04 +0000 (16:26 +0200)] 
Update NEWS for 5.2.5.

5 years agoTranslations: Rebuild cs.po to avoid incorrect fuzzy strings.
Lasse Collin [Mon, 16 Mar 2020 19:57:21 +0000 (21:57 +0200)] 
Translations: Rebuild cs.po to avoid incorrect fuzzy strings.

"make dist" updates the .po files and the fuzzy strings would
result in multiple very wrong translations.

5 years agoREADME: Update outdated sections.
Lasse Collin [Mon, 16 Mar 2020 18:01:37 +0000 (20:01 +0200)] 
README: Update outdated sections.

5 years agoREADME: Mention that translatable strings will change after 5.2.x.
Lasse Collin [Mon, 16 Mar 2020 17:46:27 +0000 (19:46 +0200)] 
README: Mention that translatable strings will change after 5.2.x.

5 years agoREADME: Mention that man pages can be translated.
Lasse Collin [Mon, 16 Mar 2020 17:39:45 +0000 (19:39 +0200)] 
README: Mention that man pages can be translated.

5 years agoTranslations: Add partial Danish translation.
Lasse Collin [Mon, 16 Mar 2020 15:30:39 +0000 (17:30 +0200)] 
Translations: Add partial Danish translation.

I made a few minor white space changes without getting them
approved by the Danish translation team.

5 years agoUpdate INSTALL.generic from Automake 1.16.1.
Lasse Collin [Mon, 16 Mar 2020 14:43:29 +0000 (16:43 +0200)] 
Update INSTALL.generic from Automake 1.16.1.

5 years agoUpdate INSTALL for Windows and DOS and add preliminary info for z/OS.
Lasse Collin [Sun, 15 Mar 2020 13:27:22 +0000 (15:27 +0200)] 
Update INSTALL for Windows and DOS and add preliminary info for z/OS.

5 years agoBuild: Update m4/ax_pthread.m4 from Autoconf Archive (again).
Lasse Collin [Sun, 15 Mar 2020 13:26:20 +0000 (15:26 +0200)] 
Build: Update m4/ax_pthread.m4 from Autoconf Archive (again).

5 years agoxz: Never use thousand separators in DJGPP builds.
Lasse Collin [Wed, 11 Mar 2020 19:15:35 +0000 (21:15 +0200)] 
xz: Never use thousand separators in DJGPP builds.

DJGPP 2.05 added support for thousands separators but it's
broken at least under WinXP with Finnish locale that uses
a non-breaking space as the thousands separator. Workaround
by disabling thousands separators for DJGPP builds.

5 years agoDOS: Update dos/Makefile for DJGPP 2.05.
Lasse Collin [Wed, 11 Mar 2020 17:38:08 +0000 (19:38 +0200)] 
DOS: Update dos/Makefile for DJGPP 2.05.

It doesn't need -fgnu89-inline like 2.04beta did.

5 years agoDOS: Update instructions in dos/INSTALL.txt.
Lasse Collin [Wed, 11 Mar 2020 17:36:07 +0000 (19:36 +0200)] 
DOS: Update instructions in dos/INSTALL.txt.

5 years agoDOS: Update config.h.
Lasse Collin [Wed, 11 Mar 2020 15:58:51 +0000 (17:58 +0200)] 
DOS: Update config.h.

The added defines assume GCC >= 4.8.

5 years agoTranslations: Add hu, zh_CN, and zh_TW.
Lasse Collin [Wed, 11 Mar 2020 20:37:54 +0000 (22:37 +0200)] 
Translations: Add hu, zh_CN, and zh_TW.

I made a few white space changes to these without getting them
approved by the translation teams. (I tried to contact the hu and
zh_TW teams but didn't succeed. I didn't contact the zh_CN team.)

5 years agoTranslations: Update vi.po to match the file from the TP.
Lasse Collin [Wed, 11 Mar 2020 12:33:30 +0000 (14:33 +0200)] 
Translations: Update vi.po to match the file from the TP.

The translated strings haven't been updated but word wrapping
is different.

5 years agoTranslations: Add fi and pt_BR, and update de, fr, it, and pl.
Lasse Collin [Wed, 11 Mar 2020 12:18:03 +0000 (14:18 +0200)] 
Translations: Add fi and pt_BR, and update de, fr, it, and pl.

The German translation isn't identical to the file in
the Translation Project but the changes (white space changes
only) were approved by the translator Mario Blättermann.

5 years agoUpdate THANKS.
Lasse Collin [Tue, 25 Feb 2020 19:35:14 +0000 (21:35 +0200)] 
Update THANKS.

5 years agoBuild: Add very limited experimental CMake support.
Lasse Collin [Wed, 11 Mar 2020 11:05:29 +0000 (13:05 +0200)] 
Build: Add very limited experimental CMake support.

This version matches CMake files in the master branch (commit
265daa873c0d871f5f23f9b56e133a6f20045a0a) except that this omits
two source files that aren't in v5.2 and in the beginning of
CMakeLists.txt the first paragraph in the comment is slightly
different to point out possible issues in building shared liblzma.

5 years agoBuild: Add support for --no-po4a option to autogen.sh.
Lasse Collin [Thu, 27 Feb 2020 18:24:27 +0000 (20:24 +0200)] 
Build: Add support for --no-po4a option to autogen.sh.

Normally, if po4a isn't available, autogen.sh will return
with non-zero exit status. The option --no-po4a can be useful
when one knows that po4a isn't available but wants autogen.sh
to still return with zero exit status.

5 years agoUpdate m4/.gitignore.
Lasse Collin [Mon, 24 Feb 2020 21:37:07 +0000 (23:37 +0200)] 
Update m4/.gitignore.

5 years agoliblzma: Remove unneeded <sys/types.h> from fastpos_tablegen.c.
Lasse Collin [Mon, 24 Feb 2020 21:01:00 +0000 (23:01 +0200)] 
liblzma: Remove unneeded <sys/types.h> from fastpos_tablegen.c.

This file only generates fastpos_table.c.
It isn't built as a part of liblzma.

5 years agoUse defined(__GNUC__) before __GNUC__ in preprocessor lines.
Lasse Collin [Sat, 22 Feb 2020 12:15:07 +0000 (14:15 +0200)] 
Use defined(__GNUC__) before __GNUC__ in preprocessor lines.

This should silence the equivalent of -Wundef in compilers that
don't define __GNUC__.

5 years agoliblzma: Add more uses of lzma_memcmplen() to the normal mode of LZMA.
Lasse Collin [Fri, 21 Feb 2020 15:40:02 +0000 (17:40 +0200)] 
liblzma: Add more uses of lzma_memcmplen() to the normal mode of LZMA.

This gives a tiny encoder speed improvement. This could have been done
in 2014 after the commit 544aaa3d13554e8640f9caf7db717a96360ec0f6 but
it was forgotten.

5 years agoBuild: Add visibility.m4 from gnulib.
Lasse Collin [Fri, 21 Feb 2020 15:01:15 +0000 (17:01 +0200)] 
Build: Add visibility.m4 from gnulib.

Appears that this file used to get included as a side effect of
gettext. After the change to gettext version requirements this file
no longer got copied to the package and so the build was broken.

5 years agoxz: Silence a warning when sig_atomic_t is long int.
Lasse Collin [Fri, 21 Feb 2020 14:10:44 +0000 (16:10 +0200)] 
xz: Silence a warning when sig_atomic_t is long int.

It can be true at least on z/OS.

5 years agoxz: Avoid unneeded access of a volatile variable.
Lasse Collin [Fri, 21 Feb 2020 13:59:26 +0000 (15:59 +0200)] 
xz: Avoid unneeded access of a volatile variable.

5 years agotuklib_integer.m4: Optimize the check order.
Lasse Collin [Thu, 20 Feb 2020 23:24:18 +0000 (01:24 +0200)] 
tuklib_integer.m4: Optimize the check order.

The __builtin byteswapping is the preferred one so check for it first.

5 years agotuklib_exit: Add missing header.
Lasse Collin [Thu, 20 Feb 2020 16:54:04 +0000 (18:54 +0200)] 
tuklib_exit: Add missing header.

strerror() needs <string.h> which happened to be included via
tuklib_common.h -> tuklib_config.h -> sysdefs.h if HAVE_CONFIG_H
was defined. This wasn't tested without config.h before so it
had worked fine.

5 years agosysdefs.h: Omit the conditionals around string.h and limits.h.
Lasse Collin [Sun, 16 Feb 2020 09:18:28 +0000 (11:18 +0200)] 
sysdefs.h: Omit the conditionals around string.h and limits.h.

string.h is used unconditionally elsewhere in the project and
configure has always stopped if limits.h is missing, so these
headers must have been always available even on the weirdest
systems.

5 years agoBuild: Bump Autoconf and Libtool version requirements.
Lasse Collin [Sat, 15 Feb 2020 13:07:11 +0000 (15:07 +0200)] 
Build: Bump Autoconf and Libtool version requirements.

There is no specific reason for this other than blocking
the most ancient versions. These are still old:

Autoconf 2.69 (2012)
Automake 1.12 (2012)
gettext 0.19.6 (2015)
Libtool 2.4 (2010)

5 years agoBuild: Use AM_GNU_GETTEXT_REQUIRE_VERSION and require 0.19.6.
Lasse Collin [Sat, 15 Feb 2020 01:08:32 +0000 (03:08 +0200)] 
Build: Use AM_GNU_GETTEXT_REQUIRE_VERSION and require 0.19.6.

This bumps the version requirement from 0.19 (from 2014) to
0.19.6 (2015).

Using only the old AM_GNU_GETTEXT_VERSION results in old
gettext infrastructure being placed in the package. By using
both macros we get the latest gettext files while the other
programs in the Autotools family can still see the old macro.

5 years agoTranslations: Add German translation of the man pages.
Lasse Collin [Fri, 14 Feb 2020 18:42:06 +0000 (20:42 +0200)] 
Translations: Add German translation of the man pages.

Thanks to Mario Blättermann.

5 years agoBuild: Add support for translated man pages using po4a.
Lasse Collin [Fri, 7 Feb 2020 13:32:21 +0000 (15:32 +0200)] 
Build: Add support for translated man pages using po4a.

The dependency on po4a is optional. It's never required to install
the translated man pages when xz is built from a release tarball.
If po4a is missing when building from xz.git, the translated man
pages won't be generated but otherwise the build will work normally.

The translations are only updated automatically by autogen.sh and
by "make mydist". This makes it easy to keep po4a as an optional
dependency and ensures that I won't forget to put updated
translations to a release tarball.

The translated man pages aren't installed if --disable-nls is used.

The installation of translated man pages abuses Automake internals
by calling "install-man" with redefined dist_man_MANS and man_MANS.
This makes the hairy script code slightly less hairy. If it breaks
some day, this code needs to be fixed; don't blame Automake developers.

Also, this adds more quotes to the existing shell script code in
the Makefile.am "-hook"s.

5 years agoUpdate THANKS (sync with the master branch).
Lasse Collin [Wed, 5 Feb 2020 22:04:42 +0000 (00:04 +0200)] 
Update THANKS (sync with the master branch).

5 years agoUpdate tests/.gitignore.
Lasse Collin [Wed, 5 Feb 2020 20:35:06 +0000 (22:35 +0200)] 
Update tests/.gitignore.

5 years agoUpdate m4/.gitignore.
Lasse Collin [Wed, 5 Feb 2020 20:28:51 +0000 (22:28 +0200)] 
Update m4/.gitignore.

5 years agoUpdate THANKS.
Lasse Collin [Wed, 5 Feb 2020 18:47:38 +0000 (20:47 +0200)] 
Update THANKS.

5 years agoxz: Comment out annoying sandboxing messages.
Lasse Collin [Wed, 5 Feb 2020 18:33:50 +0000 (20:33 +0200)] 
xz: Comment out annoying sandboxing messages.

5 years agoBuild: Workaround a POSIX shell detection problem on Solaris.
Lasse Collin [Wed, 5 Feb 2020 17:33:37 +0000 (19:33 +0200)] 
Build: Workaround a POSIX shell detection problem on Solaris.

I don't know if the problem is in gnulib's gl_POSIX_SHELL macro
or if xzgrep does something that isn't in POSIX. The workaround
adds a special case for Solaris: if /usr/xpg4/bin/sh exists and
gl_cv_posix_shell wasn't overriden on the configure command line,
use that shell for xzgrep and other scripts. That shell is known
to work and exists on most Solaris systems.

5 years agoBuild: Update m4/ax_pthread.m4 from Autoconf Archive.
Lasse Collin [Mon, 3 Feb 2020 20:03:50 +0000 (22:03 +0200)] 
Build: Update m4/ax_pthread.m4 from Autoconf Archive.

5 years agoxz: Limit --memlimit-compress to at most 4020 MiB for 32-bit xz.
Lasse Collin [Sat, 1 Feb 2020 17:56:18 +0000 (19:56 +0200)] 
xz: Limit --memlimit-compress to at most 4020 MiB for 32-bit xz.

See the code comment for reasoning. It's far from perfect but
hopefully good enough for certain cases while hopefully doing
nothing bad in other situations.

At presets -5 ... -9, 4020 MiB vs. 4096 MiB makes no difference
on how xz scales down the number of threads.

The limit has to be a few MiB below 4096 MiB because otherwise
things like "xz --lzma2=dict=500MiB" won't scale down the dict
size enough and xz cannot allocate enough memory. With
"ulimit -v $((4096 * 1024))" on x86-64, the limit in xz had
to be no more than 4085 MiB. Some safety margin is good though.

This is hack but it should be useful when running 32-bit xz on
a 64-bit kernel that gives full 4 GiB address space to xz.
Hopefully this is enough to solve this:

https://bugzilla.redhat.com/show_bug.cgi?id=1196786

FreeBSD has a patch that limits the result in tuklib_physmem()
to SIZE_MAX on 32-bit systems. While I think it's not the way
to do it, the results on --memlimit-compress have been good. This
commit should achieve practically identical results for compression
while leaving decompression and tuklib_physmem() and thus
lzma_physmem() unaffected.

5 years agoxz: Set the --flush-timeout deadline when the first input byte arrives.
Lasse Collin [Sun, 26 Jan 2020 18:53:25 +0000 (20:53 +0200)] 
xz: Set the --flush-timeout deadline when the first input byte arrives.

xz --flush-timeout=2000, old version:

  1. xz is started. The next flush will happen after two seconds.
  2. No input for one second.
  3. A burst of a few kilobytes of input.
  4. No input for one second.
  5. Two seconds have passed and flushing starts.

The first second counted towards the flush-timeout even though
there was no pending data. This can cause flushing to occur more
often than needed.

xz --flush-timeout=2000, after this commit:

  1. xz is started.
  2. No input for one second.
  3. A burst of a few kilobytes of input. The next flush will
     happen after two seconds counted from the time when the
     first bytes of the burst were read.
  4. No input for one second.
  5. No input for another second.
  6. Two seconds have passed and flushing starts.

5 years agoxz: Move flush_needed from mytime.h to file_pair struct in file_io.h.
Lasse Collin [Sun, 26 Jan 2020 18:19:19 +0000 (20:19 +0200)] 
xz: Move flush_needed from mytime.h to file_pair struct in file_io.h.

5 years agoxz: coder.c: Make writing output a separate function.
Lasse Collin [Sun, 26 Jan 2020 12:49:22 +0000 (14:49 +0200)] 
xz: coder.c: Make writing output a separate function.

The same code sequence repeats so it's nicer as a separate function.
Note that in one case there was no test for opt_mode != MODE_TEST,
but that was only because that condition would always be true, so
this commit doesn't change the behavior there.

5 years agoxz: Fix semi-busy-waiting in xz --flush-timeout.
Lasse Collin [Sun, 26 Jan 2020 12:13:42 +0000 (14:13 +0200)] 
xz: Fix semi-busy-waiting in xz --flush-timeout.

When input blocked, xz --flush-timeout=1 would wake up every
millisecond and initiate flushing which would have nothing to
flush and thus would just waste CPU time. The fix disables the
timeout when no input has been seen since the previous flush.

5 years agoxz: Refactor io_read() a bit.
Lasse Collin [Sun, 26 Jan 2020 11:47:31 +0000 (13:47 +0200)] 
xz: Refactor io_read() a bit.

5 years agoxz: Update a comment in file_io.h.
Lasse Collin [Sun, 26 Jan 2020 11:37:08 +0000 (13:37 +0200)] 
xz: Update a comment in file_io.h.

5 years agoxz: Move the setting of flush_needed in file_io.c to a nicer location.
Lasse Collin [Sun, 26 Jan 2020 11:27:51 +0000 (13:27 +0200)] 
xz: Move the setting of flush_needed in file_io.c to a nicer location.

5 years agoxz: Enable Capsicum sandboxing by default if available.
Lasse Collin [Wed, 5 Feb 2020 17:56:09 +0000 (19:56 +0200)] 
xz: Enable Capsicum sandboxing by default if available.

It has been enabled in FreeBSD for a while and reported to work fine.

Thanks to Xin Li.

5 years agoRename unaligned_read32ne to read32ne, and similarly for the others.
Lasse Collin [Tue, 31 Dec 2019 20:41:45 +0000 (22:41 +0200)] 
Rename unaligned_read32ne to read32ne, and similarly for the others.

5 years agoRename read32ne to aligned_read32ne, and similarly for the others.
Lasse Collin [Mon, 30 Dec 2019 22:29:48 +0000 (00:29 +0200)] 
Rename read32ne to aligned_read32ne, and similarly for the others.

Using the aligned methods requires more care to ensure that
the address really is aligned, so it's nicer if the aligned
methods are prefixed. The next commit will remove the unaligned_
prefix from the unaligned methods which in liblzma are used in
more places than the aligned ones.