Bug 149197 - openswan-2.4.4 does not cope with suspend2-sources-2.6.18
|
Bug#:
149197
|
Product: Gentoo Linux
|
Version: 2006.0
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: maintainer-needed@gentoo.org
|
Reported By: dominik.buerkle@web.de
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: openswan-2.4.4 does not cope with suspend2-sources-2.6.18
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2006-09-26 10:51 0000
|
Hi,
openswan-2.4.4 complains about "kernel version not supported", because the
ebuild depends on UTS_RELEASE in linux/include/linux/version.h.
That line is missing in suspend2-sources-2.6.18.
UTS_RELEASE comes before LINUX_VERSION_CODE in suspend2-sources-2.6.17-r5, the
following patch is depending on this order. I can write another patch, if this
can not be guaranteed.
Works for me. :-)
Please check if the awk command is sufficient. Can be adapted to "accept
UTS_RELEASE, if anywhere in the file, else use LINUX_VERSION_CODE".
KV_major/minor/micro (or whatever) should be inherited from sth. like
kernel-dependencies.eclass, imho.
Please, don't resolve bugs that are not fixed in portage.
Created an attachment (id=98165) [details]
new awk command
copes with any "version.h" that has either UTS_RELEASE or LINUX_VERSION_CODE.
Prefers UTS_RELEASE over LINUX_VERSION_CODE (which includes EXTRAVERSION, in my
case "-suspend2-r5" with 2.6.17-suspend2-r5) - quite like before.
Though EXTRAVERSION is cut off in this specific ebuild, it might be used in
other places, if that code was copied from somewhere else.
However, EXTRAVERSION cannot be recovered from version.h if UTS_RELEASE is not
included, so ebuilds that use this string have to choose some other method of
determining EXTRAVERSION... e.g.
$ cd /usr/src/linux; make kernelrelease
2.6.18-suspend2
$
$ cd /usr/src/; for d in linux-*; do (echo $d:; cd $d; make kernelrelease);
done
linux-2.6.16-suspend2-r8:
2.6.16-suspend2-r8
linux-2.6.17-suspend2-r4:
2.6.17-suspend2-r4
linux-2.6.17-suspend2-r5:
2.6.17-suspend2-r5
linux-2.6.18-suspend2:
2.6.18-suspend2
$
...
Consider this Makefile snippet:
kernelrelease:
$(if $(wildcard include/config/kernel.release), $(Q)echo
$(KERNELRELEASE), \
$(error kernelrelease not valid - run 'make prepare' to update it))
kernelversion:
@echo $(KERNELVERSION)
so something like
KV_full="$(cd /usr/src/linux && make kernelrelease)"
eerror $? "kernel not configured"
would be possible, wouldn't it?
*** Bug 149786 has been marked as a duplicate of this bug. ***
This package should be fixed to use linux-info or linux-mod