From: Russell King <rmk@arm.linux.org.uk>
To: linux-kernel@vger.kernel.org
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linus Torvalds <torvalds@transmeta.com>
Subject: [PATCH] Make kernel build numbers work again (was: Re: Cannot compile 2.4.10pre12aa1 with 2.95.2 on Debian)
Date: Thu, 20 Sep 2001 11:24:19 +0100 [thread overview]
Message-ID: <20010920112419.F1577@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20010919193128.A8650@cm.nu> <Pine.OSF.4.21.0109201149110.3983-100000@prfdec.natur.cuni.cz>
In-Reply-To: <Pine.OSF.4.21.0109201149110.3983-100000@prfdec.natur.cuni.cz>; from mmokrejs@natur.cuni.cz on Thu, Sep 20, 2001 at 11:57:02AM +0200
On Thu, Sep 20, 2001 at 11:57:02AM +0200, Martin MOKREJ© wrote:
> . scripts/mkversion > .version
People,
As I'm sure you're all aware, being experts in userland programming, that
the above obviously cannot work and is totally bogus.
The mkversion script contains:
if [ ! -f .version ]
then
echo 1
else
expr 0`cat .version` + 1
fi
but wait! As far as the script is concerned, .version will always exist
because its created before the script is run (the open occurs, the file is
truncated, and passed to the script as STDOUT).
This has a nice effect - the build number of the kernel is now fixed at '1'.
So, why don't we get rid of the above crap and just do "echo 1 > .version"
and be done with it? ;)
Alternatively, the following patch fixes things such that we can read the
original .version file within the script, if it existed prior to invocation,
and produce the correct build number.
Note that as illustrated by the previous poster, -linus now has the problem,
and -ac also has the same. The following patch was generated against
2.4.9-ac10, but should apply to both trees without problem.
--- ref/Makefile Wed Sep 19 14:00:24 2001
+++ linux/Makefile Thu Sep 20 11:19:43 2001
@@ -234,7 +234,7 @@
drivers/sound/pndsperm.c \
drivers/sound/pndspini.c \
drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
- .version .config* config.in config.old \
+ .version* .config* config.in config.old \
scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
.menuconfig.log \
@@ -306,7 +306,8 @@
$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
newversion:
- . scripts/mkversion > .version
+ . scripts/mkversion > .version.tmp
+ @mv -f .version.tmp .version
include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
@echo -n \#define UTS_VERSION \"\#`cat .version` > .ver
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2001-09-20 10:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-04 13:11 __alloc_pages: 0-order allocation failed Martin MOKREJŠ
2001-09-04 16:12 ` Daniel Phillips
2001-09-07 12:53 ` Martin MOKREJŠ
2001-09-07 13:06 ` Martin MOKREJŠ
2001-09-07 20:43 ` Daniel Phillips
2001-09-07 21:00 ` Daniel Phillips
2001-09-12 13:06 ` Martin MOKREJŠ
2001-09-19 14:21 ` __alloc_pages: 0-order allocation failed still in -pre12 Martin MOKREJŠ
2001-09-19 15:03 ` Martin MOKREJŠ
2001-09-19 15:16 ` Rik van Riel
2001-09-19 15:51 ` Martin MOKREJŠ
2001-09-19 22:34 ` Shane Wegner
2001-09-19 22:45 ` Andrea Arcangeli
2001-09-20 2:31 ` Shane Wegner
2001-09-20 2:36 ` Andrea Arcangeli
2001-09-20 2:36 ` Shane Wegner
2001-09-20 2:52 ` Andrea Arcangeli
2001-09-20 15:02 ` Randy.Dunlap
2001-09-21 1:54 ` Keith Owens
2001-09-20 9:57 ` Cannot compile 2.4.10pre12aa1 with 2.95.2 on Debian Martin MOKREJŠ
2001-09-20 10:10 ` Magnus Naeslund(f)
2001-09-20 10:26 ` Martin MOKREJŠ
2001-09-20 10:26 ` Magnus Naeslund(f)
2001-09-20 10:59 ` Perf improvements in 2.4.10pre12aa1 Martin MOKREJŠ
2001-09-20 15:28 ` Martin MOKREJŠ
2001-09-20 15:40 ` Martin MOKREJŠ
2001-09-20 10:24 ` Russell King [this message]
2001-09-20 12:54 ` [PATCH] Make kernel build numbers work again (was: Re: Cannot compile 2.4.10pre12aa1 with 2.95.2 on Debian) Alan Cox
2001-09-19 22:39 ` __alloc_pages: 0-order allocation failed still in -pre12 Andrea Arcangeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010920112419.F1577@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox