Hello,

Martin Gansser venit, vidit, dixit 2024-09-05 11:41:04:
> Hello,
> 
> I have created a new package pyliblo3.spec [1] and would like to know how to
> create a rpm-autospec` based package from it.

welcome to the club :)
 
> If I use the following command
> 
> [martin@fc40 SPECS]$ rpmautospec convert pyliblo3.spec 
> Converted to %autorelease and %autochangelog.
> 
> then these two lines are changed in the spec file.
> 
> Release: %autorelease
> ....
> %changelog
> %autochangelog
> 
> and a changelog file is created.

Perfect! There is nothing else to do besides committing the changes.
 
> Which command is used to enter the following block in the spec file?
> 
> 
> ## START: Set by rpmautospec
> ## (rpmautospec version 0.6.3)
> ## RPMAUTOSPEC: autorelease, autochangelog
> %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
>     release_number = 0.5
>     base_release_number = tonumber(rpm.expand(“%{?-b*}%{!?-b:1}”));
>     print(release_number + base_release_number - 1);
> }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
> ## END: Set by rpmautospec

This is the definition of the "%autorelease" macro. So, by including
"%autorelease" in your spec you "have it already there".

If you want to see the spec file which the machinery builds before
actually building the package you can use

rpmautospec process-distgit orig.spec processed.spec

But don't commit processed.spec to the dist-git repo. (This is in a way
similar to rpkg preprocessing for spec files, in case you use that.)

Cheers
Michael
-- 
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to