On Thu, Oct 01, 2009 at 05:43:58PM -0700, Keith Rarick wrote:
> 
> On Thu, Oct 1, 2009 at 6:33 AM, Graham Barr <[email protected]> wrote:
> > There is probably a better way then hard coding in the file, but please 
> > update
> > the version number in beanstalkd.spec
> 
> Thanks for reminding me! It's now an autoconf template and included in
> the distributed tarball.
> 
> I don't know the usual flow for generating rpm files. Hopefully this
> will work. I only know of one problem with this approach: the version
> string between releases has hyphens in it (like 1.3-55-g9f71603
> instead of just 1.3) and rpm forbids this (according to the
> documentation). I welcome any suggestions on how to deal with this.

We've been using 'git describe' to populate the release number in our 
projects stored in git.  That '55' above, is the number of commits since the 
v1.3 tag.

  jer...@stiletto:~/repos/git/beanstalkd master % git describe --match v1.1
  v1.1-171-g9f71603
  jer...@stiletto:~/repos/git/beanstalkd master % git describe --match v1.2
  v1.2-60-g9f71603
  jer...@stiletto:~/repos/git/beanstalkd master % git describe --match v1.3
  v1.3-55-g9f71603 

So from beanstalkd's perspective, you can use the 1.3 for the @VERSION@ and
then make:
  
  Release:  @rele...@%{?dist}

and populate @RELEASE@ based upon the output of 'git describe'.  

Its not perfect, if you have the same number of commits from a tag in two 
different branches, you could have 2 spec files that had the same 
name-version-release but would be two different rpms.  

Or make the @VERSION@ be the 1.3-55 only, and leave @RELEASE@ to be the
rpm release.

If I get a chance today I may try a few things and send a pull request.

enjoy,

-jeremy

-- 
========================================================================
 Jeremy Hinegardner                              [email protected] 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to