Re: [Freeipa-devel] [PATCH] Improve developers RPM builds

2014-11-18 Thread Nathaniel McCallum
On Mon, 2014-11-17 at 23:42 -0500, Simo Sorce wrote:
 This small patch will add a date component to the ipa version when
 building straight from git.
 
 This way successive builds will clearly install on top of a previous
 one even if alphabetically the git commit id has gone backwards.
 
 It also gives a chance of remembering what/when you had installed on
 older VMs at a simply rpm -qi glance.

ACK

And thank you! This has been bugging me.

Nathaniel

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Improve developers RPM builds

2014-11-18 Thread Simo Sorce
On Tue, 18 Nov 2014 11:25:19 -0500
Nathaniel McCallum npmccal...@redhat.com wrote:

 On Mon, 2014-11-17 at 23:42 -0500, Simo Sorce wrote:
  This small patch will add a date component to the ipa version when
  building straight from git.
  
  This way successive builds will clearly install on top of a previous
  one even if alphabetically the git commit id has gone backwards.
  
  It also gives a chance of remembering what/when you had installed on
  older VMs at a simply rpm -qi glance.
 
 ACK
 
 And thank you! This has been bugging me.
 
 Nathaniel
 

I added your reviewed-by and pushed it to master.

Do people want to push it to other branches ?

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Improve developers RPM builds

2014-11-18 Thread Martin Kosek

On 11/18/2014 09:25 PM, Simo Sorce wrote:

On Tue, 18 Nov 2014 11:25:19 -0500
Nathaniel McCallum npmccal...@redhat.com wrote:


On Mon, 2014-11-17 at 23:42 -0500, Simo Sorce wrote:

This small patch will add a date component to the ipa version when
building straight from git.

This way successive builds will clearly install on top of a previous
one even if alphabetically the git commit id has gone backwards.

It also gives a chance of remembering what/when you had installed on
older VMs at a simply rpm -qi glance.


ACK

And thank you! This has been bugging me.

Nathaniel



I added your reviewed-by and pushed it to master.

Do people want to push it to other branches ?

Simo.



It should be harmless for release builds and should help development builds. So 
+1 for adding to all actively developed branches, i.e. ipa-4-1 and ipa-4-0.


Thanks,
Martin

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH] Improve developers RPM builds

2014-11-18 Thread Simo Sorce
On Tue, 18 Nov 2014 21:46:00 +0100
Martin Kosek mko...@redhat.com wrote:

 On 11/18/2014 09:25 PM, Simo Sorce wrote:
  On Tue, 18 Nov 2014 11:25:19 -0500
  Nathaniel McCallum npmccal...@redhat.com wrote:
 
  On Mon, 2014-11-17 at 23:42 -0500, Simo Sorce wrote:
  This small patch will add a date component to the ipa version when
  building straight from git.
 
  This way successive builds will clearly install on top of a
  previous one even if alphabetically the git commit id has gone
  backwards.
 
  It also gives a chance of remembering what/when you had installed
  on older VMs at a simply rpm -qi glance.
 
  ACK
 
  And thank you! This has been bugging me.
 
  Nathaniel
 
 
  I added your reviewed-by and pushed it to master.
 
  Do people want to push it to other branches ?
 
  Simo.
 
 
 It should be harmless for release builds and should help development
 builds. So +1 for adding to all actively developed branches, i.e.
 ipa-4-1 and ipa-4-0.

Ok, pushed there too.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] Improve developers RPM builds

2014-11-17 Thread Simo Sorce

This small patch will add a date component to the ipa version when
building straight from git.

This way successive builds will clearly install on top of a previous
one even if alphabetically the git commit id has gone backwards.

It also gives a chance of remembering what/when you had installed on
older VMs at a simply rpm -qi glance.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York
From efd1c6bae37da241f33d8331cbd405d55c90fc78 Mon Sep 17 00:00:00 2001
From: Simo Sorce s...@redhat.com
Date: Mon, 17 Nov 2014 19:35:44 -0500
Subject: [PATCH] Add UTC date to GIT snapshot version generation

This way make rpms will always generate new packages that can be installed on
top fo older ones, regardless of alphabetic ordering of the GIT commit id.
Also make sure version and date variables are immditely resolved, so they can't
change during the build.
---
 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index eca282a2390002dcefcc7b544b69a47b81418e0d..d714aad813f8e08c264075545a9ce678eca37425 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,10 @@ IPA_NUM_VERSION ?= $(shell printf %d%02d%02d $(IPA_VERSION_MAJOR) $(IPA_VERSION_
 # target.
 
 ifeq ($(IPA_VERSION_IS_GIT_SNAPSHOT),yes)
-GIT_VERSION=$(shell git show --pretty=format:%h --stat HEAD 2/dev/null|head -1)
+DATESTR:=$(shell date -u +'%Y%m%d%H%M')
+GIT_VERSION:=$(shell git show --pretty=format:%h --stat HEAD 2/dev/null|head -1)
 ifneq ($(GIT_VERSION),)
-IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE)GIT$(GIT_VERSION)
+IPA_VERSION=$(IPA_VERSION_MAJOR).$(IPA_VERSION_MINOR).$(IPA_VERSION_RELEASE).$(DATESTR)GIT$(GIT_VERSION)
 endif # in a git tree and git returned a version
 endif # git
 
-- 
2.1.0

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel