Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Sep 2018 17:25:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 231554] sysutils/file returns mime type which Mk/Scripts/find-lib.sh doesn't recognise
Message-ID:  <bug-231554-7788-6v0iuKOnpN@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-231554-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-231554-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231554

--- Comment #1 from hostmaster@GTS.NET ---

When sysutils/file is installed, Mk/Scripts/find-lib.sh ends up using it if
$PATH puts /usr/local/bin first - the result is that it gives this:

> file -b -L --mime-type /usr/local/lib/liblzo2.so
application/x-pie-executable

rather than what /usr/bin/file gives:

> /usr/bin/file -b -L --mime-type /usr/local/lib/liblzo2.so
application/x-sharedlib

When /usr/local/bin/file is used, this test in Mk/Scripts/find-lib.sh fails:

[ "$(file -b -L --mime-type ${libfile})" =3D "application/x-sharedlib" ]


So, when any port Makefile uses the "LIB_DEPENDS=3D " construct, the port
incorrectly rebuilds the dependency because it is marked as non-existent


Suggested fixes:=20

1. use absolute path in Mk/Scripts/find-lib.sh:

[ "$(/usr/bin/file -b -L --mime-type ${libfile})" =3D "application/x-shared=
lib" ]

2. change test to also recognise "application/x-pie-executable" as a valid
shared library object

3. change sysutils/file to return "application/x-sharedlib" when a FreeBSD
lib*.so shared library object is encountered

4. all of the above

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231554-7788-6v0iuKOnpN>