[Bro-Dev] [JIRA] (BIT-1096) Should check version of libmagic not version of file

Ryan Schmidt (JIRA) jira at bro-tracker.atlassian.net
Fri Nov 22 14:39:12 PST 2013

    [ https://bro-tracker.atlassian.net/browse/BIT-1096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14801#comment-14801 ] 

Ryan Schmidt commented on BIT-1096:

bq. Looks like MAGIC_VERSION doesn't appear in magic.h until libmagic 5.13, which is probably why it's currently looking in {{file --version}} output for version info.

Oh. Well drat.

bq. Is it sufficient to use MAGIC_VERSION if available and fallback on {{file --version}} ? Or is there a better way to extract the version from older libmagics?

That would address my immediate concern. There doesn't seem to be a {{libmagic-config}} program or pkg-config .pc file for libmagic so I don't know how else to check its version.

> Should check version of libmagic not version of file
> ----------------------------------------------------
>                 Key: BIT-1096
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1096
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro
>    Affects Versions: 2.2
>         Environment: Mac OS X 10.6.8; libmagic and other dependencies installed using MacPorts
>            Reporter: Ryan Schmidt
> As far as I can tell, bro requires the libmagic library, but not the file program. However bro's configuration script appears not to be checking the version of the libmagic library, but the version of the file program. This is a problem in distributions like MacPorts where the libmagic library and the file program are in separate packages; installing the libmagic package does not mean you will automatically get the corresponding version of the file program.
> This causes a build failure on Mac OS X 10.6 Snow Leopard for example which ships with /usr/bin/file version 5.03. Even though libmagic 5.15 is installed from MacPorts, bro fails to configure, thinking it's too old. The MacPorts project's bug report for that is https://trac.macports.org/ticket/41457
> Could you change bro's configuration script to check the version of libmagic instead? You can check MAGIC_VERSION in magic.h.

This message was sent by Atlassian JIRA

More information about the bro-dev mailing list