99be3e790d
Add pregenerated bz_version.h
2021-06-12 19:47:29 +01:00
d76e685c7a
[*] import/export api macros were omega scuffed
2021-06-12 19:11:24 +01:00
Micah
bf905ea225
Merge branch 'master' into 'master'
...
license and version print should output to stdout and exit with code 0
See merge request federicomenaquintero/bzip2!36
2021-05-31 19:53:03 +00:00
Micah
4c7533f434
Merge branch 'master' into 'master'
...
Minor man page update dealing with bzip2/gzip differences
See merge request federicomenaquintero/bzip2!38
2021-05-31 19:51:38 +00:00
imartisko
f2bbd4e5d8
Minor man page update dealing with bzip2/gzip differences
2021-05-31 19:51:38 +00:00
Micah
775be3c894
Merge branch 'skip_tests_if_no_app' into 'master'
...
APP tests are disabled if app is not built
See merge request federicomenaquintero/bzip2!37
2021-05-24 01:35:02 +00:00
Dmitry Kargin
8e70ae1957
APP tests are disabled if app is not built
2020-11-08 19:05:44 +03:00
Micah
6211b6500c
Merge branch 'win' into 'master'
...
Fix windows compile failure and add CI
See merge request federicomenaquintero/bzip2!35
2020-09-11 21:11:13 +00:00
Isuru Fernando
e37cc75e84
Add VS 2019
2020-09-06 22:34:53 -05:00
Isuru Fernando
95f6895804
Add appveyor
2020-09-06 22:34:53 -05:00
Isuru Fernando
f85224356b
Use generator expressions for target file
2020-09-06 22:34:22 -05:00
Federico Mena Quintero
15255b553e
Merge branch 'cmake-install-symlinks' into 'master'
...
Cmake install bunzip, bzcat, & shellscripts
See merge request federicomenaquintero/bzip2!28
2020-08-11 00:45:27 +00:00
Micah Snyder
17a7a0ebfa
Gitlab CI: Test cmake build on Debian
...
Was seeing ModuleNotFoundError: No module named 'skbuild' when using
pip3 to install cmake on Ubuntu 16. Installing with apt-get may resolve
the issue, and switching to use debian:testing to be certain a newer
version of cmake is available.
2020-02-20 21:17:33 -05:00
Micah Snyder
b715457c1e
CMake Improvements: Fix ENABLE_STATIC_LIB option, and renames static library with _static suffix to differentiate between shared library .lib file on Windows.
2020-02-19 22:05:10 -05:00
Micah Snyder
b850a926ba
Meson Improvements: Replaces use of add_project_arguments with executable()'s c_args option, providing a list of args that vary depending on the host OS. Also bumps minimum meson version from 0.48 to 0.50, to alleviate warnings about using features introduced in 0.50.
2019-10-27 19:07:35 -04:00
Micah Snyder
2c8c975075
CMake Improvements: reverted use of TARGET_FILE_SUFFIX because it requires CMake 3.15 or newer, which is not available on all test systems.
2019-10-27 16:26:43 -04:00
Micah Snyder
0023ecfbdb
CMake improvements: copy/install bunzip.exe, bzcat.exe to correct directory (eg build\Release for a Release build).
2019-10-27 15:54:26 -04:00
Micah Snyder
095262feae
CMake improvements: Replaces add_definitions with target_compile_definitions for bzip2, bzip2recover targets.
2019-10-27 13:33:17 -04:00
Rikard Gynnerstedt
65179284ce
license and version print should output to stdout and exit with code 0
2019-10-24 12:48:57 +02:00
Micah Snyder
bae2dfa931
Changes CMake duplicate install targets (bunzip, etc) to symlinks instead of file copies.
2019-09-14 22:58:37 -04:00
Micah Snyder
1de04548d0
Improves CMake formatting, removing unnecessary quotes and fixing indentation.
2019-09-14 21:19:35 -04:00
Micah Snyder
b52681fab6
Moves BZ_UNIX, BZ_LCCWIN32 defines out of bzip2.c and bzip2recover.c and into the build tooling (cmake, meson, and nmake).
2019-09-14 18:51:17 -04:00
Micah Snyder
d0dae15260
Removing hardcoded BZ_UNIX definition which broke the build on Windows.
2019-09-14 18:51:17 -04:00
Micah Snyder
af3ab6c58f
CMake build tooling improvement: Adds install for bunzip, bzcat copies of bzip2, as well as shell-scripts bzdiff, bzgrep, bzmore, and their alternately named copies (not available for Windows).
2019-09-14 18:51:17 -04:00
Federico Mena Quintero
b7a6722911
Merge branch 'meson-warncflags' into 'master'
...
Port WARNCFLAGS of CMakeLists.txt to meson.build
See merge request federicomenaquintero/bzip2!34
2019-09-10 17:31:00 +00:00
Federico Mena Quintero
cc1d5a784a
Merge branch 'meson-install-binary-links' into 'master'
...
Meson: install symlinks or copies of binaries
See merge request federicomenaquintero/bzip2!26
2019-09-10 17:26:20 +00:00
Chih-Hsuan Yen
4a8a9fd228
Port WARNCFLAGS of CMakeLists.txt to meson.build
...
And let CMake determine which compiler warning flags are available as
suggested in [1].
[1] https://gitlab.com/federicomenaquintero/bzip2/merge_requests/19#note_206149857
2019-09-05 09:50:06 +08:00
Jordan Petridis
3eff339237
Merge branch 'apt-get' into 'master'
...
CI: Use apt-get rather than apt
See merge request federicomenaquintero/bzip2!33
2019-07-22 09:26:51 +00:00
Роман Донченко
20201212ab
CI: Use apt-get rather than apt
...
apt does not have a stable interface, as it will itself warn about when
run non-interactively.
2019-07-15 20:57:56 +00:00
Jordan Petridis
ef31e2d0ba
Merge branch 'distutils' into 'master'
...
CI: Install python3-distutils on Debian testing
See merge request federicomenaquintero/bzip2!31
2019-07-15 02:28:23 +00:00
Роман Донченко
60faa3a33c
CI: Install python3-distutils on Debian testing
...
Debian testing recently updated to a new version of meson, which fails
to find Python unless distutils is also installed. On Debian, distutils
is in a separate package from Python itself, so we need to install it
separately.
2019-07-14 20:47:20 +00:00
Federico Mena Quintero
030da03add
Merge branch 'cmake-cxx' into 'master'
...
CMake: remove C++ option checking
See merge request federicomenaquintero/bzip2!25
2019-07-10 19:50:39 +00:00
Mark Wielaard
812a898b76
Accept as many selectors as the file format allows.
...
But ignore any larger than the theoretical maximum, BZ_MAX_SELECTORS.
The theoretical maximum number of selectors depends on the maximum
blocksize (900000 bytes) and the number of symbols (50) that can be
encoded with a different Huffman tree. BZ_MAX_SELECTORS is 18002.
But the bzip2 file format allows the number of selectors to be encoded
with 15 bits (because 18002 isn't a factor of 2 and doesn't fit in
14 bits). So the file format maximum is 32767 selectors.
Some bzip2 encoders might actually have written out more selectors
than the theoretical maximum because they rounded up the number of
selectors to some convenient factor of 8.
The extra 14766 selectors can never be validly used by the decompression
algorithm. So we can read them, but then discard them.
This is effectively what was done (by accident) before we added a
check for nSelectors to be at most BZ_MAX_SELECTORS to mitigate
CVE-2019-12900.
The extra selectors were written out after the array inside the
EState struct. But the struct has extra space allocated after the
selector arrays of 18060 bytes (which is larger than 14766).
All of which will be initialized later (so the overwrite of that
space with extra selector values would have been harmless).
2019-07-10 14:39:32 -05:00
Dylan Baker
ab22254684
Meson: install symlinks or copies of binaries
...
On most system symlinks are fine, but on windows symlinks are tricky at
best, or unsupported for older versions of windows. To avoid those
problems we'll just copy the binary if the host or build machine is
windows. This uses a small helper python script to make this all
easier to use and understand.
2019-07-01 14:53:21 -07:00
Rolf Eike Beer
91a3b6d614
CMake: remove needless checks
2019-06-27 08:52:45 +02:00
Rolf Eike Beer
1e6d325fee
CMake: remove C++ option checking
...
There is no C++ code.
2019-06-27 08:39:02 +02:00
Federico Mena Quintero
78aa9c8623
Merge branch 'version-header' into 'master'
...
(#2 ): Generate a header file with the version number
Closes #2
See merge request federicomenaquintero/bzip2!24
2019-06-25 23:59:30 +00:00
Federico Mena Quintero
4c6ef278dc
( #2 ): Generate a header file with the version number
...
Fixes https://gitlab.com/federicomenaquintero/bzip2/issues/2
2019-06-25 18:28:19 -05:00
Federico Mena Quintero
d9a99adca7
Update NEWS
2019-06-25 13:38:19 -05:00
Colin Phipps
31bfafca67
bzip2recover: Refuse to overwrite existing output files
...
This comes from
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=56386
but is modified to use the more or less the same fopen_output_safely()
from bzip2.c.
2019-06-25 13:36:12 -05:00
Federico Mena Quintero
b1446b53ed
NEWS - Link to the Red Hat bug for CVE-2016-3189
2019-06-25 12:35:50 -05:00
Federico Mena Quintero
e275cecc0f
NEWS - Fix attribution for the bzip2recover strcpy() patch
2019-06-25 12:33:59 -05:00
Federico Mena Quintero
53766110d1
docs/RELEASING.md - start a release checklist
2019-06-21 17:55:07 -05:00
Federico Mena Quintero
9eac831b5e
Bump library revision
2019-06-21 17:55:07 -05:00
Federico Mena Quintero
277548b072
Sync versioning schemes between Meson and CMake
...
Use a computed soversion of 1.
This keeps compatibility with the version in the SONAME from openSUSE
and Fedora, which fixed the botched soname in bzip2's historical
tarballs.
See this post for details:
https://people.gnome.org/~federico/blog/preparing-the-bzip2-107-release.html
2019-06-21 17:55:07 -05:00
Federico Mena Quintero
29a935d589
Merge branch 'meson-macos' into 'master'
...
meson: Fix build on macos
Closes #18
See merge request federicomenaquintero/bzip2!22
2019-06-21 17:22:27 +00:00
Dylan Baker
5cd6c8f2b2
meson: Fix build on macos
...
There is a bug in meson's Compiler.has_function_attribute('visibility'),
which results in it incorrectly returning False on macos. This causes
meson to not defined BZ_EXTERN, but the gnu_symbol_visibility results in
hidden by default symbols. This means that there are no visible symbols
in libbz2 at all and linking naturally fails.
Fixes #18
2019-06-21 09:16:04 -07:00
Federico Mena Quintero
a51fb7324e
Merge branch 'remove-autotools'
2019-06-20 11:39:25 -05:00
Federico Mena Quintero
1660afceba
NEWS - link to an alternate construction of the bzip2 repository
2019-06-20 11:38:17 -05:00
Federico Mena Quintero
2e006d78c6
Add a NEWS file with the changes in 1.0.7
2019-06-20 11:22:55 -05:00