Create archive tarballs and roast them!
Note
When using recomprizz
, files with filenames like package-1.2.3.tar.gz
will have
the number parts of their names preserved i.e. package-1.2.3.tar.gz
-> package-1.2.3.tar.zst
.
However, filenames with letters after the numbers will be removed especially for version part
of the filenames are tagged as alpha
or beta
. For example, package-1.2.3.alpha.tar.gz
will
turn into package-1.2.3.tar.zst
. This is a limitation with the renaming logic. The solution is
to use the -R
or --rename
flag to hardcode the new name. So a command like
recomprizz -t package-1.2.3.alpha.tar.gz -R package-1.2.3.alpha
should fix the issue.
I am trying to split the logic from obs-service-cargo. Not only is this a library, it also contains binaries that extract and decompress tarballs or create tarballs with the available highest level compression for supported compression formats.
Plus, it has the comfort of being a simple tar
alternative.
Roast contains to binaries
roast
raw
recomprizz
From source:
cargo install --git https://github.com/openSUSE-Rust/roast
From crates.io:
cargo install roast-cli
Both commands pull from source. The only difference is that the first one obviously relies on git.
There are three path behaviours in Roast.
- excluded paths
- additional paths
- included paths
Excluded paths and included paths are within the source or target
directory. For example. If we are going to archive the roast-cli
directory
here, declared paths in the --exclude
and --include
paths are relative
to the top-most level directory of the source or target directory e.g. src/bin/roast.rs
points to roast-cli/src/bin/roast.rs
.
One thing to note about the path behaviours is the higher precedence over files than directories.
- If a directory is INCLUDED while EXCLUDED, it is, therefore, IGNORED.
- If a file is INCLUDED but it is WITHIN an EXCLUDED directory, it is, therefore, ADDED with the directory created if directory (new parent of the file) does not exist.
- If a directory is ADDED i.e. from outside but resulting destination should be EXCLUDED, it is, therefore, ADDED.
Important
ADDED != INCLUDED. ADDED can either point to any path. INCLUDED always points WITHIN the top-most level directory of the source or target directory.
Note
The reasoning behind the third point is that the user may have intended to use a different source or to include only a specific set of files, thereby ignoring the top-level directory of the original source.
It maps when you run the following commands
roast -h
raw -h
recomprizz -h