Why does fedora-minimal ship gcc, all of Perl, and unzip? Pulling one thread removed 281 packages

I keep archive extractors out of my offline templates on purpose — unzip and friends are exactly the kind of parser attack surface a vault qube should never carry. So I was surprised to find this in a template that never had it installed:

$ rpm -q unzip
unzip-6.0-69.fc44.x86_64

Traced it back to fedora-44-minimal itself. The chain:

perl-devel → redhat-rpm-config → zip → unzip

and that same chain is quietly holding a full build toolchain in “minimal”: gcc, gcc-c++, binutils, make, glibc-devel, kernel-headers, plus the entire Perl distribution (~270 modules, including perl-Archive-Zip and perl-Archive-Tar — more archive parsers).

The kicker — on a virgin minimal clone:

$ sudo dnf remove zip
…
Transaction Summary: Removing: 281 packages (326 MiB freed)

I’ve done it in a test clone: desktop stack fine, reboots fine, dnf update quiet. Only real casualty is file (rides out as an unused dep — I re-added it).

Three questions:

  • Is this intended? Does anything in the Qubes template build actually need rpm-build machinery and gcc at runtime, or is this a packaging accident inherited from Fedora?

  • Is dnf remove zip the sane fix, or is there a better way to trim it?

  • Anyone know what breaks? Nothing I run has missed it yet, but I’d like to hear the corner case before rebuilding my whole lineage on the trimmed trunk.

Check your own minimal-derived templates:

rpm -q zip unzip gcc perl redhat-rpm-config

(Qubes 4.3.1, qubes-template-fedora-44-minimal.)

3 Likes

If you want some specific answer here, you need to provide more context about your researchs. Otherwise, you will end up with a disappointing answer like this:

2 Likes

That’s fair. Context: my concern is that minimal-template bloat ends up in my vault qube’s lineage, and some of it (unzip, perl-Archive-Zip/Tar) is parser attack surface a vault should never carry.

Tracing where it comes from — the template’s own build history survives in dnf history. Transaction 2 of fedora-44-minimal:

dnf install -y […] qubes-vm-dependencies      # 695 packages; no install_weak_deps=False

Then dnf repoquery --installed --whatrequires at each link: nothing requires perl except perl-CPAN (Perl itself), and nothing requires qubes-vm-dependencies — but perl-devel → redhat-rpm-config → zip → unzip hard-chain the toolchain (gcc, binutils, make, glibc-devel, kernel-headers, ~270 perl modules) to each other.

So it looks like weak-dep fallout of the build meta, orphaned ever since. On a near-virgin minimal clone, sudo dnf remove zip proposes 281 packages / 326 MiB — none of it qubes-* — and post-removal the agents, desktop stack, reboot, and updates are all fine so far.

Unless someone knows a reason this chain must ship, my read is that it’s a build-time accident — and I’ll file it against qubes-builder this week (suggested fix: install_weak_deps=False when installing qubes-vm-dependencies; full transaction logs and the removal test attached). If that chain is load-bearing somewhere I haven’t looked, please shout.

Meanwhile, anyone can check their own minimal-derived templates: rpm -q zip unzip gcc perl — I’d be curious whether 4.2-era templates show the same.

3 Likes

same in r4.2 fedora minimal template:

zip-3.0-44.fc43.x86_64
unzip-6.0-67.fc43.x86_64
gcc-15.2.1-7.fc43.x86_64
perl-5.42.2-523.fc43.x86_64

Notable that debian minimal template only included perl from this list (apt list –installed zip unzip gcc perl), which is a removable package according to @qubist’s minifying debian guide.

5 Likes

I’ll start upgrading my personal templates from Fedora 43 to 44 in the next days.

I’d be very interested in an answer to the question @netvmnone has raised !

@netvmnone Did you make any progress on your side ?

3 Likes

It looks like nobody is interested in this topic (anymore) ?

Since I did make some progress on my side - and - since I am still interested, I’ll open a separate new topic !

I hope it will be interesting for some …

3 Likes

I checked the base of my personalized templates, which always starts with a minimal template - and - adds

  • ‘qubes-core-agent-passwordless-root’ - plus -
  • ‘vim minimal’ .

Here are the statistics for Debian 13 & Fedora 44:

  • Number of packages in ‘vr-aqt-dl13-00’: 474 pkgs
  • Number of packages in ‘vr-aqt-fl44-00’: 991 pkgs

I have seen that for example ‘gcc’ is also part of Debian - but - I’d like to get an explanation about the TWO to ONE difference in number of packages !

Thanks in advance for your feedback.

PS : I did double-check that it is not related to APT / DNF - or - DEB / RPM …

Edit #1:

While waiting for feedback, I investigated a bit further - and - checked out the number of packages in a ‘Fedora 44’ container image:

Container Setup Complete!
📦[user@test-fedora-core-45 ~]$
📦[user@test-fedora-core-45 ~]$ cat /etc/os-release
NAME="Fedora Linux"
VERSION="45 (Container Image Prerelease)"
RELEASE_TYPE=development
ID=fedora
VERSION_ID=45
VERSION_CODENAME=""
PRETTY_NAME="Fedora Linux 45 (Container Image Prerelease)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:45"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f45/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=45
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=45
SUPPORT_END=2027-11-24
VARIANT="Container Image"
VARIANT_ID=container
📦[user@test-fedora-core-45 ~]$
📦[user@test-fedora-core-45 ~]$ sudo dnf list --installed | wc --lines
247
📦[user@test-fedora-core-45 ~]$

Here the ratio is even close to FOUR to ONE. - Looking forward to an explanation !

Edit #2:

In a private msg I received as one feedback, that I’m comparing apples & oranges (my words).

Since I have to admit, that I did not verify, before sharing the information, I want to follow up on this statement …

The person was correct in that the ‘fedora container’ image did not have any ‘terminal’ program installed, which for me is the only user-facing ~value~ a minimal template offers.

However it was easy to update the ‘distrobox’ manifest & install the ‘xterm’ package.

Attached is a screenshot to show that this updated container image is working properly.

The new number of installed packages is 264 instead of 247.

So the ratio is still closer FOUR to ONE than THREE to ONE …

2 Likes