- Fix a wrong assumption in
Tar_lwt_unix.run
forTar.Really_read _
that one tar block was always read. This meant that usingTar.Really_read
with a size different from 512 would fail. (Reported by @jonahbeckford, review by @hannesm, @reynir, #153) - Document better the actual behavior of
Tar_unix.extract
andTar_lwt_unix.extract
(@reynir, #155)
- Expose
Tar_lwt_unix.run
as we do withTar_unix.run
andTar_eio.run
. This was an oversight in v3.0.0. (Reported by @jonahbeckford, @reynir, #150)
-
Fix
Header.marshal
and the checksum and the length (@reynir, #145) -
Delete a mutable field about the level into the header (@hannesm, #141)
-
BREAKING: de-functorize the package (@hannesm, @reynir, @dinosaure, #140, #143, #146)
These PRs attempt to de-functorize
Tar
so that users can implement I/O themselves, usingTar
's own element serialization/deserialization functions to take advantage of read/write methods. This avoids imposing on the user the implementation of a module that is too rigid in his/her case (which could have performance implications).Tar
offers functions for serializing/deserializing tar-specific elements fromstring
. It is then up to the user to know how to obtain or write thesestrings
.To this, these PRs add "logics" (see
'a Tar.t
) requiring read and/or write implementations and describing how to extract all entries from a tar file or how to write a tar file according to a "dispenser" (likeSeq.to_dispenser
) of entries.These logics do not depend on a particular "scheduler", and these PRs propose a derivation of these logics with
tar-unix
,tar-eio
andtar-mirage
. These latter derivations mean that the API for these packages has only been extended, and there are no breaking changes as such.These logics also make it easy to offer a compression/decompression layer with
decompress
, so you can easily manipulate and/or create a .tar.gz file.
- Add eio backend for tar in tar-eio (@patricoferris, review by @talex5, @reynir, #132)
- Also apply backwards compatibility fix when GNU LongName is used. The compatibility fix is unfortunately also applied for unknown-to-ocaml-tar link indicators (reported by @gravicappa in #129, @reynir, #133)
tar
: support pax Global Extended Headers. This adds state to tar parsing. (#119, #120, @MisterDA)- Support GNU LongLink and LongName. Prior,
Tar.HeaderWriter
andTar.HeaderReader
supported both, butTar.Header.Link
only hadLongLink
and (de)serialized to (from) GNU LongName (#127) - Compatibility level when reading / parsing is removed. Only GNU LongLink/LongName extensions were affected by the compatibility level when reading (#127)
- Add module types
Tar.HEADERREADER
andTar.HEADERWRITER
describing the output ofTar.HeaderReader
andTar.HeaderWriter
respectively (#127) - Types
Tar.READER.t
andTar.WRITER.t
are renamed toio
(#127) - Add
write_global
function for writing a global PAX extended header (#127) - Rework IO-specific modules (tar-unix etc.) harmonizing them (#127)
- Avoid exceptions in tar and use result instead. The exceptions
End_of_stream
andChecksum_mismatch
are removed (#127) - Remove the
Tar_cstruct
module as it was unused (#127) - Remove debug printers (#127)
- Finally remove the unused camlp-streams dependency (#127)
- Treat headers with link indicator '0' or '\000' (
Normal
) as directories for backward compatibility (reported in #129, fix by @reynir)
- File names and link names are used from PAX headers when parsing (reported by @gravicappa, fixed in #128 by @reynir)
- Switch to alcotest for tests (@MisterDA, review by @reynir, #121)
- BREAKING: fix ustar magic version. Previously, the version "0\000" was serialized instead of the correct version "00". This means tar archives may not be reproducable with older versions. (@reynir, @hannesm, #117 and #122)
- Remove
ppx_cstruct
dependency (@hannesm, review by @reynir, #117) - Properly skip Pax GlobalExtendedHeaders (@MisterDA, @reynir, #116 and #118)
tar-mirage
: implement mirage-kv.6.0.0 (@reynir, @hannesm)
tar-mirage
: fix writing of data when data+tar header is a multiple ofsector_size
greater than 1 (@reynir, review by @hannesm, #100)
tar-mirage
: fix writing of data, previously the end_of_archive was set 512 bytes short (#99 @hannesm @reynir)
tar-mirage
requires and implementsmirage-kv.5.0.0
(@hannesm, #96)tar-mirage
implementsMirage_kv.RW
(append-only) (@hannesm, @reynir, @dinosaure, review by @MisterDA, #93)- Update usage of
cstruct
intar
: unnecessary memsets removed, useCstruct.of_string
(@hannesm, #93) - Fix
tar-mirage
read buffer allocation error (@reynir, review by @hannesm, #94) tar
andtar-mirage
do not requirere
anymore,tar-mirage
doesn't depend oniopage
and works with solo5 and other improvements (@hannesm, review by @reynir, #90)
tar-mirage
requiresmirage-block.2.0.0
(@kit-ty-kate, #86)- Remove
io-page-unix
dependency (@hannesm, #87) - Add GZip support (@dinosaure, #88)
- Set
O_CLOEXEC
on opened files and be sure to close opened files (@MisterDA, @talex5, #83) - OCaml 5.00 support (add a new dependecy
camlp-stream
) (@Sudha247, #84) - Missing padding in LongLing 'L' case (@dra27, #82)
- Bump lower-bound on Cstruct to 6.0.0 (@MisterDA, @djs55, @dinosaure, #74)
- Update to Dune 2.9 and generate opam files (@MisterDA, @djs55, @dinosaure, #74)
- Support only OCaml versions 4.08 and higher. (@MisterDA, @dinosaure, #77)
- Don't print any logging to stdout or stderr (@MisterDA, @djs55, @dinosaure, #74)
- Remove
Tar.Make.Header
,Tar_cstruct.Header
,Tar_unix.Header
, andTar_lwt_unix.Header
to keep only Tar.Header and use it everywhere.Tar.Make.Header.get_next_header
becomesTar.Make.get_next_header
;Tar_cstruct.Header.get_next_header
becomesTar_cstruct.get_next_header
;Tar_lwt_unix.Header.get_next_header
becomesTar_lwt_unix.get_next_header
;Tar_lwt_unix.Header.of_file
becomesTar_lwt_unix.header_of_file
;Tar_unix.Header.get_next_header
becomesTar_unix.get_next_header
;Tar_unix.Header.of_file
becomesTar_unix.header_of_file
;- All the
Tar_*.Header.t
values have to be changed toTar.Header.t
. (@MisterDA, @dinosaure, #77)
- Fix parsing of pax Extended Header File Times with sub-second granularity. (@MisterDA, @dinosaure, #77)
- Add
Tar_unix.transform
andTar_lwt_unix.transform
to help transforming headers of a streamed tar archive between two file descriptors. (@MisterDA, @dinosaure, #77) - Remove
{build}
tag on thedune
dependency (@CraigFe, @hannesm, #72) - Adapt
ocaml-tar
to newer MirageOS interfaces (@hannesm, @dinosaure, #73) - Update gnu.org link (@reynir, @dinosaure, #79)
file_mode
defaults to0o400
(@reynir, @MisterDA, @dinosaure, #78)
- Do not depend on mirage-types, use mirage-kv instead (@hannesm)
- Support mirage-kv 2.0.0 (@hannesm)
- Do not suppress "unused value" warning (@emillon)
- Represent link indicator as a char. This transforms comments into actual code (@emillon)
- fix tar-unix build with modern cstruct.lwt (@avsm)
- port build to dune from builder (@avsm)
- upgrade opam metadata to 2.0 (@avsm)
- remove topkg in favour of dune-release (@avsm)
- use modern
ppx_cstruct
instead ofcstruct.ppx
(#65 @avsm @djs55) - test with OCaml 4.07 as well (@avsm)
- preliminary support for Cstruct.t-backed tar processing (#54 by @hcarty)
- fix build with OCaml 4.06.0 (and
-safe-string
)
- split into 3 packages:
tar
,tar-unix
,tar-mirage
- use jbuilder for building
- add support for reading @LongLink headers
- mark deprecated functions with @@ocaml.deprecated
- fix some warnings
- convert build system to topkg (#43, @hannesm)
- Build against MirageOS version 3, and drop support for earlier versions.
- Support only OCaml versions 4.03 and higher.
- fix a bug in the key=value interface when the archive isn't a multiple of 4KiB in size
- support for pax headers
- removed Tar.Archive.fold: please use HeaderReader instead
- handle EINTR and short writes properly (@ivg)
- avoid a warning catching
Failure
exceptions fromint_of_string
- now requires cstruct >= 1.9.0 and OCaml 4.02+
- test: only run tests if mirage-block-unix is present
- improve the opam file
- travis: simplify the configuration
- fix Tar_mirage when using block devices with < 4096 byte sectors
- add tar.mirage in ocamlfind, containing Tar_mirage which exposes a BLOCK device as a KV_RO
- add Tar.Make functor which allows easier integration with camlzip
- always initialise tar header unused bytes to 0 (previously would use uninitialised data)
- modernise Travis CI scripts to use OPAM 1.2 workflow.
- Re-add some old deprecated functions
- Add 'Tar.Archive.fold' for folding over entries in an archive
- Rename ocamlfind package from 'ocaml-tar' to simply 'tar'
- Initial release