#4342 download-build: allow fallback to unsigned with --key
Closed by tkopecek. Opened by adamwill.
adamwill/koji download-fallback-unsigned  into  master

Download 4342.patch

If you pass --key to download-build and signed packages aren't
available, Koji will skip the unsigned package, or error out.
This adds a modified behavior controlled by the new
--fallback-unsigned arg. If this is passed with --key, unsigned
copies will be downloaded for packages for which no signed copy
can be found.

This is primarily intended to work with a proposed Bodhi feature:
https://github.com/fedora-infra/bodhi/pull/5859 . That would
make Bodhi's bodhi updates download command automatically try
to download signed copies, but I think it would be best if it
falls back to getting unsigned copies if that doesn't work. Just
failing out entirely seems wrong for that case. Implementing the
fallback in Bodhi itself is more awkward and messy than adding it
in Koji, and it may be useful for others in Koji I guess.

Note there are two distinct 'no signed copies' cases. In the
simple one, queryRPMSigs tells us Koji has no record of the
package ever being signed with the key in question. In this case
we don't bother trying to download a signed copy. In the other
case, queryRPMSigs tells us the package has been signed with
the key, but it turns out that signed copy has been garbage-
collected and we can no longer download it. In this case we have
to catch the failure on the download attempt and retry the
download with sigkey set to None.

Signed-off-by: Adam Williamson awilliam@redhat.com

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

This options seems fine.

It seems like this command could benefit from a --write-signed-rpms option, but that can be separate work (and since it requires a special perm, probably not that useful for the use-case above)

Metadata Update from @tkopecek:
- Pull-request untagged with: testing-ready
- Pull-request tagged with: testing-basic

Are you waiting on anything from me here?

We're waiting on qe testing

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

merged in https://pagure.io/koji/c/15d604f32e136991d6cbe93e155d2b859494343a?branch=master

pretty please pagure-ci rebuild

Pull-Request has been closed by tkopecek

thanks! do you know when a new release of koji with this included will happen?

Just released 1.35.3 yesterday, so it will be a while (at least month, probably more) before the next release (looking to state of https://pagure.io/koji/roadmap/1.36/)

Metadata