reptar

package module
v0.0.0-...-38fabfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2022 License: MPL-2.0 Imports: 11 Imported by: 1

README

Reptar

Reptar or Reproducible Tar creates tar archives from files that are stripped of information that typically makes reproducability challenging.

Generally this means that this library tries to implement something similar to this tar command.

tar - \
    --sort=name \
    --mtime="1970-01-01 00:00:00Z" \
    --owner=0 --group=0 --numeric-owner \
    --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
    -cf

Further reading here for more information on reproducible archives: https://reproducible-builds.org/docs/archives/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Archive

func Archive(location string, out io.Writer, options ...ArchiveOption) (err error)

Reptar creates a tar of a location. Reptar stands for reproducible tar and is intended to replicate the following gnu tar command:

tar - \
--sort=name \
--mtime="1970-01-01 00:00:00Z" \
--owner=0 --group=0 --numeric-owner \
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
-cf

This command is currently not complete and only works on very basic test cases. GNU Tar also adds padding to outputted files

func GzipArchive

func GzipArchive(location string, out io.Writer) error

func GzipUnarchive

func GzipUnarchive(in io.Reader, location string) error

func SkipVCSOption

func SkipVCSOption(ao *archiveOptions)

func Unarchive

func Unarchive(in io.Reader, location string) error

Unarchive

Types

type ArchiveOption

type ArchiveOption func(*archiveOptions)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL