253 Commits

Author SHA1 Message Date
Mark Karpov 2a73746113 Version bump (1.7.2) 1.7.2 2021-10-29 20:35:08 +02:00
Mark Karpov f9a9099f35 Write the Zip64 extra field only when it is necessary 2021-10-29 20:20:10 +02:00
Mark Karpov bc10b93466 Allow time-1.12 2021-08-07 10:32:32 +02:00
Mark Karpov d7c5b5dc0e Test with GHC 8.10.5 2021-07-14 21:48:50 +02:00
Mark Karpov 1a585173f2 Version bump (1.7.1) 1.7.1 2021-06-06 16:31:02 +02:00
Julian Ospald 630998e997 Fix build with disable-zstd/disable-bzip2 2021-06-06 16:30:18 +02:00
Mark Karpov fc967375c9 Improve the writing 2021-04-18 20:47:29 +02:00
Mark Karpov 57e69cd3f7 Use haskell/actions/setup v1.2 2021-03-09 20:21:54 +01:00
Mark Karpov 892e2fcf59 Test with GHC 9.0.1 and 8.10.4 2021-03-06 18:24:13 +01:00
Mark Karpov d228f0faf6 Version bump (1.7.0) 1.7.0 2021-01-19 11:41:15 +01:00
Alexander Vershilov fc1027caa6 Set file permissions on Unix platforms
Set user permissions on linux platform as follows:

  * if an existing file is added, use its permissions
  * if an entry is generated from a bytestring or a stream, use 0600

This behavior mimics the zip utility.
2021-01-18 23:55:03 +01:00
Mark Karpov 8121748d6a Allow bytestring-0.11 2021-01-04 15:44:29 +01:00
Mark Karpov 1551856589 Test with GHC 8.10.3 2021-01-04 14:45:38 +01:00
Mark Karpov 775968de89 Use latest versions of GitHub actions 2020-11-24 16:13:07 +01:00
Mark Karpov fc28225556 Use ormolu-action 2020-11-16 12:18:48 +01:00
Mark Karpov a5ee8022a4 Test with GHC 8.10.2 2020-10-12 20:31:56 +02:00
Csaba Hruska 4ef24161dc Update README.md 2020-09-17 12:51:29 +02:00
Mark Karpov 8c49b27a6f Version bump (1.6.0) 1.6.0 2020-09-16 16:23:06 +02:00
Csaba Hruska 7dee54beb6 Add support for Zstandard (zstd) compression method 2020-09-16 16:22:56 +02:00
Mark Karpov 6df7409fa4 Test with GHC 8.8.4 2020-08-22 20:07:51 +02:00
Mark Karpov 4a5b2624a6 Fix a bug in the CI script
Previously the cache action would restore an outdated version of Hackage
snapshot overwriting the results of the cabal v2-update.
2020-07-25 00:54:17 +02:00
Mark Karpov 227584e4e4 Allow ‘dlist-2.0’ 2020-07-20 11:58:23 +02:00
Mark Karpov 13d269a4ab Improve the new CI setup
* Trigger CI on pull request events.
* Better caching setup.
2020-07-11 17:50:55 +02:00
Mark Karpov aff36c3010 Re-format with Ormolu 0.1.2.0 2020-07-10 22:29:56 +02:00
Mark Karpov 24e29f4083 Use GitHub actions for CI 2020-07-10 22:13:52 +02:00
Mark Karpov 73951d0525 Formatting whims 2020-04-24 20:36:16 +02:00
Mark Karpov 053e9d55b3 Do not use global ‘env’ in the travis script
Changing the ‘env’ value discards the caches, which is unacceptable.
2020-04-23 22:52:08 +02:00
Mark Karpov 8b358565e4 Format the source code with Ormolu 2020-04-23 22:22:12 +02:00
Mark Karpov b3521f44b1 Format Cabal file ‘cabal format’ 2020-04-23 22:02:03 +02:00
Mark Karpov dc8feff7d1 Raise minimal version of base to 4.12 2020-04-13 12:27:36 +02:00
Mark Karpov ddf684a0c4 Version bump (1.5.0)
[skip ci]
1.5.0
2020-04-12 12:08:01 +02:00
Mark Karpov 7302f4fb26 Test with GHC 8.10.1 2020-04-12 11:49:56 +02:00
Mark Karpov 6816fb7ac5 Add ‘packDirRecur'’ 2020-04-12 11:48:13 +02:00
Mark Karpov 6ac768ab45 Add ‘stack.yaml.lock’ to ‘.gitignore’ 2020-03-29 13:17:33 +02:00
Mark Karpov dddc3a83b9 Version bump (1.4.1)
[skip ci]
1.4.1
2020-03-16 20:27:11 +01:00
Mark Karpov 88b1484373 Fix the build for Mac 2020-03-16 20:26:39 +01:00
Mark Karpov 090e589391 Version bump (1.4.0)
[skip ci]
1.4.0
2020-03-11 20:36:12 +01:00
Alexander Vershilov 26b5746cbe Introduce helpers for setting permissions
It was very hard to set permissions using this library, as the permissions
were not properly documented. Here we try to solve the problem in 2 ways:

1. We add a low level documentation that explains how to work with
   permissions.
2. We introduce unix specific helpers that allow to describe permissions in
   a human readable way.

Unfortunately making those helpers OS agnostic is a pretty hard task we
enable them only on the Unix platforms.
2020-03-11 20:35:34 +01:00
Alexander Vershilov 72970d9e47 Add OS version to the required/made by versions
As per zip spec we may want to encode host version. This version is used by
e.g. the unzip utility in order to understand how to interpret external
info (type of files and permissions).

Current algorithm is pretty naive, we do not test for all OS versions
supported by zip. Instead we check if we run on windows and put 0 in that
case (MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems). Otherwise we put 3
(UNIX).

This way code works properly on the unix OS, and we keep old behavior for
the other OS.

Note that we didn't change ‘toVersion’ function, as it already masked the
higher byte where OS information was stored.

This code was tested manually by storing archive and then unarchiving it via
unzip. There is no automated test because such test would require external
tools (unzip).
2020-03-11 20:35:34 +01:00
Mark Karpov d3a4106102 Version bump (1.3.2)
[skip ci]
1.3.2
2020-03-02 11:36:31 +01:00
Moritz Kiefer 687bc036aa Ignore DoesNotExistError in removeFile
We have seen a bunch of errors on CI of the form

```
C:\users\foobar\ghcBDA1.zip: DeleteFile "\\\\?\\C:\\users\\foobar\\ghcBDA1.zip": does not exist (The system cannot find the file specified.)
```

I haven’t managed to reproduce this but looking at the code it seems
like we can be interrupted with an async exception (we kill threads
pretty aggressively) in the `bracketOnError` call after the file has
been renamed but before the whole block returns. In this case, the
file will not exist but you’ll run the cleanup in `bracketOnError`
anyway which will then fail.

We could try to fix this by masking things differently but ignoring
the error seems like a simpler and more robust solution.
2020-03-02 11:35:44 +01:00
Mark Karpov 9a6aa2ae17 Version bump (1.3.1)
[skip ci]
1.3.1
2020-03-01 00:41:38 +01:00
Mark Karpov 717f6c27ef Speed up the test suite 2020-03-01 00:41:03 +01:00
Mark Karpov cb768e57d0 Test with GHC 8.8.3 2020-02-25 13:32:02 +01:00
Mark Karpov f7073830d2 Test with GHC 8.8.2 2020-01-19 15:08:05 +01:00
mrkkrp d591be86a8 Version bump (1.3.0)
[skip ci]
1.3.0
2019-12-01 23:39:06 +01:00
mrkkrp d9cfb8d4a1 Add ‘since’ note for ‘BZip2Unsupported’ 2019-12-01 23:39:02 +01:00
Rodney Lorrimar 5a39029ceb Add Cabal flag to avoid the bzip2 C library dependency
The bzlib-conduit library is causing us trouble when trying to
cross-compile it for Windows.

The best thing to do in our case is to remove the dependency.

This change adds -fdisable-bzip2. Under this flag, if a caller
attempts to compress or decompress a BZip2 entry, then an exception
will be thrown.

Resolves #57
2019-11-30 16:46:42 +01:00
mrkkrp af399a22c3 Misc edits in the readme
[skip ci]
2019-09-27 14:28:45 +02:00
mrkkrp 299b6b4a68 Test with GHC 8.8.1 2019-09-25 23:13:48 +02:00