From b018266780f42827a16d6d464ed99e91904db25e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 24 May 2017 13:02:31 +0200 Subject: [PATCH] update spec file from upstream --- NetworkManager.spec | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/NetworkManager.spec b/NetworkManager.spec index 5529be7..3848e7d 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -30,6 +30,8 @@ %global snap %{?snapshot_dot}%{?git_sha_dot} +%global is_devel_build %(printf '%s' '%{real_version}' | sed -n 's/^1\\.\\([0-9]*[13579]\\)\\..*/1/p') + ############################################################################### %bcond_without adsl @@ -40,8 +42,13 @@ %bcond_without ppp %bcond_without nmtui %bcond_without regen_docs +%if 0%{is_devel_build} +%bcond_without debug +%else %bcond_with debug +%endif %bcond_without test +%bcond_with sanitizer ############################################################################### @@ -358,9 +365,19 @@ 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 \ + --enable-more-logging \ --with-more-asserts=10000 \ +%else + --disable-more-logging \ + --without-more-asserts \ %endif --enable-ld-gc \ --with-libaudit=yes-disabled-by-default \ @@ -478,11 +495,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