Fix hardened builds

Related: #1966688
This commit is contained in:
Ryan O'Hara 2021-06-03 14:26:05 -05:00
parent 8f39d2dc46
commit 2db14df2df

View File

@ -8,7 +8,7 @@
Name: haproxy
Version: 2.4.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: HAProxy reverse proxy for high availability environments
License: GPLv2+
@ -55,11 +55,13 @@ regparm_opts=
regparm_opts="USE_REGPARM=1"
%endif
%{__make} %{?_smp_mflags} CPU="generic" TARGET="linux-glibc" USE_OPENSSL=1 USE_PCRE2=1 USE_SLZ=1 USE_LUA=1 USE_CRYPT_H=1 USE_SYSTEMD=1 USE_LINUX_TPROXY=1 USE_GETADDRINFO=1 USE_PROMEX=1 ${regparm_opts} ADDINC="%{optflags}" ADDLIB="%{__global_ldflags}"
%{__make} %{?_smp_mflags} CPU="generic" TARGET="linux-glibc" USE_OPENSSL=1 USE_PCRE2=1 USE_SLZ=1 USE_LUA=1 USE_CRYPT_H=1 USE_SYSTEMD=1 USE_LINUX_TPROXY=1 USE_GETADDRINFO=1 USE_PROMEX=1 ${regparm_opts} ADDINC="%{build_cflags}" ADDLIB="%{build_ldflags}"
%{__make} admin/halog/halog OPTIMIZE="%{optflags} %{build_ldflags}"
%{__make} admin/iprange/iprange OPTIMIZE="%{optflags} %{build_ldflags}"
%{__make} admin/iprange/ip6range OPTIMIZE="%{optflags} %{build_ldflags}"
%{__make} admin/halog/halog ADDINC="%{build_cflags}" ADDLIB="%{build_ldflags}"
pushd admin/iprange
%{__make} OPTIMIZE="%{build_cflags}" LDFLAGS="%{build_ldflags}"
popd
%install
%{__make} install-bin DESTDIR=%{buildroot} PREFIX=%{_prefix} TARGET="linux2628"
@ -129,6 +131,9 @@ exit 0
%{_mandir}/man1/*
%changelog
* Thu Jun 03 2021 Ryan O'Hara <rohara@redhat.com> - 2.4.0-2
- Fix hardened builds (#1966688)
* Tue Jun 01 2021 Ryan O'Hara <rohara@redhat.com> - 2.4.0-1
- Update to 2.4.0 (#1966688)