Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
commit hash in tarball?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dieter_be  
View profile  
 More options Dec 12 2009, 1:14 pm
From: Dieter_be <dieterplaeti...@gmail.com>
Date: Sat, 12 Dec 2009 10:14:24 -0800 (PST)
Local: Sat, Dec 12 2009 1:14 pm
Subject: commit hash in tarball?
Hi,
when we release software we tag it, push the tag and give the tarball
url to downstream.
ie: http://github.com/Dieterbe/uzbl/tarball/2009.11.30

but the problem is, in the make process we need to know which commit
hash you're compiling from, so we can store that in the binaries. it
helps in identifying the software.
(see http://github.com/Dieterbe/uzbl/blob/master/Makefile )

for this we currently use the .git directory, but this directory is
not available in the tarballs.

is it possible for github to do one of:
- leaving .git intact in the tarball
- put a little file in the tarball, containing the commit hash and
optionally the tag

or alternatively, is their some trick we can do ourselves to have a
file which always contains the current commit hash? i think svn can do
something like that, but couldn't find it for git.

thanks!
Dieter


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tekkub  
View profile  
 More options Dec 12 2009, 8:51 pm
From: Tekkub <tek...@gmail.com>
Date: Sat, 12 Dec 2009 18:51:30 -0700
Local: Sat, Dec 12 2009 8:51 pm
Subject: Re: commit hash in tarball?

If you look at the tarball that is downloaded you'll see that we give you
the short hash.  If you want the .git folder you should just clone the repo,
because that's created by your local git when you clone.  You could also
just hit the tag page and parse the commit off that,
http://github.com/Dieterbe/uzbl/tree/2009.11.30.  There might also be a way
to get that info from the API.

    Tekkub
    GitHub Tech Support
    http://support.github.com/
    Join us on IRC: #github on freenode.net
    Discussion group: github@googlegroups.com

On Sat, Dec 12, 2009 at 11:14 AM, Dieter_be <dieterplaeti...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dieter_be  
View profile  
 More options Dec 13 2009, 4:34 pm
From: Dieter_be <dieterplaeti...@gmail.com>
Date: Sun, 13 Dec 2009 13:34:53 -0800 (PST)
Local: Sun, Dec 13 2009 4:34 pm
Subject: Re: commit hash in tarball?

On Dec 13, 2:51 am, Tekkub <tek...@gmail.com> wrote:

> If you look at the tarball that is downloaded you'll see that we give you
> the short hash.  If you want the .git folder you should just clone the repo,
> because that's created by your local git when you clone.  You could also
> just hit the tag page and parse the commit off that,http://github.com/Dieterbe/uzbl/tree/2009.11.30.  There might also be a way
> to get that info from the API.

well..
- short hash is not enough. i need the long one
- packaging should work without internet access

thanks anyway
Dieter


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tekkub  
View profile  
 More options Dec 13 2009, 4:49 pm
From: Tekkub <tek...@gmail.com>
Date: Sun, 13 Dec 2009 14:49:52 -0700
Local: Sun, Dec 13 2009 4:49 pm
Subject: Re: commit hash in tarball?

Perhaps you should make your tags in little side branches with the direct
modifications you need in them.  This is what I do, take a look at one of my
repos: http://github.com/tekkub/engravings/network  With this users can
directly download the tarball/zip directly, they don't need to know anything
about git, or even that the repo *is* git.

The only issue here is that you can't use the SHA1, but honestly that always
feels sorta lazy anyway.  What I do is replace the version string in my code
with the tag name, that's certainly more user friendly and just as easy (if
not easier) to track down than a SHA1 is.

On Sun, Dec 13, 2009 at 2:34 PM, Dieter_be <dieterplaeti...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dieter_be  
View profile  
 More options Dec 15 2009, 3:19 pm
From: Dieter_be <dieterplaeti...@gmail.com>
Date: Tue, 15 Dec 2009 12:19:33 -0800 (PST)
Local: Tues, Dec 15 2009 3:19 pm
Subject: Re: commit hash in tarball?

On Dec 13, 10:49 pm, Tekkub <tek...@gmail.com> wrote:

> Perhaps you should make your tags in little side branches with the direct
> modifications you need in them.  This is what I do, take a look at one of my
> repos:http://github.com/tekkub/engravings/network With this users can
> directly download the tarball/zip directly, they don't need to know anything
> about git, or even that the repo *is* git.

> The only issue here is that you can't use the SHA1, but honestly that always
> feels sorta lazy anyway.  What I do is replace the version string in my code
> with the tag name, that's certainly more user friendly and just as easy (if
> not easier) to track down than a SHA1 is.

Hi, thanks, but:
- making own branches and manually updating a file just to denote a
version just seems wrong to me
- i prefer to have the hash available in the compiled software at
runtime, though i am willing to compromise for just the git tag ;) [at
least git tags are a good mechanim to mark releases]
- i definitely agree that the end user shouldn't need to know or be
aware of the git thing.  it is only my intention for the makefile/
buildscripts to be aware of the commit hash when building the software
(without internet access)
  i.e. this is about building and packaging in "the downstream"
- what do you mean with "feels lazy"? if you mean "involves no manual
work" then you're definitely right, but that's a good thing ;) and i
think sha1 hashes are a great way to uniquely identify each single
source tree state (when trying to debug problems and such).  but like
i said, i'm willing to compromise for git tags, as downstream usually
works with that anyway.

I think all ultimately needed for this is just a little .info file or
something in the tarball containing the "origin information" (hash,
tag, maybe url?) or
a magic variable replacement system like svn has (but i couldn't find
it for git :/)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tekkub  
View profile  
 More options Dec 17 2009, 5:36 am
From: Tekkub <tek...@gmail.com>
Date: Thu, 17 Dec 2009 03:36:55 -0700
Local: Thurs, Dec 17 2009 5:36 am
Subject: Re: commit hash in tarball?

Sorry, I was a bit unclear... by "feels lazy" I meant, if you're creating a
tag then it seems logical to me that the version should be the tag name...
and that you'd use some sort of standard versioning scheme for that
(major.minor.patch) that would be human-readable.  I've seen far to many
(svn) people that use the commit number *as* their version number.  Not just
build number, as the whole version.  Naturally that makes even less sense in
git, since commits are not sequentially numbered.  If the user is using a
nightly-build or "edge" sort of setup, then SHA1s would make sense.  Simply
put, if the end user is not aware of git (they're using a tarball instead of
a clone), then I would expect that the packager wouldn't be either.

As for the contents of the tarball and the variables, you'd probably be best
to direct those questions to the git mailing list.  We just use git-archive
to create the tarballs, and git doesn't have a variable system like svn
does.

On Tue, Dec 15, 2009 at 1:19 PM, Dieter_be <dieterplaeti...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dieter_be  
View profile  
 More options Dec 17 2009, 2:53 pm
From: Dieter_be <dieterplaeti...@gmail.com>
Date: Thu, 17 Dec 2009 11:53:22 -0800 (PST)
Local: Thurs, Dec 17 2009 2:53 pm
Subject: Re: commit hash in tarball?

On Dec 17, 11:36 am, Tekkub <tek...@gmail.com> wrote:

okay that makes sense.  i can live with "hashes for git users, tags
for release users", but again:
once you got the tarball from github there is no way to know which git
tag it corresponds to.

this is really too bad, as you need to resort to workarounds such as
manually updating versionfiles in order to support normal downstream
packaging.

Dieter


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »