Difference between revisions of "Kernel module package guidelines"

From ArchWiki
Jump to: navigation, search
(Introduction)
(Kernel Module Package Guidelines)
Line 12: Line 12:
  
 
* create an nvidia package containing just the kernel modules built for the vanilla kernel
 
* create an nvidia package containing just the kernel modules built for the vanilla kernel
* create an nvidia-utils package containing the accompanying files
+
* create an nvidia-utils package containing the supporting files
 
* make sure nvidia depends on nvidia-utils
 
* make sure nvidia depends on nvidia-utils
 
* for another kernel like kernel26-mm, create nvidia-mm containing the kernel modules built against that kernel which provides nvidia and also depends on nvidia-utils
 
* for another kernel like kernel26-mm, create nvidia-mm containing the kernel modules built against that kernel which provides nvidia and also depends on nvidia-utils
 
This structure allows others to easily create module packages for various kernels that can all coexist on a single installed system.
 
  
 
=== Rationale ===
 
=== Rationale ===
  
The key factor being navigated is that, while kernel modules built for different kernels always live in different directories and can peacefully coexist, the accompanying files are expected to live in one location. If one package contained all the files, you would be unable to install the modules for more than one kernel because the accompanying files in the packages would have file conflicts.
+
While kernel modules built for different kernels always live in different directories and can peacefully coexist, the supporting files are expected to be found in one location. If one package contained module and supporting files, you would be unable to install the modules for more than one kernel because the supporting files in the packages would cause pacman file conflicts.
  
This separation of modules and accompanying files allows multiple kernel module packages to be installed for multiple kernels on the same system while sharing the utilities among them.
+
The separation of modules and accompanying files allows multiple kernel module packages to be installed for multiple kernels on the same system while sharing the supporting files among them in the expected location.

Revision as of 02:28, 25 October 2007

Kernel Module Package Guidelines

Introduction

Packages that contain kernel modules should be treated specially, to support users who wish to have more than one kernel installed on a system.

When packaging software containing a kernel module and other non-module supporting files/utilities, it is important to separate the kernel modules from the supporting files.

Guideline

When packaging such software (using the NVidia drivers as an example) the convention is:

  • create an nvidia package containing just the kernel modules built for the vanilla kernel
  • create an nvidia-utils package containing the supporting files
  • make sure nvidia depends on nvidia-utils
  • for another kernel like kernel26-mm, create nvidia-mm containing the kernel modules built against that kernel which provides nvidia and also depends on nvidia-utils

Rationale

While kernel modules built for different kernels always live in different directories and can peacefully coexist, the supporting files are expected to be found in one location. If one package contained module and supporting files, you would be unable to install the modules for more than one kernel because the supporting files in the packages would cause pacman file conflicts.

The separation of modules and accompanying files allows multiple kernel module packages to be installed for multiple kernels on the same system while sharing the supporting files among them in the expected location.