Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding basic RPM spec file #287

Merged

Conversation

BrianSipos
Copy link
Contributor

Closes #286

This also enables and configures ctest for any other use of test running.

@laurencelundblade
Copy link
Owner

Hi Brian,

Appreciate the addition here. Want to check in on a few of the requirements to maintain this going forward since I'm not familiar with it.

It looks like I should update the spec file every time I make a new release. Mostly the version number and the change log, right?

What is '%setup -q -n QCBOR-1.5' ? I'm asking because it seems to involve versioning. Should it be 1.5.0?

Want to make sure I do this right going forward.

Thx!

@BrianSipos
Copy link
Contributor Author

Yes, the version number at the top is necessary to update. Though there could be some automation applied to making the update (or produce a spec file from e.g. CMake, but that adds complexity).
The changelog is helpful to include and mandatory for an eventual inclusion Fedora.

There is detailed description of the %setup macro in upstream RPM documentation but because the current spec file obtains its "Source0" directly from Github tarball, which is auto-generated from a release tag, the setup macro must be informed of the directory naming convention that Github uses. Because the Fedora guidelines for naming prefer lower-case the package name qcbor is different than the Github repo/directory name QCBOR.

In the future if release tags follow the same form as the full three-part version name this could be simplified to %setup -q -n QCBOR-%{version} but for now I wanted to get a package that built the actual v1.5 release tarball.

@laurencelundblade
Copy link
Owner

Understood. Thx for the explanation. I will merge this, but expect you actually want a QCBOR release with this. I will do that soon. It will be 1.5.1, so it will be %setup -q -n QCBOR-1.5.1 since Git puts the ending ".1" in the name of the tar ball.

@BrianSipos
Copy link
Contributor Author

Yes exactly, the setup name just needs to match the GitHub generated tar directory name.

While it will be nice to see the spec file in a release version, the tools like Copr already allow out-of-source specs. I added a test package at https://copr.fedorainfracloud.org/coprs/bsipos/BSL/package/qcbor/ to verify everything is lined up in the current spec.

@laurencelundblade laurencelundblade merged commit 846e2d3 into laurencelundblade:master Jan 4, 2025
22 checks passed
laurencelundblade pushed a commit that referenced this pull request Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RPM package spec
2 participants