Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907728 - app-emulation/libvirt-9.3.0 (and probably other versions) need updated kernel config checks
Summary: app-emulation/libvirt-9.3.0 (and probably other versions) need updated kernel...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-06-03 03:47 UTC by Mitchell Dorrell
Modified: 2023-06-04 01:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mitchell Dorrell 2023-06-03 03:47:47 UTC
There may be similar issues with other checks, but at the very least, line 201 of the libvirt-9.3.0 ebuild is a check for CONFIG_IP_NF_TARGET_MASQUERADE. As of kernel version 5.4 and later, the helptext reads:
"
This is a backwards-compat option for the user's convenience                                                                                                                                                                          
(e.g. when running oldconfig). It selects NETFILTER_XT_TARGET_MASQUERADE.
"
... which suggests that the ebuild should be checking NETFILTER_XT_TARGET_MASQUERADE, right? Users with NETFILTER_XT_TARGET_MASQUERADE=y and CONFIG_IP_NF_TARGET_MASQUERADE=n are fine.

At first glance, kernels 4.14 and 4.19 (still in the tree) do not appear to have this backwards-compatibility nature.
I suggest changing updating the ebuild to be satisfied by either option being set, or perhaps more easily, configure the ebuild to conditionally check the new option or the old option based on the kernel version.

Reproducible: Always
Comment 1 Michal Prívozník 2023-06-03 17:23:28 UTC
Yeah, making the kernel version check just feels better. It can be dropped, once the old kernels leave the tree. However, I think it was actually earlier than 5.4 that this became an alias:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adf82accc5f52

kernel.git $ git describe --contains --tags adf82accc5f52
v5.2-rc1~133^2~174^2~6

Let me post a fix.
Comment 2 Larry the Git Cow gentoo-dev 2023-06-04 01:09:41 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=712bfd92b0a700215c56b0a5b26ab4006530a625

commit 712bfd92b0a700215c56b0a5b26ab4006530a625
Author:     Michal Privoznik <michal.privoznik@gmail.com>
AuthorDate: 2023-06-03 17:23:37 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-06-04 01:05:57 +0000

    app-emulation/libvirt: Fix IP_NF_TARGET_MASQUERADE check
    
    As of kernel commit v5.2-rc1~133^2~174^2~6 the
    IP_NF_TARGET_MASQUERADE is just an alias for
    NETFILTER_XT_TARGET_MASQUERADE:
    
      config IP_NF_TARGET_MASQUERADE
        tristate "MASQUERADE target support"
        select NETFILTER_XT_TARGET_MASQUERADE
        help
        This is a backwards-compat option for the user's convenience
        (e.g. when running oldconfig). It selects NETFILTER_XT_TARGET_MASQUERADE.
    
    Fine tune our kernel config checks, though this can be changed
    once kernels older than 5.2.0 leave the tree.
    
    Closes: https://bugs.gentoo.org/907728
    Signed-off-by: Michal Privoznik <michal.privoznik@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/31292
    Signed-off-by: Sam James <sam@gentoo.org>

 app-emulation/libvirt/libvirt-8.7.0-r1.ebuild | 13 ++++++++++++-
 app-emulation/libvirt/libvirt-8.8.0-r1.ebuild | 13 ++++++++++++-
 app-emulation/libvirt/libvirt-8.9.0-r2.ebuild | 13 ++++++++++++-
 app-emulation/libvirt/libvirt-8.9.0.ebuild    | 13 ++++++++++++-
 app-emulation/libvirt/libvirt-9.2.0.ebuild    | 13 ++++++++++++-
 app-emulation/libvirt/libvirt-9.3.0.ebuild    | 13 ++++++++++++-
 app-emulation/libvirt/libvirt-9999.ebuild     | 13 ++++++++++++-
 7 files changed, 84 insertions(+), 7 deletions(-)