cfengine: upgrade to 3.21.0

Also fixed --with-libxml2=no case in configure.ac
The CF3_WITH_LIBRARY and AC_CHECK_HEADERS were moved to outside of the check for with-libxml2=no
This fix is already merged in cfengine master but will need some time to cherry-pick and arrive in a 3.21.x LTS release.

Ticket: CFE-4023
Changelog: title

Signed-off-by: Craig Comstock <craig@unreasonablefarm.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Craig Comstock
2023-02-17 11:17:22 -06:00
committed by Khem Raj
parent 43ee6170bb
commit 8caa8a3d12
4 changed files with 96 additions and 24 deletions
@@ -1,16 +0,0 @@
--- a/modules/packages/apt_get
+++ b/modules/packages/apt_get
@@ -1,4 +1,4 @@
-#!/var/cfengine/bin/python
+#!/var/cfengine/bin/python3
import sys
import os
--- a/modules/packages/apt_get.in
+++ b/modules/packages/apt_get.in
@@ -1,4 +1,4 @@
-#!@bindir@/python
+#!@bindir@/python3
import sys
import os
@@ -18,13 +18,12 @@ or wherever `$(sys.masterdir)` points. \
HOMEPAGE = "http://cfengine.com"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9f76426f9ef8c6f6739fadd21d817a4f"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bb843e794feb6890f7697637b461c36e"
SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \
file://python3.patch \
"
SRC_URI[md5sum] = "6d456fdd9bd24ff6617eeaa05efae602"
SRC_URI[sha256sum] = "4a071c0c4ba7df9bad93144cff5fbc0566e5172afd66201072e3193b76c55a38"
#SRC_URI[md5sum] = "5df2f85c75efc351ffadebcc11046a98"
SRC_URI[sha256sum] = "013ebe68599915cedb4bf753b471713d91901a991623358b9a967d9a779bcc16"
inherit autotools
@@ -0,0 +1,87 @@
From a08acdfadb5eba2a3201209c6da3ad6f2ca4ae79 Mon Sep 17 00:00:00 2001
From: Craig Comstock <craig.comstock@northern.tech>
Date: Fri, 27 Jan 2023 15:19:48 -0600
Subject: [PATCH] Fixed --with-libxml2=no case in configure.ac
The CF3_WITH_LIBRARY and AC_CHECK_HEADERS were moved to outside of the check for with-libxml2=no
Ticket: CFE-4023
Changelog: title
---
configure.ac | 21 +++++++++++----------
libntech/configure.ac | 21 +++++++++++----------
2 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/configure.ac b/configure.ac
index e189b10..f6b8226 100644
--- a/configure.ac
+++ b/configure.ac
@@ -659,19 +659,20 @@ if test "x$with_libxml2" != "xno"; then
LIBXML2_CPPFLAGS=-I$with_libxml2/include/libxml2
fi
fi
-fi
-CF3_WITH_LIBRARY(libxml2,
- [AC_CHECK_LIB(xml2, xmlFirstElementChild,
- [],
- [if test "x$with_libxml2" != xcheck; then
- AC_MSG_ERROR(Cannot find libxml2); fi]
- )
- AC_CHECK_HEADERS([libxml/xmlwriter.h], [break],
+ CF3_WITH_LIBRARY(libxml2,
+ [AC_CHECK_LIB(xml2, xmlFirstElementChild,
+ [],
[if test "x$with_libxml2" != xcheck; then
AC_MSG_ERROR(Cannot find libxml2); fi]
- )]
-)
+ )
+ AC_CHECK_HEADERS([libxml/xmlwriter.h], [break],
+ [if test "x$with_libxml2" != xcheck; then
+ AC_MSG_ERROR(Cannot find libxml2); fi]
+ )]
+ )
+
+fi
AM_CONDITIONAL([HAVE_LIBXML2],
[test "x$with_libxml2" != xno &&
diff --git a/libntech/configure.ac b/libntech/configure.ac
index 7bb8787..28b3683 100644
--- a/libntech/configure.ac
+++ b/libntech/configure.ac
@@ -571,19 +571,20 @@ if test "x$with_libxml2" != "xno"; then
LIBXML2_CPPFLAGS=-I$with_libxml2/include/libxml2
fi
fi
-fi
-CF3_WITH_LIBRARY(libxml2,
- [AC_CHECK_LIB(xml2, xmlFirstElementChild,
- [],
- [if test "x$with_libxml2" != xcheck; then
- AC_MSG_ERROR(Cannot find libxml2); fi]
- )
- AC_CHECK_HEADERS([libxml/xmlwriter.h], [break],
+ CF3_WITH_LIBRARY(libxml2,
+ [AC_CHECK_LIB(xml2, xmlFirstElementChild,
+ [],
[if test "x$with_libxml2" != xcheck; then
AC_MSG_ERROR(Cannot find libxml2); fi]
- )]
-)
+ )
+ AC_CHECK_HEADERS([libxml/xmlwriter.h], [break],
+ [if test "x$with_libxml2" != xcheck; then
+ AC_MSG_ERROR(Cannot find libxml2); fi]
+ )]
+ )
+
+fi
AM_CONDITIONAL([HAVE_LIBXML2],
[test "x$with_libxml2" != xno &&
--
2.39.1
@@ -15,13 +15,15 @@ SKIP_RECIPE[cfengine] ?= "Needs porting to openssl 3.x"
LICENSE = "GPL-3.0-only"
LIC_FILES_CHKSUM = "file://LICENSE;md5=233aa25e53983237cf0bd4c238af255f"
DEPENDS = "attr tokyocabinet bison-native"
DEPENDS += "attr tokyocabinet bison-native libxml2"
#RDEPENDS:cfengine += "attr tokyocabinet bison-native libxml2"
SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BP}.tar.gz \
SRC_URI = "https://cfengine-package-repos.s3.amazonaws.com/tarballs/${BPN}-community-${PV}.tar.gz \
file://0001-Fixed-with-libxml2-no-case-in-configure.ac.patch \
file://set-path-of-default-config-file.patch \
"
SRC_URI[md5sum] = "d4dabfa46d8afa151be5610f184354e7"
SRC_URI[sha256sum] = "fa53e137f850eb268a8e7ae4578b5db5dc383656341f5053dc1a353ed0288265"
#SRC_URI[md5sum] = "5318e40702bc66a3ece44ec4ad77712b"
SRC_URI[sha256sum] = "911778ddb0a4e03a3ddfc8fc0f033136e1551849ea2dcbdb3f0f14359dfe3126"
inherit autotools-brokensep systemd