How i can install kernel 5.18 in Leap15.4 ?

How i can install kernel 5.18 in Leap15.4 ?

i tried to do like this:


sudo zypper ref && sudo zypper update
sudo zypper in -t pattern devel_basis
sudo zypper in bc openssl openssl-devel dwarves rpm-build libelf-devel
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.18.5.tar.gz
cd linux-5.18.5/
sudo find /boot/ \( -iname "*config*" -a -iname "*`uname -r`*" \) -exec cp -i -t ./ {} \;
mv *`uname -r`* .config
vi .config
search for “CONFIG_MODULE_SIG_KEY”.
And comment out like:
#CONFIG_MODULE_SIG_KEY
sudo make menuconfig
sudo make clean
sudo make rpm-pkg
sudo zypper in  ./kernel-5.18.5_150400.22_default-1.x86_64.rpm ./kernel-headers-5.18.5_150400.22_default-1.x86_64.rpm ./kernel-devel-5.18.5_150400.22_default-1.x86_64.rpm 


and have this errors:


3 new packages to install.
Overall download size: 0 B. Already cached: 1.21 GiB. After the operation, additional 7.4 GiB will be used.

    Note: System reboot required.
Continue? [y/n/v/...? shows all options] (y): y
In cache kernel-devel-5.18.5_150400.22_default-1.x86_64.rpm                                (1/3), 147.7 MiB ( 1.14 GiB unpacked)
In cache kernel-5.18.5_150400.22_default-1.x86_64.rpm                                      (2/3),  1.07 GiB ( 6.29 GiB unpacked)
In cache kernel-headers-5.18.5_150400.22_default-1.x86_64.rpm                              (3/3),   1.3 MiB (  5.7 MiB unpacked)

Checking for file conflicts: ............................................................................................[error]
Detected 156 file conflicts:

File /usr/include/asm-generic/fcntl.h
  from install of
     kernel-headers-5.18.5_150400.22_default-1.x86_64 (Plain RPM files cache)
  conflicts with file from package
     linux-glibc-devel-5.14-150400.4.44.x86_64 (@System)

File /usr/include/asm-generic/mman-common.h
  from install of
     kernel-headers-5.18.5_150400.22_default-1.x86_64 (Plain RPM files cache)
  conflicts with file from package
     linux-glibc-devel-5.14-150400.4.44.x86_64 (@System)
......................
File /usr/include/xen/gntdev.h
  from install of
     kernel-headers-5.18.5_150400.22_default-1.x86_64 (Plain RPM files cache)
  conflicts with file from package
     linux-glibc-devel-5.14-150400.4.44.x86_64 (@System)

File conflicts happen when two packages attempt to install files with the same name but different contents. If you continue, conflicting files will be replaced losing the previous content.
Continue? [yes/no] (no):

Perhaps there is a correct option how to add kernel5.18 to Leap15.4 ?

Serg

https://build.opensuse.org/package/show/Kernel:stable:Backport/kernel-default

Because of glibc 2.31 in Leap 15.4 you need patched kernel from openSUSE.


zypper addrepo https://download.opensuse.org/repositories/Kernel:stable:Backport/standard/Kernel:stable:Backport.repo
zypper refresh
zypper install kernel-default

For compiling kernel by yourself you need either patching kernel.org kernel or upgrading glibc.

Really? The original post shows successfully compiled kernel from kernel.org. May be you should stop spreading misinformation.

Compiling without actual using?

https://bugzilla.opensuse.org/show_bug.cgi?id=1182224#c2
https://lists.opensuse.org/archives/list/kernel@lists.opensuse.org/message/3IUK52MTNYB6KP5VYK27GVB6Y4ZRPM2K/

It’s up to user whether he/she needs kernel-syms and kernel-default-devel.

It’s all about openSUSE packaging, not about compiling upstream tarballs.

OK, user can compile kernel.org kernel with default glibc 2.31 in Leap 15.4.
How can user install this kernel and use it with Leap 15.4?

Maybe you could try kernel from this repository
https://download.opensuse.org/repositories/Kernel:/stable/standard/

Because of Updates it is better to add, enable and switch to the Repo, see post #3

Surprise …

make modules_install
make install

Gasp …

OK, one needs kernel-install-tools for /sbin/installkernel.

Kernel-install-tools package is not available for Leap, only for SLE: https://software.opensuse.org/package/kernel-install-tools


zypper addrepo https://download.opensuse.org/repositories/Kernel:tools/SLE_15_SP4/Kernel:tools.repo
zypper refresh
zypper install kernel-install-tools

Will it work with Leap 15.4?

Oh my! Have you heard about YaST Software or zypper?

https://software.opensuse.org/package/kernel-install-tools

Welcome back Mr. Rip van Winkle. software.o.o was broken since Leap 15.3 and is broken for Leap 15.4.

Cannot find repo for Leap here: https://download.opensuse.org/repositories/Kernel:/tools/

Only SLE and openSUSE:Factory are available:
https://build.opensuse.org/package/show/Kernel:tools/kernel-install-tools
https://build.opensuse.org/package/show/openSUSE%3AFactory/kernel-install-tools

No repo for Leap in https://download.opensuse.org/repositories/Kernel:/tools/

Only for SLE & openSUSE:Factory
https://build.opensuse.org/package/show/Kernel:tools/kernel-install-tools
https://build.opensuse.org/package/show/openSUSE%3AFactory/kernel-install-tools

For Leap 15.4 in OSS:

zypper se -s kernel-inst
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...

S | Name                 | Type  | Version          | Arch   | Repository
--+----------------------+-------+------------------+--------+-----------
  | kernel-install-tools | Paket | 0.3.0-150400.1.4 | x86_64 | OSS

Available for Leap 15.4: https://download.opensuse.org/distribution/leap/15.4/repo/oss/x86_64/kernel-install-tools-0.3.0-150400.1.4.x86_64.rpm
Not available for Leap 15.3: https://download.opensuse.org/distribution/leap/15.3/repo/oss/x86_64/

Available with dracut package:

:~> rpm -qf /sbin/installkernel
dracut-049.1+suse.234.g902e489c-150200.3.57.1.x86_64

Kernel-install-tools provides /sbin/installkernel with changes mainly for signing kernels.

You are trying to prove that yours is bigger than mine? I surrender, you won.

No, I’m trying to understand things that I don’t know yet.

Aggression, sarcasm, passive aggression from you… Please, change your mood.
You have qualification good enough to get well-being outside Russia…
:peace: