From dc87cd08dcd1d9723223b09c6e5dcff19d6d2f06 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Oct 2025 13:15:15 -0500 Subject: [PATCH 1/7] Added RedHat 10 platform support Ticket: ENT-13016 Changelog: title --- build-scripts/labels.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-scripts/labels.txt b/build-scripts/labels.txt index 06fa3d72a..38a10171b 100644 --- a/build-scripts/labels.txt +++ b/build-scripts/labels.txt @@ -8,6 +8,8 @@ PACKAGES_HUB_arm_64_linux_debian_12 PACKAGES_HUB_x86_64_linux_redhat_7 PACKAGES_HUB_x86_64_linux_redhat_8 PACKAGES_HUB_x86_64_linux_redhat_9 +PACKAGES_HUB_x86_64_linux_redhat_10 +PACKAGES_HUB_arm_64_linux_redhat_10 PACKAGES_HUB_x86_64_linux_ubuntu_20 PACKAGES_HUB_x86_64_linux_ubuntu_22 @@ -23,6 +25,8 @@ PACKAGES_arm_64_linux_debian_12 PACKAGES_x86_64_linux_redhat_7 PACKAGES_x86_64_linux_redhat_8 PACKAGES_x86_64_linux_redhat_9 +PACKAGES_x86_64_linux_redhat_10 +PACKAGES_arm_64_linux_redhat_10 PACKAGES_x86_64_linux_suse_12 PACKAGES_x86_64_linux_suse_15 From 193dc390a8100e91b143ccce6c874881e9517835 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Oct 2025 13:25:57 -0500 Subject: [PATCH 2/7] Adjusted apache patch spec file for newer Patch N style Ticket: ENT-13016 Changelog: none --- deps-packaging/apache/cfbuild-apache.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deps-packaging/apache/cfbuild-apache.spec b/deps-packaging/apache/cfbuild-apache.spec index 1a743e508..f404c8972 100644 --- a/deps-packaging/apache/cfbuild-apache.spec +++ b/deps-packaging/apache/cfbuild-apache.spec @@ -8,6 +8,7 @@ Release: 1 Source0: httpd-%{apache_version}.tar.gz Source1: httpd.conf Patch0: apachectl.patch +Patch1: fixed-implicit-decl-gettid.patch License: MIT Group: Other Url: https://cfengine.com @@ -21,7 +22,8 @@ AutoReqProv: no mkdir -p %{_builddir} %setup -q -n httpd-%{apache_version} -%patch0 -p0 +%patch -P 0 +%patch -P 1 -p1 CPPFLAGS=-I%{buildprefix}/include From 77a7be6a298efcf2ec9e4b6055596291b0ebc37e Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Oct 2025 13:26:29 -0500 Subject: [PATCH 3/7] Removed not needed libtool control la files in dependencies Ticket: ENT-13016 Changelog: none --- deps-packaging/leech/cfbuild-leech.spec | 3 +-- deps-packaging/librsync/cfbuild-librsync.spec | 3 +-- deps-packaging/libyaml/cfbuild-libyaml.spec | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/deps-packaging/leech/cfbuild-leech.spec b/deps-packaging/leech/cfbuild-leech.spec index 4f1aa72dd..a437def74 100644 --- a/deps-packaging/leech/cfbuild-leech.spec +++ b/deps-packaging/leech/cfbuild-leech.spec @@ -21,7 +21,6 @@ mkdir -p %{_builddir} ./configure --prefix=%{prefix} --enable-shared --disable-static rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/libleech.a -rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/libleech.la %build @@ -31,6 +30,7 @@ make rm -rf ${RPM_BUILD_ROOT} make install DESTDIR=${RPM_BUILD_ROOT} +rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/libleech.la %clean rm -rf $RPM_BUILD_ROOT @@ -59,6 +59,5 @@ CFEngine Build Automation -- leech -- development files %{prefix}/include/*.h %dir %{prefix}/lib -%{prefix}/lib/*.la %changelog diff --git a/deps-packaging/librsync/cfbuild-librsync.spec b/deps-packaging/librsync/cfbuild-librsync.spec index e3be8bc21..534d828d9 100644 --- a/deps-packaging/librsync/cfbuild-librsync.spec +++ b/deps-packaging/librsync/cfbuild-librsync.spec @@ -53,7 +53,6 @@ touch -t 0001010102 ar-lib ./configure --prefix=%{prefix} --enable-shared --disable-static rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/librsync.a -rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/librsync.la %build @@ -63,6 +62,7 @@ make rm -rf ${RPM_BUILD_ROOT} make install DESTDIR=${RPM_BUILD_ROOT} +rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/librsync.la %clean rm -rf $RPM_BUILD_ROOT @@ -91,7 +91,6 @@ CFEngine Build Automation -- librsync -- development files %{prefix}/include/*.h %dir %{prefix}/lib -%{prefix}/lib/*.la %{prefix}/lib/pkgconfig %changelog diff --git a/deps-packaging/libyaml/cfbuild-libyaml.spec b/deps-packaging/libyaml/cfbuild-libyaml.spec index b2de6669f..8ad3ebe70 100644 --- a/deps-packaging/libyaml/cfbuild-libyaml.spec +++ b/deps-packaging/libyaml/cfbuild-libyaml.spec @@ -33,6 +33,7 @@ $MAKE %install rm -rf ${RPM_BUILD_ROOT} $MAKE DESTDIR=${RPM_BUILD_ROOT} install +rm -rf ${RPM_BUILD_ROOT}%{prefix}/lib/libyaml.la %clean rm -rf $RPM_BUILD_ROOT @@ -65,7 +66,6 @@ CFEngine Build Automation -- lmdb -- development files %dir %{prefix}/lib %{prefix}/lib/pkgconfig %{prefix}/lib/*.a -%{prefix}/lib/*.la %changelog From d23daaafca3f82d29eb6dc5a3cfad2766e280401 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Oct 2025 13:27:35 -0500 Subject: [PATCH 4/7] Adjusted rpm deps and packaging to allow /var/cfengine/lib as an RPATH entry Adjusted rpm packaging to allow empty manifest lists such as debug symbols Some dependencies don't generate symbols even when BUILD_TYPE=DEBUG aka with_debugsym 0 and __strip /bin/true as options to rpmbuild. Ticket: ENT-13016 Changelog: none --- build-scripts/package | 2 ++ deps-packaging/pkg-build-rpm | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/build-scripts/package b/build-scripts/package index 71252da14..f156b8ac7 100755 --- a/build-scripts/package +++ b/build-scripts/package @@ -225,6 +225,8 @@ rpm | lpp) # eval is needed to preserve spaces in arguments within quotes # Example: --define 'with_expansion 1' needs to be passed as two args log_debug "Building RPM package with rpmbuild" + # rhel-10 rpmbuild is more picky about /var/cfengine/lib RPATH we need + export QA_RPATHS=2 # this is a set of bit flags, we just want 0x0002 here eval rpmbuild -bb \ --define "'_topdir $BASEDIR/$PKG'" \ --define "'buildprefix $BUILDPREFIX'" \ diff --git a/deps-packaging/pkg-build-rpm b/deps-packaging/pkg-build-rpm index 2039562aa..72b4d2d6e 100755 --- a/deps-packaging/pkg-build-rpm +++ b/deps-packaging/pkg-build-rpm @@ -76,11 +76,15 @@ if [ $TARGET != native ]; then exit 42 fi +# deps packages may result in binaries without debug symbols even when debugsym=yes aka BUILD_TYPE=DEBUG +# to avoid rpmbuild errors when this occurs, allow empties +RPMBUILD_OPTIONS="$RPMBUILD_OPTIONS --define '_empty_manifest_terminate_build 0'" + case "$TESTS" in no) - RPMBUILD_OPTIONS="--define 'with_testsuite 0'";; + RPMBUILD_OPTIONS="$RPMBUILD_OPTIONS --define 'with_testsuite 0'";; yes) - RPMBUILD_OPTIONS="--define 'with_testsuite 1'";; + RPMBUILD_OPTIONS="$RPMBUILD_OPTIONS --define 'with_testsuite 1'";; *) fatal "Unknown tests option: $TESTS";; esac @@ -112,6 +116,12 @@ fi # example cmd --define 'a b': # - argv[1] = --define # - argv[2] = a b + +# We have /var/cfengine/lib in RPATHS which should be OK +# We asked in https://github.com/rpm-software-management/rpm/issues/3982, and it seems allowing this is OK +# 0x0002 - contains an invalid RPATH - in our case /var/cfengine/lib is OK so allow it as an exception +# Here we only want to specify this one flag: 0x0002. Sadly these scripts run on POSIX shell (especially e.g. aix71 runs as /bin/sh which is ksh) so no bitwise operators. Add them together manually to a decimal integer. +export QA_RPATHS=2 # 0x0002 all by itself, no &(ands) eval rpmbuild -bb \ --define "'_topdir $BASEDIR/$PKGNAME'" \ --define "'version $VERSION'" \ From d78fdb7597a3312d10b04516817cf0635dccd501 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Tue, 28 Oct 2025 15:11:44 -0500 Subject: [PATCH 5/7] Adjusted CFEngine package script to allow /var/cfengine/lib RPATH in binaries Setting QA_RPATHS=$(( 0x0002 )) is our best way of working around this with newer rpmbuild versions since rhel-10. Ticket: ENT-13016 Changelog: none --- build-scripts/package | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-scripts/package b/build-scripts/package index f156b8ac7..05c7a71d1 100755 --- a/build-scripts/package +++ b/build-scripts/package @@ -227,7 +227,7 @@ rpm | lpp) log_debug "Building RPM package with rpmbuild" # rhel-10 rpmbuild is more picky about /var/cfengine/lib RPATH we need export QA_RPATHS=2 # this is a set of bit flags, we just want 0x0002 here - eval rpmbuild -bb \ +||||||| parent of 83ae5fa (Adjusted CFEngine package script to allow /var/cfengine/lib RPATH in binaries) --define "'_topdir $BASEDIR/$PKG'" \ --define "'buildprefix $BUILDPREFIX'" \ --define "'_basedir $BASEDIR'" \ From af86f202787ae063f47a4051e7bd5fd38647aee9 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Tue, 28 Oct 2025 17:18:54 -0500 Subject: [PATCH 6/7] Added a smidge of Rocky Linux support here Just enough to get started with a build. No official support intended (yet). Ticket: ENT-13016 Changelog: none --- build-scripts/detect-environment | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-scripts/detect-environment b/build-scripts/detect-environment index 81d0831a7..dff3f597c 100644 --- a/build-scripts/detect-environment +++ b/build-scripts/detect-environment @@ -129,7 +129,7 @@ detect_distribution() { # CentOS Linux release 7.6.1810 (Core) OS=centos ;; - "Red Hat Enterprise Linux "*) + "Red Hat Enterprise Linux "*|"Rocky Linux release "*) # Example output for RHEL: # Red Hat Enterprise Linux release 8.10 (Ootpa) OS=rhel From 7472083f9f0b9ac6281d887be54826f8bd85cc3b Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 29 Oct 2025 13:59:19 -0500 Subject: [PATCH 7/7] Added Debian 13 platform support Ticket: ENT-13164 Changelog: title --- build-scripts/labels.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-scripts/labels.txt b/build-scripts/labels.txt index 38a10171b..dfcff7b10 100644 --- a/build-scripts/labels.txt +++ b/build-scripts/labels.txt @@ -4,6 +4,8 @@ PACKAGES_HUB_x86_64_linux_debian_11 PACKAGES_HUB_arm_64_linux_debian_11 PACKAGES_HUB_x86_64_linux_debian_12 PACKAGES_HUB_arm_64_linux_debian_12 +PACKAGES_HUB_x86_64_linux_debian_13 +PACKAGES_HUB_arm_64_linux_debian_13 PACKAGES_HUB_x86_64_linux_redhat_7 PACKAGES_HUB_x86_64_linux_redhat_8 @@ -21,6 +23,8 @@ PACKAGES_x86_64_linux_debian_11 PACKAGES_arm_64_linux_debian_11 PACKAGES_x86_64_linux_debian_12 PACKAGES_arm_64_linux_debian_12 +PACKAGES_x86_64_linux_debian_13 +PACKAGES_arm_64_linux_debian_13 PACKAGES_x86_64_linux_redhat_7 PACKAGES_x86_64_linux_redhat_8