You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing package.json files for some packages? #183
When I turn on "require package hashes" in Stack on the Hackage Security branch, I get the following error message:
Package index Hackage is configured to require package hashes, but no hash is available for amazonka-codedeploy-1.4.0
Sure enough, if I look in the 01-index.tar file, there is no package.json file for that release of amazonka-codedeploy:
Is there some reason for this file to be missing? From a security standpoint, it would be nice to be able to depend on the existence of a hash for every package.
Also, I'm not sure if this is the appropriate repo for this question. I can move it to the Hackage Server tracker if that's better.
We have known about this for quite some time already (c.f. haskell/hackage-server#488) but this glitch is very hard to reproduce and hasn't re-occured ever since then. This is also the reason why the hackage-mirror-toolneeds this temporary hack. At some point we're gonna supply those missing package.json files in the index tarball, we just didn't get to it yet.
This does seem to significantly impede the ability of tools to provide security guarantees.
That's not really true though because as a kind of happy accident this unintentional situation currently exercises cabal's code-paths for when the package hashes are missing; and in fact cabal refuses to download those couple of packages whose cryptographic checksums are missing. This just forces us to be able to cope with this exceptional case which we would have to anyway.
Is there any way for me to help with this issue? It has been a known problem for a year and a half. It continues to happen as recently as a week ago. It does not seem like something that tools should have to deal with; if a .cabal file is in the index, a package.json file should be there too.
It's hard to tell how often this happens because the original report (haskell/hackage-server#488) has been edited, but these are the packages that are currently affected by this problem:
Can you clarify how this resolved the issue? It seems like this is a one
time fix-up, but doesn't solve the underlying cause, meaning this may recur
in the future. I'd be happy to hear that the underlying cause was fixed too
(and frankly would be really interested in learning what the problem is).
Before, insertion of the package into the packagedb occurred and then hackage security data was added to the db, in two steps. So it was possible a thread could die or the server could fall-over between the steps. That change made sure that either both changes happened or neither change happened.
Activity
Support Hackage Security hashes
hvr commentedon Jan 25, 2017
We have known about this for quite some time already (c.f. haskell/hackage-server#488) but this glitch is very hard to reproduce and hasn't re-occured ever since then. This is also the reason why the
hackage-mirror-toolneeds this temporary hack. At some point we're gonna supply those missingpackage.jsonfiles in the index tarball, we just didn't get to it yet.snoyberg commentedon Jan 25, 2017
Is there no method available to:
This does seem to significantly impede the ability of tools to provide security guarantees.
Support Hackage Security hashes
hvr commentedon Jan 28, 2017
That's not really true though because as a kind of happy accident this unintentional situation currently exercises
cabal's code-paths for when the package hashes are missing; and in factcabalrefuses to download those couple of packages whose cryptographic checksums are missing. This just forces us to be able to cope with this exceptional case which we would have to anyway.Add a fixup (haskell/hackage-security#183)
Add a fixup (haskell/hackage-security#183)
Add a fixup (haskell/hackage-security#183)
tfausak commentedon Oct 24, 2017
Is there any way for me to help with this issue? It has been a known problem for a year and a half. It continues to happen as recently as a week ago. It does not seem like something that tools should have to deal with; if a
.cabalfile is in the index, apackage.jsonfile should be there too.tfausak commentedon Oct 24, 2017
It's hard to tell how often this happens because the original report (haskell/hackage-server#488) has been edited, but these are the packages that are currently affected by this problem:
Generated with https://gist.github.com/tfausak/ed463c32638b8bd876df1a0712fc88bd.
snoyberg commentedon Oct 24, 2017
@tfausak That looks like to lines up with the list from hackage-mirror-tool: https://github.com/snoyberg/hackage-mirror-tool/blob/213064e4dd5983d01b6c7daa1c7eb37bed5255fd/src/IndexShaSum.hs#L165
snoyberg commentedon Oct 27, 2017
Looks like aivika-transformers-5.3.1.tar.gz needs to be added to the list.
Add a fixup for aivika-transformers-5.3.1 (haskell/hackage-security#183)
tfausak commentedon Dec 16, 2017
As @snoyberg mentioned, aivika-transformers-5.3.1 is missing its
package.json. It was uploaded at 2017-10-27T04:35:54Z.Also this just happened again with llvm-hs-5.1.1 (haskell/hackage-server#643). That one was uploaded at 2017-12-16T14:00:07Z.
gbaz commentedon Mar 19, 2018
This is resolved with haskell/hackage-server#488
snoyberg commentedon Mar 19, 2018
gbaz commentedon Mar 19, 2018
The underlying cause was fixed in haskell/hackage-server#644
Before, insertion of the package into the packagedb occurred and then hackage security data was added to the db, in two steps. So it was possible a thread could die or the server could fall-over between the steps. That change made sure that either both changes happened or neither change happened.
snoyberg commentedon Mar 19, 2018