1
0
mirror of https://git.tukaani.org/xz.git synced 2025-02-17 14:08:12 +00:00

2515 Commits

Author SHA1 Message Date
Christoph Junghans
a2d66de54f
ci: set -e on netbsd
(cherry picked from commit 21b02dd128cf9e8c76325ec124f70381862dcf19)
2024-09-06 18:51:57 +03:00
Christoph Junghans
1bdc70176b
ci: actually fail on FreeBSD
Without "set -e" the job will always be successful.

See vmactions/freebsd-vm#72

(cherry picked from commit 8641f0c24c041136670c975b23408184b45431bc)
2024-09-06 18:51:57 +03:00
Andrew Murray
4132277103
Updated actions
Closes: https://github.com/tukaani-project/xz/pull/115
(cherry picked from commit ef616683ef11f11ffdfbe0624da33905e28a70f9)
2024-09-06 18:51:57 +03:00
Sam James
1575414636
ci: add po4a
(cherry picked from commit 57b440d316da9ac9cb312ee7e6890f5382556f10)
2024-09-06 18:51:57 +03:00
Sam James
c3e293037e
ci: add Solaris
Inspired by 3f2a38b011.

It runs on Solaris 5.11 via a VirtualBox VM.

(cherry picked from commit 08cdf4be9a673d78efe393b53dd73bf43c81dd95)
2024-09-06 18:51:56 +03:00
Sam James
dc6b6011b4
xz: list: suppress -Wformat-nonliteral for Solaris
Solaris' GCC can't understand that our use is fine, unlike modern compilers:
```
list.c: In function 'print_totals_basic':
list.c:1191:4: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
  uint64_to_str(totals.files, 0));
  ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

It's presumably because of older gettext missing format attributes.

This is with `gcc (GCC) 7.3.0`.

(cherry picked from commit b69768c8bd1a34fde311935c551d061ba52d9a3f)
2024-09-06 18:51:56 +03:00
Lasse Collin
7ce2ac795a
Update THANKS
(cherry picked from commit b8d134e61ede9f4a296226d97f5c20721fb4e8e2)
2024-09-06 18:51:49 +03:00
Lasse Collin
3ec664d3f6 Bump version and soname for 5.6.2 v5.6.2 2024-05-29 18:03:51 +03:00
Lasse Collin
3cc0aa702e Add NEWS for 5.6.2 2024-05-29 18:03:04 +03:00
Lasse Collin
526d3f7f2c Add NEWS for 5.4.7 2024-05-29 18:03:04 +03:00
Lasse Collin
660b09279e Add NEWS for 5.2.13 2024-05-29 18:03:04 +03:00
Lasse Collin
7d76282dac Translations: Run po4a/update-po
Now the files are in the new formatting without source file
line numbers. Future updates should keep the diffs much smaller.
2024-05-29 17:47:47 +03:00
Lasse Collin
4470c3f7d8 Translations: Run "make -C po update-po"
In the past this wasn't done before releases; the Git repository
just contained the files from the Translation Project. But this
way it is clearer when comparing release tarballs against the
Git repository. In future releases this might no longer be necessary
within a stable branch as the .po files won't change so easily anymore
when creating a tarball.
2024-05-29 17:47:47 +03:00
Lasse Collin
33b8a85fac Build: Update po/*.po files only when needed
When po/xz.pot doesn't exist, running "make" or "make dist" will
create it. Then the .po files will be updated but only if they
actually would change more than the POT-Creation-Date line.
Then the .gmo files would be generated from the .po files.
This is the case before and after this commit.

However, "make dist" and thus "make mydist" did a forced update
to the files, updating them even if the only change was the
POT-Creation-Date line. This had pros and cons: It made it clear
that the .po file really is in sync with the recent strings in
the package. On the other hand, it added noise in form of changed
files in the source tree and distribution tarballs. It can be
ignored with something like "diff -I'^"POT-Creation-Date: '" but
it's still a minor annoyance *if* there's not enough value in
having the most recent timestamp.

Setting DIST_DEPENDS_ON_UPDATE_PO = no means that such forced
update won't happen in "make dist" anymore. However, the "mydist"
target will use xz.pot-update target which is the same target that
is run when xz.pot doesn't exist at all yet. Thus "mydist" will
ensure that the translations are up to date, without noise from
changes that would affect only the POT-Creation-Date line.

Note that po4a always uses msgmerge with --update, so POT-Creation-Date
in the man page translations is never the only change in .po files.
In that sense this commit makes the message translations behave more
similarly to the man page translations.

Distribution tarballs will still have non-reproducible POT-Creation-Date
in po/xz.pot and po4a/xz-man.pot but those are just two files. Even they
could be made reproducible from a Git timestamp if desired.

(cherry picked from commit 9284f1aea31f0eb23e2ea72f7218b271e2234762)
2024-05-29 17:31:42 +03:00
Lasse Collin
09daebd66b po4a/update-po: Disable wrapping in .pot and .po files
The .po files from the Translation Project come with unwrapped
strings so this matches it.

This may reduce the noise in diffs too. When the beginning of
a paragraph had changed, the rest of the lines got rewrapped
in msgsid. Now it's just one very long line that changes when
a paragraph has been edited.

The --add-location=file option was removed as redundant. The line
numbers don't exist in the .pot file due to --porefs file and thus
they cannot get copied to the .po files either.

(cherry picked from commit 4beba1cd62d7f8f7a6f1e899b68292d94c53b599)
2024-05-28 21:26:53 +03:00
Lasse Collin
51ad72dae4 Update contact info in README
(cherry picked from commit b14c130a58a649f9a73392eeb122cb252327c569)
2024-05-28 18:41:35 +03:00
Lasse Collin
18463917f9 Translations: Use --package-name=xz-man with po4a
This is to match reality. See the added comment.

(cherry picked from commit 75f5f2e014b0ee646963f36bc6a9c840fb272353)
2024-05-28 17:23:10 +03:00
Lasse Collin
26bbcb13cd Translations: Omit --package-name from po/Makevars
This is closer to the reality in the po/*.po files.

(cherry picked from commit eb217d016cfbbba1babc19a61095b3ea25898af6)
2024-05-28 17:23:10 +03:00
Lasse Collin
c35ee804b8 Translations: Omit man page line numbers from .pot and .po files
(cherry picked from commit 9114267038deaecf4832a5cacb5acbe6591ac839)
2024-05-28 12:21:22 +03:00
Lasse Collin
0f4429d47f Translations: Use the xgettext option --add-location=file
(cherry picked from commit 093490b58271e9424ce38a7b1b38bcf61b9c86c6)
2024-05-28 12:21:22 +03:00
Lasse Collin
a93e2c2d1d Translations: Use the msgmerge option --add-location=file
This way the PO file diffs are less noisy but the locations of the
strings are still present at file level, just without line numbers.

The option is available since gettext 0.19 (2014).
configure.ac requires 0.19.6.

(cherry picked from commit fccebe2b4fd513488fc920e4dac32562ed3c7637)
2024-05-28 12:21:22 +03:00
Lasse Collin
d438989559 Build: Use $(SHELL) instead of sh to run scripts in Makefile.am
(cherry picked from commit f361d9ae85707a87eb28db400eb7229cec103d58)
2024-05-28 12:21:22 +03:00
Lasse Collin
5781414b6e Translations: Change the home page URLs in man page translations
Since the source strings have changed, these would get marked as
fuzzy and the original string would be used instead. The original
and translated strings are identical in this case so it wouldn't
matter. But patching the translations helps still because then
po4a will show the correct translation percentage.

(cherry picked from commit a26dece34793a09aac2476f954d162d03e9cf62b)
2024-05-23 18:18:05 +03:00
Lasse Collin
3670e0616e CMake: Add manual support for 32-bit x86 assembly files
One has to pass -DENABLE_X86_ASM=ON to cmake to enable the
CRC assembly code. Autodetection isn't done. Looking at
CMAKE_SYSTEM_PROCESSOR might not work as it comes from uname
unless cross-compilation is done using a CMake toolchain file.

On top of this, if the code is run on modern processors that support
the CLMUL instruction, then the C code should be faster (but then
one should also be using a x86-64 build if possible).

(cherry picked from commit 24387c234b4eed1ef9a7eaa107391740b4095568)
2024-05-23 15:40:51 +03:00
Lasse Collin
c1b001b09e CMake: Rename USE_DOXYGEN to ENABLE_DOXYGEN
It's more consistent with the other option() uses.

(cherry picked from commit 0fb3c9c3f684f5a25bd425ed079a20a79f0c969d)
2024-05-23 15:40:51 +03:00
Lasse Collin
7213fe39c7 Use more confident language in COPYING
(cherry picked from commit 62733592a1cc6f0b41f46ef52e06d1a6fe1ff38a)
2024-05-23 11:37:06 +03:00
Lasse Collin
15358be94a Add SPDX license identifiers to files under tests/ossfuzz
(cherry picked from commit 9ae2ebc1e504a1814b0788de95fb5c58c0328dde)
2024-05-23 11:37:06 +03:00
Lasse Collin
1aa92c7ffd Add SPDX license identifier to .codespellrc
(cherry picked from commit 9000d70eb9815bd7f43ffddc1c3316c507aa0e05)
2024-05-23 11:37:06 +03:00
Lasse Collin
3c7e400fdc Move entries po4a/.gitignore to the top level .gitignore
The po4a directory is in EXTRA_DIST and thus all files there
are included in the package. .gitignore doesn't belong in the
package so keep that file out of the po4a directory.

(cherry picked from commit 903c16fcfa5bfad0cdb2a7383d941243bcb12e76)
2024-05-23 11:37:06 +03:00
Lasse Collin
8a99272d4a CMake: Add comments
(cherry picked from commit 9d997d6f9d4f042412e45c7b7a23a14ad2e4f9aa)
2024-05-23 11:36:05 +03:00
Lasse Collin
c35259c9e2 CMake: Remove the note that some tests aren't run
They are now in the common build configurations.

(cherry picked from commit d35368b33e54bad2f566df99fac29ffea38e34de)
2024-05-23 11:36:05 +03:00
Lasse Collin
30982a2153 CMake: Add support for test_files.sh
(cherry picked from commit dc232d584619b2819a9c52d6ad5d8b5d56b392ba)
2024-05-23 11:36:05 +03:00
Lasse Collin
3a8f81e0ad Tests: Make test_files.sh more flexible
Add a new optional argument to specify the directory of the xz and
xzdec executables.

If ../config.h doesn't exist, assume that all encoders and decoders
are available.

(cherry picked from commit a7e9230af9d1f87f474fe38886eb977d4149dc9b)
2024-05-23 11:36:05 +03:00
Lasse Collin
0644675c82 CMake: Add support for test_compress.sh tests
(cherry picked from commit b40e6efbb48d740b9b5b303e59e344801cbb5bd8)
2024-05-23 11:36:05 +03:00
Lasse Collin
dcc02a6ca0 Tests: Make test_compress.sh more flexible
Add a new optional second argument: directory of the xz and xzdec
executables. This is need with the CMake build where the binaries
end up in the top-level build directory.

If ../config.h doesn't exist, assume that all encoders and decoders
are available. This will make this script usable from CMake in the
most common build configuration.

NOTE: Since the existence of ../config.h is checked, the working
directory of the test script must be a subdir in the build tree!
Otherwise ../config.h would look outside the build tree.

Use the default check type instead of forcing CRC32 or CRC64.
Now the script doesn't need to check if CRC64 is available.

(cherry picked from commit ac3222d2cb1ff3a15eb6d58f9ea9bc78e8bc3bb2)
2024-05-23 11:36:05 +03:00
Lasse Collin
c761b7051f CMake: Prepare to support the test_*.sh tests
This is a bit hacky since the scripts grep config.h to know which
features were built but the CMake build doesn't create config.h.
So instead those test scripts will be run only when all relevant
features have been enabled.

(cherry picked from commit 006040b29c83104403621e950ada0c8956c56b3d)
2024-05-23 11:36:05 +03:00
Lasse Collin
a71bc2d75b Tests: test_suffix.sh: Add a comment
(cherry picked from commit 6167607a6ea72fb74eefb943c4566e3cab528cd2)
2024-05-23 11:36:05 +03:00
Lasse Collin
8fda5ce872 Fix typos
Thanks to xx on #tukaani.

(cherry picked from commit 4e9023857d287f624562156b60dc23d2b64c0f10)
2024-05-23 11:36:05 +03:00
Lasse Collin
2729079bcb liblzma: Fix white space
Thanks to xx on #tukaani.

(cherry picked from commit b14d08fbbc254485ace9ccfe7908674f608a62ae)
2024-05-23 11:36:05 +03:00
Lasse Collin
a289c4dfeb xz: Document the static function get_chains_memusage()
(cherry picked from commit 142e670a413a7bce1a2647f1cf1f33f8ee2dbe88)
2024-05-23 11:28:20 +03:00
Lasse Collin
6f0db31713 xz: Rename filters_memusage_max() to get_chains_memusage()
(cherry picked from commit 78e984399a64bfee5d11e7308e0bdbc1006db2ca)
2024-05-23 11:28:20 +03:00
Lasse Collin
d7e2bf7e2d xz: Rename filter_memusages to chains_memusages
(cherry picked from commit 54c3db0a83d3e67d89aba92a0957f2dce9b111a7)
2024-05-23 11:28:20 +03:00
Lasse Collin
58f200b6d1 xz: Simplify the memory usage scaling code
This is closer to what it was before the --filtersX support was added,
just extended to support for scaling all filter chains. The method
before this commit was an extended version of the original too but
it was done in a more complex way for no clear reason. In case of
an error, the complex version printed fewer informative messages
(a good thing) but it's not a sigificant benefit.

In the limit is too low even for single-threaded mode, the required
amount of memory is now reported like in 5.4.x instead of like in
5.5.1alpha - 5.6.1 which showed the original non-scaled usage. It
had been a FIXME in the old code but it's not clear what message
makes the most sense.

Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a
(cherry picked from commit d9e1ae79ec90d6a7eafeaceaf0ece4f0c83d4417)
2024-05-23 11:28:20 +03:00
Lasse Collin
41bdc9fa5c xz: Edit comments
(cherry picked from commit 0ee56983d198b776878432703de664049b1be32e)
2024-05-23 11:28:20 +03:00
Lasse Collin
52e40c1912 xz: Rename chain_idx to chain_num
(cherry picked from commit ec82a49c3553f7206104582dbfb8b64fa433b491)
2024-05-23 11:28:20 +03:00
Lasse Collin
8a01963331 xz: Edit coding style
(cherry picked from commit a731a6993c34bbbd55abaf9c166718682b1da24f)
2024-05-23 11:28:20 +03:00
Lasse Collin
e3ad7eda74 xz: Edit comments
Fixes: 5f0c5a04388f8334962c70bc37a8c2ff8f605e0a
(cherry picked from commit 32eb176b89243fce3112347fe43a8ad14a9fd2be)
2024-05-23 11:28:20 +03:00
Lasse Collin
09cabae2ab xz: Fix grammar in a comment
Fixes: cb3111e3ed84152912b5138d690c8d9f00c6ef02
(cherry picked from commit b90339f4daa510d2b1b8c550f855a99667f1d004)
2024-05-23 11:28:20 +03:00
Lasse Collin
c10b66fbf9 xz: Rename filter_memusages to encoder_memusages
(cherry picked from commit 4c0bdaf13d651b22ba13bd93f8379724d6ccdc13)
2024-05-23 11:28:20 +03:00
Lasse Collin
9132ce3564 xz: Edit coding style
(cherry picked from commit b54aa023e0ec291b06e976e5f094ab0549e7b09b)
2024-05-23 11:28:20 +03:00