What is the recommended approach for distributing a kernel module using a RPM? Ideally, for portability, I would like the RPM to be able to build the modules against the running kernel's headers before installing.
I've used Dynamic Kernel Module Support or DKMS before to distribute a Linux driver targeting multiple kernel versions (2.6.31-37). DKMS itself is a collection of bash scripts that can automate both the building and rebuilding of a kernel module based on the current installed version of Linux. You can distribute drivers as either RPM or DEB files which contain the driver source, DKMS scripts, and optionally, binary versions of the driver tied to particular kernel versions.
Related
The PostgreSQL used to provide EDB package for Linux x86_64 till version 10.15 like postgresql-10.15-1-linux-x64-binaries.tar.gz.
Now we want to upgrade PostgreSQL to version 13.1 and EDB package for it is not available.
Hence we want to create the package our own using documentation link. But we are able to compile package but it is not including all required files such and header and libs for SSL, tar.
How to generate a complete relocatable package like postgresql-10.15-1-linux-x64-binaries.tar to run PostgreSQL as standalone software on RHEL6/7/8 SUSE, SLES12/15 Linux versions.
or
Are there any special instructions to generate PostgreSQL 13.1 package like postgresql-10.15-1-linux-x64-binaries.tar?
I recommend that you use the PGDG packages.
Building from source is of course also an option, but I recommend that you do not try to create standalone binary packages. The proper way for that would be linking the software statically, which is not supported by the build process and would require you to have static libraries for all referenced software.
You could attempt to add all linked shared libraries to the software distribution, but you would have to make sure that these libraries are used instead of the ones on the default shared library path, which is difficult.
It seems to me that you are trying to re-invent the wheel here, and the wheel in this case is a docker container. Use that and stop worrying.
I'm building an RPM that contain a kernel module.
Like all the other kernel modules, there is a dependency between the running kernel version to the kernel module.
I want to enforce this dependency, so if you want to update your kernel, you will need to update my rpm.
I was trying to do that with the spec file but without success.
Could you help me to find a way to do this?
Any other idea for enforce update of my kernel module during kernel update?
I am running into a issue with RH7 kernels. We are running RH6/Centos6 based systems - we normally compile the kernel module once (Centos6.6) and we could install the kernel module on another Centos kernel in the same series (say Centos6.4).
With Centos7 (3.10 kernel) I cannot build the kernel module with says 3.10.0-329 (Centos7.2) kernel and install on a kernel version 3.10.0-227 (Centos7.1) - insmod returns invalid format.
Anyone run into similar issues - are there any workarounds.
Thanks
--
Jimmy
Probably, you want a binary blob - ready-made object file which is part of the module. Look into kernel documentation for know how to build module which uses binary blobs. – Tsyvarev
I need to install old kernel into Kali (Debian like) distro. I need to run program which requires older kernel.
I downloaded kernel but the installation gives me too many errors. I was reading similar topics and watch the videos, but so far I am not successful.
I do not have experience with kernels. Is there .deb package for kernels or any other easier way to do it?
Can I use such old kernel for this distribution?
Thank you
The 2.4.33 kernel is pretty old. According to Debian's packaging files installing that old a kernel doesn't seem to be doable in wheezy. Attempting to install and run an old kernel outside the packaging system is not going to to work. All the "modern" libraries and applications will be broken when running the 2.4 kernel, as will the program (you need more than just a kernel for your program). If it were me, I'd set up a virtualization environment like VirtualBox or something similar and pick an old distro like CentOS 3.9 or an older Debian release (sarge or later). If that's not an option, you could always try and port the program to a more recent kernel.
I'm looking for the "best"* method to add the linux kernel headers and development libraries as a requirement for an RPM and Debian package I'm making. I know that I can add a "Requires: blah" tag in the RPM .spec file, and that I can do the analog in the Debian control file, but this will have the user download the latest kernel's headers/devel...not their current headers/devel.
For example, say the user is running linux kernel version 3.4, and the latest is 3.5. If they install the RPM via yum, and don't have any kernel headers or development libraries, they will download the 3.5 headers and development libraries. But when the software goes to build, it will try to find the 3.4 headers and development libraries and fail.
Thanks!
Debian at least easily allows you to specify a particular version in Build-Depends:. Usually you don't want to, but it's perfectly possible.
I do not understand why something like this would not suffice (something like a minumum kernel required)
Requires: kernel >= 3.5
BuildRequires: kernel-headers >= 3.5
i guess you are trying to build/package some 3rd party kernel modules (since afaik this is really the only type of package that should depend on kernel-headers).
if so, you probably want to have a look at how other kernel-modules are packaged, esp, check dkms, which is supported by all major distributions, and use that to build your kernel module.