[Ovirt-devel] [PATCH node] Restructured makefile and rpmbuilding to simplify it
Daniel P. Berrange
berrange at redhat.com
Fri Sep 19 09:09:21 UTC 2008
On Thu, Sep 18, 2008 at 05:59:45PM -0400, Perry Myers wrote:
> Removed customized rpm macros that should really be set by users
> ~/.rpmmacros directory. This removed need for custom tar target,
> as we can now use dist and rpmbuild -ta instead.
>
> Still need to have custom RPM_FLAGS for ovirt specific overrides
> like OVIRT_CACHE_DIR (used by appliance and node-image spec files)
>
> Removed unused bumprelease, bumpversion and setversion targets
> Removed other unused make variables
> Simplified publish to just rsync all RPMS frpm the rpmdir.
> Added seconds granularity to git tag for bumpgit target.
>
> Made it so version file is no longer edited by makefile.
> Instead configure.ac file is used to store version. For
> developers setting OVIRT_DEV env var causes extra_dist to be
> passed to rpmbuild adding the git tag onto the RPM.
>
> Signed-off-by: Perry Myers <pmyers at redhat.com>
ACK. Very nicely done - exactly same as I would have done.
> --- a/ovirt-node.spec
> +++ b/ovirt-node.spec.in
> @@ -1,10 +1,9 @@
> Summary: The oVirt Node daemons/scripts
> Name: ovirt-node
> -Source1: version
> -Version: %(echo `awk '{ print $1 }' %{SOURCE1}`)
> -Release: %(echo `awk '{ print $2 }' %{SOURCE1}`)%{?dist}%{?extra_release}
> +Version: @VERSION@
> +Release: 0%{?git_release}%{?dist}%{?extra_release}
Do you need the %git_release bit to be in front of the %dist tag ? I'd
guess not because %dist is basically a constant for any one developer's
build host. The %git_release & %extra_release are essentially serviing
the same purpose - append a unique extra token - the latter is used by
autobuild. So we could simplify it tiny a little by just merging the
two tags:
Release: 0%{?dist}%{?extra_release}
and then just set %extra_release to contain the current %git_release data
when calling it in the Makefile.am.
Regards,
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the ovirt-devel
mailing list