Giter Site home page Giter Site logo

common.postinst and AUTOINSTALL="" about dkms HOT 6 CLOSED

anbe42 avatar anbe42 commented on July 16, 2024
common.postinst and AUTOINSTALL=""

from dkms.

Comments (6)

anbe42 avatar anbe42 commented on July 16, 2024

I'll test the following in dkms_common.postinst:

autoinstall=$(AUTOINSTALL=; . "/var/lib/dkms/$NAME/$VERSION/source/dkms.conf" >/dev/null 2>&1; echo $AUTOINSTALL)
if [ -z "$autoinstall" ]; then
    echo "Not building the $NAME module which does not have AUTOINSTALL enabled."
    exit 0
fi

from dkms.

evelikov avatar evelikov commented on July 16, 2024

The current code skips the module if $AUTOINSTALL is empty even if set. Aka:

autoinstall()
{
  ...
  if [[ ! $AUTOINSTALL ]]; then
    continue;
  fi
  ...
}

As mentioned previously I would love us to nuke dkms_common.postinst. In order to have no breaking changes in Debian, it could simply calls to kernel_postinst.d_dkms.in and/or kernel_prerm.d_dkms.

Can I offer some virtual 🍪 to sketch and test how it works from Debian POV? Thanks in advance

from dkms.

anbe42 avatar anbe42 commented on July 16, 2024

dkms_common.postinst and kernel_postinst.d_dkms.in are two orthogonal things:
dkms_common.postinst runs after installation of foo-dkms and builds the foo module for all kernels
kernel_postinst.d_dkms.in runs after installation of a hernel (or its headers) and builds all modules for this kernel

if dkms_common.postinst is not used elsewhere I have no problem moving it to the debian packaging, but we cannot get rid of it for a few years at least since it is referenced in the maintainer scripts of all *-dkms packages

from dkms.

evelikov avatar evelikov commented on July 16, 2024

dkms_common.postinst is used outside of Debian (+ derivatives) so having it upstream is fine. Although I would love to trim it down, or document at the very least.

Notable bits:

  • sources debconf a file - is that still relevant?
  • duplicates existing dkms logic - framework.conf, no-autoinstall, kernel-headers ...
  • while we request autoinstall_all_kernels we install only on latest one (determined via dpkg, rpm) + current kernel ... seemingly not "all" as per the request
  • takes 5 args ... (at a glance) all users provide only 2 + bunch of additional logic for the 3-5 args

I would love to see AUTOINSTALL fixed, but IMHO we should looked into at least some of the above first.

from dkms.

anbe42 avatar anbe42 commented on July 16, 2024

Ideally this common.postinst functionality ("build $module for all kernels") should be part of dkms (so it could reuse the existing logic) and common.postinst simply calls dkms like kernel_postinst.d_dkms calls dkms autoinstall.

from dkms.

evelikov avatar evelikov commented on July 16, 2024

Fully agreed - it seems like others not using common.postinst (like Arch) will also benefit from such functionality being in core dkms.

Opened a separate task with some details and pointers. Thanks o/

from dkms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.