spec file changes: removing Release: and %changelog

Colin Walters walters at redhat.com
Wed Mar 5 18:03:35 UTC 2008


Hi,

I've spent a little bit of time on the shuttle to/from work hacking on
Makefile.common.  The general idea is to remove the Release: and %
changelog fields from spec files, and have them generated automatically.
The goals are:

* Allow for automated (re-)builds without hackish scripts
* Avoid developer time being spent incrementing integers in spec file
* Obviate the need to keep two changelogs in sync
* Resolve clashes about what disttags should be by having them
  determined by the build system 
* Longer term, make it easier to transition to a better source format

For example, with this change we can go from the workflow of:

edit foo.spec
make clog
cvs commit -F clog
make tag build
# discover error
edit foo.spec
make force-tag build

Now:

edit foo.spec2
make build
# discover error
edit foo.spec2
make build

Much nicer!  And we're being generous with the first system - if you
want to do it without the unsafe force-tag it's even longer.  In the new
system, you only need to know two commands: "make local" to do a local
build, and "make build" for Koji.

The attached patch is a work in progress; you can patch your
Makefile.common, delete the Release: line from your spec file, and
rename your spec file to .spec2 (suggestions for a better name are
appreciated).

It works for "make local" which gives you a feel for how the system can
operate.  You can verify that after every 'make local' you get a new RPM
release, and thus you can install them sanely on your system without
using --force.  One tweak I'd like to implement for 'make local' is have
it use '.local' or something for a disttag.

What remains to be implemented is the Koji side of things.  The idea is
that "make build" will run 'cvs commit; make tag koji', and that Koji
will have a database of package Release tags, and increment them itself
for each new build.  It will generate the %changelog section from the
CVS changelog between the last tag and the new one.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile-no-release-changelog.patch
Type: text/x-patch
Size: 3542 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-devel-list/attachments/20080305/03773244/attachment.bin>


More information about the fedora-devel-list mailing list