Skip to content

Commit

Permalink
Use GNU tar format instead of UStar for copy
Browse files Browse the repository at this point in the history
This enables copying from sources containing long file names
(more than 100 characters)
  • Loading branch information
TheLortex committed Oct 20, 2021
1 parent eebec47 commit 76d6b00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
### unreleased

- Use GNU tar format instead of UStar for `copy` operations (@TheLortex ...).
This enables copying from sources containing long file names (>100 characters).

- Add support for secrets (@TheLortex #63, reviewed by @talex5).
The obuilder spec's `run` command supports a new `secrets` fields, which allows to temporarily
mount secret files in an user-specified location. The sandbox build context has an additional
Expand Down
2 changes: 1 addition & 1 deletion lib/tar_transfer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module Tar_lwt_unix = struct
module HW = Tar.HeaderWriter(Lwt)(Writer)

let write_block (header: Tar.Header.t) (body: Lwt_unix.file_descr -> unit Lwt.t) (fd : Lwt_unix.file_descr) =
HW.write ~level:Tar.Header.Ustar header fd
HW.write ~level:Tar.Header.GNU header fd
>>= fun () ->
body fd >>= fun () ->
Writer.really_write fd (Tar.Header.zero_padding header)
Expand Down

0 comments on commit 76d6b00

Please sign in to comment.