From 1e6e15cd8097cc55011ff6af759c15bbb11d8e36 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 4 Aug 2022 14:50:20 +0200 Subject: [PATCH] contrib/rpm: prefer --with-$OPTION=yes|no over --with/--without and --enable/--disable autotools accepts both --with-$OPTION/--without-$OPTION and --with-$OPTION=yes|no. Consistently use the latter. The advantage is that whether it's enabled becomes an argument, so in a script you could do "--with-$OPTION=$VALUE" Same for enable/disable option. --- contrib/fedora/rpm/NetworkManager.spec | 38 +++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 5063a16b99..29f7362841 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -741,8 +741,8 @@ gtkdocize autoreconf --install --force %configure \ --with-runstatedir=%{_rundir} \ - --disable-silent-rules \ - --disable-static \ + --enable-silent-rules=no \ + --enable-static=no \ --with-nft=/usr/sbin/nft \ --with-iptables=/usr/sbin/iptables \ --with-dhclient=yes \ @@ -757,26 +757,26 @@ autoreconf --install --force %if %{with sanitizer} --with-address-sanitizer=exec \ %if 0%{?fedora} || 0%{?rhel} >= 8 - --enable-undefined-sanitizer \ + --enable-undefined-sanitizer=yes \ %else - --disable-undefined-sanitizer \ + --enable-undefined-sanitizer=no \ %endif %else --with-address-sanitizer=no \ - --disable-undefined-sanitizer \ + --enable-undefined-sanitizer=no \ %endif %if %{with debug} - --enable-more-logging \ + --enable-more-logging=yes \ --with-more-asserts=10000 \ %else - --disable-more-logging \ - --without-more-asserts \ + --enable-more-logging=no \ + --with-more-asserts=0 \ %endif - --enable-ld-gc \ + --enable-ld-gc=yes \ %if %{with lto} - --enable-lto \ + --enable-lto=yes \ %else - --disable-lto \ + --enable-lto=no \ %endif --with-libaudit=yes-disabled-by-default \ %if 0%{?with_modem_manager_1} @@ -815,11 +815,11 @@ autoreconf --install --force --with-nm-cloud-setup=no \ %endif --enable-vala=yes \ - --enable-introspection \ + --enable-introspection=yes \ %if %{with regen_docs} - --enable-gtk-doc \ + --enable-gtk-doc=yes \ %else - --disable-gtk-doc \ + --enable-gtk-doc=no \ %endif %if %{with team} --enable-teamdctl=yes \ @@ -834,11 +834,11 @@ autoreconf --install --force --with-selinux=yes \ --enable-polkit=yes \ --enable-modify-system=yes \ - --enable-concheck \ + --enable-concheck=yes \ %if 0%{?fedora} - --with-libpsl \ + --with-libpsl=yes \ %else - --without-libpsl \ + --with-libpsl=no \ %endif --with-ebpf=%{ebpf_enabled} \ --with-session-tracking=systemd \ @@ -859,9 +859,9 @@ autoreconf --install --force --enable-ppp=yes \ %endif %if %{with firewalld_zone} - --enable-firewalld-zone \ + --enable-firewalld-zone=yes \ %else - --disable-firewalld-zone \ + --enable-firewalld-zone=no \ %endif --with-dist-version=%{version}-%{release} \ %if %{?config_plugins_default_ifcfg_rh}