pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: libcurl.pc now relies on inexistent heimdal-gssapi.pc (and ldap.pc) in NetBSD (was: CVS commit: pkgsrc/www)



Thomas Klausner writes:
> On Wed, Nov 06, 2024 at 03:07:48PM +0100, Leonardo Taccari wrote:
> > [...]
> > At least on NetBSD, where "gssapi" option is unconditionally enabled
> > this breaks `libcurl` pkgconfig file when invoking via the `--cflags`:
> > 
> >  $ pkgconf --cflags libcurl
> >  Package heimdal-gssapi was not found in the pkg-config search path.
> >  Perhaps you should add the directory containing `heimdal-gssapi.pc'
> >  to the PKG_CONFIG_PATH environment variable
> >  Package 'heimdal-gssapi', required by 'libcurl', not found
> > 
> > ...and that will likely breaks all packages that are relying on libcurl
> > pkgconfig file.
>
> Why isn't
>
> .if ${PKG_BUILD_OPTIONS.curl:Mgssapi}
> .  include "../../mk/krb5.buildlink3.mk"
> .endif
>
> in the buildlink3.mk enough to fix this?
>

Because NetBSD does not have any heimdal-gssapi.pc and
security/heimdal-gssapi/builtin.mk does not provide any fake .pc file
for builtin.

> > As a quick workaround I propose to not treat NetBSD special and do
> > not enable gssapi option by default. We should then investigate how to
> > possibly avoid that (I think it is possible to provide fake .pc files
> > but I have not fully investigated yet, sorry!).
> > 
> > OK?
>
> Fine with me.
> [...]

I have a different proposal, less intrusive, does not require a
recursive revbump... but ok, still wrong! (but that's as wrong as it was
curl before 8.11.0! :))

I propose to avoid appending such problematic entries in
Requires.private, after all that was the case until curl-8.11.0!
In that way we have more time to discuss, review and test about
providing fake
.pc for security/heimdal-gssapi and databases/openldap-client (and
anything else other dependency that I have possibly missed).


Attached in this email possible patch with candidate commit message!


Please let me know if OK and I will commit it!
Thanks!
curl: do not add gssapi and ldap to Requires.private:

curl-8.11.0 started to add gssapi and ldap to Requires.private because they are
required for static linking.

However, both security/heimdal-gssapi and databases/openldap-client
builtin.mk-s do not provide any logic to generate fake .pc files in
case builtin does not provide any (like it is the case in NetBSD).

Revert that part like it was in curl<8.11.0 to avoid generating an unusable
libcurl.pc files on such platforms.

Add big FIXME comments because strictly speaking this is not correct
and we should instead provide logic to generate fake .pc in
heimdal-gssapi and openldap-client.

PKGREVISION++.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/curl/Makefile,v
retrieving revision 1.287
diff -u -p -r1.287 Makefile
--- Makefile    6 Nov 2024 08:19:26 -0000       1.287
+++ Makefile    6 Nov 2024 14:58:33 -0000
@@ -1,5 +1,6 @@
 # $NetBSD: Makefile,v 1.287 2024/11/06 08:19:26 wiz Exp $
 
+PKGREVISION=   1
 .include "Makefile.common"
 
 CONFIGURE_ARGS+=       --with-ssl=${BUILDLINK_PREFIX.openssl}
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/www/curl/distinfo,v
retrieving revision 1.209
diff -u -p -r1.209 distinfo
--- distinfo    6 Nov 2024 08:19:26 -0000       1.209
+++ distinfo    6 Nov 2024 14:58:33 -0000
@@ -3,4 +3,5 @@ $NetBSD: distinfo,v 1.209 2024/11/06 08:
 BLAKE2s (curl-8.11.0.tar.xz) = 96155a81073d9094d0237e4dc2699dc7e0e79840f8b6e249c15a1284d4d9815c
 SHA512 (curl-8.11.0.tar.xz) = 3a642d421e0a5c09ecb681bea18498f2c6124e9af4d8afdc074dfb85a9b0211d8972ade9cf00ab44b5dfed9303262cd83551dd3b5e0976d11fc19da3c4a0987e
 Size (curl-8.11.0.tar.xz) = 2750684 bytes
+SHA1 (patch-configure) = cd64c90450b7e675eeed06a8ee8f6d13ea105fa8
 SHA1 (patch-curl-config.in) = 1f84517a0a2060bb4ba96821d32e873f51722a7f
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure     6 Nov 2024 14:58:33 -0000
@@ -0,0 +1,37 @@
+$NetBSD$
+
+Revert part of upstream commit f057de5a1a950a90d1920021db152a4b695f1a8a
+and commit 3e7a6fbb8e38f930970a5dcc7a3f27cf6fdc04e8.
+
+Avoid unconditional append of ldap and gssapi related .pc files to
+libcurl.pc. Several platforms (e.g. NetBSD) do not provide such .pc and
+their respective builtin.mk at the moment do not provide any logic to
+generate fake .pc yet.
+
+FIXME: This patch should be reverted and instead the corresponding builtin.mk
+FIXME: files should be instructed to generate such .pc files.
+
+--- configure.orig     2024-11-06 14:43:07.882717533 +0000
++++ configure
+@@ -25042,7 +25042,6 @@ printf "%s\n" "no additional lib require
+       else
+         LIBS="$curl_cv_ldap_LIBS $curl_cv_save_LIBS"
+       fi
+-      LIBCURL_PC_REQUIRES_PRIVATE="ldap $LIBCURL_PC_REQUIRES_PRIVATE"
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $curl_cv_ldap_LIBS" >&5
+ printf "%s\n" "$curl_cv_ldap_LIBS" >&6; }
+       ;;
+@@ -26189,13 +26188,6 @@ printf "%s\n" "found" >&6; }
+         ;;
+     esac
+   fi
+-  if test -n "$gnu_gss"; then
+-    LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE gss"
+-  elif test "x$not_mit" = "x1"; then
+-    LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE heimdal-gssapi"
+-  else
+-    LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE mit-krb5-gssapi"
+-  fi
+ else
+   CPPFLAGS="$save_CPPFLAGS"
+ fi


Home | Main Index | Thread Index | Old Index