Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glob-0.10.0 release tarball has strange file permissions #31

Open
peti opened this issue Dec 21, 2018 · 4 comments
Open

Glob-0.10.0 release tarball has strange file permissions #31

peti opened this issue Dec 21, 2018 · 4 comments

Comments

@peti
Copy link

peti commented Dec 21, 2018

I noticed the following issues with the latest Hackage release tarball:

  1. Files don't seem to have a valid modification / creation date.
  2. Various *.txt files have an executable bit set.

Is that intentional?

$ tar tfv Glob-0.10.0.tar.gz
drwxr-xr-x 0/0               0 1970-01-01 01:00 Glob-0.10.0/
-rwxr-xr-x 0/0            9294 1970-01-01 01:00 Glob-0.10.0/CHANGELOG.txt
-rwxr-xr-x 0/0             112 1970-01-01 01:00 Glob-0.10.0/CREDITS.txt
-rw-r--r-- 0/0            2933 1970-01-01 01:00 Glob-0.10.0/Glob.cabal
-rw-r--r-- 0/0            1651 1970-01-01 01:00 Glob-0.10.0/LICENSE.txt
-rwxr-xr-x 0/0             746 1970-01-01 01:00 Glob-0.10.0/README.txt
-rw-r--r-- 0/0              46 1970-01-01 01:00 Glob-0.10.0/Setup.hs
drwxr-xr-x 0/0               0 1970-01-01 01:00 Glob-0.10.0/System/FilePath/
-rw-r--r-- 0/0            2378 1970-01-01 01:00 Glob-0.10.0/System/FilePath/Glob.hs
drwxr-xr-x 0/0               0 1970-01-01 01:00 Glob-0.10.0/System/FilePath/Glob/
-rw-r--r-- 0/0           25538 1970-01-01 01:00 Glob-0.10.0/System/FilePath/Glob/Base.hs
-rw-r--r-- 0/0           16160 1970-01-01 01:00 Glob-0.10.0/System/FilePath/Glob/Directory.hs
-rw-r--r-- 0/0            7260 1970-01-01 01:00 Glob-0.10.0/System/FilePath/Glob/Match.hs
-rw-r--r-- 0/0            2183 1970-01-01 01:00 Glob-0.10.0/System/FilePath/Glob/Primitive.hs
-rw-r--r-- 0/0            1477 1970-01-01 01:00 Glob-0.10.0/System/FilePath/Glob/Simplify.hs
-rw-r--r-- 0/0            4911 1970-01-01 01:00 Glob-0.10.0/System/FilePath/Glob/Utils.hs
drwxr-xr-x 0/0               0 1970-01-01 01:00 Glob-0.10.0/tests/
-rw-r--r-- 0/0             890 1970-01-01 01:00 Glob-0.10.0/tests/Main.hs
drwxr-xr-x 0/0               0 1970-01-01 01:00 Glob-0.10.0/tests/Tests/
-rw-r--r-- 0/0            2462 1970-01-01 01:00 Glob-0.10.0/tests/Tests/Base.hs
-rw-r--r-- 0/0            1221 1970-01-01 01:00 Glob-0.10.0/tests/Tests/Compiler.hs
-rw-r--r-- 0/0            5553 1970-01-01 01:00 Glob-0.10.0/tests/Tests/Directory.hs
-rw-r--r-- 0/0            2290 1970-01-01 01:00 Glob-0.10.0/tests/Tests/Instances.hs
-rw-r--r-- 0/0            2702 1970-01-01 01:00 Glob-0.10.0/tests/Tests/Matcher.hs
-rw-r--r-- 0/0            1724 1970-01-01 01:00 Glob-0.10.0/tests/Tests/Optimizer.hs
-rw-r--r-- 0/0            5534 1970-01-01 01:00 Glob-0.10.0/tests/Tests/Regression.hs
-rw-r--r-- 0/0            1034 1970-01-01 01:00 Glob-0.10.0/tests/Tests/Simplifier.hs
-rw-r--r-- 0/0            1632 1970-01-01 01:00 Glob-0.10.0/tests/Tests/Utils.hs
@Deewiant
Copy link
Owner

Deewiant commented Dec 21, 2018

This might be the first tarball I created using cabal new-sdist instead of cabal sdist.

The timestamps are probably a reproducibility feature — as https://www.haskell.org/cabal/users-guide/nix-local-build.html#cabal-new-sdist states:

These archives are stable and two archives of the same format built from the same source will hash to the same value.

I don't know why the text files are made executable though. They certainly aren't in my source directory.

@peti
Copy link
Author

peti commented Dec 22, 2018

I opened haskell/cabal#5813 about this issue. Let's see what the cabal gurus think about this.

@juhp
Copy link

juhp commented Apr 14, 2020

BTW I was trying to reproduce this for other projects and so far from my limited testing this happens only(?) with Extra-Source-Files but not Extra-Doc-Files.
I forget when exactly the latter was introduced but I think it was well before Cabal-2 anyway...
and I reckon all the Glob Extra-Source-Files are actually Extra-Doc-Files. :)

@Deewiant
Copy link
Owner

Apparently extra-doc-files was introduced in 1.20 — according to the changelog at https://github.com/haskell/cabal/blob/master/Cabal/ChangeLog.md#12000-johan-tibell-april-2014 at least, although the docs at https://www.haskell.org/cabal/users-guide/developing-packages.html#pkg-field-extra-doc-files say it's in since 1.18.

This seems to have grown organically in Glob.cabal anyway, since originally only the tests were added as extras and the other documentation came only later. My bad for not realizing the more suitable field at the time, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants