Skip to content

Export <CI_CNT> and <B_CNT> as RPM macros #18841

@Conan-Kudo

Description

@Conan-Kudo

Is your feature request related to a problem? Please describe.
In Fedora Linux, we're working on adding support for build counters to our default packaging through a (future) buildsystem controlled macro called %buildrelease.

Describe the solution you'd like
I would like <CI_CNT> and <B_CNT> to be exported as macros in the RPM build environment.
Since these are OBS-specific, I think it would make sense to export them like so:

%_obs_commit_count <CI_CNT>
%_obs_build_count <B_CNT>

Then, Fedora OBS targets can be defined with:

Release: <SPEC_REL>

Macros:
%buildrelease ~obs%{_obs_commit_count}.%{_obs_build_count}
:Macros

Describe alternatives you've considered
The only real alternative I've considered is having OBS continue to ignore the feature and rewrite the Release: field as it does today. There aren't really any other options that would work with this approach.

Additional context
The details of the %buildrelease macro are discussed in pagureio#fesco#3501.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BackendThings regarding the OBS backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions