synopsis: Rework `v2-sdist` command
packages: cabal-install
issues: #6635 #5813 #2940 #6611 #6514
prs: #6454 #6637 #6640 #6660 #6666 #6884 #6916
significance: significant

description: {

`v2-sdist` marks all files as readonly in resulting tarballs.

The #2940 "cabal sdist should touch preprocessed .hs files" issue
is fixed by virtue of not doing any preprocessing anymore.
It's responsibility of packager.

The #6611 "v2-sdist includes a file twice in the tarball " issue
is fixed as we don't consider only one file list,
not two separate executable and ordinary file lists.

The #6514 "unpack doesn't preserve (executable) permissions" issue
is partially resolved,  as there shouldn't be executable permissions
in the tar files.

The rationale for above simplification is simple. The only file
Cabal machinery would run is `configure` script. These
are run with explicit `sh` program. For package internal scripts,
maintainers should also use interpreters explicitly as well.
Scripts with shebangs are not executable on Windows.

The `v1-sdist` command is removed, as its functionality is completely
superseded by `v2-sdist`.

}