[Bug 231554] sysutils/file returns mime type which Mk/Scripts/find-lib.sh doesn't recognise
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Sep 21 17:25:45 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231554
--- Comment #1 from hostmaster at 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})" = "application/x-sharedlib" ]
So, when any port Makefile uses the "LIB_DEPENDS= " construct, the port
incorrectly rebuilds the dependency because it is marked as non-existent
Suggested fixes:
1. use absolute path in Mk/Scripts/find-lib.sh:
[ "$(/usr/bin/file -b -L --mime-type ${libfile})" = "application/x-sharedlib" ]
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
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list