Packages: hardening flags for rpm.
This commit is contained in:
@@ -10,6 +10,8 @@
|
|||||||
%define unit_version %%UNIT_VERSION%%
|
%define unit_version %%UNIT_VERSION%%
|
||||||
%define unit_release %%UNIT_RELEASE%%%{?dist}.ngx
|
%define unit_release %%UNIT_RELEASE%%%{?dist}.ngx
|
||||||
|
|
||||||
|
%define CC_OPT %{optflags}
|
||||||
|
|
||||||
%define CONFIGURE_ARGS $(echo "%%CONFIGURE_ARGS%%")
|
%define CONFIGURE_ARGS $(echo "%%CONFIGURE_ARGS%%")
|
||||||
|
|
||||||
Name: %%NAME%%
|
Name: %%NAME%%
|
||||||
@@ -50,13 +52,15 @@ tar --strip-components=1 -zxf %{SOURCE0}
|
|||||||
./configure \
|
./configure \
|
||||||
%{CONFIGURE_ARGS} \
|
%{CONFIGURE_ARGS} \
|
||||||
--modules=%{_libdir}/unit/debug-modules \
|
--modules=%{_libdir}/unit/debug-modules \
|
||||||
|
--cc-opt="%{CC_OPT}" \
|
||||||
--debug
|
--debug
|
||||||
./configure %%MODULE_CONFARGS%%
|
./configure %%MODULE_CONFARGS%%
|
||||||
make %%MODULE_MAKEARGS%%
|
make %%MODULE_MAKEARGS%%
|
||||||
%{__mv} build build-debug
|
%{__mv} build build-debug
|
||||||
./configure \
|
./configure \
|
||||||
%{CONFIGURE_ARGS} \
|
%{CONFIGURE_ARGS} \
|
||||||
--modules=%{_libdir}/unit/modules
|
--modules=%{_libdir}/unit/modules \
|
||||||
|
--cc-opt="%{CC_OPT}"
|
||||||
./configure %%MODULE_CONFARGS%%
|
./configure %%MODULE_CONFARGS%%
|
||||||
make %%MODULE_MAKEARGS%%
|
make %%MODULE_MAKEARGS%%
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ BuildRequires: systemd
|
|||||||
Requires: systemd
|
Requires: systemd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define CC_OPT %{optflags} -fPIC
|
||||||
|
%define LD_OPT -Wl,-z,relro -Wl,-z,now -pie
|
||||||
|
|
||||||
%define CONFIGURE_ARGS $(echo "%%CONFIGURE_ARGS%%")
|
%define CONFIGURE_ARGS $(echo "%%CONFIGURE_ARGS%%")
|
||||||
|
|
||||||
Provides: nginx-unit
|
Provides: nginx-unit
|
||||||
@@ -61,12 +64,16 @@ dynamically via an API.
|
|||||||
./configure \
|
./configure \
|
||||||
%{CONFIGURE_ARGS} \
|
%{CONFIGURE_ARGS} \
|
||||||
--modules=%{_libdir}/unit/debug-modules \
|
--modules=%{_libdir}/unit/debug-modules \
|
||||||
|
--cc-opt="%{CC_OPT}" \
|
||||||
|
--ld-opt="%{LD_OPT}" \
|
||||||
--debug
|
--debug
|
||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
%{__mv} build build-debug
|
%{__mv} build build-debug
|
||||||
./configure \
|
./configure \
|
||||||
%{CONFIGURE_ARGS} \
|
%{CONFIGURE_ARGS} \
|
||||||
--modules=%{_libdir}/unit/modules
|
--modules=%{_libdir}/unit/modules \
|
||||||
|
--cc-opt="%{CC_OPT}" \
|
||||||
|
--ld-opt="%{LD_OPT}"
|
||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|||||||
Reference in New Issue
Block a user