public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* scripts/setlocalversion: information retrieval about git repository state
@ 2010-08-24 23:03 Michael Prokop
  2010-08-27 14:26 ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Prokop @ 2010-08-24 23:03 UTC (permalink / raw)
  To: linux-kbuild; +Cc: nico-linuxsetlocalversion

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]

Hi,

(please Cc me on replies as I'm not subscribed to linux-kbuild@)

while building Debian packages of my own kernel version I stumbled
upon a build problem with a Debian mechanism, see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591793

Why I'm reporting this issue: in scripts/setlocalversion there's the
following comment (hint: "apped" should be "append"):

        # apped a plus sign if the repository is not in a clean tagged
        # state and  LOCALVERSION= is not specified

Ok, so testing with a clean and untagged state and empty
LOCALVERSION using master of current
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git:

  % cd linux-2.6
  % make defconfig
  % make prepare
  % git status
  # On branch master
  nothing to commit (working directory clean)
  % scripts/setlocalversion
  +

Alright. But:

  % git branch
  * master
  % git show master | head -1
  commit d1b113bb028999e82a8528e1484be8c23fb5a7d9
  % git tag master-test d1b113bb028999e82a8528e1484be8c23fb5a7d9
  % scripts/setlocalversion
  +

Huh? Ok, scripts/setlocalversion uses 'git describe --exact-match':

  % git describe --exact-match
  fatal: no tag exactly matches 'd1b113bb028999e82a8528e1484be8c23fb5a7d9'
  % git branch --contains d1b113bb028999e82a8528e1484be8c23fb5a7d9
  * master

For my understanding this *is* a tagged and clean state of the
repository. But I'm not sure whether that's a bug in 'git describe
--exact-match' or if scripts/setlocalversion of recent kernel
versions should be adjusted (either the check for the untagged state
or clarify/improve the comment about it).

regards,
-mika-

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: scripts/setlocalversion: information retrieval about git repository state
  2010-08-24 23:03 scripts/setlocalversion: information retrieval about git repository state Michael Prokop
@ 2010-08-27 14:26 ` Michal Marek
  2010-09-03 11:58   ` Michael Prokop
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Marek @ 2010-08-27 14:26 UTC (permalink / raw)
  To: Michael Prokop; +Cc: linux-kbuild, nico-linuxsetlocalversion

On 25.8.2010 01:03, Michael Prokop wrote:
> Huh? Ok, scripts/setlocalversion uses 'git describe --exact-match':
> 
>   % git describe --exact-match
>   fatal: no tag exactly matches 'd1b113bb028999e82a8528e1484be8c23fb5a7d9'
>   % git branch --contains d1b113bb028999e82a8528e1484be8c23fb5a7d9
>   * master

Git describe only looks at annotated or signed tags (git tag -a/-s) by
default.

Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: scripts/setlocalversion: information retrieval about git repository state
  2010-08-27 14:26 ` Michal Marek
@ 2010-09-03 11:58   ` Michael Prokop
  2010-09-03 12:10     ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Prokop @ 2010-09-03 11:58 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kbuild, nico-linuxsetlocalversion

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

* Michal Marek [Fri Aug 27, 2010 at 04:26:47PM +0200]:
> On 25.8.2010 01:03, Michael Prokop wrote:
> > Huh? Ok, scripts/setlocalversion uses 'git describe --exact-match':

> >   % git describe --exact-match
> >   fatal: no tag exactly matches 'd1b113bb028999e82a8528e1484be8c23fb5a7d9'
> >   % git branch --contains d1b113bb028999e82a8528e1484be8c23fb5a7d9
> >   * master

> Git describe only looks at annotated or signed tags (git tag -a/-s) by
> default.

Thanks for the pointer.

My issue is still valid though: scripts/setlocalversion of recent
kernel versions should be adjusted -> either check for the untagged
state or clarify/improve the comment about it. :)

I'd provide a patch for that if you let me know what's the way to
go.

regards,
-mika-

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: scripts/setlocalversion: information retrieval about git repository state
  2010-09-03 11:58   ` Michael Prokop
@ 2010-09-03 12:10     ` Michal Marek
  2010-09-06  9:57       ` [PATCH] scripts/setlocalversion: update comment regarding " Michael Prokop
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Marek @ 2010-09-03 12:10 UTC (permalink / raw)
  To: Michael Prokop; +Cc: linux-kbuild, nico-linuxsetlocalversion

On 3.9.2010 13:58, Michael Prokop wrote:
> My issue is still valid though: scripts/setlocalversion of recent
> kernel versions should be adjusted -> either check for the untagged
> state or clarify/improve the comment about it. :)
> 
> I'd provide a patch for that if you let me know what's the way to
> go.

Please update the comment. What the script is looking for are the
"official" release tags, like v2.6.35, which are annotated and signed.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] scripts/setlocalversion: update comment regarding information retrieval about git repository state
  2010-09-03 12:10     ` Michal Marek
@ 2010-09-06  9:57       ` Michael Prokop
  2010-09-06 11:27         ` Michal Marek
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Prokop @ 2010-09-06  9:57 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild, nico-linuxsetlocalversion; +Cc: Michael Prokop

A tagged repository state isn't enough, git describe only
looks at signed or annotated tags (git tag -a/-s). This
documentation update makes sure the comment matches the
current behaviour.

Signed-off-by: Michael Prokop <mika@grml.org>
---
 scripts/setlocalversion |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 057b6b3..ef8729f 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -160,8 +160,10 @@ if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
 	# full scm version string
 	res="$res$(scm_version)"
 else
-	# apped a plus sign if the repository is not in a clean tagged
-	# state and  LOCALVERSION= is not specified
+	# append a plus sign if the repository is not in a clean
+	# annotated or signed tagged state (as git describe only
+	# looks at signed or annotated tags - git tag -a/-s) and
+	# LOCALVERSION= is not specified
 	if test "${LOCALVERSION+set}" != "set"; then
 		scm=$(scm_version --short)
 		res="$res${scm:++}"
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] scripts/setlocalversion: update comment regarding information retrieval about git repository state
  2010-09-06  9:57       ` [PATCH] scripts/setlocalversion: update comment regarding " Michael Prokop
@ 2010-09-06 11:27         ` Michal Marek
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Marek @ 2010-09-06 11:27 UTC (permalink / raw)
  To: Michael Prokop; +Cc: linux-kbuild, nico-linuxsetlocalversion

On Mon, Sep 06, 2010 at 11:57:19AM +0200, Michael Prokop wrote:
> A tagged repository state isn't enough, git describe only
> looks at signed or annotated tags (git tag -a/-s). This
> documentation update makes sure the comment matches the
> current behaviour.
> 
> Signed-off-by: Michael Prokop <mika@grml.org>
> ---
>  scripts/setlocalversion |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)

Thanks, applied.

Michal

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-06 11:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-24 23:03 scripts/setlocalversion: information retrieval about git repository state Michael Prokop
2010-08-27 14:26 ` Michal Marek
2010-09-03 11:58   ` Michael Prokop
2010-09-03 12:10     ` Michal Marek
2010-09-06  9:57       ` [PATCH] scripts/setlocalversion: update comment regarding " Michael Prokop
2010-09-06 11:27         ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox