-
Notifications
You must be signed in to change notification settings - Fork 6
deps
Reference for packagers. Every entry below was verified against the source tree at
master = 4f881d07b; nothing here is inferred from upstream mc or from distribution
conventions.
The tree splits cleanly in two: libraries linked into the mc binary itself, and
libraries pulled in by individual panel plugins, each of which is a separate .so.
Only the first group is unavoidable for a minimal install.
| Library | Status | Linked via | Debian/Ubuntu build package |
|---|---|---|---|
glib-2.0 >= 2.32 |
required, AC_MSG_ERROR
|
everywhere | libglib2.0-dev |
gmodule >= 2.32 |
required | same | same package |
slang >= 2.0 |
required with the default --with-screen, AC_MSG_ERROR
|
MCLIBS -> lib/libmc.la
|
libslang2-dev |
libmagic |
optional, --enable-mctree-magic (auto) |
src/mctree (noinst) -> binary |
libmagic-dev |
libssh2 >= 1.2.8 |
optional, --enable-shell-ssh2 (auto) |
src/vfs/shell (noinst) -> binary |
libssh2-1-dev |
ext2fs + e2p >= 1.42.4
|
optional, --enable-ext2fs-attr (auto) |
MCLIBS; only e2p is linked, ext2fs supplies headers |
libext2fs-dev |
gpm |
optional, --with-gpm-mouse (auto, Linux only) |
MCLIBS |
libgpm-dev |
X11 |
optional, AC_PATH_XTRA
|
not linked - loaded through gmodule at runtime |
libx11-dev (headers only) |
Where each check lives: m4.include/mc-glib.m4:81, m4.include/mc-with-screen-slang.m4:8,
configure.ac:219, m4.include/vfs/mc-vfs-shell.m4:13, m4.include/mc-ext2fs-attr.m4:25-34,
configure.ac:407, m4.include/mc-with-x.m4:18.
Needing no package of their own: libutil (openpty, in glibc), libintl
(AM_GNU_GETTEXT([external]), in glibc), termcap (tgoto, comes with S-Lang).
The check >= 0.9.10 framework (m4.include/mc-tests.m4:23) is used by make check
only and never appears at runtime.
Editor plugins (ctags, etags, spell) have no Makefile.am of their own - they are
compiled into the binary through builtin-plugins.c and add no libraries. Aspell is off
by default (--enable-aspell, default no) and is loaded through gmodule even when
enabled, so it never becomes a link-time dependency.
There are exactly 13 installable modules, all under src/panel-plugins/. Nothing is
installed into vfs_plugins_dir or editor_plugins_dir yet; those paths are declared
but unused.
| Plugin | Libraries beyond glib | Switch |
|---|---|---|
arcmc |
libarchive >= 3.0, libmagic
|
--enable-panel-plugin-arcmc (auto) |
ftp |
libcurl >= 7.20.0 |
--enable-panel-plugin-ftp (auto) |
s3 |
libcurl >= 7.75.0 |
--enable-panel-plugin-s3 (auto) |
mongo |
libmongoc-1.0 >= 1.21, libbson-1.0 >= 1.21
|
--enable-panel-plugin-mongo (auto) |
samba |
smbclient |
--enable-panel-plugin-samba (auto) |
sftp |
libssh2 >= 1.2.8 |
--enable-vfs-sftp (auto) |
docker, git, hello, k8s, panelize, shell-link, systemd
|
none | none, always built |
Build packages: libarchive-dev, libcurl4-openssl-dev, libmongoc-dev plus
libbson-dev, libsmbclient-dev.
The pkg-config files these checks look for were confirmed present in Ubuntu noble:
libmagic.pc in libmagic-dev, smbclient.pc in libsmbclient-dev, libmongoc-1.0.pc
in libmongoc-dev, e2p.pc in libext2fs-dev, and slcurses.h in libslang2-dev.
Five plugins link nothing but shell out to external programs. dpkg-shlibdeps cannot see
these; list them by hand in Recommends or Suggests.
| Plugin | Program |
|---|---|
docker |
docker |
k8s |
kubectl |
git |
git |
systemd |
systemctl |
shell-link |
sh |
Every optional library can now be pinned from the command line, so a package's feature set
is decided by the packaging and not by whatever happens to be installed in the build
chroot. Pass each switch explicitly in debian/rules rather than relying on auto:
--enable-mctree-magic=yes --enable-shell-ssh2=yes --enable-ext2fs-attr=yes
--enable-panel-plugin-samba=yes --enable-panel-plugin-ftp=yes
--enable-panel-plugin-arcmc=yes --enable-panel-plugin-s3=yes
--enable-panel-plugin-mongo=no --enable-vfs-sftp=yes
--with-gpm-mouse --with-screen=slang
Each switch takes auto, yes or no. With yes a missing library is a hard configure
error, which is what a packaging build wants - a silently dropped feature is far worse than
a failed build.
Note that --enable-shell-ssh2=no removes libssh2 from the core binary but not from the
tree: the sftp panel plugin has its own copy, so libssh2 leaves the core package and
lands in the plugin subpackage instead.
The seven unconditional plugins are a different matter - they are perfectly deterministic,
just not configurable. hello is a demonstration module and probably does not belong in a
distribution package at all.
debhelper-compat (= 13), pkgconf, gettext,
libglib2.0-dev, libslang2-dev,
libmagic-dev, libssh2-1-dev, libext2fs-dev, libgpm-dev, libx11-dev,
libarchive-dev, libcurl4-openssl-dev, libsmbclient-dev,
libmongoc-dev, libbson-dev,
check
Runtime dependencies for both the core package and the plugin subpackages are computed by
${shlibs:Depends}, which inspects the ELF files of each binary package separately - do
not write them out by hand. Two things do need to be written by hand: every plugin
subpackage needs Depends: mc (= ${binary:Version}), because plugins resolve the core's
symbols at dlopen time and a partial upgrade would fail with undefined symbols at
runtime; and the external programs above belong in Recommends/Suggests.