changelog in spec file, was Re: Stop the git abuse

Michael Scherer misc at
Mon May 21 16:28:56 UTC 2012

Le lundi 21 mai 2012 à 09:01 -0700, Adam Williamson a écrit :
> On Mon, 2012-05-21 at 08:33 +0100, Richard W.M. Jones wrote:
> > On Sun, May 20, 2012 at 09:49:03PM -0400, Matthew Miller wrote:
> > > On Sun, May 20, 2012 at 08:02:23PM -0400, Paul Wouters wrote:
> > > > Agreed. changelog and version field conflicts are 90% of my cherry-pick
> > > > conflicts.
> > > > I would be in favour of no longer maintaining a changelog in the spec file
> > > 
> > > As long as it gets put into the final RPM in the build process somehow. `rpm
> > > --changelog` is often very, very useful in the field.
> > 
> > Absolutely!
> > 
> > BTW SuSE has not had an RPM %changelog section for at least 4 years.
> > However they have a system where a hand-written <package>.changes file
> > is incorporated into the spec during the build, so their solution
> > isn't directly applicable.
> As I always mention when this comes up - once a year on average -
> Mandriva has been auto-generating the package changelog from the SCM
> changelog for years, ever since switching from CVS to SVN.

To complete, it work like this :
- the changelog is created by taking every commit message in svn for the
current branch of the package, except if it start with "SILENT:" on the
first line, in which case the whole message is discarded. Line starting
by "SILENT:" who are not the first are also removed, this permit to have
filtering on each line.

- Then a file called log, coming from svn, is added to the end of the
changelog. This file is where the previous changelog before the
migration is stored. 

For example this file :

That's the changelog from mandriva before it got forked to mageia, but
this can also be the changelog before a package was imported in the svn.
Extraction is done on import by a dedicated tool called mdvsys ( or
mgarepo, a fork ).

- then we add '%changelog' + changelog in the spec, and build a srpm out
of svn and mirrors for binary content.
- then the srpm is rebuilt ( binary and src.rpm ) and then sent to

Michael Scherer

More information about the devel mailing list