Commit Graph

7 Commits (065f202d3021ed0a61dbb34be9bce2bc767dba10)

Author SHA1 Message Date
Stefano Rivera d500354798
unarchive: Clamp zip timestamps on 32-bit time_t (#84409)
Clamp zip timestamps to representible values when unpacking zip files on
platforms that use 32-bit time_t (e.g.  Debian i386). This is a
non-issue in practice (in 2024), but should allow the test suite to pass
on Debian i386.

We use a round value of 2038-01-01 00:00:00 for simplicity, and to avoid
running into timezone offsets closer to the actual limit.

MR #81520 introduced sanity-checking tests that used dates not
representable with a 32-bit time_t.
1 year ago
Gilson Guimarães e64c6c1ca5
unarchive: Better handling of files with an invalid timestamp in zip file (#81520)
Fixes: #81092

Signed-off-by: gilsongpfe <gilson.gpf@gmail.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Matt Clay 9f899f9492
Require `from __future__ import annotations` (#81902) 2 years ago
Matt Clay 82b5544b09
Improve code coverage of unit tests (#81119)
- Remove unused code
- Remove unnecessary code
- Ignore coverage for unreachable code
- Use previously unused code to increase coverage
2 years ago
Felix Fontein e3c72230cd
unarchive: fix io_buffer_size option, remove ignore.txt entry (#77271)
* Fix io_buffer_size option.

* Remove ignore.txt entry by adding action plugin only options to module's argument spec.

* Add changelog fragment.

* Adjust unit tests.
4 years ago
Sam Doran 004c33d9c5
unarchive - do not fail in init when trying to find required binary (#74892)
Test for the required binaries in the can_handle_archive() method and fail there. This
prevents failures for missing binaries unrelated to the archive type.

* Update missing zip binary message to match tar message
* Update unit tests
* Add integration tests
* Define packages based on the system rather than ignoring failures
5 years ago
Abhijeet Kasurde be9f8c69d1
unarchive: Fail when zipinfo is not available (#74632)
Fixes: #39029

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago