summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-07-29 17:28:26 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-07-29 17:28:26 +0200
commitbe2dac4d1b4805117a4e6221cf772fdaea5d73cf (patch)
treeec2f5ac6ca559f0080b6968420145802a0a9a90a
parentd7c82945b5e724ffa3e4cbe97458cb7c5a811e26 (diff)
contrib/rpm: enable -Werror on --with debug instead of --with testlr/rpm-debug-werror
The test bcond is used to make test suite failure terminate the %check phase. That should generally be done for distro builds. What the distro builds shouldn't do is terminate the build on compiler warnings, because they're fairly likely to appear on toolchain updates without indicating actual bugs. However, currently that's precisely what do we do now. Let's use -Werror on debug builds instead. They are intentionally made more prone to fail (e.g. trip more runtime assertions) because failures can be more rapidly addressed and don't affect distro builds.
-rw-r--r--contrib/fedora/rpm/NetworkManager.spec11
1 files changed, 3 insertions, 8 deletions
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec
index 5063a16b99..113c725a17 100644
--- a/contrib/fedora/rpm/NetworkManager.spec
+++ b/contrib/fedora/rpm/NetworkManager.spec
@@ -611,9 +611,6 @@ Preferably use nmcli instead.
%meson \
-Db_ndebug=false \
--warnlevel 2 \
-%if %{with test}
- --werror \
-%endif
-Dnft=/usr/sbin/nft \
-Diptables=/usr/sbin/iptables \
-Ddhcpcanon=no \
@@ -625,6 +622,7 @@ Preferably use nmcli instead.
-Dcrypto=nss \
%endif
%if %{with debug}
+ --werror \
-Dmore_logging=true \
-Dmore_asserts=10000 \
%else
@@ -766,9 +764,11 @@ autoreconf --install --force
--disable-undefined-sanitizer \
%endif
%if %{with debug}
+ --enable-more-warnings=error \
--enable-more-logging \
--with-more-asserts=10000 \
%else
+ --enable-more-warnings=yes \
--disable-more-logging \
--without-more-asserts \
%endif
@@ -846,11 +846,6 @@ autoreconf --install --force
--with-system-ca-path=/etc/pki/tls/cert.pem \
--with-dbus-sys-dir=%{dbus_sys_dir} \
--with-tests=yes \
-%if %{with test}
- --enable-more-warnings=error \
-%else
- --enable-more-warnings=yes \
-%endif
--with-valgrind=no \
--enable-ifcfg-rh=yes \
--enable-ifupdown=no \