]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3148] remove build_ldflags macro from kea.spec for centos 7
authorAndrei Pavel <andrei@isc.org>
Tue, 14 Nov 2023 11:34:28 +0000 (13:34 +0200)
committerAndrei Pavel <andrei@isc.org>
Tue, 14 Nov 2023 11:34:28 +0000 (13:34 +0200)
hammer.py

index 650846d501db8e01c123a199373d64f05e715c61..43a24eb8082cdef259a6bd04ff607129f5a8bbcb 100755 (executable)
--- 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):