Le mercredi 01 juillet 2020 à 23:48 +0200, Dan Čermák a écrit :
This is a system-wide change because all packages build with
> redhat-rpm-config, but it only concerns packages that opted to use
> this part of redhat-rpm-config (auto framework).
> The change will make those packages auto-bump and auto-changelog at
> the rpm level, in an infrastructure-independent way.
Please forgive the silly questions (it's getting late here…), but how
does this look in practice?
There are no silly questions, do ask if you have more.
How do I let rpm generate the changelog automatically?
This feature is not changelog generation, just changelog bumping on
build events. You still need some other method to put non-build events
in the changelog.
The detached changelog is just one more file in SRPM sources, which is
modified by rpmbuild at `%build` time with other files rpmbuild
modifies. The tricky part is to modify the source file as a source file
so rpmbuild adds the result to the produced SRPM (and, that does not
work in mock right now, because mock serves the SRPM that existed at
the start, not at the end of the build. Though it’s probably just a
matter of getting mock to call again its SRPM creation method at the
end of the build).
The packager does not have to request the modification in his spec,
it’s done as part of the various %auto_foo calls the change introduced
Is the old changelog discarded?
The old changelog file is replaced in srpm sources with a new file
containing new build event lines before the old lines. It is not done
before the build is effective and %build has been started (ie a
rpmbuild -bs or rpmspec -P will show the future bump, but nothing will
be stored before the build is effective)
And is this related to Piere/Pingou's work on the same topic that
deployed to koji staging?
It’s a different implementation, at the rpm level, that does not tie
bumping to Fedora infra (koji included). Though, it is probably
complementary to what pingou did on the changelog alimentation front.
IMHO the design mistake so far was to conflate bumping and non-build
event changelog filling. You need to do both of course but build event
should be a build event driven by the lowest common denominator
(rpmbuild) with koji/infra scrapping rpmbuild results as usual and
exposing them to users.