Re: What is the difference between the srcpackage kernel-default the package kernel-source

Originally Posted by
calculon
In my understanding, a package of type srcpackage is a package, which contains source code. When I do
, if find
Code:
| kernel-default | The Standard Kernel | srcpackage
and
Code:
i+ | kernel-source | The Linux Kernel Sources | package
Which one do I need to install in order to compile the kernel? Why is kernel-source not a source package?
Try 'zypper in kernel-source'. The command wants to install the following three packages:
Code:
erlangen:~ # zypper if kernel-default-devel kernel-devel kernel-source
Loading repository data...
Reading installed packages...
Information for package kernel-default-devel:
---------------------------------------------
Repository : openSUSE-Tumbleweed-Oss
Name : kernel-default-devel
Version : 5.15.2-1.1
Arch : x86_64
Vendor : openSUSE
Installed Size : 4.7 MiB
Installed : No
Status : not installed
Source package : kernel-default-5.15.2-1.1.nosrc
Summary : Development files necessary for building kernel modules
Description :
This package contains files necessary for building kernel modules (and
kernel module packages) against the default flavor of the kernel.
Source Timestamp: 2021-11-13 14:10:12 +0000
GIT Revision: 26a203b53de5bda52f512344a49e138964e43912
GIT Branch: stable
Information for package kernel-devel:
-------------------------------------
Repository : openSUSE-Tumbleweed-Oss
Name : kernel-devel
Version : 5.15.2-1.1
Arch : noarch
Vendor : openSUSE
Installed Size : 58.4 MiB
Installed : No
Status : not installed
Source package : kernel-source-5.15.2-1.1.src
Summary : Development files needed for building kernel modules
Description :
Kernel-level headers and Makefiles required for development of
external kernel modules.
Source Timestamp: 2021-11-13 14:10:12 +0000
GIT Revision: 26a203b53de5bda52f512344a49e138964e43912
GIT Branch: stable
Information for package kernel-source:
--------------------------------------
Repository : openSUSE-Tumbleweed-Oss
Name : kernel-source
Version : 5.15.2-1.1
Arch : noarch
Vendor : openSUSE
Installed Size : 972.0 MiB
Installed : No
Status : not installed
Source package : kernel-source-5.15.2-1.1.src
Summary : The Linux Kernel Sources
Description :
Linux kernel sources with many fixes and improvements.
Source Timestamp: 2021-11-13 14:10:12 +0000
GIT Revision: 26a203b53de5bda52f512344a49e138964e43912
GIT Branch: stable
erlangen:~ #
The sources are what they are. The src packages are used to generate rpms, such as kernel-default-devel kernel-devel and kernel-source. They reside in a different repo:
Code:
erlangen:~ # zypper se -s kernel-source
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
--+-----------------------+------------+------------+--------+---------------------------
| kernel-source | package | 5.15.2-1.1 | noarch | openSUSE-Tumbleweed-Oss
| kernel-source | srcpackage | 5.15.2-1.1 | noarch | openSUSE-Tumbleweed-Source
| kernel-source-vanilla | package | 5.15.2-1.1 | noarch | openSUSE-Tumbleweed-Oss
| openafs-kernel-source | package | 1.8.8-2.8 | x86_64 | openSUSE-Tumbleweed-Oss
| openafs-kernel-source | package | 1.8.8-2.8 | i586 | openSUSE-Tumbleweed-Oss
erlangen:~ #
i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X (2022) openSUSE Tumbleweed, KDE Plasma