[Bug 282687] filesystems/smbnetfs: fails to find installed libsecret dependency if libsecret-storage.so installed

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 11 Nov 2024 04:41:18 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282687

            Bug ID: 282687
           Summary: filesystems/smbnetfs: fails to find installed
                    libsecret dependency if libsecret-storage.so installed
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: jcfyecrayz@liamekaens.com

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 from Bugzilla Automation <bugzilla@FreeBSD.org> ---
Maintainer informed via mail

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