• [gentoo-dev] [PATCH 1/5] use.desc: document new dkms flag

    From Nowa Ammerlaan@21:1/5 to All on Fri Mar 14 13:50:01 2025
    Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
    ---
    profiles/use.desc | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/profiles/use.desc b/profiles/use.desc
    index 36468b321ddb..6e8329009947 100644
    --- a/profiles/use.desc
    +++ b/profiles/use.desc
    @@ -66,6 +66,7 @@ dedicated - Add support for dedicated game servers (some packages do not provide
    dga - Add DGA (Direct Graphic Access) support for X
    dist-kernel - Enable subslot rebuilds on Distribution Kernel upgrades
    djvu - Support DjVu, a PDF-like document format esp. suited for scanned documents
    +dkms - Manage external kernel modules with sys-kernel/dkms
    doc - Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
    dri - Enable direct rendering: used for accelerated 3D and some 2D, like DMA
    dts - Enable DTS Coherent Acoustics decoder support
    --
    2.48.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nowa Ammerlaan@21:1/5 to All on Fri Mar 14 14:00:02 2025
    so we can re-use this function in dkms.eclass.

    Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
    ---
    eclass/linux-mod-r1.eclass | 7 +++----
    1 file changed, 3 insertions(+), 4 deletions(-)

    diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
    index fd83324fa35d..d736f48d679e 100644
    --- a/eclass/linux-mod-r1.eclass
    +++ b/eclass/linux-mod-r1.eclass
    @@ -625,7 +625,7 @@ modules_post_process() {
    # dracut omit files that *hopefully* prevent this
    # _modules_process_depmod.d "${mods[@]##*/}"

    - _modules_process_dracut.conf.d "${mods[@]##*/}"
    + modules_process_dracut.conf.d "${mods[@]##*/}"
    _modules_process_strip "${mods[@]}"
    _modules_process_sign "${mods[@]}"
    _modules_sanity_modversion "${mods[@]}" # after strip/sign in case broke it
    @@ -967,13 +967,12 @@ _modules_process_depmod.d() {
    )
    }

    -# @FUNCTION: _modules_process_dracut.conf.d
    +# @FUNCTION: modules_process_dracut.conf.d
    # @USAGE: <module>...
    -# @INTERNAL
    # @DESCRIPTION:
    # Create dracut.conf.d snippet defining if module should be included in the
    # initramfs.
    -_modules_process_dracut.conf.d() {
    +
  • From Nowa Ammerlaan@21:1/5 to All on Fri Mar 14 14:00:02 2025
    Does not really change anything but avoids duplication in dkms.eclass

    Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
    ---
    eclass/linux-mod-r1.eclass | 78 +++++++++++++++++++++++++-------------
    1 file changed, 51 insertions(+), 27 deletions(-)

    diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
    index 16c280219ef8..fd83324fa35d 100644
    --- a/eclass/linux-mod-r1.eclass
    +++ b/eclass/linux-mod-r1.eclass
    @@ -412,46 +412,20 @@ linux-mod-r1_src_compile() {
    debug-print-function ${FUNCNAME} "$@"
    _modules_check_function ${#} 0 0 || return 0

    - [[ ${modlist@a} == *a* && ${#modlist[@]} -gt 0 ]] ||
    - die "${FUNCNAME[0]} was called without a 'modlist' array"
    -
    # run this again to verify built files access with src_compile's user
    _modules_sanity_kernelbuilt

    - local -a emakeargs=( "${MODULES_MAKEARGS[@]}" )
    - [[ ${modargs@a} == *a* ]] && emakeargs+=( "${modargs[@]}" )
    + modules_process_modlist

    local -A built=()
    local build mod name target
    for mod in "${modlist[@]}"; do
    - # note modlist was not made an associative array ([name]=) to preserve
    - # ordering, but is still using = to
  • From Nowa Ammerlaan@21:1/5 to All on Fri Mar 14 14:00:02 2025
    and stable mask for now

    Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
    ---
    profiles/arch/amd64/use.mask | 4 ++++
    profiles/arch/amd64/use.stable.mask | 4 ++++
    profiles/arch/arm64/use.mask | 4 ++++
    profiles/arch/arm64/use.stable.mask | 4 ++++
    profiles/arch/base/use.mask | 4 ++++
    profiles/arch/x86/use.mask | 4 ++++
    profiles/arch/x86/use.stable.mask | 4 ++++
    7 files changed, 28 insertions(+)

    diff --git a/profiles/arch/amd64/use.mask b/profiles/arch/amd64/use.mask
    index d4ed8ec4f047..6f96ddd09fd4 100644
    --- a/profiles/arch/amd64/use.mask
    +++ b/profiles/arch/amd64/use.mask
    @@ -4,6 +4,10 @@
    # Unmask the flag which corresponds to ARCH.
    -amd64

    +# Nowa Ammerlaan <nowa@gentoo.org> (2025-02-22)
    +# DKMS is available here
    +-dkms
    +
    # Thomas Bettler <thomas.bettler@gmail.com> (2024-11-04)
    # media-libs/tiff only keyworded on amd64
    -lerc
    diff --git a/profiles/arch/amd64/use.stable.mask b/profiles/arch/amd64/use.stable.mask
    index 71ed679097c9..845db0e701ad 100644
    --- a/profiles/arch/amd64/use.stable.mask
    +++ b/profiles/arc
  • From Nowa Ammerlaan@21:1/5 to All on Fri Mar 14 14:00:02 2025
    Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
    ---
    eclass/dkms.eclass | 545 +++++++++++++++++++++++++++++++++++++++++++++
    1 file changed, 545 insertions(+)
    create mode 100644 eclass/dkms.eclass

    diff --git a/eclass/dkms.eclass b/eclass/dkms.eclass
    new file mode 100644
    index 000000000000..c445b95721c3
    --- /dev/null
    +++ b/eclass/dkms.eclass
    @@ -0,0 +1,545 @@
    +# Copyright 2025 Gentoo Authors
    +# Distributed under the terms of the GNU General Public License v2
    +
    +# @ECLASS: dkms.eclass
    +# @MAINTAINER:
    +# Nowa Ammerlaan <nowa@gentoo.org>
    +# @AUTHOR:
    +# Author: Nowa Ammerlaan <nowa@gentoo.org>
    +# @SUPPORTED_EAPIS: 8
    +# @PROVIDES: linux-mod-r1
    +# @BLURB: Helper eclass to manage DKMS modules
    +# @DESCRIPTION:
    +# Registers, builds and installs kernel modules using the DKMS
    +# (Dynamic Kernel Module Support) system provided by sys-kernel/dkms.
    +#
    +# The dkms_autoconf may be used to translate the modlist and modargs
    +# arrays from linux-mod-r1.eclass to a DKMS configuration file.
    +#
    +# If the upstream sources already contain a DKMS conf
  • From Nowa Ammerlaan@21:1/5 to Alexey Sokolov on Fri Mar 14 16:50:01 2025
    On 14/03/2025 16:34, Alexey Sokolov wrote:
    14.03.2025 12:48, Nowa Ammerlaan пишет:
    Signed-off-by: Nowa Ammerlaan<nowa@gentoo.org>
    ---
    eclass/dkms.eclass | 545 +++++++++++++++++++++++++++++++++++++++++++++
    1 file changed, 545 insertions(+)
    create mode 100644 eclass/dkms.eclass

    diff --git a/eclass/dkms.eclass b/eclass/dkms.eclass
    new file mode 100644
    index 000000000000..c445b95721c3
    --- /dev/null
    +++ b/eclass/dkms.eclass
    @@ -0,0 +1,545 @@
    +# Copyright 2025 Gentoo Authors
    +# Distributed under the terms of the GNU General Public License v2
    +
    +# @ECLASS: dkms.eclass
    +# @MAINTAINER:
    +# Nowa Ammerlaan<nowa@gentoo.org>
    +# @AUTHOR:
    +# Author: Nowa Ammerlaan<nowa@gentoo.org>
    +# @SUPPORTED_EAPIS: 8
    +# @PROVIDES: linux-mod-r1
    +# @BLURB: Helper eclass to manage DKMS modules
    +# @DESCRIPTION:
    +# Registers, builds and installs kernel modules using the DKMS
    +# (Dynamic Kernel Module Support) system provided by sys-kernel/dkms.
    +#
    +# The dkms_autoconf may be used to translate the modlist and modargs
    +# arrays from linux-mod-r1.eclass to a DKMS configuration file.
    +#
    +# If the upstream sources already contain a DKMS configuration file
    +# this may be used instead of the dkms_autoconf function. In this
    +# case dkms_gentoofy_conf function may be used to insert the users
    +# compiler, MAKEOPTS and *FLAGS preferences into the DKMS
    +# configuration file.
    +#
    +# The dkms_dopackage function is used to install a DKMS package, this
    +# function expects to find a dkms.conf file at the path specified
    +# by the argument passed to this function. If not path is specified
    +# the current working directory is used.

    typo: if no path is specified


    Thanks, fixed in my pull request.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)