Skip to content

Change layout of source tarball to have a single directory  #2895

@omajid

Description

@omajid

Describe the Problem

The source tarball produced by the source-build (installer) project extracts to many files in the directory it is exacted.

The general convention for most other projects is that a tarball named $project-$versopm.tar.gz unpacks to a single directory named $project-$version, which, in turn, contains all the actual contents.

https://tldp.org/HOWTO/Software-Release-Practice-HOWTO/distpractice.html

The single most annoying mistake newbie developers make is to build tarballs that unpack the files and directories in the distribution into the current directory, potentially stepping on files already located there. Never do this!

Instead, make sure your archive files all have a common directory part named after the project, so they will unpack into a single top-level directory directly beneath the current one.

https://www.gnu.org/prep/standards/html_node/Releases.html

Package the distribution of Foo version 69.96 up in a gzipped tar file with the name foo-69.96.tar.gz. It should unpack into a subdirectory named foo-69.96.

https://dwheeler.com/essays/releasing-floss-software.html

Follow good distribution-making practice, in particular, make sure tarballs always unpack into a single new subdirectory (of the current directory) named NAME-VERSION

typedb/bazel-distribution#49

The file should follow the following convention:

name-version.tar.gz

When extracted, it should extract to a folder named

name-version/

https://www.control-escape.com/linux/lx-swinstall-tar.html

A typical incantation to install a source package looks something like this.

[root]# tar -xzvf ${name}.tar.gz
Unpacking ...
[root]# cd ${name}

Describe the Solution

The release tarball should have a single directory with a name (dotnet-sdk-source-$version) matching the tarball (dotnet-sdk-source-$version.tar.gz) and all the current items should be under that single main directory tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions