From adb69c78bcca867296f865c848174010ec5f4419 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 19 Aug 2019 12:29:12 +0200 Subject: [PATCH] Use RELRO hardening on all binaries --- community-mysql.spec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/community-mysql.spec b/community-mysql.spec index 183209e..a5f11b7 100644 --- a/community-mysql.spec +++ b/community-mysql.spec @@ -67,7 +67,7 @@ Name: community-mysql Version: 8.0.17 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Summary: MySQL client programs and shared libraries URL: http://www.mysql.com @@ -386,6 +386,8 @@ cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} \ %{SOURCE14} %{SOURCE15} %{SOURCE17} %{SOURCE18} %{SOURCE31} scripts %build +%{set_build_flags} + # fail quickly and obviously if user tries to build as root %if %runselftest if [ x"$(id -u)" = "x0" ]; then @@ -445,10 +447,13 @@ cmake .. \ -DREPRODUCIBLE_BUILD=OFF \ -DCMAKE_C_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable}" \ -DCMAKE_CXX_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable}" \ -%{?with_debug: -DWITH_DEBUG=1}\ -%{?with_debug: -DMYSQL_MAINTAINER_MODE=0}\ + -DCMAKE_EXE_LINKER_FLAGS="-pie %{build_ldflags}" \ +%{?with_debug: -DWITH_DEBUG=1} \ +%{?with_debug: -DMYSQL_MAINTAINER_MODE=0} \ -DTMPDIR=/var/tmp \ - -DWITH_MYSQLD_LDFLAGS="-pie -Wl,-z,relro,-z,now" + -DWITH_MYSQLD_LDFLAGS="%{build_ldflags}" \ + -DCMAKE_C_LINK_FLAGS="%{build_ldflags}" \ + -DCMAKE_CXX_LINK_FLAGS"%{build_ldflags}" cmake .. -LAH @@ -789,6 +794,9 @@ fi %endif %changelog +* Mon Aug 19 2019 Michal Schorm - 8.0.17-2 +- Use RELRO hardening on all binaries + * Wed Jul 31 2019 Lars Tangvald - 8.0.17-1 - Update to MySQL 8.0.17