Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 635720 - base/make.defaults: unset USE=modules by default
Summary: base/make.defaults: unset USE=modules by default
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://archives.gentoo.org/gentoo-de...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-28 18:39 UTC by Michael Orlitzky
Modified: 2018-10-08 06:18 UTC (History)
11 users (show)

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


Attachments
0001-profiles-unset-USE-modules-by-default.patch (0001-profiles-unset-USE-modules-by-default.patch,2.97 KB, patch)
2018-01-14 22:18 UTC, Michael Orlitzky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2017-10-28 18:39:48 UTC
The "modules" USE flag is enabled by default for all profiles in base/make.defaults:

  # 2009/09/21 Robin H. Johnson <robbat2@gentoo.org>
  # https://archives.gentoo.org/gentoo-dev/msg_dc705dc2c1a45e18a85aa62e8fb17009.xml
  # Build kernel modules from linux-mod by default:
  USE="${USE} modules"

It looks like the original intention was to enable any kernel modules using the linux-mod.eclass. However, the name of the USE flag associated with that eclass is now set by the variable MODULES_OPTIONAL_USE, and isn't guaranteed to be "modules". Moreover, there are at least two packages (graphicsmagick, mcabber) using the flag for things other than kernel modules.

I suggest we disable it -- I'll eventually remove it myself if no one objects after a long enough period of time.

I'm CCing the maintainers of all affected packages. If anyone would like us to wait until they've set "+modules" in their ebuilds, please just file a blocker bug against this.

Affected packages:

  * app-crypt/tpm-emulator
  * app-emulation/open-vm-tools
  * media-gfx/graphicsmagick
  * net-firewall/ipset
  * net-firewall/xtables-addons
  * net-im/mcabber
  * net-misc/openvswitch
  * sys-cluster/knem
  * sys-cluster/open-mx
Comment 1 Alon Bar-Lev (RETIRED) gentoo-dev 2017-10-28 18:59:27 UTC
app-crypt/tpm-emulator - done
Comment 2 Mike Gilbert gentoo-dev 2017-10-28 19:07:51 UTC
app-emulation/open-vm-tools - modules are unneeded with a modern kernel, so I would actually prefer to have them disabled by default

+1 for removing the USE flag from make.defaults.
Comment 3 Michael Orlitzky gentoo-dev 2017-10-29 01:05:23 UTC
I just noticed that USE=modules is also set at the bottom of default/linux/make.defaults, so it will need to be removed from there too eventually.
Comment 4 Michael Orlitzky gentoo-dev 2018-01-14 22:18:55 UTC
Created attachment 514824 [details, diff]
0001-profiles-unset-USE-modules-by-default.patch

Proposed patch, will send to the -dev list and wait a while before proceeding.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2018-01-14 23:53:32 UTC
Mail sent to -dev with an eclass cleanup to make this easier to do.
Comment 6 Larry the Git Cow gentoo-dev 2018-01-18 21:42:09 UTC
The bug has been referenced in the following commit(s):

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

commit b98ae0d93872422dab1db8d33f7a1fc06806c83a
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2018-01-18 21:40:08 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2018-01-18 21:42:01 +0000

    eclass/linux-mod.eclass: implement MODULES_OPTIONAL_USE_IUSE_DEFAULT.
    
    Add IUSE default support for $MODULES_OPTIONAL_USE use flag variable.
    Defaults to disabled, and individual packages will have it enabled
    rather than tree-wide.
    
    Bug: https://bugs.gentoo.org/635720
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 eclass/linux-mod.eclass | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)}
Comment 7 Michael Orlitzky gentoo-dev 2018-04-15 17:13:28 UTC
Robin, AFAIK I'm still waiting on ebuild updates before proceeding with this, correct?
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2018-04-17 04:26:03 UTC
(In reply to Michael Orlitzky from comment #7)
> Robin, AFAIK I'm still waiting on ebuild updates before proceeding with
> this, correct?

Looking at the present tree, I personally think the following packages still need review for it:
* net-firewall/xtables-addons
* sys-cluster/knem
* sys-cluster/open-mx

Everybody else either added their own "+modules", or modules shouldn't be the default anymore (app-emulation/open-vm-tools, net-firewall/ipset, net-misc/openvswitch).

If you were to update those 3 packages, I think we could go ahead with the rest of this oureslves.
Comment 9 Michael Orlitzky gentoo-dev 2018-07-22 14:07:59 UTC
(In reply to Robin Johnson from comment #8)
> 
> Looking at the present tree, I personally think the following packages still
> need review for it:
> * net-firewall/xtables-addons
> * sys-cluster/knem
> * sys-cluster/open-mx
> 

I sent an email to the maintainers of these three packages a few days ago. I'll wait a week or so for a response, and then try IRC...
Comment 10 Michael Orlitzky gentoo-dev 2018-09-30 22:35:01 UTC
No answer after two months... I'm just going to send this to the -dev list again and see if anyone objects there.
Comment 11 Larry the Git Cow gentoo-dev 2018-10-07 21:55:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f7838027ac84f2a57d98823e8b259677fe6ef36

commit 0f7838027ac84f2a57d98823e8b259677fe6ef36
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2018-01-14 15:31:24 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2018-10-07 21:52:53 +0000

    profiles: unset USE=modules by default.
    
    The "modules" USE flag was originally enabled by default in the base
    profile so that any ebuild inheriting linux-mod.eclass would have its
    kernel modules built by default. However, the name of that USE flag is
    now controlled by the MODULES_OPTIONAL_USE variable, set in the ebuild
    itself. The best place for the USE flag default is therefore in IUSE
    (in the ebuild), because only the ebuild knows the correct flag name.
    
    There are at least two packages, media-gfx/graphicsmagick and
    net-im/mcabber, that assign a different meaning to the "modules" flag,
    further suggesting that a global default is too blunt an approach.
    
    This commit drops the flag from base/make.defaults, and also from
    default/linux/make.defaults where a redundant entry was present.
    Thereafter, the override in features/hardened/make.defaults is
    unnecessary, so it has been dropped as well.
    
    Closes: https://bugs.gentoo.org/635720
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 profiles/base/make.defaults              | 5 -----
 profiles/default/linux/make.defaults     | 5 -----
 profiles/features/hardened/make.defaults | 1 -
 3 files changed, 11 deletions(-)
Comment 12 Larry the Git Cow gentoo-dev 2018-10-08 06:18:55 UTC
The bug has been referenced in the following commit(s):

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

commit fb320c2ee91f5d7e4e72a3d0fd43d9df75e14167
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-10-08 06:18:26 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-10-08 06:18:40 +0000

    net-firewall/xtables-addons: adopt new USE=modules logic
    
    Bug: https://bugs.gentoo.org/635720
    Package-Manager: Portage-2.3.50, Repoman-2.3.11
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 net-firewall/xtables-addons/xtables-addons-2.13.ebuild | 5 +++--
 net-firewall/xtables-addons/xtables-addons-2.14.ebuild | 5 +++--
 net-firewall/xtables-addons/xtables-addons-3.0.ebuild  | 5 +++--
 net-firewall/xtables-addons/xtables-addons-3.1.ebuild  | 5 +++--
 net-firewall/xtables-addons/xtables-addons-3.2.ebuild  | 5 +++--
 5 files changed, 15 insertions(+), 10 deletions(-)