[Ovirt-devel] [PATCH appliance] Restructured makefile and rpmbuilding to simplify it

Daniel P. Berrange berrange at redhat.com
Fri Sep 19 09:16:30 UTC 2008


On Fri, Sep 19, 2008 at 01:32:49AM -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 this looks good to me.

> +git_head	= $$(git log -1 --pretty=format:%h)
> +GIT_RELEASE	= $$(date --utc +%Y%m%d%H%M%S)git$(git_head)
> +RPMDIR		= $$(rpm --eval '%{_rpmdir}')
> +RPM_FLAGS	= --define "ovirt_cache_dir $(OVIRT_CACHE_DIR)"
> +RPM_FLAGS	+= $(if $(OVIRT_DEV),--define "git_release .$(GIT_RELEASE)")



> --- a/ovirt-appliance.spec
> +++ b/ovirt-appliance.spec.in
> @@ -8,11 +8,10 @@
>  
>  Summary: oVirt Appliance
>  Name: ovirt-appliance
> -Source1: version
> -Version: %(echo `awk '{ print $1 }' %{SOURCE1}`)
> -Release: %(echo `awk '{ print $2 }' %{SOURCE1}`)%{?dist}
> +Version: @VERSION@
> +Release: 0%{?git_release}%{?dist}%{?extra_release}

Same minor question as before about whether we can merge git_release
and extra_release, just using extra_release.

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