From 4d0b6812e5e7eca77d67908eaf2a960ebee4ca8b Mon Sep 17 00:00:00 2001 From: "Neil.wrz" Date: Mon, 20 Feb 2023 23:48:07 -0800 Subject: [PATCH] do not check yajl when not have isulad Signed-off-by: Neil.wrz (cherry picked from commit 9a5664be33ef690eea5812756353aa21040c87ef) --- 0060-check-yajl-only-when-have-isulad.patch | 55 +++++++++++++++++++++ lxc.spec | 9 +++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 0060-check-yajl-only-when-have-isulad.patch diff --git a/0060-check-yajl-only-when-have-isulad.patch b/0060-check-yajl-only-when-have-isulad.patch new file mode 100644 index 0000000..8e5c25d --- /dev/null +++ b/0060-check-yajl-only-when-have-isulad.patch @@ -0,0 +1,55 @@ +From f90f99c6e8213512fed3b5c55337dee3c1a7e13d Mon Sep 17 00:00:00 2001 +From: "Neil.wrz" +Date: Tue, 21 Feb 2023 00:28:05 -0800 +Subject: [PATCH] yajl + +--- + configure.ac | 6 +++--- + src/lxc/Makefile.am | 6 ++++-- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7766638..98e4700 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -120,9 +120,6 @@ AM_CONDITIONAL([DISTRO_UBUNTU], [test "x$with_distro" = "xubuntu"]) + + AC_CONFIG_LINKS([config/etc/default.conf:config/etc/${distroconf}]) + +-# Check yajl +-PKG_CHECK_MODULES([YAJL], [yajl >= 2],[],[AC_MSG_ERROR([You must install yajl >= 2])]) +- + # Check for init system type + AC_MSG_CHECKING([for init system type]) + AC_ARG_WITH([init-script], +@@ -818,6 +815,9 @@ AM_CONDITIONAL([HAVE_ISULAD], [test "x$adapt_isulad" = "xyes"]) + if test "x$adapt_isulad" = "xyes"; then + AC_DEFINE([HAVE_ISULAD], 1, [adapt to iSulad]) + AC_MSG_RESULT([yes]) ++ ++ # Check yajl ++ PKG_CHECK_MODULES([YAJL], [yajl >= 2],[],[AC_MSG_ERROR([You must install yajl >= 2])]) + else + AC_MSG_RESULT([no]) + fi +diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am +index 2686e24..7373916 100644 +--- a/src/lxc/Makefile.am ++++ b/src/lxc/Makefile.am +@@ -361,9 +361,11 @@ LDADD = liblxc.la \ + @OPENSSL_LIBS@ \ + @SECCOMP_LIBS@ \ + @SELINUX_LIBS@ \ +- @DLOG_LIBS@ \ +- @YAJL_LIBS@ ++ @DLOG_LIBS@ + ++if HAVE_ISULAD ++ LDADD += @YAJL_LIBS@ ++endif + if ENABLE_TOOLS + lxc_attach_SOURCES = tools/lxc_attach.c \ + rexec.c rexec.h \ +-- +2.25.1 + diff --git a/lxc.spec b/lxc.spec index 180ce93..6ec70af 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 2022102411 +%global _release 2022102412 Name: lxc Version: 4.0.3 @@ -67,6 +67,7 @@ Patch0056: 0056-fix-cve-CVE-2022-47952-log-leaks-root-information.patch Patch0057: 0057-fix-lxc-write-error-message.patch Patch0058: 0058-add-loongarch64-support-for-lxc.patch Patch0059: 0059-remove-process-inheritable-capability.patch +Patch0060: 0060-check-yajl-only-when-have-isulad.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -247,6 +248,12 @@ make check %endif %changelog +* Tue Feb 21 2023 wangrunze - 4.0.3-2022102412 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: do not check yajl when not have isulad + * Tue Feb 21 2023 zhangxiaoyu - 4.0.3-2022102411 - Type:bugfix - ID:NA -- Gitee