Bug 245748

Summary: New port: archivers/tar-stream-chunker streams stdin of unknown size as a tar to stdout
Product: Ports & Packages Reporter: Igor Ostapenko <igor.ostapenko>
Component: Individual Port(s)Assignee: Li-Wen Hsu <lwhsu>
Status: Closed FIXED    
Severity: Affects Only Me CC: lwhsu
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
tar-stream-chunker.diff none

Description Igor Ostapenko 2020-04-19 21:33:26 UTC
Created attachment 213578 [details]

Splits stdin of unknown size onto chunks of given size and collects such chunk
files as a TAR archive what is written to stdout.

Initial motivation was to use it as a packer of a data stream what pipes it to
https://tarsnap.com for backup purposes, with a requirement of low and more
predictable memory consumption. And the problem solved here is that TAR file
header should specify size of a file, but it's unknown due to the nature of
input data stream.

The following real case could be an example:
$ pg_dump ... | tar_stream_chunker ... | tarsnap -c ... @-
Comment 1 commit-hook freebsd_committer 2020-07-21 14:36:34 UTC
A commit references this bug:

Author: lwhsu
Date: Tue Jul 21 14:36:16 UTC 2020
New revision: 542746
URL: https://svnweb.freebsd.org/changeset/ports/542746

  Add archivers/tar-stream-chunker

  streams stdin of unknown size as a tar to stdout

  PR:		245748
  Submitted by:	Igor Ostapenko <igor.ostapenko@pm.me>