From 2b2be31af09694761c3657d0f7d9299ed722b914 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Apr 2025 11:59:25 +0100 Subject: [PATCH] build: Remove test for libmagic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libmagic (part of the "file" command) was required in earlier versions of libguestfs, but this requirement was effectively removed in commit b48da89dd6 ("daemon: Reimplement ‘file_architecture’ API in OCaml") back in 2017. Or to be more precise, we now use the "file" command inside the daemon, which may or may not use libmagic but we no longer link to the library directly. Reported-by: Mohamed Akram Fixes: commit b48da89dd6edce325f4c1f2956435c4d383ebe77 Related: https://github.com/libguestfs/libguestfs/issues/184 --- docs/guestfs-building.pod | 4 ---- m4/guestfs-libraries.m4 | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod index 08e6ad1f8..9b07d5880 100644 --- a/docs/guestfs-building.pod +++ b/docs/guestfs-building.pod @@ -195,10 +195,6 @@ Optional if compiling from tarball. I. ocaml-hivex is the OCaml binding for hivex, which is required when building the daemon. -=item libmagic - -I. This is the library used by the L command. - =item libvirt E 0.10.2 Optional. Always use the latest possible version of libvirt. diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4 index e5568b2c4..24a3f4bbd 100644 --- a/m4/guestfs-libraries.m4 +++ b/m4/guestfs-libraries.m4 @@ -260,16 +260,6 @@ LIBS="$AUGEAS_LIBS" AC_CHECK_FUNCS([aug_source]) LIBS="$old_LIBS" -dnl libmagic (required) -AC_CHECK_LIB([magic],[magic_file],[ - AC_CHECK_HEADER([magic.h],[ - AC_SUBST([MAGIC_LIBS], ["-lmagic"]) - ], []) -],[]) -AS_IF([test -z "$MAGIC_LIBS"], - [AC_MSG_ERROR([libmagic (part of the "file" command) is required. - Please install the file devel package])]) - dnl libvirt (highly recommended) AC_ARG_WITH([libvirt],[ AS_HELP_STRING([--without-libvirt],