How do you build/install a scratch build of a package

I created a bug report and out of that the assignee has created a PR against the package and posted I could try a scratch build of the package.

Looking at documentation I think I need to use koji build --scratch rawhide 'git url' but I am either wrong or have the wrong git url.

The error I get is ‘FAILED: BuildError: No spec file found’

So I’m not really sure what I’m missing.

Is the patch against the upstream package not the RPM?
If so you would need to add the patch to the RPM sources and spec file then build it.
Do you know how to that?

1 Like

It is a patch against the fedora selinux-policy git repo, so not against the rpm.

I can see in the repo how a src.rpm is created, and the INSTALL file has some instructions on installing the selinux policy so I could just do that.

It just seems like I’m missing something I’m supposed to know to do it properly.

You should be able to use mock to build the .src.rpm on your fedora system.
You will need to dnf install mock then add your user to the mock group.
After that you can use mock to build the .src.rpm as your user, no need for root.

Not an answer to your question but if you open the PR, click on Show all check, you’ll find that there is a set of rpm builds already built in copr, e.g. Allow collectd read udev pid files by zpytela · Pull Request #1938 · fedora-selinux/selinux-policy · GitHubPackit Service