#456 Fedora CI - scratch build does not correctly set %autorelease
Closed by msrb. Opened by churchyard.

Apparently when Fedora CI - scratch build runs on PR for package with %autorelease, the release is incorrectly set to 1.

Example:

https://src.fedoraproject.org/rpms/python-setuptools/pull-request/109
https://src.fedoraproject.org/rpms/3dprinter-udev-rules/pull-request/1
https://src.fedoraproject.org/rpms/uflash/pull-request/2
https://src.fedoraproject.org/rpms/python-tomli/pull-request/23
(I have plenty more)


When testing the scratchbuild locally, it makes it hard not to accidentally "upgrade" it to the older version with higher Release.

There are multiple possible solutions to this problem.

Basic: When the SRPM is built to be submitted to Koji, rpmautospec needs to be installed and up to date. Is it?

Advanced: Instead of building SRPM and uploading it to Koji, tell Koji to build it from SCM. For scratch builds, this is allowed for forks. An additional advantage is that we don't need to download and upload sources and SRPMs over the internet, making the CI arguably faster. Also, this will solve similar problems with outdated machines that submit the Koji builds -- nothing is needed, just a Koji client (not even rpmbuild).

koji build rawhide --scratch 'git+https://src.fedoraproject.org/rpms/<pkgname>.git#<commit_has_from_the_pr>'

Telling Koji to build from SCM is the way to go. I never liked the mock fiddling in CI, just to create the SRPM... that's why I opened https://pagure.io/fedora-infrastructure/issue/9728.

The job that deals with this needs to be updated to take advantage of this new functionality.

For the record, the release value from Zuul's scratchbuilds is OK.

mock is gone \o/ No more "no disk space left on the device" and outdated mock configs after branching.

Metadata Update from @msrb:
- Issue status updated to: Closed (was: Open)

@msrb you rock!

Metadata