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. :-)
Created attachment 98152 [details, diff] patch with modified awk command, to accept 2.6.18 (+?) kernel versions
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 attachment 98165 [details, diff] 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
now uses linux-info