Pretty much all distros have at least the option of pulling the spec changelog
from an external source - namely the package SCM (dist-git in the Fedora
world). There have been various suggestions to make rpm better integrate with
this, such as
- https://github.com/rpm-software-management/rpm/issues/393
- https://github.com/rpm-software-management/rpm/pull/69
...and I think a whole other bunch in RH bugzilla and other ticket systems over
time, yet here we still are, none of them have been implemented/applied,
because the designs just haven't seemed right. If you have an external process
to do 'git log > changes; rpmbuild --changelog=changes foo.spec' then that same
process can could just as easily append the changes to the spec itself. Plus
it's a step you need to remember to do manually unless you have extra tooling
around rpmbuild. Adding -f support to %changelog to allow for an external
changelog forces silly '%changelog -f somefile' boilerplate in each and every
spec, and worse, introduces a whole new world of spec parse failures because
the externally generated file is not there.
To come up with a solution that satisfies most if not everybody, we need to be
aware of what people are currently doing. I don't know what exactly other
distros do (just append to the spec or something fancier? please fill us in),
in Fedora there's [rpmautospec](https://pagure.io/fedora-infra/rpmautospec) to
fill this role and (optionally) generate a release automatically too. I haven't
used it beyond curiosity testing a bit. There are interesting ideas in there,
but then it also requires running some external wrapper tooling to make it
actually work. And at that point we're back to: if external tooling is
required, then what do we need rpm changes for? This is already possible, in
numerous different ways. But surely, there *must* be something we can do in
this area.
Thoughts and ideas, even wacky ones, welcome. It's better to hash out the ideas
as a central discussion that speculate independent RFE tickets. We'll file
ticket(s) if/when some conclusions are reached.
I've been recently working on
https://github.com/rpm-software-management/rpm/issues/1087, and one thing that
will give us is a way to automatically populate spec sections with macros. This
should make it possible to invoke something like `%([ -d .git ] && git log
--pretty="* %ad %an <%ae>%n- %s%n")` (real-worl will want more complicated
"filter" there now doubt) to autofill %changelog from inside rpmbuild itself
with no need for external commands and zero changes to the spec itself. Except
to trim out the %changelog section entirely. Whether this kinda of thing is
useful to anybody at this point is another question.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2768
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/repo-discussions/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint