A recent update of my Silverblue brought in gcc compiler which was not there before. What was the reasoning for adding this to Silverblue base? What are the advantages and disadvantages of having a compiler installed by default? Personally I would rather not have it in there. I prefer a minimal base system and use toolbox/containers for compiling code.
It looks like gcc
is Required by kernel-devel
$ rpm -q --whatrequires gcc
kernel-devel-5.12.8-300.fc34.x86_64
Looking at the kernel
spec file, it looks like the change was introduced here - Commit - rpms/kernel - 17639df044f5f81bbf267f566426eae4a5187875 - src.fedoraproject.org
I think a BZ against the kernel
component would be the right path forward here; I don’t think the kernel-devel
package should require gcc
.
This package [kernel-devel] contains the Linux kernel sources. You will need a compiler to use them to build the akmod/dkms out-of-tree kernel modules.
Sure, but is it necessary to drag in gcc
and friends in order to install the kernel-devel
RPM?
Do we need kernel-devel in the base image? I did a
rpm-ostree override remove kernel-devel gcc
and life is good.
Removing gcc and kernel-devel seem good only if there is no complexity add to nvidia user.
This is a side effect of Correct kernel-devel make prepare build for 5.12. (!972) · Merge requests · cki-project / kernel-ark · GitLab.
This is work in progress to fix that for users:
- PR#214: Revert "Add minimal -devel packages as needed to build kernel modules" - workstation-ostree-config - Pagure.io
- core: Prevent installing mismatching kernel-devel by allisonkarlitskaya · Pull Request #2817 · coreos/rpm-ostree · GitHub
And I’ve just suggested another option: PR#214: Revert "Add minimal -devel packages as needed to build kernel modules" - workstation-ostree-config - Pagure.io
Timothée beat me to the punch, but I’m going to post what I have in my buffer anyways.
I spoke with @siosm today and he pointed out some relevant activity around kernel-devel
+ Silverblue.
We currently include the package in the Silverblue host to facilitate building kernel modules (like the Nvidia driver) for users.[1]
Additionally, the kernel
folks explicitly added the requirements on build tools to facilitate building newer kernels.[2]
There’s a PR to the Silverblue manifest to remove the kernel-devel
package because we have the fedora-updates-archive
repo with all the available RPM versions there.[3]
That PR seems to have stalled though and additional work is being pursued in rpm-ostree
to prevent the install of mis-matched kernel
+ kernel-devel
packages.[4] (Which is part of why we have kernel-devel
on the host).
Unfortunately, I think in the current state the best thing to do is what @mmorrell2016 said and just rpm-ostree override remove
those packages that you don’t need/want.
[1] Commit - workstation-ostree-config - 31ad6acced8426a374d5af3701d0cfdbf58cb3da - Pagure.io
[2] Correct kernel-devel make prepare build for 5.12. (!972) · Merge requests · cki-project / kernel-ark · GitLab
[3] PR#214: Revert "Add minimal -devel packages as needed to build kernel modules" - workstation-ostree-config - Pagure.io
[4] core: Prevent installing mismatching kernel-devel by allisonkarlitskaya · Pull Request #2817 · coreos/rpm-ostree · GitHub