public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] read EXTRAVERSION from file
@ 2004-08-30 15:14 Christoph Hellwig
  2004-08-30 15:35 ` Muli Ben-Yehuda
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christoph Hellwig @ 2004-08-30 15:14 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel

The're an very interesting patch in the Debian tree still from the time
where Herbert Xu mentioned it, it allows creating a file .extraversion
in the toplevel kernel directory and the Makefile will set EXTRAVERSION
to it's contents.  This has the nice advantage of keeping an
extraversion pre-tree instead of having to patch the Makefile and
getting rejects everytime you pull a new tree (or BK refuses to touch
the Makefile).

The only thing I'm not fully comfortable is the .extraversion name, I
think I'd prefer a user-visible name.

Any other comments on this one?

--- kernel-source-2.6.6/Makefile	2004-05-10 19:47:45.000000000 +1000
+++ kernel-source-2.6.6-1/Makefile	2004-05-10 22:21:02.000000000 +1000
@@ -151,6 +151,9 @@
 
 export srctree objtree VPATH TOPDIR
 
+ifeq ($(EXTRAVERSION),)
+EXTRAVERSION := $(shell [ ! -f .extraversion ] || cat .extraversion)
+endif
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
 # SUBARCH tells the usermode build what the underlying arch is.  That is set

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

* Re: [PATCH] read EXTRAVERSION from file
  2004-08-30 15:14 [PATCH] read EXTRAVERSION from file Christoph Hellwig
@ 2004-08-30 15:35 ` Muli Ben-Yehuda
  2004-08-30 16:18 ` Sam Ravnborg
  2004-09-10 21:53 ` Matt Mackall
  2 siblings, 0 replies; 6+ messages in thread
From: Muli Ben-Yehuda @ 2004-08-30 15:35 UTC (permalink / raw)
  To: Christoph Hellwig, sam, linux-kernel

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

On Mon, Aug 30, 2004 at 05:14:05PM +0200, Christoph Hellwig wrote:

> The only thing I'm not fully comfortable is the .extraversion name, I
> think I'd prefer a user-visible name.

Agreed. 

> Any other comments on this one?

Yes please!

Cheers, 
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/


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

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

* Re: [PATCH] read EXTRAVERSION from file
  2004-08-30 15:14 [PATCH] read EXTRAVERSION from file Christoph Hellwig
  2004-08-30 15:35 ` Muli Ben-Yehuda
@ 2004-08-30 16:18 ` Sam Ravnborg
  2004-08-31  6:20   ` Frank Steiner
  2004-09-10 21:53 ` Matt Mackall
  2 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2004-08-30 16:18 UTC (permalink / raw)
  To: Christoph Hellwig, sam, linux-kernel

On Mon, Aug 30, 2004 at 05:14:05PM +0200, Christoph Hellwig wrote:
> The're an very interesting patch in the Debian tree still from the time
> where Herbert Xu mentioned it, it allows creating a file .extraversion
> in the toplevel kernel directory and the Makefile will set EXTRAVERSION
> to it's contents.  This has the nice advantage of keeping an
> extraversion pre-tree instead of having to patch the Makefile and
> getting rejects everytime you pull a new tree (or BK refuses to touch
> the Makefile).
> 
> The only thing I'm not fully comfortable is the .extraversion name, I
> think I'd prefer a user-visible name.
> 
> Any other comments on this one?
> 
> --- kernel-source-2.6.6/Makefile	2004-05-10 19:47:45.000000000 +1000
> +++ kernel-source-2.6.6-1/Makefile	2004-05-10 22:21:02.000000000 +1000
> @@ -151,6 +151,9 @@
>  
>  export srctree objtree VPATH TOPDIR
>  
> +ifeq ($(EXTRAVERSION),)
> +EXTRAVERSION := $(shell [ ! -f .extraversion ] || cat .extraversion)
> +endif
>  KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)

This would fail for 2.6.8.1 for instance. Or at least the '1' that Linus 
added would be part of the final EXTRAVERSION.

Ian Wienand <ianw@gelato.unsw.edu.au> posted a patch some time ago that
introduces LOCALVERSION - it's in my queue but not applied since it
needs some rework. And documentation also.
That should be easy to extend to read the file localversion.

I would then prefer something like:
If exists $(srctree)/localversion read file and append to LOCALVERSION
If exists $(objtree)/localversion read file and append to LOCALVERSION


Example for a debian patched kernel src tree:

srctree:
localversion <= contains -deb-unstb-7.9
objtree:
localversion <= contains -smp-p4

Resulting in a kernelversion equals: 2.6.8-rc1-deb-unstb-7.9-smp-p4

	Sam

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

* Re: [PATCH] read EXTRAVERSION from file
  2004-08-30 16:18 ` Sam Ravnborg
@ 2004-08-31  6:20   ` Frank Steiner
  0 siblings, 0 replies; 6+ messages in thread
From: Frank Steiner @ 2004-08-31  6:20 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Christoph Hellwig, linux-kernel

Sam Ravnborg wrote:

> This would fail for 2.6.8.1 for instance. Or at least the '1' that Linus 
> added would be part of the final EXTRAVERSION.
> 
> Ian Wienand <ianw@gelato.unsw.edu.au> posted a patch some time ago that
> introduces LOCALVERSION - it's in my queue but not applied since it
> needs some rework. And documentation also.
> That should be easy to extend to read the file localversion.

Nice idea, because we indeed ran into the problem with 2.6.8.1 that our
own extraversion we always set in the kernel rpms overwrite the .1. So
we are now extracting the EXTRAVERSION from the Makefile to add our
own stuff. All very ugly since the extraversion is contained e.g. in the
path of the kernel source file, and thus, setting an own extraversion
makes all the path stuff difficult.
A LOCALVERSION that was always uninitialized in the kernel.org packages
would be a nice thing, so that EXTRAVERSION could be left untouched.

cu,
Frank

-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17           Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:   +49 89 2180-99-4049


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

* Re: [PATCH] read EXTRAVERSION from file
  2004-08-30 15:14 [PATCH] read EXTRAVERSION from file Christoph Hellwig
  2004-08-30 15:35 ` Muli Ben-Yehuda
  2004-08-30 16:18 ` Sam Ravnborg
@ 2004-09-10 21:53 ` Matt Mackall
  2004-09-10 22:11   ` Sam Ravnborg
  2 siblings, 1 reply; 6+ messages in thread
From: Matt Mackall @ 2004-09-10 21:53 UTC (permalink / raw)
  To: Christoph Hellwig, sam, linux-kernel

On Mon, Aug 30, 2004 at 05:14:05PM +0200, Christoph Hellwig wrote:
> The're an very interesting patch in the Debian tree still from the time
> where Herbert Xu mentioned it, it allows creating a file .extraversion
> in the toplevel kernel directory and the Makefile will set EXTRAVERSION
> to it's contents.  This has the nice advantage of keeping an
> extraversion pre-tree instead of having to patch the Makefile and
> getting rejects everytime you pull a new tree (or BK refuses to touch
> the Makefile).
> 
> The only thing I'm not fully comfortable is the .extraversion name, I
> think I'd prefer a user-visible name.
> 
> Any other comments on this one?

(catching up)

Consider this approach as a more flexible alternative:

http://groups.google.com/groups?q=oxymoron+patch+names&hl=en&lr=&ie=UTF-8&selm=fa.jif8l5v.1b049jd%40ifi.uio.no&rnum=1

-- 
Mathematics is the supreme nostalgia of our time.

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

* Re: [PATCH] read EXTRAVERSION from file
  2004-09-10 21:53 ` Matt Mackall
@ 2004-09-10 22:11   ` Sam Ravnborg
  0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2004-09-10 22:11 UTC (permalink / raw)
  To: Matt Mackall; +Cc: Christoph Hellwig, sam, linux-kernel

On Fri, Sep 10, 2004 at 04:53:53PM -0500, Matt Mackall wrote:
> On Mon, Aug 30, 2004 at 05:14:05PM +0200, Christoph Hellwig wrote:
> > The're an very interesting patch in the Debian tree still from the time
> > where Herbert Xu mentioned it, it allows creating a file .extraversion
> > in the toplevel kernel directory and the Makefile will set EXTRAVERSION
> > to it's contents.  This has the nice advantage of keeping an
> > extraversion pre-tree instead of having to patch the Makefile and
> > getting rejects everytime you pull a new tree (or BK refuses to touch
> > the Makefile).
> > 
> > The only thing I'm not fully comfortable is the .extraversion name, I
> > think I'd prefer a user-visible name.
> > 
> > Any other comments on this one?
> 
> (catching up)
> 
> Consider this approach as a more flexible alternative:
> 
> http://groups.google.com/groups?q=oxymoron+patch+names&hl=en&lr=&ie=UTF-8&selm=fa.jif8l5v.1b049jd%40ifi.uio.no&rnum=1

Did something remotely similar.
Name the file localversion* and it will be in KERNELRELEASE.

	Sam

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

end of thread, other threads:[~2004-09-10 22:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-30 15:14 [PATCH] read EXTRAVERSION from file Christoph Hellwig
2004-08-30 15:35 ` Muli Ben-Yehuda
2004-08-30 16:18 ` Sam Ravnborg
2004-08-31  6:20   ` Frank Steiner
2004-09-10 21:53 ` Matt Mackall
2004-09-10 22:11   ` Sam Ravnborg

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