From e21a5d1ee4dacda2b409a6bc0c387af83453db48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Membr=C3=A9?= Date: Fri, 17 Jan 2025 11:00:27 +0100 Subject: [PATCH] Fixes #26203: libaugeas-dev is too old on old systems (#2950) --- rudder-agent/SOURCES/Makefile.in | 4 +++- rudder-agent/SPECS/rudder-agent.spec | 8 ++++++-- rudder-agent/debian/rules | 8 ++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/rudder-agent/SOURCES/Makefile.in b/rudder-agent/SOURCES/Makefile.in index e0ff1566c..5c1d6ad1a 100644 --- a/rudder-agent/SOURCES/Makefile.in +++ b/rudder-agent/SOURCES/Makefile.in @@ -201,7 +201,9 @@ ifneq (false,$(USE_APT)) CARGO_FEATURES_SU="apt" endif -build-agent: rudder-sources +MODULE_DEPS = $(shell set -x; ../../build-caching get dependencies/ $(DEPS_CACHE_PARAMETERS) || echo @augeas_DEP@ ) + +build-agent: $(MODULE_DEPS) rudder-sources ifneq (false,$(USE_RUST)) # The deps versions are in the Cargo.lock in the repo root DEPS_SOURCE_SHA=$$(ls -1 rudder-sources/rudder/Cargo.* | sort | xargs openssl dgst -sha256 | openssl dgst -sha256 | awk '{print $$2}') ;\ diff --git a/rudder-agent/SPECS/rudder-agent.spec b/rudder-agent/SPECS/rudder-agent.spec index 7f8261827..d2865f422 100644 --- a/rudder-agent/SPECS/rudder-agent.spec +++ b/rudder-agent/SPECS/rudder-agent.spec @@ -59,8 +59,6 @@ %if 0%{?rhel} && 0%{?rhel} <= 6 # PIE and PIC incompatible on old gcc %define enable_pie false -# no augeas or augeas too old -%define with_augeas true # no rust %define enable_rust false %endif @@ -70,6 +68,8 @@ %define with_openssl true %endif %if 0%{?rhel} && 0%{?rhel} <= 8 +# no augeas or augeas too old +%define with_augeas true # need pcre2 for rhel < 8 %define with_pcre2 true %endif @@ -93,6 +93,10 @@ # no rust %define enable_rust false %endif +%if 0%{?suse_version} +# augeas too old on all sles for augeas module +%define with_augeas true +%endif %if 0%{?suse_version} && 0%{?suse_version} < 1500 # augeas too old on suse < 15 %define with_augeas true diff --git a/rudder-agent/debian/rules b/rudder-agent/debian/rules index 0d2135bc2..b03de9836 100755 --- a/rudder-agent/debian/rules +++ b/rudder-agent/debian/rules @@ -49,12 +49,12 @@ STRIP_OPT = --no-automatic-dbgsym endif # Ubuntu 18.04 ifeq (bionic,$(OS_CODENAME)) -WITH = --with-openssl --with-libcurl --with-lmdb --with-pcre2 +WITH = --with-openssl --with-libcurl --with-lmdb --with-pcre2 --with-augeas STRIP_OPT = --no-automatic-dbgsym endif # Ubuntu 20.04 ifeq (focal,$(OS_CODENAME)) -WITH = --with-lmdb --with-libcurl --with-pcre2 +WITH = --with-lmdb --with-libcurl --with-pcre2 --with-augeas STRIP_OPT = --no-automatic-dbgsym endif # Ubuntu 22.04 @@ -93,12 +93,12 @@ STRIP_OPT = --no-automatic-dbgsym endif # Debian 10 ifeq (buster,$(OS_CODENAME)) -WITH = --with-lmdb --with-libcurl --with-pcre2 +WITH = --with-lmdb --with-libcurl --with-pcre2 --with-augeas STRIP_OPT = --no-automatic-dbgsym endif # Debian 11 ifeq (bullseye,$(OS_CODENAME)) -WITH = --with-lmdb --with-libcurl +WITH = --with-lmdb --with-libcurl --with-augeas STRIP_OPT = --no-automatic-dbgsym endif # Debian 12