Skip to content

Feature: Allow processing of archive prepared by user #359

Description

@brainchild0

While the application offers support for customized parameters used in creating the tar archive, inevitability some fringe cases are not addressed.

Two cases I have encountered are as follows:

  1. Support is lacking for selection of specific items under a source directory to be included in the archive, with all other items excluded. With the tar command, the case is supported by each desired source item being provided as a separate positional parameter, distinct from the base directory (i.e. provided by --directory, -C), or with no positional parameters but repeated occurrences of the option --add-file, or with a list file provided by --files-from (-T).

  2. In certain cases, the selected instance of tar is not the one preferred. For example, Ubuntu features GNU tar as the preferred instance, which is named tar, and features no command named gtar. The result is selection by the application, as the operative instance of tar, of a heavily enfeebled version of bsdtar, lacking basic features such as support for setting the UID and GID of the entries added to the archive.

While any of the issues might be addressed individually, also of value would be allowing all such restrictions to be bypassed, by allowing processing of an archive prepared by the user, instead of created within the application.

A solution which I believe would be minimally disruptive to the existing logic is adding tests for the specified source "directory", as follows:

  1. If the value refers not to a directory, but instead to a prepared archive file, then compress and prepend the archive as though created within the application.

  2. If the value consists only of a hyphen, -, then process standard input as the prepared archive.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions