Le jeudi 27 février 2020 à 17:38 +0100, clime a écrit : > On Thu, 27 Feb 2020 at 16:26, Nicolas Mailhot via devel > <devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > > Le 2020-02-27 12:59, clime a écrit : > > Hi, > > > > > can you, please, show an example of such package? I was searching > > > through some > > > golang packages because I was curious how it works but couldn't > > > find > > > an example > > > > A Go example: > > https://src.fedoraproject.org/rpms/golang-x-build > > > > A non-Go example: > > https://src.fedoraproject.org/rpms/impallari-dancing-script-fonts > > > > In both cases the spec calls a macro (not the same one in both > > specs) that causes one or several distprefixNUMBER variables to be > > computed > > > > The result then ends in Release via > > https://src.fedoraproject.org/rpms/fedora-release/blob/master/f/fedora-release.spec#_488 > > > > The font spec example calls the macro in redhat-rpm-config directly > > (%forgemeta), the Go example calls it through a Go-specific macro > > in go-rpm-macros (%gometa) > > Okay, thanks :)! > > At least my idea was that there should be a spec file preprocessor, > evaluating the macros that need git context, that would produce valid > rpm spec that will be evaluated by the rpm engine in the end so > everything related to %{dist} generation that is used in those > packages will work unchanged. > > A small tweak in those spec files to allow dynamic release bumping > could be: > > Release: 0.<<dynamic_release>>%{?dist} > > or alternatively: > > Release: <<dynamic_release prefix=0>>%{?dist} depending on the > implementation of the dynamic_release macro. Yes, something like that would be possible, my worry was essentially about not snipping commit info from automated changelogs. %{dynrel} should default to 1 if buildsys info is not available Regards, -- Nicolas Mailhot _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxxxx