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

Update sigstore layout in (atomic sign) #931

@mtrmac

Description

@mtrmac

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions