My first shot at rpm packaging

I’m just getting started with learning about packaging for Fedora.

I’m reading tutorials from Fedora and RPM.org, and I am finding some conflicting information and not sure when various tutorials were made.

Can someone recommend an up to date or best practice workflow?

I want to first package someone elses software as a COPR repo.

Do I build on my local computer, and then upload to COPR?
Keep it simple for me :slight_smile:

If there is a conflict between the advice from Fedora and RPM then use the Fedora advice.

If you can get to the stage of having a working RPM spec files we can review here and give feedback.

If you cannot get the RPM spec file to work ask here for help.

This is not helpful.

It would be good if general advice and perhaps links about workflow could be given as requested by the OP, which other people (like me) can also read, instead of only looking at a “spec” file.

If the Fedora docs are not covering the issue then that’s the best I know to offer.

It isn’t clear what is or isn’t official Fedora information. For example, the COPR documentation is at pagure.org:

https://docs.pagure.org/copr.copr/user_documentation.html#quick-start

which in turn refers to github.io for documentation about SRPM files:

The instructions are not consolidated which makes it challenging for new users to get a grasp on things.

Using copr does not impose packaging rules (beyond the don’t break licensing etc).
But for an RPM to be accepted into Fedora there are rules.

From my notes I think this is the documentation Package Maintenance Guide :: Fedora Docs

That link is about maintaining (updating) existing packages in Fedora’s repos using a Git based workflow. Much too advanced for me!

@barryascott Thank you for offering to help with my .spec file. That is what I am stuck on (after trying for one day).

@litemotiv Yes, I am looking for an explanation of the basic workflow, as well as trying to establish a post that myself others could use as a reference to begin a lifelong and illustrious career as a packager. I am thinking High-School level :slight_smile:

As I understand it, I have to build my sourcecode as a .rpm with a .spec file before uploading that .rpm to COPR. COPR will then establish a user repo and build the .rpm into a deployable asset via DNF.


What I have now is the Linux amd_64 file Mox and I have these two tutorials Developer and Docs which give me two different examples on how to build a spec file for the same test program.

What I want is a detailed and up to date list of what information (and why) to put in each .spec file section. I don’t want to follow a basic tutorial like the ones I linked beause I still won’t understand how I got what comes out the other end.
I don’t know if ‘source’ is a local link on my PC, or a URL to download from. I don’t know if I have the right ‘source’ file on my local PC.

I’ve played around with packaging in COPR to build things that weren’t available or an update I wanted to try.

Most of the time I found an example or tried to translate from an arch package.

I also referenced, Fedora Packaging Guidelines :: Fedora Docs

Since this is a go package you may also want to get in contact with the go sig

You will probably also need, @go-sig/golang-rawhide Copr for the latest version in the current fedora.

Good luck!

Maybe start with something easier than ‘go’, it’s so much harder to package than most other langs.