Bug 2270397 - container images built from unsigned packages
Summary: container images built from unsigned packages
Keywords:
Status: VERIFIED
Alias: None
Product: Fedora
Classification: Fedora
Component: distribution
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Aoife Moloney
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: RejectedFreezeException
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-20 06:17 UTC by Jan Pazdziora
Modified: 2024-04-22 10:25 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-03-21 23:22:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2024-03-20 06:17:22 UTC
Running rpm -qi rpm in container shows Signature as (none).



Reproducible: Always

Steps to Reproduce:
1. podman pull registry.fedoraproject.org/fedora:rawhide
2. podman run --rm registry.fedoraproject.org/fedora:rawhide rpm -qi rpm


Actual Results:  
$ podman pull registry.fedoraproject.org/fedora:rawhide
Trying to pull registry.fedoraproject.org/fedora:rawhide...
Getting image source signatures
Copying blob 796f531ee50f skipped: already exists  
Copying config 6cd5b158c2 done   | 
Writing manifest to image destination
6cd5b158c288b0ed0582ada45579bff74c76d5b68dfd2991fac2dc01cb5bc6f2
$ podman run --rm registry.fedoraproject.org/fedora:rawhide rpm -qi rpm
Name        : rpm
Version     : 4.19.1.1
Release     : 1.fc40
Architecture: x86_64
Install Date: Tue Mar 19 08:50:37 2024
Group       : Unspecified
Size        : 3095700
License     : GPL-2.0-or-later
Signature   : (none)
Source RPM  : rpm-4.19.1.1-1.fc40.src.rpm
Build Date  : Wed Feb  7 15:55:53 2024
Build Host  : buildvm-x86-31.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.rpm.org/
Bug URL     : https://bugz.fedoraproject.org/rpm
Summary     : The RPM package management system
Description :
The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
verifying, querying, and updating software packages. Each software
package consists of an archive of files along with information about
the package like its version, a description, etc.



Expected Results:  
The Signature is shown, something like
RSA/SHA256, Sun Feb 11 08:19:17 2024, Key ID d0622462e99d6ad1



It is possible that it's not rpm that is at fault, that the registry.fedoraproject.org/fedora:rawhide (and registry.fedoraproject.org/fedora:40) container images now have unsigned packages installed. But I wouldn't expect such a big failure in the whole container image build process.

Comment 1 Panu Matilainen 2024-03-20 07:20:30 UTC
A stable rpm version doesn't suddenly forget where to look for its own signatures. If rpm says there is no signature then there isn't one. 

The corresponding packages in the rawhide repositories *are* signed so, it means the rawhide container images are being built from packages prior to signing.

Comment 2 Neal Gompa 2024-03-20 17:10:05 UTC
I believe I've got a fix submitted to Koji for this: https://pagure.io/koji/pull-request/4061

Comment 3 Adam Williamson 2024-03-20 17:21:44 UTC
Proposing as a Beta FE to decide if we think this is important enough to fix for Beta (otherwise it would just get fixed with post-Beta nightlies which will be published to the registries).

Comment 4 Adam Williamson 2024-03-20 20:53:51 UTC
+3 in https://pagure.io/fedora-qa/blocker-review/issue/1538 , marking accepted FE.

Comment 5 Kevin Fenzi 2024-03-20 21:10:26 UTC
I've updated koji with the patch so hopefully this will be fixed in rc10.

Comment 6 Kevin Fenzi 2024-03-21 14:56:51 UTC
ok, this was not actually fixed in rc10, but... is now fixed in both branched 40 and rawhide. ;) 

If anyone could doublecheck that would be great.

Comment 7 Jan Pazdziora 2024-03-21 15:02:31 UTC
Pulling fresh images from the registry, I see

$ podman run --rm -ti registry.fedoraproject.org/fedora:40 rpm -qi rpm | grep Signature
Signature   : RSA/SHA256, Wed Feb  7 16:03:09 2024, Key ID 0727707ea15b79cc
$ podman run --rm -ti registry.fedoraproject.org/fedora:rawhide rpm -qi rpm | grep Signature
Signature   : RSA/SHA256, Sun Feb 11 08:19:17 2024, Key ID d0622462e99d6ad1

So I'm happy.

Comment 8 Adam Williamson 2024-03-21 23:22:42 UTC
Let's call it fixed, then, there is no update to push here, we fixed it in the koji deployment.

Comment 9 Jan Pazdziora 2024-04-08 07:10:15 UTC
For the record, the problem is back on registry.fedoraproject.org/fedora:40:

$ podman pull registry.fedoraproject.org/fedora:40
Trying to pull registry.fedoraproject.org/fedora:40...
Getting image source signatures
Copying blob c6405a39eed1 skipped: already exists  
Copying config 71a9aee84c done   | 
Writing manifest to image destination
71a9aee84c30bdd96c84be43693f6d74ba56f1d71c278f383ef1524f0ec86903
$ podman run --rm registry.fedoraproject.org/fedora:40 rpm -qi rpm | grep Signature
Signature   : (none)

Comment 10 Kamil Páral 2024-04-08 08:01:44 UTC
Reopening the bug and proposing for a Final freeze exception.

Comment 11 Neal Gompa 2024-04-08 09:47:35 UTC
I think our patches on Koji got dropped accidentally somehow, because not only is this back, but the verbose logging is missing from the kiwi image builds again.

Comment 12 Jan Pazdziora 2024-04-08 09:57:34 UTC
Are we sure the https://pagure.io/koji/pull-request/4061 mentioned in comment 2 ever got merged? It is still listed as open and the https://pagure.io/koji/history/plugins/builder/kiwi.py?identifier=master does not show any change in the past year.

Do we need some tests added to the pipeline first, to make sure the result is sanity-checked and pipeline stopped with a loud bang?

Comment 13 Neal Gompa 2024-04-08 10:35:36 UTC
It was cherry-picked into an infra koji build, but because they weren't committed to the koji package, I'm guessing it got overwritten and dropped accidentally.

Comment 14 Jan Pazdziora 2024-04-08 10:37:55 UTC
New ticket: https://pagure.io/fedora-qa/blocker-review/issue/1573

Comment 15 Adam Williamson 2024-04-08 15:02:43 UTC
if the change goes into an f39 infra build, it doesn't really need an f40 final freeze exception (both because it's f39 not f40, and because infra builds aren't subject to the freeze for 'regular' builds).

Comment 16 František Zatloukal 2024-04-08 20:09:41 UTC
Discussed during the 2024-04-08 blocker review meeting: [1]

The decision to classify this bug as a RejectedFreezeException (Final) was made:

"This is clearly an important problem and we want to fix it, but an F40 Final freeze exception is no use in doing that, as the fix needs to be applied to the builders, which run Fedora 39. What we need is an infrastructure freeze break request, nirik has proposed one on the mailing list, we need releng/sysadmin-main members to vote on that at https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org/thread/XFJATU5DDOUDLF7DCBY6JG5CNLKQ4MAT/ ."

[1] https://meetbot.fedoraproject.org/blocker-review_matrix_fedoraproject-org/2024-04-08/f40-blocker-review.2024-04-08-16.00.html

Comment 17 Kevin Fenzi 2024-04-09 00:25:49 UTC
The infrastructure fix is in, so hopefully tonights nightlys will be fixed.

Comment 18 Jan Pazdziora 2024-04-17 05:18:14 UTC
The images were fixed for a while:

$ podman images registry.fedoraproject.org/fedora:40
REPOSITORY                         TAG         IMAGE ID      CREATED       SIZE
registry.fedoraproject.org/fedora  40          f9754cf18f83  7 days ago  229 MB
$ podman run --rm registry.fedoraproject.org/fedora:40 rpm -qi rpm | grep Signature
Signature   : RSA/SHA256, Wed Feb  7 16:03:09 2024, Key ID 0727707ea15b79cc

And now they are broken again:

$ podman images registry.fedoraproject.org/fedora:40
REPOSITORY                         TAG         IMAGE ID      CREATED       SIZE
registry.fedoraproject.org/fedora  40          895a2e2fc547  18 hours ago  227 MB
$ podman run --rm registry.fedoraproject.org/fedora:40 rpm -qi rpm | grep Signature
Signature   : (none)

Comment 19 Kevin Fenzi 2024-04-17 22:24:52 UTC
Yeah, I applied a updated upstream patch and... it's not defaulting to what I expect. 

Asking about it upstream and will try and get it fixed asap.

Comment 20 Kevin Fenzi 2024-04-19 18:27:00 UTC
% podman images registry.fedoraproject.org/fedora:40
REPOSITORY                         TAG         IMAGE ID      CREATED      SIZE
registry.fedoraproject.org/fedora  40          868a0de6755b  8 hours ago  222 MB
% podman run --rm registry.fedoraproject.org/fedora:40 rpm -qi rpm | grep Signature
Signature   : RSA/SHA256, Wed Feb  7 16:03:09 2024, Key ID 0727707ea15b79cc

Please confirm. :)

Comment 21 Jan Pazdziora 2024-04-22 10:25:43 UTC
Confirming that on both

REPOSITORY                         TAG         IMAGE ID      CREATED       SIZE
registry.fedoraproject.org/fedora  rawhide     e4352707d741  27 hours ago  229 MB
registry.fedoraproject.org/fedora  40          868a0de6755b  3 days ago    229 MB

I currently see the signature. Thank you.


Note You need to log in before you can comment on or make changes to this bug.