Bug 282687

Summary: filesystems/smbnetfs: fails to find installed libsecret dependency if libsecret-storage.so installed
Product: Ports & Packages Reporter: John Hein <jcfyecrayz>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description John Hein 2024-11-11 04:41:18 UTC
sysutils/syslog-ng installs lib/libsecret-storage.so

If that is installed when trying to build filesystems/smbnetfs, the following shows it fails to find the installed

===>   fusefs-smbnetfs-0.6.3_1 depends on shared library: libsecret-*.sotest: /usr/local/lib/libsecret-1.so: unexpected operator
test: /usr/local/lib/libsecret-1.so: unexpected operator
 - not found

The dependency is specified in filesystems/smbnetfs/Makefile with a wildcard:

LIBSECRET_LIB_DEPENDS= libsecret-*.so:security/libsecret

If libsecret-1.so and libsecret-storage.so are both installed, then Mk/Scripts/find-lib.sh gets two args, and it is not prepared for that, causing the above error.  That makes it seem like libsecret-1.so is not installed (even though it is), and the build process tries to build / install libsecret again which fails (because it is already installed).

I think it's better to be explicit and not use a wildcard in the build dependency:

diff --git a/filesystems/smbnetfs/Makefile b/filesystems/smbnetfs/Makefile
index a577b6ece99b..5a07f103f7ea 100644
--- a/filesystems/smbnetfs/Makefile
+++ b/filesystems/smbnetfs/Makefile
@@ -16,7 +16,7 @@ OPTIONS_DEFINE=       DOCS LIBSECRET

 LIBSECRET_DESC=        Use libsecret to store credentials
 LIBSECRET_CONFIGURE_WITH=      libsecret
-LIBSECRET_LIB_DEPENDS= libsecret-*.so:security/libsecret
+LIBSECRET_LIB_DEPENDS= libsecret-1.so:security/libsecret

 DOCSDIR=       ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}


This is the only instance of a wildcard in LIB_DEPENDS I could find in the ports tree.  find-lib.sh admittedly should probably not fail this way (with a bourne shell parsing error), but I don't think smbnetfs should depend on just any libsecret-*.so that happens to be installed.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2024-11-11 04:41:18 UTC
Maintainer informed via mail