[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging an apparently unreleased Git repository



Hi,

On Thu, Jan 28, 2016 at 09:46:41AM +0100, Jan Dittberner wrote:
> On Wed, Jan 27, 2016 at 11:33:49PM -0800, Matt Kraai wrote:
> > Hi,
> > 
> > I'd like to package rust-mode
> > (cf. https://github.com/rust-lang/rust-mode).  There is a version
> > number in the source code (i.e., 0.2.0), but I haven't been able to
> > find any releases or tags.  I'd like to know if there are any best
> > practices for handling the .orig.tar and the version number.
> > 
> > I've tentatively created a tar archive of the latest Git revision
> > (minus the .git directory) and named it
> > elpa-rust-mode_0.2.0.orig.tar.gz.  I have also set the package version
> > to 0.2.0-1.  Does anyone have a better suggestion?
> 
> Please ask the upstream maintainers to create a release tag. If you can not
> convince them you could package a specific git commit, but first try to get
> a release tag.
> 
> 
> Otherwise you should not just name the package 0.2.0-x but make sure that
> you include the git commit id like:
> 
> 0.2.0~git20160116.1.fa5b38f-1
> 
> This version will sort before a real 0.2.0 version:
> 
> % dpkg --compare-versions 0.2.0~git20160116.1.fa4b38f-1 lt 0.2.0-1 && echo "true"
> true
> 
> Parts of that version are defined like this:
> 
> 0.2.0     is the version that will eventually be released
> ~         makes it sort before an actual 0.2.0 release
> git       is just to make it human readable that git is involved
> 20160616  date of the commit in the upstream repository in sortable order
> 1         version of upstream on that date (if you want to package another
>           commit from the same date for hotfixes for example)
> fa5b38f   shortened git commit hash
> -1        debian revision
> 
> This will allow you to properly package later upstream version when new
> commits occur. I came up with this suggestion after I had a look at the
> versions of packages installed on my system:
> 
> % dpkg -l|awk '{ print $3 }'|grep git|sort -u

Thanks for the information!  I'll ask upstream to create a release tag
and, if they don't, follow the version number convention you
specified.

Thanks again,
-- 
Matt


Reply to: