From 832a2683362a3186c824127fc4a808513ec969e9 Mon Sep 17 00:00:00 2001 From: Andrei Pavel Date: Tue, 14 Nov 2023 13:34:28 +0200 Subject: [PATCH] [#3148] remove build_ldflags macro from kea.spec for centos 7 --- hammer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hammer.py b/hammer.py index 650846d501..43a24eb808 100755 --- a/hammer.py +++ b/hammer.py @@ -2318,6 +2318,11 @@ def _build_rpm(system, revision, features, tarball_path, env, check_times, dry_r execute('rm -rf %s' % rpm_root_path) execute('mkdir -p %s/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}' % rpm_root_path) + if system == 'centos' and revision == '7': + # we need to remove macro that is not yet available on centos 7 + # it's a hack that we don't need anywhere else + execute("sed -i -E 's/export LDFLAGS=\"%\{build_ldflags\} -fno-lto\"//' kea.spec", cwd=os.path.join(src_path, 'rpm'), check_times=check_times, dry_run=dry_run) + # get rpm.spec from tarball rpm_dir = os.path.join(src_path, 'rpm') for f in os.listdir(rpm_dir): -- 2.47.2