-
Notifications
You must be signed in to change notification settings - Fork 723
Description
Describe the bug
Cabal sdist mangles file permissions for files in Extra-Source-Files. It sets all of them all to be executable. This is a serious problem for CPSA. It distributes many example source file that obviously are not executable.
To Reproduce
The enclosed file perms.tar.gz demonstrates the error. Run ./showbug to see that README gets the wrong permissions.
$ ./showbug
ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.1
cabal --version
cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library
echo
ls -l
total 48
-rw-r--r-- 1 ramsdell MITRE\Domain Users 63 May 21 14:35 Main.hs
-rw-r--r-- 1 ramsdell MITRE\Domain Users 215 May 21 15:41 README
-rw-r--r-- 1 ramsdell MITRE\Domain Users 46 May 21 14:36 Setup.hs
drwxr-xr-x 3 ramsdell MITRE\Domain Users 96 May 21 14:48 doc
-rw-r--r-- 1 ramsdell MITRE\Domain Users 19 May 21 14:36 license.txt
-rw-r--r-- 1 ramsdell MITRE\Domain Users 616 May 21 14:54 perms.cabal
-rwxr-xr-x 1 ramsdell MITRE\Domain Users 131 May 21 15:50 showbug
echo
cabal sdist
Wrote tarball sdist to
/Users/ramsdell/src/perms/dist-newstyle/sdist/perms-4.2.3.tar.gz
echo
tar tvzf dist-newstyle/sdist/perms-4.2.3.tar.gz
drwxr-xr-x 0 0 0 0 Sep 8 2001 perms-4.2.3/
-rw-r--r-- 0 0 0 63 Sep 8 2001 perms-4.2.3/Main.hs
-rwxr-xr-x 0 0 0 215 Sep 8 2001 perms-4.2.3/README
-rw-r--r-- 0 0 0 46 Sep 8 2001 perms-4.2.3/Setup.hs
drwxr-xr-x 0 0 0 0 Sep 8 2001 perms-4.2.3/doc/
-rw-r--r-- 0 0 0 45 Sep 8 2001 perms-4.2.3/doc/data.txt
-rw-r--r-- 0 0 0 19 Sep 8 2001 perms-4.2.3/license.txt
-rw-r--r-- 0 0 0 616 Sep 8 2001 perms-4.2.3/perms.cabal
-rwxr-xr-x 0 0 0 131 Sep 8 2001 perms-4.2.3/showbug
$
perms.tar.gz