Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Update sigstore layout in (atomic sign) #931

Closed
mtrmac opened this issue Mar 4, 2017 · 2 comments
Closed

Update sigstore layout in (atomic sign) #931

mtrmac opened this issue Mar 4, 2017 · 2 comments

Comments

@mtrmac
Copy link
Contributor

mtrmac commented Mar 4, 2017

Per containers/image#187 etc., containers/image#247 will change the sigstore layout from $base/$hostname/$repo-path/$image@$algo:$hex to $base/$repo-path/$image@$algo=$hex. Please update atomic sign accordingly.

The replacement of : with = is simple enough,

diff --git a/Atomic/sign.py b/Atomic/sign.py
index 57b851f..d41dfef 100644
--- a/Atomic/sign.py
+++ b/Atomic/sign.py
@@ -117,7 +120,7 @@ class Sign(Atomic):
                     if not os.path.exists(signature_path):
                         raise ValueError("The signature path {} does not exist".format(signature_path))
 
-                sigstore_path = "{}/{}@{}".format(signature_path, expanded_image_name.rsplit(':', 1)[0], manifest_hash)
+                sigstore_path = "{}/{}@{}".format(signature_path, expanded_image_name.rsplit(':', 1)[0], manifest_hash.replace(':', '=', 1))
                 self.make_sig_dirs(sigstore_path)
                 sig_name = self.get_sig_name(sigstore_path)
                 fq_sig_path = os.path.join(sigstore_path, sig_name)

but I’m not sure what to use instead of expanded_image so that the hostname is removed, especially considering that expanded_image may be resolved incorrectly (item 5 in #929).

@mtrmac mtrmac changed the title Update sigstore layout in atomic sign Update sigstore layout in (atomic sign) Mar 4, 2017
@rhatdan
Copy link
Member

rhatdan commented Mar 6, 2017

@aweiteka PTAL

@mtrmac
Copy link
Contributor Author

mtrmac commented Apr 24, 2017

Fixed by #937.

@mtrmac mtrmac closed this as completed Apr 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants