From 899e0f951a0e8a85eee2b7061bb4c5fb24f4dc8c Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Oct 2025 13:25:57 -0500 Subject: [PATCH 1/3] Adjusted apache patch spec file for newer Patch N style Ticket: ENT-13016 Changelog: none (cherry picked from commit 614f9dc0954258b39eb79dc5c2476f8f00013b91) (cherry picked from commit 2d0cfda3d0729575da5c9542dd63b0e7542777ba) --- 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 2a9af2822..b734c448f 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 8379b0b2d6584065377497cf895844296ce49302 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Oct 2025 13:26:29 -0500 Subject: [PATCH 2/3] Removed not needed libtool control la files in dependencies Ticket: ENT-13016 Changelog: none (cherry picked from commit 6fc52e4db4a61a754d0450963c8b1b11ed941107) (cherry picked from commit 54cd4b183eda29c895052c11c1cfcf6ae53ff35f) --- deps-packaging/libyaml/cfbuild-libyaml.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 61fb15d89f92c136595d45ba4233187bd6638be0 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Fri, 24 Oct 2025 13:27:35 -0500 Subject: [PATCH 3/3] 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 (cherry picked from commit 920d7391da65a2fbeca1472a11fa731af565227d) Conflicts: build-scripts/package deps-packaging/pkg-build-rpm Removed some docs/debugs from master and KEPT system_ssl option here as our openssl is too different in 3.24.x from distributions we build for and causes conflicts in libraries, e.g. ENT-12528 (cherry picked from commit 2a4b6c10b4b66d55ec4153bbf5774921cd20b942) --- 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 9e137708c..4dfac89c3 100755 --- a/build-scripts/package +++ b/build-scripts/package @@ -178,6 +178,8 @@ case "$PACKAGING" in # - argv[2] = a b # Also note that $RPMBUILD_OPTIONS might have spaces # which must be preserved + # 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_CMD" -bb \ --define "'_topdir $BASEDIR/$PKG'" \ --define "'buildprefix $BUILDPREFIX'" \ diff --git a/deps-packaging/pkg-build-rpm b/deps-packaging/pkg-build-rpm index a26cdae63..84bc3edfa 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_CMD -bb \ --define "'_system_ssl $SYSTEM_SSL'" \ --define "'_topdir $BASEDIR/$PKGNAME'" \