summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-02-12 11:39:31 +0100
committerThomas Haller <thaller@redhat.com>2021-02-12 13:35:24 +0100
commite23bafe5d5d1afc187a1466f6acb111db3804c60 (patch)
treef942faf7acc10882215ad6ec8ce883dbb518e744
parent4d66d6c7a195b9d57613d5f47741b5e470b3f2b2 (diff)
downloadNetworkManager-e23bafe5d5d1afc187a1466f6acb111db3804c60.tar.gz
contrib/rpm: revert building "--with test" for RHEL 9
"--with test" does two things: (1) it enables "-Werror" compiler option. We always enable all compiler warnings we care about, but this option makes all warnings fatal. Compiler warnings depend on compiler version and build options. It's hard to build without any compiler warnings, in particular for *future* compiler versions which we don't know yet. It is desirable that a SRPM from yesterday can also be build tomorrow. (2) it fails build if any unit tests fail. We always run all unit tests, but "--with test" makes it fatal. Again, we have many unit tests that interact with the system (that is, make system calls, like creating IP addresses or write files). It is surprisingly hard to get them pass 100% on all the systems we care. For example, on copr a test setup randomly fails during ifr.ifr_flags = IFF_TAP | IFF_NO_PI; nm_utils_ifname_cpy(ifr.ifr_name, TEST_IFNAME); r = ioctl(fd, TUNSETIFF, &ifr); It's not clear why, nor is it at all clear that there is a bug in NetworkManager. Making tests fatal basically means that a build on copr infrastructure fails with a probability from a few percent. Enough to be seriously annoying. Note that on copr we actually build "--with test", because we want to catch these issues. Likewise for our CI builds we explicitly specify "--with test". In general, we build with various build configurations (compiler warnings) and run unit tests on a source package many times. Starting on the developer machine (`make check`), gitlab-ci, copr builds, NetworkManager-ci. If you build an SRPM with such sources, a failure of the unit tests is much more likely a glitch than an actual issue. This is about changing the default if you build a Fedora/RHEL package. That is with the Fedora/RHEL packages that are build in koji/brew. Well, at least usually. In practice, we don't build frequently on non x64_86 archs, so what I said there is less true. But the package build is not there to replace CI/testing. The package build is there to get a (mostly) working binary. Note that RHEL packages anyway go through rpmdiff too, and rpmdiff parses the build log and complain if `make check` fails. This reverts commit e68e5c0a4c36ab6fe7cf4793f77ca741179690ce.
-rw-r--r--contrib/fedora/rpm/NetworkManager.spec4
1 files changed, 0 insertions, 4 deletions
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec
index f9bf4802c1..15fd16def9 100644
--- a/contrib/fedora/rpm/NetworkManager.spec
+++ b/contrib/fedora/rpm/NetworkManager.spec
@@ -55,12 +55,8 @@
%if "x__BCOND_DEFAULT_TEST__" == "x1" || "x__BCOND_DEFAULT_TEST__" == "x0"
%global bcond_default_test __BCOND_DEFAULT_TEST__
%else
-%if 0%{?rhel} >= 9
-%global bcond_default_test 1
-%else
%global bcond_default_test 0
%endif
-%endif
%bcond_with meson
%bcond_without adsl