diff mbox series

[meta-networking] adcli: upgrade 0.9.2 -> 0.9.3.1

Message ID 20260119012707.15616-1-liuyd.fnst@fujitsu.com
State New
Headers show
Series [meta-networking] adcli: upgrade 0.9.2 -> 0.9.3.1 | expand

Commit Message

Liu Yiding Jan. 19, 2026, 1:27 a.m. UTC
1. Add pkgconfig to solve following configure error:
 ../sources/adcli-0.9.3.1/configure: line 15340: syntax error near unexpected token `LIBSELINUX,'
 ../sources/adcli-0.9.3.1/configure: line 15340: `PKG_CHECK_MODULES(LIBSELINUX, libselinux, found_libselinux=yes, found_libselinux=no)'
 
2. Add PACKAGECONFIG[selinux] for new selinux support in 0.9.3.1.

3. Add 0001-configure.ac-Fix-selinux-error-for-cross_compiling.patch to fix SELINUX_MAKEFILE file check in 0.9.3.1.

4. Add --disable-offline-join-support to solve following configure error

 configure: error: Couldn't build offline join support, Samba version too old or libnatapi devel package is missing

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
---
 ...ix-selinux-error-for-cross_compiling.patch | 49 +++++++++++++++++++
 .../{adcli_0.9.2.bb => adcli_0.9.3.1.bb}      | 15 ++++--
 2 files changed, 60 insertions(+), 4 deletions(-)
 create mode 100644 meta-networking/recipes-connectivity/adcli/adcli/0001-configure.ac-Fix-selinux-error-for-cross_compiling.patch
 rename meta-networking/recipes-connectivity/adcli/{adcli_0.9.2.bb => adcli_0.9.3.1.bb} (58%)
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/adcli/adcli/0001-configure.ac-Fix-selinux-error-for-cross_compiling.patch b/meta-networking/recipes-connectivity/adcli/adcli/0001-configure.ac-Fix-selinux-error-for-cross_compiling.patch
new file mode 100644
index 0000000000..b3b7702644
--- /dev/null
+++ b/meta-networking/recipes-connectivity/adcli/adcli/0001-configure.ac-Fix-selinux-error-for-cross_compiling.patch
@@ -0,0 +1,49 @@ 
+Subject: [PATCH] configure.ac: Fix selinux error for
+ cross_compiling
+
+Before this patch:
+configure file will check SELINUX_MAKEFILE /usr/share/selinux/devel/Makefile which is defined for target.
+But in cross_compiling environment, the SELINUX_MAKEFILE should defined for host
+
+So following error occurs
+| checking for libselinux... no
+| checking for /usr/share/selinux/devel/Makefile... configure: error: cannot check for file existence when cross compiling
+| NOTE: The following config.log files may provide further information.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
+---
+ configure.ac | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b0be041..b5c3baf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -171,9 +171,19 @@ fi
+ SELINUX_MAKEFILE=/usr/share/selinux/devel/Makefile
+ AC_SUBST([SELINUX_MAKEFILE])
+ 
+-AC_CHECK_FILE([$SELINUX_MAKEFILE],
+-              [build_selinux=yes],
+-              [build_selinux=no])
++AS_IF([test "x$cross_compiling" = "xyes"],
++    [
++        AS_IF([test -f "${SYSROOT_DIR}/usr/share/selinux/devel/Makefile"],
++            [build_selinux=yes],
++            [build_selinux=no])
++        SELINUX_MAKEFILE="${SYSROOT_DIR}/usr/share/selinux/devel/Makefile"
++    ],
++    [
++        SELINUX_MAKEFILE=/usr/share/selinux/devel/Makefile
++        AC_CHECK_FILE([$SELINUX_MAKEFILE],
++            [build_selinux=yes],
++            [build_selinux=no])
++    ])
+ 
+ if test x$build_selinux_support = xyes && test x$build_selinux = xno; then
+     AC_MSG_ERROR([Couldn't build SELinux support, SELinux policy devel packages missing])
+-- 
+2.43.0
+
diff --git a/meta-networking/recipes-connectivity/adcli/adcli_0.9.2.bb b/meta-networking/recipes-connectivity/adcli/adcli_0.9.3.1.bb
similarity index 58%
rename from meta-networking/recipes-connectivity/adcli/adcli_0.9.2.bb
rename to meta-networking/recipes-connectivity/adcli/adcli_0.9.3.1.bb
index 7bd07491fe..a15afbe2ec 100644
--- a/meta-networking/recipes-connectivity/adcli/adcli_0.9.2.bb
+++ b/meta-networking/recipes-connectivity/adcli/adcli_0.9.3.1.bb
@@ -4,20 +4,27 @@  DESCRIPTION = "A helper library and tools for Active Directory client operations
 HOMEPAGE = "http://cgit.freedesktop.org/realmd/adcli"
 SECTION = "net"
 
-SRCREV = "8e88e3590a19006362ea8b8dfdc18bb88b3cb3b5"
-
-SRC_URI = "git://gitlab.freedesktop.org/realmd/adcli;protocol=https;branch=master"
+SRCREV = "f3b69c2497c1a66359047abc3042c11cab2199e1"
 
+SRC_URI = "git://gitlab.freedesktop.org/realmd/adcli;protocol=https;branch=master;tag=${PV} \
+           file://0001-configure.ac-Fix-selinux-error-for-cross_compiling.patch \
+          "
 
 LICENSE = "LGPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
 
-inherit autotools xmlcatalog
+inherit autotools xmlcatalog pkgconfig
 
 DEPENDS += "virtual/crypt krb5 openldap gettext libxslt xmlto libxml2-native \
             cyrus-sasl libxslt-native xmlto-native coreutils-native\
            "
 
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
+PACKAGECONFIG[selinux] = ",--disable-selinux-support,libselinux,libselinux"
+
 EXTRA_OECONF += "--disable-silent-rules \
                  --disable-doc \
+                 --disable-offline-join-support \
                 "
+
+FILES:${PN} += "${datadir}"