On Fri, 04 May 2007 21:40:24 +0200, Johannes Berg <[EMAIL PROTECTED]> said:
> But I like having debian packages with the gX...X-dirty version :) > What I usually did was hack on the kernel, make, make M=... until it > all compiles, make again, then invoke make-kpkg kernel_image and > install the result. This allows me to remove everything from the > kernel in a clean way. > This used to work very well, I got debian packages with version > 2.6.21-g65c44b40-dirty and was generally happy with that. Now > kernel-package kills the setlocalversion script leaving me with the > package version 2.6.21 which is fairly useless since I have many > versions of 2.6.21. > From what I can tell, nuking setlocalversion seems to be done for the > case where > (1) the kernel source is pristine and wasn't built before, so > setlocalversion wasn't invoked before > (2) the user has for some stupid reason set CONFIG_LOCALVERSION_AUTO > (3) that user is now trying to build a kernel with make-kpkg > (2) is why I'm questioning the point of nuking setlocalversion, any > sane debian kernel build surely won't be setting > CONFIG_LOCALVERSION_AUTO since it'll possibly even be included in the > resulting kernel binary as /proc/config[.gz] and simply be wrong > because setlocalversion was nuked > Right now I'm working around this by invoking make-kpkg, waiting until > it has nuked setlocalversion, aborting it, putting setlocalversion > back and invoking make-kpkg again :) OK. Since you are using git kernels, perhaps you can try this experiment: Edit the file /usr/share/kernel-package/ruleset/targets/target.mk, change line 162 from: (echo "#!/bin/sh"; echo ": echo ") > scripts/setlocalversion) to (echo "#!/bin/sh"; echo ": echo ") > scripts/setlocalversion.1) That will prevent make-kpkg from nuking the setlocalversion script. Now, get a fresh kernel tree, and see if running make-kpkg works. I want to see if: a) running make-kpkg on a pristine git tree works b) make some change (add/delete whitespace, or something, so the tree is not pristine, and run make-kpkg again. Does it still work? c) Get another pristine git tree, where make-kpkg has not been run. Now make a change -- so the tree is dirty. _Then_ run make-kpkg. Does that work? If the only failure mode is when CONFIG_LOCALVERSION_AUTO is set, then I'll just detect that and halt early, and stop nuking the setlocalversion script. I think we want make-kpkg to still work out of the box for the three cases above. manoj -- wok, n.: Something to thwow at a wabbit. Manoj Srivastava <[EMAIL PROTECTED]> <http://www.golden-gryphon.com/> 1024D/BF24424C print 4966 F272 D093 B493 410B 924B 21BA DABB BF24 424C -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]