#1396 RFE: rebuild srpms before building
Opened 2 months ago by mikem. Modified 8 days ago

When we build from source control, we first build an srpm inside a chroot to get the correct headers for the target environment. However, when we build from an uploaded SRPM, we just pass that SRPM directly to the build task. This can result in situations where the resulting srpm from the build does not agree with the one we started with (commonly due to dist tags).

This is a problem because we use that initial srpm to create the build entry, so if that NVR is wrong, the build will eventually fail due to sanity check.

One way to address this is to first rebuild the srpm in a chroot, similar to what we do for builds from source control.


This has come up in relation to module builds. See: https://pagure.io/fm-orchestrator/issue/1187

While I think it is reasonable to just make the change to rebuild all srpms before building, it might also be worth making this configurable in some way. Speak up if you have opinions.

I think rebuilding everything makes sense here. Only hypothetical counterargument in my head is, that SRPM's checksum can be tracked in some other tool already and it will not match with rebuilt one. Same goes with possibly signed input SRPM. On the other hand I don't know about any such setup.

Possibly, the build task could take a flag that controls whether to rebuild the srpm.

  • maybe system-default in kojid.conf?

maybe system-default in kojid.conf?

Even though we have a few things like this that can be specified in kojid.conf already, I don't feel that's a good place for this sort of configuration. There really wouldn't be a reason to have this vary across hosts.

could we have a policy for this?

Metadata Update from @yulwang:
- Issue assigned to dgregor

2 months ago

Metadata Update from @dgregor:
- Issue priority set to: High (was: Normal)
- Issue set to the milestone: 1.18

a month ago

I've created policy-driven rebuildSRPM task here: #1462

Metadata Update from @dgregor:
- Custom field Size adjusted to None
- Issue assigned to tkopecek (was: dgregor)

11 days ago

could we have a policy for this?

A policy feels like overkill.

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1462 Last updated 44 minutes ago