summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-05-23 19:14:56 +0200
committerThomas Haller <thaller@redhat.com>2017-05-23 22:00:43 +0200
commit07036d731ace134f7764f60c7aa42dafa64d5709 (patch)
treee7412e9d0799f7de29ffa3495164cbff90ccc447 /contrib
parent260fd3e79f8decef7fd85c3ca00f6ec69dbe3678 (diff)
contrib/rpm: add option to build package with sanitizer
Diffstat (limited to 'contrib')
-rw-r--r--contrib/fedora/rpm/NetworkManager.spec16
1 files changed, 12 insertions, 4 deletions
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec
index a867000812..752bb32a6b 100644
--- a/contrib/fedora/rpm/NetworkManager.spec
+++ b/contrib/fedora/rpm/NetworkManager.spec
@@ -51,6 +51,7 @@
%bcond_without regen_docs
%bcond_with debug
%bcond_without test
+%bcond_with sanitizer
###############################################################################
@@ -365,6 +366,13 @@ intltoolize --automake --copy --force
--with-dhcpcd=no \
--with-crypto=nss \
--enable-more-warnings=error \
+%if %{with sanitizer}
+ --enable-address-sanitizer \
+ --enable-undefined-sanitizer \
+%else
+ --disable-address-sanitizer \
+ --disable-undefined-sanitizer \
+%endif
%if %{with debug}
--with-more-logging \
--with-more-asserts=10000 \
@@ -485,11 +493,11 @@ fi
%systemd_postun
-%post glib -p /sbin/ldconfig
-%postun glib -p /sbin/ldconfig
+%post glib -p /sbin/ldconfig
+%postun glib -p /sbin/ldconfig
-%post libnm -p /sbin/ldconfig
-%postun libnm -p /sbin/ldconfig
+%post libnm -p /sbin/ldconfig
+%postun libnm -p /sbin/ldconfig
%files