Xen-tools 4.11/4.12 from ports wants to install a ton of extra packages

I tried to build emulators/xen-kernel (I also tried xen 4.11) and sysutils/xen-tools (I also tried xen 4.11) for my server. I built them on a VM "dev" workstation I setup for building port packages. The build completed and created a package. When I try to install the package on my server I get this notice from pkg that a bunch of additional dependencies are required before it can be installed.

Code:
root@xen01:~ # pkg upgrade xen-tools-4.12.0_1.txz
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 98 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        xen-tools: 4.12.0_1
        curl: 7.65.0_2
        libnghttp2: 1.37.0
        ca_root_nss: 3.44
        libssh2: 1.8.2,3
        pango: 1.42.4_1
        libXrender: 0.9.10_2
        libX11: 1.6.7,1
        libxcb: 1.13.1
        libXdmcp: 1.1.3
        xorgproto: 2018.4
        libXau: 1.0.9
        libpthread-stubs: 0.4
        xorg-fonts-truetype: 7.7_1
        font-misc-meltho: 1.0.3_4
        mkfontscale: 1.2.1
        libfontenc: 1.1.4
        freetype2: 2.9.1
        fontconfig: 2.12.6,1
        expat: 2.2.6_1
        font-misc-ethiopic: 1.0.3_4
        font-bh-ttf: 1.0.3_4
        encodings: 1.0.4_4,1
        font-util: 1.3.1
        dejavu: 2.37_1
        libXft: 2.3.2_3
        harfbuzz: 2.4.0_1
        graphite2: 1.3.13
        cairo: 1.16.0,2
        libXext: 1.3.3_3,1
        png: 1.6.37
        mesa-libs: 18.3.2
        libxshmfence: 1.2_4
        libXxf86vm: 1.1.4_3
        libXfixes: 5.0.3_2
        libXdamage: 1.1.4_5
        wayland: 1.16.0_1
        libepoll-shim: 0.0.20181229
        libdrm: 2.4.96,1
        libpciaccess: 0.13.5
        pciids: 20190213
        libunwind: 20170615
        xkeyboard-config: 2.24_1
        libXrandr: 1.5.1_2
        gmp: 6.1.2_1
        libepoxy: 1.5.2
        fribidi: 0.19.7
        gtk3: 3.24.7
        libxkbcommon: 0.8.0_1
        libXinerama: 1.1.4_2,1
        libXi: 1.7.9_2,1
        libXcursor: 1.1.15_2
        libXcomposite: 0.4.4_5,1
        adwaita-icon-theme: 3.28.0
        gtk-update-icon-cache: 2.24.32
        shared-mime-info: 1.10_1
        hicolor-icon-theme: 0.17
        gdk-pixbuf2: 2.36.12
        tiff: 4.0.10
        jpeg-turbo: 2.0.2
        jbigkit: 2.1_1
        atk: 2.28.1
        cups: 2.2.10
        gnutls: 3.6.7
        trousers: 0.3.14_2
        tpm-emulator: 0.7.4_2
        p11-kit: 0.23.15
        libtasn1: 4.13_1
        nettle: 3.4.1_1
        libidn2: 2.1.1
        libunistring: 0.9.10_1
        libpaper: 1.1.24.4
        avahi-app: 0.7_2
        gnome_subr: 1.0
        libdaemon: 0.14_1
        gobject-introspection: 1.56.1,1
        python36: 3.6.8_1
        dbus-glib: 0.110
        dbus: 1.12.12
        libSM: 1.2.3,1
        libICE: 1.0.9_3,1
        gdbm: 1.18.1
        wayland-protocols: 1.17
        librsvg2: 2.40.20
        libcroco: 0.6.12
        libgsf: 1.14.44
        colord: 1.3.5
        polkit: 0.114_2
        spidermonkey52: 52.9.0_2
        nspr: 4.21
        icu: 64.2,1
        sqlite3: 3.28.0
        lcms2: 2.9
        argyllcms: 1.9.2_4
        libXScrnSaver: 1.2.3_2
        at-spi2-atk: 2.26.2
        at-spi2-core: 2.28.0
        libXtst: 1.2.3_2

Number of packages to be installed: 98

The process will require 577 MiB more space.
92 MiB to be downloaded.

Proceed with this action? [y/N]:

Any idea what would cause it to try and install all of this extra stuff on a server? It just seems out of a place, for example wayland, cups, gtk3, etc. Something just doesn't feel right.

Can anyone sanity check me on this? At first I was thinking maybe its a bug but I am unsure. I am currently running FreeBSD-12.0-RELEASE-p5.
 
Sanity check confirmed: how anyone is able to figure out dependencies for software is black box to me as well.
The other thing that annoys me is the pre-selected options. Sometime it is obvious and other times I wonder how do they know that is the option that is needed.

*sigh*

I suppose if I really dug into it that I could flatten out my learning curve.
 
Well probably xen-tools contains some GUI management app or the like?

If you have the choice, forget about xen and just use bhyve (which is in base) and sysutils/vm-bhyve to manage your VMs. This is a very lean solution. If for some reason, you definitely need xen, maybe build these tools yourself and check whether there's an option you can disable that pulls all these GUI dependencies.
 
Just from a cursory glance, x11-toolkits/pango pulls in a bunch of Xorg libraries, graphics/cairo then pulls in the Mesa libraries and probably Wayland and so on. Eventually you get a cascading effect with dependencies depending on more dependencies of their own.
 
Well probably xen-tools contains some GUI management app or the like?
It does not contain any but I thought along the same lines:
"Maybe it is made to be used with VirtManager".
What blows that theory apart is libvirt needs to be compiled from ports to add the XEN option. Bhyve only by default.
VirtManager is the GTK GUI that runs on top of libvirtd.
 
The tricky bit in this case is to try and find out what pulls in gtk3. I have a feeling that's a big cascading dependency chain. If you can eliminate that dependency (usually by disabling an option) you can probably cut the whole list in half. That will be a good start. If you want more then you have to go through each individual port and look at its dependencies, especially the 'extra' dependencies that are added when an option is enabled. Sometimes disabling a single option in a single port can reduce the dependency chain significantly. But you're going to need to put some elbow grease in it and methodically check everything.

Reading a port's Makefile is the best place to start. They're really not that difficult to read, even if you don't understand the whole process behind them. Most of the actual magic is hidden away in various other makefiles, just accept that those do what needs to be done. At least for now.
 
Code:
root@xen01:~ # pkg upgrade xen-tools-4.12.0_1.txz


Do you have xen-tools-4.12.0_1.txz file lying around? For example:
Code:
% pkg info | grep lua53
lua53-5.3.5_1                  Powerful, efficient, lightweight, embeddable scripting language
% sudo pkg upgrade lua53-5.3.5_1.txz
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: lua53-5.3.5_1.txz is not installed, therefore upgrade is impossible
Checking integrity... done (0 conflicting)
Your packages are up to date.


On other hand, pkg seems to be ok with accepting file path as an argument to upgrade command:
Code:
% cd /var/cache/pkg/
% sudo pkg upgrade lua53-5.3.5_1.txz
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
    lua53-5.3.5_1 [unknown-repository]

Number of packages to be reinstalled: 1

Proceed with this action? [y/N]: n
 
Ah, scrap that. I didn't realize this thread is not about upgrades. Here is a thread-specific advice:
  1. The proper command to install a non-repo package is pkg add <file path>, pkg install <file path> usually works but also occasionally crashes with segfault.
  2. pkg upgrade <whatever> in my subjective opinion should not be used at all — partial upgrades are entirely buggy and/or unpredictable.
  3. Don't ever enable latest and quartely repos simultaneously.
 
Back
Top