iptables ebuild should contain the option for the user to include kernel sources
Created attachment 196894 [details, diff] adding useflag ksource to compile with kernel sources adding useflag ksource to compile with kernel sources
Created attachment 196998 [details, diff] adding useflag ksource to compile with kernel sources adding useflag ksource to compile with kernel sources
Well, some patches require building against kernel sources although I'm unsure about USE flag. @base-system, any suggestions here? Is it sane to detect if we apply any patches and then and build against kernel sources in such case? cilly, in any case we don't need to detect kernel version/sources location in case ksource USE flag is disabled. So something like this is required in ebuild: pkg_setup() { # Don't call linux-info_pkg_setup in case ksource USE disabled. use ksource && linux-info_pkg_setup }
Created attachment 197040 [details, diff] adding useflag ksource to compile with kernel sources adding useflag ksource to compile with kernel sources, including: https://bugs.gentoo.org/276737#c3
Created attachment 197042 [details, diff] adding useflag ksource to compile with kernel sources adding useflag ksource to compile with kernel sources, including: https://bugs.gentoo.org/276737#c3
Probably, something like this: if [[ -d ${EPATCH_SOURCE} ]] ; then EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" \ EPATCH_MULTI_MSG="Applying user patches from ${EPATCH_SOURCE} ..." \ epatch linux-info_pkg_setup CONFIGKERNEL="kernel ${KERNEL_DIR}" break fi and later in configure: src_compile() { econf \ --sbindir=/sbin \ --libexecdir=/$(get_libdir) \ --enable-devel \ --enable-libipq \ --enable-shared \ --enable-static \ $(CONFIGEXT)
(In reply to comment #6) > Probably, something like this: > > if [[ -d ${EPATCH_SOURCE} ]] ; then > > EPATCH_SUFFIX="patch" > EPATCH_FORCE="yes" \ > EPATCH_MULTI_MSG="Applying user patches from > ${EPATCH_SOURCE} ..." \ > epatch > linux-info_pkg_setup > CONFIGKERNEL="kernel ${KERNEL_DIR}" > break > fi > > and later in configure: > > src_compile() { > econf \ > --sbindir=/sbin \ > --libexecdir=/$(get_libdir) \ > --enable-devel \ > --enable-libipq \ > --enable-shared \ > --enable-static \ > $(CONFIGEXT) > s/CONFIGEXT/CONFIGKERNEL/
Does iptables need to be compiled against kernel sources in any case, if no patch is added?
Created attachment 197149 [details, diff] adding useflag ksource to compile with kernel sources adding useflag ksource to compile with kernel sources, code https://bugs.gentoo.org/276737#c3 not working
Created attachment 197151 [details, diff] adding useflag ksource to compile with kernel sources adding useflag ksource to compile with kernel sources, code https://bugs.gentoo.org/276737#c3 not working
those last two attachments are not patches, they're entire files
Created attachment 197762 [details, diff] adding useflag ksource to compile with kernel sources adding useflag ksource to compile with kernel sources
Created attachment 197764 [details, diff] adding useflag ksource to compile with kernel sources adding useflag ksource to compile with kernel sources
sorry for that many attachments
(In reply to comment #3) > Well, some patches require building against kernel sources although I'm > unsure about USE flag. really ? some patches need to go grubbin around internal kernel headers and cant use the sanitized user headers ? do you examples ?
(In reply to comment #15) > really ? Yes. > some patches need to go grubbin around internal kernel headers and > cant use the sanitized user headers ? do you examples ? Check IMQ patches. You have to apply both kernel patches and then rebuild patched iptables.
imo, those changes should be propagated to the installed kernel headers
(In reply to comment #17) > imo, those changes should be propagated to the installed kernel headers "--with-ksource" is a configure option of iptables which will let iptables to compile against changed and patched kernel-sources. Patches for kernel-sources can be easily applied via /etc/portage/patches and therefor a useflag for iptables to let the users decide is imho the least what gentoo can do to reflect user's choice. Isn't gentoo's philosophy "let the user decide"? Of cource, the useflag ksource should be disabled by default and must not be supported. A description could be: ksource - compile iptables against kernel-sources, don't use it if you don't know what you are doing...
*** Bug 414857 has been marked as a duplicate of this bug. ***