helm / chartmuseum

helm chart repository server
https://chartmuseum.com
Apache License 2.0
3.57k stars 400 forks source link

Creates wrong names for .prov file #138

Closed Cryptophobia closed 6 years ago

Cryptophobia commented 6 years ago

When the helm .prov files generated with the helm package --sign command has the following structure:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

description: Buildpack application builder for Hephy Workflow.
home: https://github.com/teamhephy/slugbuilder
maintainers:
- - email: team@teamhephy.com
  name: Team Hephy
name: slugbuilder
version: v2.6.0

...
files:
  slugbuilder-v2.6.0.tgz: sha256:ad0441e3c4518d9d26bf73b6e37beb8ec719d9d7807dd41b8c74f56b021049e0
-----BEGIN PGP SIGNATURE-----

wsFcBAEBCgAQBQJbJDgaCRBOPt40+beXrAAAQzQQABczvmnl/N2yB6JBg2VAbXcD
zVt4qY9QX1GGtwjFbSzpA9ff2Vt9C9AyijyCPgt1A9IJGCCJh0gKdqzEfnhNPBl2
uNginixYlO4YcYyOlPEkR6yg9l0J/ygdcwd40onG2/w1UZvk2i2hWrOLjEV7CzIY
2H4RzZzLJY8TgzmJ7L3VLCDHHSs99zbtRItVvhP4pGBBA0bGQUVWBiYyT2l+VRX6
Mgu1k6NRiZpqq2piC3QPUSfpDSWJKnHL+CLBH7tssXmqn3wF0EbTlT8DR/suImhC
ULpkjO7TZPVQFh8XsqYIgeZjr0+BCaefd2+rP0Uj5ZJs91Q8dPj3Ouf7o+OS3G50
80/Z3SVNM/lVIg+SUJLJolte+Watg2om2vbOTr1y7JW72FE4vhLdnlDg0DhvT1iZ
Yxu/3m0Yg8bYQIbjXXweCBh4GCXXkNnh1ZOmA/5elAyO4EjcazUp+EbXELh42h97
IJE+suhtXyt5kn6Z/0eQWIcitw7JpspZeFwCPdaeusovUMNh8WNwEsKWlnil2c0L
OguBY1Q9kCni7Qs9unYS/AFV4R5EqqIrSY2Hh9PuRfTME523qS8rlApoKbqz5hJh
unS/Sxq/uKtbq/yRzdLYXAYpqdNr1ddk9DKVtdW/cATaei1+KtySUwY8Xkhie7in
mw30uKzgcQvlhc7VoTAf
=rPSt
-----END PGP SIGNATURE-----

Chartmuseum creates a .prov file that is not named correctly when pushed with:

curl -u blah:blah --data-binary "@slugbuilder-v2.6.0.tgz.prov" https://charts.mychartrepository.com/api/prov

The file is named:

Team Hephy-v2.6.0.tgz.prov

But the file should be named:

slugbuilder-v2.6.0.tgz.prov

A way to fix this is to remove name: from the maintainers field in the .prov file above. Chartmuseum is obviously looking for the first field name: and it accidentally gets that from the maintainers: parent field.

jdolitsky commented 6 years ago

@Cryptophobia thanks for catching this, this should be an easy fix.

Cryptophobia commented 6 years ago

@jdolitsky Are you using go 1.9 got an error when trying to test with go 1.8

vendor/go.uber.org/zap/field.go:33: syntax error: unexpected = in type declaration