Dmitry Kalinkin [Mon, 22 Jun 2020 00:30:12 +0000 (20:30 -0400)]
zzip/CMakeLists.txt: fix for macOS
Fix for APPLE where dylib goes in the end
This is hardcoded here:
https://gitlab.kitware.com/cmake/cmake/-/blob/
742ff97f809410055b22405a6b5728e72c458683/Source/cmGeneratorTarget.cxx#L5890-5903
Also a related thread:
https://cmake.org/pipermail/cmake/2013-February/053605.html
Guido U. Draheim [Sun, 4 Aug 2019 16:55:17 +0000 (18:55 +0200)]
Merge pull request #79 from pks-t/pks/test-errors
Improve cross-platform compatibility of test suite
Guido U. Draheim [Sun, 4 Aug 2019 16:53:51 +0000 (18:53 +0200)]
Merge pull request #78 from pks-t/pks/cmake-fixes
CMake fixes
Guido U. Draheim [Sun, 4 Aug 2019 16:51:16 +0000 (18:51 +0200)]
Merge pull request #76 from pks-t/pks/python-fixes
Smallish Python fixes
Guido U. Draheim [Sun, 4 Aug 2019 11:05:37 +0000 (13:05 +0200)]
Merge pull request #80 from pks-t/pks/python3
Python 3 support
Patrick Steinhardt [Thu, 1 Aug 2019 07:50:22 +0000 (09:50 +0200)]
azure: install Python3 xmlreporting
With recent changes CMake is now favoring Python 3 instead of Python 2.
As Ubuntu has both versions of the interpreter installed, Azure has thus
started to use Python 3, but will fail due to a missing dependency on
xmlreporting when executing tests. This is caused by us installing
xmlreporting for Python 2, only.
As there is no python3-xmlreporting package available in Ubuntu, install
python3-pip instead and use it to install unittest-xml-reporting.
Patrick Steinhardt [Thu, 1 Aug 2019 06:36:30 +0000 (08:36 +0200)]
cmake: use either Python 2 or Python 3
Now that all Python scripts are compatible with Python 2 and Python 3,
we can instruct CMake to not care for which Python interpreter is
available. Thus, convert to use the newer FindPython package without
specifying a version.
Patrick Steinhardt [Thu, 23 May 2019 21:01:44 +0000 (23:01 +0200)]
docs: do not inherit str for Match
Instead of inheriting str, we can simply implement `__repr__` to return
a string representation of the pattern itself. This fixes compatibility
with Python 3, which throws when executing `str.__init__`.
Patrick Steinhardt [Thu, 23 May 2019 20:58:38 +0000 (22:58 +0200)]
docs: call `replace` directory on string object
In Python 3, the function string.replace has been removed in favor of
using replace on the string class directly. As Python 2.7 already
supports this variant, convert all instances of the old way to call
replace on the object.
Patrick Steinhardt [Thu, 23 May 2019 20:37:22 +0000 (22:37 +0200)]
docs: convert calls to `has_key` function
The `has_key` function for dictionaries has been removed with Python 3
in favor of the new `in` keyword. Convert all uses of the old function
in favor of the new to improve compatibility with Python 3.
Patrick Steinhardt [Thu, 23 May 2019 20:37:01 +0000 (22:37 +0200)]
docs: use print function for compatibility with Python 3
Another quite visible change with Python 3 is that the old `print`
statement has been replaced with a function. To ease migration to the
newer way, Python 2.7 provides a compatibility module "print_function".
Convert all code in docs to use the new function syntax.
Patrick Steinhardt [Thu, 23 May 2019 20:20:23 +0000 (22:20 +0200)]
docs: exception syntax compatibility with Python 3
Since Python 2.7, there exists a new syntax to catch errors: the old way
of saying `except IOError, error` has been replaced with `except IOError
as e`. The old syntax has finally been removed in Python 3, but as we're
still using it in zziplib newer interpreters will raise a parsing error.
Convert to use the new syntax to improve compatibility with Python 3.
Patrick Steinhardt [Thu, 23 May 2019 20:15:31 +0000 (22:15 +0200)]
docs: more carefully handle relative module imports
The way how relative module imports are handled has changed with Python
3, causing it to throw exceptions when we try to import zzipdoc.*
modules.
Fix this by specifying the base module from which we import fo fix
compatibility with Python 3.
Patrick Steinhardt [Thu, 1 Aug 2019 08:08:21 +0000 (10:08 +0200)]
test: use XMLTestRunner output parameter
Instead of manually opening the output file for the XMLTestRunner one
can simply specify the output file by passing its path as "output"
parameter.
This fixes encoding issues with Python 3.
Patrick Steinhardt [Wed, 22 May 2019 19:52:52 +0000 (21:52 +0200)]
test: specify subprocess encoding to be UTF-8
One of the most important and user-visible changes in Python 3 was that
when reading strings from some , one always needs to specify the
encoding lest the dreaded UnicodeException would occur if there were any
characters outside of the ASCII range. In the test suite, we're using a
subprocess taht communicates with the shell, but we do not specify the
encoding of both its stdout and stderr previous to reading them.
Explicitly decode both their output and error streams to UTF-8 to avoid
any exceptions raised by Python 3.
Patrick Steinhardt [Wed, 22 May 2019 19:22:01 +0000 (21:22 +0200)]
test: basestring compatibility with Python 3
In Python 2, strings were represented by the class basestring, which has
been removed in Python 3 in favor of the str class. To keep
compatibility with both versions of Python, let's alias basestring to
str if basestring is not available.
Patrick Steinhardt [Wed, 22 May 2019 19:21:43 +0000 (21:21 +0200)]
test: use Python3-compatible way to specify octal numbers
Support for zero-prefixed octal numbers ("0755") has been removed in
Python 3 in favor of the zero-oh-prefix ("0o755"). As the latter has
been introduced in Python 2.6, we can safely switch all occurrences of
the former with the new way to improve compatibility with Python 3.
Patrick Steinhardt [Wed, 22 May 2019 19:21:34 +0000 (21:21 +0200)]
test: avoid use of xrange for compatibility
Back in Python 2 days, there were two functions `range` and `xrange`.
While `range` returned a list, `xrange` would return a generator and
thus be the more efficient variant if a big range needs to be handled.
With Python 3, the `xrange` function was removed in favor of always
returning a generator for `range`.
Convert all uses of `xrange` to `range`. While this may be less
efficient in some places for old Python versions, their support is going
to be dropped in 2020 anyway. Also, `xrange` is only ever used in the
test suite.
Patrick Steinhardt [Wed, 22 May 2019 19:21:16 +0000 (21:21 +0200)]
test: StringIO compatibility with Python 3
With Python 3, StringIO has been moved from the "cStringIO" module to
the "io" module. Use a try-catch block to intercept ImportErrors and
fall back to the new module to support both Python 2 and Python 3.
Patrick Steinhardt [Wed, 22 May 2019 19:20:52 +0000 (21:20 +0200)]
test: urllib compatibility with Python 3
In Python 3, the functions `quote_plus` and `urlretrieve` have been
moved from urllib to urllib.parse and urllib.request, respectively. To
provide compatibility with the old and new module layouts, use a
try-catch block and fall back to the new layout if an ImportError was
raised.
Furthermore, do not hand-code `urlretrieve` functionality with
`urlopen` to avoid additional compatibility issues.
Patrick Steinhardt [Wed, 22 May 2019 11:24:05 +0000 (13:24 +0200)]
tests: loosen expectations for external info-zip tool
In our test suite, we're verifying some archives by utilizing the
unzip(1) program provided by info-zip.org. Due to changes to info-zip,
our test case 59770 may fail on some systems as we expect it to spit out
error messages in a specific format. Loosen those restrictions to make
the test pass on more systems.
Patrick Steinhardt [Wed, 22 May 2019 09:49:53 +0000 (11:49 +0200)]
test: fix error message tests on non-glibc based systems
Our tests makes strict assumptions on the error messages generated by
strerror(3P), but those aren't in any way required to have a special
text. This works just fine on glibc based systems, but causes us to
trigger asserts on other systems like e.g. musl based ones.
Fix this by introducing a new `assertErrorMessage` method. It'll take as
inputs the observed error message as well as the error code we expect
and then use `os.strerror` to compute the expected message. Like this,
we're not dependent anymore on how the system represents those error
messages but generate the expected ones on the fly.
Patrick Steinhardt [Tue, 21 May 2019 12:26:49 +0000 (14:26 +0200)]
test: zziptests: correctly honor bindir option
While there is a "--bindir" option added to the option parser of
zziptests.py, we never update the global "bindir" variable to the new
value. Do so to fix it not getting honored.
Patrick Steinhardt [Tue, 21 May 2019 12:24:49 +0000 (14:24 +0200)]
docs: dbk2man: fix deprecated way of checking for `None`
In oldish versions of Python, it was possible to check for `None` by
simply saying `if not X`, while the newer way would explicitly check `if
X is None`. Use the latter way of asking for None, which has been
supported at least since Python 2.6.
Patrick Steinhardt [Tue, 21 May 2019 19:40:10 +0000 (21:40 +0200)]
cmake: do not modify test file in source dir
When doing out-of-tree builds, a golden rule is to not touch any files
inside of the source directory. This rule is being violated by our tests
CMake instructions, which generate a "test0.zip" file and copy it over
the file "test/test.zip" in our source directory.
Stop doing this. We already copy the "test0.zip" to "test.zip" in the
binary directory, and all tests should be using that one.
Guido Draheim [Sun, 26 May 2019 11:28:26 +0000 (13:28 +0200)]
azure master/develop
Guido Draheim [Sun, 26 May 2019 11:14:31 +0000 (13:14 +0200)]
publish testresults.xml
Guido Draheim [Sun, 26 May 2019 11:14:21 +0000 (13:14 +0200)]
change testresults.xml
Guido Draheim [Sun, 26 May 2019 11:04:35 +0000 (13:04 +0200)]
xmlresults
Guido Draheim [Sun, 26 May 2019 10:57:11 +0000 (12:57 +0200)]
cmake zziptest
Guido Draheim [Sun, 26 May 2019 10:53:27 +0000 (12:53 +0200)]
cmake ZZIP_PACKAGE_VERSION and NAME
Guido Draheim [Sun, 26 May 2019 10:52:45 +0000 (12:52 +0200)]
replace ZZIP_VERSION/ZZIP_PACKAGE_VERSION ZZIP_PACKAGE/ZZIP_PACKAGE_NAME
Guido Draheim [Sun, 26 May 2019 10:24:15 +0000 (12:24 +0200)]
make check xmlrunner
Guido Draheim [Sun, 26 May 2019 10:12:08 +0000 (12:12 +0200)]
binary-dir for zzip/_config.h
Guido Draheim [Sun, 26 May 2019 10:07:18 +0000 (12:07 +0200)]
try-to-install-sdl
Guido Draheim [Sun, 26 May 2019 10:05:32 +0000 (12:05 +0200)]
try-to-install-sdl
Guido Draheim [Sun, 26 May 2019 10:00:25 +0000 (12:00 +0200)]
try-to-install-sdl
Guido Draheim [Sun, 26 May 2019 09:58:12 +0000 (11:58 +0200)]
try-to-install-sdl
Guido Draheim [Sun, 26 May 2019 09:51:40 +0000 (11:51 +0200)]
try-toinstall-sdl
Guido Draheim [Sun, 26 May 2019 09:49:40 +0000 (11:49 +0200)]
try-to-install-sdl
Guido Draheim [Sun, 26 May 2019 09:47:43 +0000 (11:47 +0200)]
correcting cmake zzipwrap includes
Guido Draheim [Sun, 26 May 2019 09:45:34 +0000 (11:45 +0200)]
verbose-azure
Guido Draheim [Sun, 26 May 2019 09:43:41 +0000 (11:43 +0200)]
correcting cmake zzipwrap includes
Guido Draheim [Sun, 26 May 2019 09:40:38 +0000 (11:40 +0200)]
correcting cmake zzipwrap includes
Guido Draheim [Sun, 26 May 2019 09:02:03 +0000 (11:02 +0200)]
azure cmake
Guido Draheim [Sun, 26 May 2019 08:58:11 +0000 (10:58 +0200)]
azure cmake
Guido Draheim [Sun, 26 May 2019 08:55:19 +0000 (10:55 +0200)]
azure cmake
Guido Draheim [Sun, 26 May 2019 08:52:32 +0000 (10:52 +0200)]
Merge branch 'master' into develop
Guido Draheim [Sun, 26 May 2019 08:45:51 +0000 (10:45 +0200)]
Merge branch 'master' of github.com:gdraheim/zziplib
Guido Draheim [Sun, 26 May 2019 08:45:41 +0000 (10:45 +0200)]
azure classic
Guido U. Draheim [Sun, 26 May 2019 08:40:18 +0000 (10:40 +0200)]
Set up CI with Azure Pipelines
develop [skip ci]
Guido Draheim [Sun, 26 May 2019 08:39:05 +0000 (10:39 +0200)]
azure
Guido U. Draheim [Sun, 26 May 2019 08:33:52 +0000 (10:33 +0200)]
Set up CI with Azure Pipelines
configure && cd build && make [skip ci]
Guido U. Draheim [Sun, 14 Oct 2018 11:58:11 +0000 (13:58 +0200)]
Merge pull request #65 from jmoellers/bins-code-cleanup
Bins code cleanup
Guido U. Draheim [Sun, 14 Oct 2018 11:57:08 +0000 (13:57 +0200)]
Merge pull request #64 from jmoellers/testcase-CVE-2018-17828
Added test case for CVE-2018-17828.
Josef Moellers [Fri, 12 Oct 2018 14:45:47 +0000 (16:45 +0200)]
Code cleanup in "bins".
Josef Moellers [Wed, 10 Oct 2018 15:14:20 +0000 (17:14 +0200)]
Added test case for CVE-2018-17828.
Guido U. Draheim [Thu, 4 Oct 2018 13:11:27 +0000 (15:11 +0200)]
Merge pull request #63 from jmoellers/CVE-2018-17828
Fix issue #62
Josef Moellers [Thu, 4 Oct 2018 12:21:48 +0000 (14:21 +0200)]
Fix issue #62: Remove any "../" components from pathnames of extracted files.
[CVE-2018-17828]
Guido Draheim [Sun, 16 Sep 2018 21:00:09 +0000 (23:00 +0200)]
adding alocal/zziplib.m4 install
Guido Draheim [Sun, 16 Sep 2018 20:22:23 +0000 (22:22 +0200)]
one more bins/unzip-mem
Guido Draheim [Sun, 16 Sep 2018 19:19:49 +0000 (21:19 +0200)]
correct test_90000 to work without libtool (but cmake)
Guido Draheim [Sun, 16 Sep 2018 18:47:53 +0000 (20:47 +0200)]
adjust result sizes of zziptests
Guido Draheim [Sun, 16 Sep 2018 18:41:05 +0000 (20:41 +0200)]
skip test_6545x as the test.zip was only provided by mail
Guido Draheim [Sun, 16 Sep 2018 18:27:28 +0000 (20:27 +0200)]
need to ensure that test0.zip is built
Guido Draheim [Sun, 16 Sep 2018 18:17:29 +0000 (20:17 +0200)]
need to always set LANGUAGES to avoid c++ checks
Guido Draheim [Sun, 16 Sep 2018 13:02:02 +0000 (15:02 +0200)]
make an explicit ZZIPLIBTOOL compatibility flag to highlight the feature
Guido Draheim [Sun, 16 Sep 2018 12:53:34 +0000 (14:53 +0200)]
derive VERNUM from PROJECT_VERSION_MINOR and set FIXNUM only where it is used for add_library(VERSION) settings
Guido Draheim [Sun, 16 Sep 2018 12:36:12 +0000 (14:36 +0200)]
set project(VERSION) and reference PROJECT_VERSION after that
Guido Draheim [Sun, 16 Sep 2018 12:18:39 +0000 (14:18 +0200)]
generated and install pkgconfig files
Guido Draheim [Sat, 15 Sep 2018 19:13:29 +0000 (21:13 +0200)]
create symlinks to librelease which cmake does not do itself
Guido Draheim [Sat, 15 Sep 2018 18:27:26 +0000 (20:27 +0200)]
use RELEASE_POSTFIX to add the RELNUM to libraries
Guido Draheim [Sat, 15 Sep 2018 14:51:46 +0000 (16:51 +0200)]
add largefile support detection
Guido Draheim [Sat, 15 Sep 2018 12:55:13 +0000 (14:55 +0200)]
generate and install ZZIPCOMPAT headers
Guido Draheim [Sat, 15 Sep 2018 12:19:01 +0000 (14:19 +0200)]
- cleanup
Guido Draheim [Sat, 15 Sep 2018 12:14:27 +0000 (14:14 +0200)]
actually do install libzzipwrap, and move options to topdir
Guido Draheim [Sat, 15 Sep 2018 12:10:44 +0000 (14:10 +0200)]
add missing /usr/include/zzip headers to cmake install()
Guido Draheim [Sat, 15 Sep 2018 11:44:04 +0000 (13:44 +0200)]
if not relnum
Guido Draheim [Sat, 15 Sep 2018 11:41:42 +0000 (13:41 +0200)]
more .gitignore
Guido Draheim [Sat, 15 Sep 2018 11:39:54 +0000 (13:39 +0200)]
move build of libzzip from topdir into zzip/
Guido Draheim [Sat, 15 Sep 2018 01:51:16 +0000 (03:51 +0200)]
evaulate checks
Guido Draheim [Sat, 15 Sep 2018 01:42:22 +0000 (03:42 +0200)]
and add 'make checks'
Guido Draheim [Sat, 15 Sep 2018 00:57:43 +0000 (02:57 +0200)]
migrate rules for xmlto pdf and make site
Guido Draheim [Fri, 14 Sep 2018 23:20:51 +0000 (01:20 +0200)]
PythonInterp and UnixCommands for portability
Guido Draheim [Fri, 14 Sep 2018 22:21:48 +0000 (00:21 +0200)]
make htmpages
Guido Draheim [Fri, 14 Sep 2018 21:18:47 +0000 (23:18 +0200)]
add docs/CMakeLists.txt to generate manpages.tar and to install man/man3 pages
Guido Draheim [Fri, 14 Sep 2018 17:37:31 +0000 (19:37 +0200)]
add test/CMakeLists.txt including special 'make sfx' command
Guido Draheim [Fri, 14 Sep 2018 16:32:07 +0000 (18:32 +0200)]
make subdir libs&bins to depend on toplevel libzzip via cmake targets
Guido Draheim [Fri, 14 Sep 2018 16:21:24 +0000 (18:21 +0200)]
refere to gnu bindir
Guido Draheim [Fri, 14 Sep 2018 15:56:24 +0000 (17:56 +0200)]
add base makefile targets
Guido Draheim [Fri, 14 Sep 2018 15:25:01 +0000 (17:25 +0200)]
add bins/CMakeLists.txt and adjust libzzip imports
Guido Draheim [Fri, 14 Sep 2018 13:48:35 +0000 (15:48 +0200)]
add SDL/CMakeLists.txt and make ZZIPWRAP / ZZIPSDL options
Guido Draheim [Fri, 14 Sep 2018 13:09:49 +0000 (15:09 +0200)]
adding zzipwrap/CMakeLists.txt
Guido Draheim [Fri, 14 Sep 2018 11:26:28 +0000 (13:26 +0200)]
make ZZIPMMAPPED and ZZIPFSEEKO optional builds
Guido Draheim [Fri, 14 Sep 2018 03:37:18 +0000 (05:37 +0200)]
correcting to detect the source *.so.x lib
Guido Draheim [Fri, 14 Sep 2018 03:33:59 +0000 (05:33 +0200)]
adapt libversion detection
Guido Draheim [Fri, 14 Sep 2018 03:32:42 +0000 (05:32 +0200)]
align naming to automake release_info / version_info tags as RELNUM/VERNUM
Guido Draheim [Fri, 14 Sep 2018 00:57:49 +0000 (02:57 +0200)]
make static
Guido Draheim [Thu, 13 Sep 2018 23:54:10 +0000 (01:54 +0200)]
make it
Guido Draheim [Thu, 13 Sep 2018 23:49:05 +0000 (01:49 +0200)]
breaking down VERSION to APIVERSION+RELVERSION, and make symlinks for the old releases as it was for automake's libtool