Skip to content

tar: Add support for creating gzip-compressed tarballs#1170

Merged
stefanprodan merged 4 commits intomainfrom
feat-targz
Apr 15, 2026
Merged

tar: Add support for creating gzip-compressed tarballs#1170
stefanprodan merged 4 commits intomainfrom
feat-targz

Conversation

@stefanprodan
Copy link
Copy Markdown
Member

@stefanprodan stefanprodan commented Apr 14, 2026

Add Tar func that writes a sanitized archive of a directory tree, skipping symlinks and other non-regular,
non-directory entries. The Tar function accepts the following options:

  • WithSkipGzip to write a plain tar stream instead of a gzip-compressed tarball
  • WithFilter to exclude entries by path or FileInfo

The tar package now includes symlink resolution utilities for archiving, which should be used in:

  • flux build artifact --resolve-symlinks
  • flux push artifact --resolve-symlinks

This PR also refactors the existing tests and reorganises the package structure, adds proper doc.go with usage examples.

Closes: #323

@stefanprodan stefanprodan requested a review from a team as a code owner April 14, 2026 13:56
@stefanprodan stefanprodan added the enhancement New feature or request label Apr 14, 2026
Comment thread tar/options.go Outdated
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Copy link
Copy Markdown
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan changed the title tar: Add support for creating tgz archives tar: Add support for creating gzip-compressed tarball Apr 15, 2026
@stefanprodan stefanprodan changed the title tar: Add support for creating gzip-compressed tarball tar: Add support for creating gzip-compressed tarballs Apr 15, 2026
@stefanprodan stefanprodan merged commit 975d4a2 into main Apr 15, 2026
14 checks passed
@stefanprodan stefanprodan deleted the feat-targz branch April 15, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tar: Add TarGzip func

2 participants