[Home]

Summary:ASTERISK-20483: Allow Asterisk to report git SHAs in version string.
Reporter:Shaun Ruffell (sruffell)Labels:
Date Opened:2012-09-27 10:24:38Date Closed:2012-10-18 15:55:38
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:SVN Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 0001-build_tools-Allow-Asterisk-to-report-git-SHAs-in-ver.patch
Description:From patch to be attached:

{noformat}

Make git more attractive for managing work-in-progress. Especially
convenient when a potential patch set needs to be tested on multiple
platforms since one can use git to keep all the test environments in
sync independent of a subversion server.

Now the Asterisk version will show the exact git SHA5 that was used
when building (still appended by "M" if there are local
modifications) from a git clone of the Asterisk repository so the
developer can more easily know what is actually under test.

You will now get this:

 $ asterisk -V
 Asterisk GIT-1698298

Instead of this:

 $ asterisk -V
 Asterisk UNKNOWN__and_probably_unsupported

This has zero impact for those not using git with the exception of
an extra test in the configure script to gather the path of the git.
This is necessary to prevent "sudo make install" from failing since
git may not be in the path in make's shell environment.
{noformat}
Comments:By: Shaun Ruffell (sruffell) 2012-09-27 10:25:36.706-0500

Attached [0001-build_tools-make_version-Allow-Asterisk-to-report-gi.patch|https://issues.asterisk.org/jira/secure/attachment/44766/0001-build_tools-Allow-Asterisk-to-report-git-SHAs-in-ver.patch].

By: Andrew Latham (lathama) 2012-09-27 10:58:07.847-0500

Shaun, what about adding some of your explaination to the documentation as part of the patch.  Maybe  in include/asterisk/doxygen/asterisk-git-howto.h

By: Shaun Ruffell (sruffell) 2012-09-27 11:34:27.500-0500

Andrew, that's a great idea. I wasn't aware that asterisk-git-howto was in the repo). I'll add a new patch for that in the next day or so.

It's already questionable whether I should have added the check for git in configure.ac in the same patch where I edit build_tools/make_version. So it might be good if I break this up into three logical changes?  [1/3] configure.ac checks for git  [2/3] build_tools adds git version information [3/3] update documentation on using git with Asterisk ?

By: Andrew Latham (lathama) 2012-09-27 11:41:47.577-0500

I agree with your concern.  I think we should push ahead a little bit and expect GIT on new platforms.  I can't think of a production machine today that would not have GIT as a means of version control or deployment scripts.

If you put the diff for the doxygen in ASTERISK-20259 and I will add it to my project.  I have over 1k lines to update soon...

By: Richard Mudgett (rmudgett) 2012-10-18 15:55:38.234-0500

Committed modified version of patch.