lxc / incus

Powerful system container and virtual machine manager
https://linuxcontainers.org/incus
Apache License 2.0
2.61k stars 217 forks source link

Incus package pulls in a significant number (174!) additional packages by default #1272

Closed WinterPhoenix closed 2 weeks ago

WinterPhoenix commented 2 weeks ago

Required information

Issue description

Attempting to install Incus (at least via the Zabbly source) includes 174 additional packages, most of which are desktop environment related, even if running a headless server.

Steps to reproduce

  1. Follow the instructions for installing Incus using Zabbly's source
  2. sudo apt update && sudo apt install incus
  3. Pick your jaw up off the ground due to the sheer number of packages that are proposed to install, while LXD required exactly 8, none of which were desktop environment related.

    Terminal output

    winter@winter-pi-server:~ $ sudo apt install incus
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following additional packages will be installed:
    dconf-gsettings-backend dconf-service fontconfig glib-networking glib-networking-common glib-networking-services
    gsettings-desktop-schemas gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-x
    incus-base incus-client iptables libaa1 libaacs0 libass9 libasyncns0 libavc1394-0 libavcodec59 libavfilter8
    libavformat59 libavutil57 libbdplus0 libblas3 libbluray2 libbs2b0 libcaca0 libcairo-gobject2 libcairo2
    libcdparanoia0 libchromaprint1 libcjson1 libcodec2-1.0 libdatrie1 libdconf1 libdrm-amdgpu1 libdrm-nouveau2
    libdrm-radeon1 libdv4 libepoxy0 libflite1 libfribidi0 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-bin
    libgdk-pixbuf2.0-common libgfortran5 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgme0
    libgpm2 libgraphite2-3 libgsm1 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libharfbuzz0b libhwy1
    libiec61883-0 libip6tc2 libjack-jackd2-0 libjson-glib-1.0-0 libjson-glib-1.0-common libjxl0.7 liblapack3
    liblcms2-2 liblilv-0-0 libllvm15 libmbedcrypto7 libmp3lame0 libmpg123-0 libmysofa1 libncurses6 libnet1 libnorm1
    libopenjp2-7 libopenmpt0 libopus0 liborc-0.4-0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpgm-5.3-0
    libpixman-1-0 libplacebo208 libpocketsphinx3 libpostproc56 libprotobuf-c1 libproxy1v5 libpulse0 librabbitmq4
    libraw1394-11 librist4 librsvg2-2 librsvg2-common librubberband2 libsensors-config libsensors5 libserd-0-0
    libshine3 libshout3 libsnappy1v5 libsndfile1 libsodium23 libsord-0-0 libsoup2.4-1 libsoup2.4-common libsoxr0
    libspeex1 libsphinxbase3 libspice-server1 libsratom-0-0 libsrt1.5-gnutls libssh-gcrypt-4 libswresample4
    libswscale6 libtag1v5 libtag1v5-vanilla libthai-data libthai0 libtheora0 libtwolame0 libudfread0
    libusbredirparser1 libva-drm2 libva-x11-2 libva2 libvdpau-va-gl1 libvdpau1 libvidstab1.1 libvisual-0.4-0
    libvorbisenc2 libvorbisfile3 libvpx7 libvulkan1 libwavpack1 libwayland-client0 libwebpmux3 libx11-xcb1
    libx264-164 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-shm0
    libxcb-sync1 libxcb-xfixes0 libxdamage1 libxfixes3 libxi6 libxrender1 libxshmfence1 libxv1 libxvidcore4
    libxxf86vm1 libz3-4 libzimg2 libzmq5 libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers
    mesa-vulkan-drivers ocl-icd-libopencl1 pocketsphinx-en-us sshfs va-driver-all vdpau-driver-all xdelta3
    Suggested packages:
    gvfs btrfs-progs ceph-common lvm2 zfsutils-linux | openzfs-zfsutils firewalld libcuda1 libnvcuvid1
    libnvidia-encode1 libbluray-bdj libdv-bin oss-compat gpm libvisual-0.4-plugins gstreamer1.0-tools jackd2
    liblcms2-utils opus-tools pulseaudio libraw1394-doc librsvg2-bin lm-sensors serdi sordi speex
    gstreamer1.0-plugins-ugly opencl-icd nvidia-vdpau-driver
    The following NEW packages will be installed:
    dconf-gsettings-backend dconf-service fontconfig glib-networking glib-networking-common glib-networking-services
    gsettings-desktop-schemas gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-x
    incus incus-base incus-client iptables libaa1 libaacs0 libass9 libasyncns0 libavc1394-0 libavcodec59 libavfilter8
    libavformat59 libavutil57 libbdplus0 libblas3 libbluray2 libbs2b0 libcaca0 libcairo-gobject2 libcairo2
    libcdparanoia0 libchromaprint1 libcjson1 libcodec2-1.0 libdatrie1 libdconf1 libdrm-amdgpu1 libdrm-nouveau2
    libdrm-radeon1 libdv4 libepoxy0 libflite1 libfribidi0 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-bin
    libgdk-pixbuf2.0-common libgfortran5 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgme0
    libgpm2 libgraphite2-3 libgsm1 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libharfbuzz0b libhwy1
    libiec61883-0 libip6tc2 libjack-jackd2-0 libjson-glib-1.0-0 libjson-glib-1.0-common libjxl0.7 liblapack3
    liblcms2-2 liblilv-0-0 libllvm15 libmbedcrypto7 libmp3lame0 libmpg123-0 libmysofa1 libncurses6 libnet1 libnorm1
    libopenjp2-7 libopenmpt0 libopus0 liborc-0.4-0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpgm-5.3-0
    libpixman-1-0 libplacebo208 libpocketsphinx3 libpostproc56 libprotobuf-c1 libproxy1v5 libpulse0 librabbitmq4
    libraw1394-11 librist4 librsvg2-2 librsvg2-common librubberband2 libsensors-config libsensors5 libserd-0-0
    libshine3 libshout3 libsnappy1v5 libsndfile1 libsodium23 libsord-0-0 libsoup2.4-1 libsoup2.4-common libsoxr0
    libspeex1 libsphinxbase3 libspice-server1 libsratom-0-0 libsrt1.5-gnutls libssh-gcrypt-4 libswresample4
    libswscale6 libtag1v5 libtag1v5-vanilla libthai-data libthai0 libtheora0 libtwolame0 libudfread0
    libusbredirparser1 libva-drm2 libva-x11-2 libva2 libvdpau-va-gl1 libvdpau1 libvidstab1.1 libvisual-0.4-0
    libvorbisenc2 libvorbisfile3 libvpx7 libvulkan1 libwavpack1 libwayland-client0 libwebpmux3 libx11-xcb1
    libx264-164 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-render0 libxcb-shm0
    libxcb-sync1 libxcb-xfixes0 libxdamage1 libxfixes3 libxi6 libxrender1 libxshmfence1 libxv1 libxvidcore4
    libxxf86vm1 libz3-4 libzimg2 libzmq5 libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers
    mesa-vulkan-drivers ocl-icd-libopencl1 pocketsphinx-en-us sshfs va-driver-all vdpau-driver-all xdelta3
    0 upgraded, 175 newly installed, 0 to remove and 0 not upgraded.
    Need to get 211 MB of archives.
    After this operation, 971 MB of additional disk space will be used.
    Do you want to continue? [Y/n] ^C

Running sudo apt install --no-install-recommends incus instead improves things significantly...

...but as a first-time user of Incus, I have idea what the consequences might be.

winter@winter-pi-server:~ $ sudo apt install --no-install-recommends incus
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  incus-base incus-client libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libjson-glib-1.0-0
  libjson-glib-1.0-common libnet1 libopus0 liborc-0.4-0 libpixman-1-0 libprotobuf-c1 libspice-server1
  libusbredirparser1 xdelta3
Suggested packages:
  btrfs-progs ceph-common lvm2 zfsutils-linux | openzfs-zfsutils libvisual-0.4-plugins gstreamer1.0-tools
  opus-tools gstreamer1.0-plugins-ugly
Recommended packages:
  iptables sshfs gstreamer1.0-plugins-base gstreamer1.0-libav gstreamer1.0-plugins-good
The following NEW packages will be installed:
  incus incus-base incus-client libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libjson-glib-1.0-0
  libjson-glib-1.0-common libnet1 libopus0 liborc-0.4-0 libpixman-1-0 libprotobuf-c1 libspice-server1
  libusbredirparser1 xdelta3
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 79.2 MB of archives.
After this operation, 531 MB of additional disk space will be used.
Do you want to continue? [Y/n] ^C
stgraber commented 2 weeks ago

The incus package depends on libspice-server1 as it's required to provide the VM remote display access through the SPICE protocol. The libspice-server1 on your distribution then pulls libgstreamer-plugins-base1.0-0 as needed for the video compression, then that recommends gstreamer1.0-plugins-base gstreamer1.0-libav gstreamer1.0-plugins-good which is what pulls everything else in.

The only part we control on our end through packaging is the libspice-server1 dependency and that is a correct dependency as we need that library. The fact that everything else comes in through recommends is because of how your Linux distribution decided to structure their depends/recommends around the gstreamer packages and isn't something that we can do anything about as a leaf package.