Using those custom thingy-config scripts is problematic as they're
never written with cross-compilation in mind. Can the code be adjusted
to find the needed items with pkg-config instead? Then it can be
offered upstream.


Alex

On Tue, 4 Feb 2025 at 12:30, Yi Zhao via lists.openembedded.org
<[email protected]> wrote:
>
> Ping ...
>
>
> //Yi
>
>
> On 1/19/25 19:06, Yi Zhao via lists.openembedded.org wrote:
> > Add PACKAGECONFIG[gssapi] to support build with gss and svcgss.
> >
> > Signed-off-by: Yi Zhao <[email protected]>
> > ---
> >   ...nd-krb5-config-for-cross-compilation.patch | 53 +++++++++++++++++++
> >   .../nfs-utils/nfs-utils_2.8.2.bb              |  4 +-
> >   2 files changed, 56 insertions(+), 1 deletion(-)
> >   create mode 100644 
> > meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Find-krb5-config-for-cross-compilation.patch
> >
> > diff --git 
> > a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Find-krb5-config-for-cross-compilation.patch
> >  
> > b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Find-krb5-config-for-cross-compilation.patch
> > new file mode 100644
> > index 0000000000..019660c12f
> > --- /dev/null
> > +++ 
> > b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Find-krb5-config-for-cross-compilation.patch
> > @@ -0,0 +1,53 @@
> > +From 74d01a9e6d19eb963bbf081e3ea7c692759a8fe3 Mon Sep 17 00:00:00 2001
> > +From: Stefan Ghinea <[email protected]>
> > +Date: Mon, 18 Dec 2023 01:20:21 +0000
> > +Subject: [PATCH] Find krb5-config for cross-compilation
> > +
> > +With $dir being used as base search for both libgssapi and krb5-config,
> > +in OE krb5-config is found in $dir/bin/crossscripts instead of $dir/bin
> > +so add this to the search posibillities relative to $dir.
> > +Remove check for needing to set -rpath in KRBLDFLAGS.
> > +
> > +Upstream-Status: Inappropriate [oe specific]
> > +
> > +Signed-off-by: Stefan Ghinea <[email protected]>
> > +Signed-off-by: Haitao Liu <[email protected]>
> > +Signed-off-by: Yi Zhao <[email protected]>
> > +---
> > + aclocal/kerberos5.m4 | 13 ++-----------
> > + 1 file changed, 2 insertions(+), 11 deletions(-)
> > +
> > +diff --git a/aclocal/kerberos5.m4 b/aclocal/kerberos5.m4
> > +index f96f0fd..61bc81e 100644
> > +--- a/aclocal/kerberos5.m4
> > ++++ b/aclocal/kerberos5.m4
> > +@@ -26,6 +26,8 @@ AC_DEFUN([AC_KERBEROS_V5],[
> > +       K5CONFIG=$dir/bin/krb5-config
> > +     elif test -f "/usr/kerberos/bin/krb5-config"; then
> > +       K5CONFIG="/usr/kerberos/bin/krb5-config"
> > ++    elif test -f $dir/bin/crossscripts/krb5-config; then
> > ++      K5CONFIG=$dir/bin/crossscripts/krb5-config
> > +     elif test -f "/usr/lib/mit/bin/krb5-config"; then
> > +       K5CONFIG="/usr/lib/mit/bin/krb5-config"
> > +     fi
> > +@@ -71,17 +73,6 @@ AC_DEFUN([AC_KERBEROS_V5],[
> > +   fi
> > +   AC_MSG_RESULT($KRBDIR)
> > +
> > +-  dnl Check if -rpath=$(KRBDIR)/lib is needed
> > +-  echo "The current KRBDIR is $KRBDIR"
> > +-  if test "$KRBDIR/lib" = "/lib" -o "$KRBDIR/lib" = "/usr/lib" \
> > +-       -o "$KRBDIR/lib" = "//lib" -o "$KRBDIR/lib" = "/usr//lib" ; then
> > +-    KRBLDFLAGS="";
> > +-  elif /sbin/ldconfig -p | grep > /dev/null "=> $KRBDIR/lib/"; then
> > +-    KRBLDFLAGS="";
> > +-  else
> > +-    KRBLDFLAGS="-Wl,-rpath=$KRBDIR/lib"
> > +-  fi
> > +-
> > +   dnl Now check for functions within gssapi library
> > +   AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context,
> > +     AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos 
> > GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIBS)
> > +--
> > +2.25.1
> > +
> > diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb 
> > b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb
> > index 18c4a249b3..4cc698f62b 100644
> > --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb
> > +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.2.bb
> > @@ -32,6 +32,7 @@ SRC_URI = 
> > "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x
> >              file://clang-warnings.patch \
> >              file://0001-locktest-Makefile.am-Do-not-use-build-flags.patch \
> >              file://0001-Fix-typecast-warning-with-clang.patch \
> > +           file://0001-Find-krb5-config-for-cross-compilation.patch \
> >              "
> >
> >   SRC_URI[sha256sum] = 
> > "a39bbea76ac0ab9e6e8699caf3c308b6b310c20d458e8fa8606196d358e7fb15"
> > @@ -56,7 +57,6 @@ EXTRA_OECONF = "--with-statduser=rpcuser \
> >                   --enable-mountconfig \
> >                   --enable-libmount-mount \
> >                   --enable-uuid \
> > -                --disable-gss \
> >                   --disable-nfsdcltrack \
> >                   --with-statdpath=/var/lib/nfs/statd \
> >                   --with-rpcgen=${HOSTTOOLS_DIR}/rpcgen \
> > @@ -75,6 +75,8 @@ PACKAGECONFIG[nfsv41] = 
> > "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmap
> >   # keyutils is available in meta-oe
> >   PACKAGECONFIG[nfsv4] = 
> > "--enable-nfsv4,--disable-nfsv4,keyutils,python3-core"
> >   PACKAGECONFIG[nfsdctl] = "--enable-nfsdctl,--disable-nfsdctl,libnl 
> > readline,"
> > +#krb5 is available in meta-oe
> > +PACKAGECONFIG[gssapi] = "--enable-gss --enable-svcgss 
> > --with-krb5=${STAGING_EXECPREFIXDIR},--disable-gss --disable-svcgss,krb5"
> >
> >   PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats ${PN}-rpcctl"
> >
> >
> >
> >
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#210777): 
https://lists.openembedded.org/g/openembedded-core/message/210777
Mute This Topic: https://lists.openembedded.org/mt/110696372/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to