[PATCH] distversion feature for snapshot dists

Andrew Bartlett abartlet at samba.org
Mon Jul 2 17:02:14 MDT 2012


On Sun, 2012-06-24 at 18:31 +1000, Andrew Bartlett wrote:
> On Fri, 2012-06-22 at 12:14 +0200, Bjoern Baumbach wrote:
> > Hi!
> > 
> > Please find attached a set of patches extending our build system.
> > 
> > Aimed problem:
> > If we create a snapshot tarball with make dist we loose the version
> > information (e.g. git hash). So packages build from such a dist package
> > have a version like 4.0.0beta3-UNKNOWN.
> > 
> > 
> > With my patches "make dist" writes a .distversion file with version
> > information and adds it to the dist tarball.
> > The wafsamba/samba_version.py code is extended to use this information.
> > 
> > Such a .distversion looks like:
> > GIT_COMMIT_ABBREV=9563c95
> > SUFFIX=GIT-9563c95
> > GIT_COMMIT_FULLREV=9563c95aaf59f3a70f4bd012a7e03a3b10349686
> > COMMIT_TIME=1340350238
> > COMMIT_DATE=Fri Jun 22 09:30:38 2012 +0200
> > 
> > I think this is very useful and I would like to use it in future.
> > 
> > Comments? :-)
> 
> I can see how this would be useful, if you are preparing tarballs of git
> snapshots.  In terms of implementation, I'm wondering if we should just
> edit the VERSION file, when it isn't an actual release?  (just an idea,
> I'm not really fussed)
> 
> For the autoconf build, you also need to rework the mkversions.sh to
> match, or find a way to just run the python code for both use cases.

I looked over this again recently, while pondering other release
challenges.  I think this is a good idea, and the patches are good
as-is.

That is, changing VERSION in the script would be quite painful anyway,
and there is no real harm if the autoconf build still has UNKNOWN. 

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list