From c3a050bad1b687f2cca0215956aac9af7ff3cf57 Mon Sep 17 00:00:00 2001 From: Jan Vaclav Date: Mon, 29 Apr 2024 11:22:54 +0200 Subject: [PATCH 1/3] build: break autotools configuration to warn about deprecation We are planning on completely dropping Autotools in the future. This breaks the build process with an argument to ignore the deprecation, so that anyone building NM is warned of this change. (cherry picked from commit d115dcec50975343b3f1f8ff437c26113858c701) --- Makefile.am | 1 + NEWS | 5 +++++ configure.ac | 14 ++++++++++++++ contrib/fedora/rpm/NetworkManager.spec | 3 ++- 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 7eb2b9f86..9f3163004 100644 --- a/Makefile.am +++ b/Makefile.am @@ -159,6 +159,7 @@ DISTCHECK_CONFIGURE_FLAGS = \ --enable-ifcfg-rh \ --enable-ifupdown \ --disable-dependency-tracking \ + --disable-autotools-deprecation \ $(NULL) dist-configure-check: diff --git a/NEWS b/NEWS index 05f67f716..baf5a7afd 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,11 @@ subject to change and not guaranteed to be compatible with the later release. USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE! +* Building with autotools is now deprecated and will be completely removed + in the next development cycle. We recommend using meson to build + NetworkManager -- for basic setup, see the CONTRIBUTING.md file. + To ignore this deprecation and still build with Autotools, you can specify + the '--disable-autotools-deprecation' argument when configuring. * Support changing the OpenSSL ciphers for 802.1X authentication via connection property "802-1x.openssl-ciphers". * The reason why a device is unmanaged is now properly set in the diff --git a/configure.ac b/configure.ac index 5a7f25a51..c49e693e0 100644 --- a/configure.ac +++ b/configure.ac @@ -16,6 +16,20 @@ AC_INIT([NetworkManager], [nm_version], [http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager], [NetworkManager]) +deprecation_message() { + echo "Building with Autotools is deprecated; meson is the recommended way to build NetworkManager." + echo "To learn more, see the CONTRIBUTING.md file." + echo "To ignore this, pass '--disable-autotools-deprecation' when configuring." + exit 1 +} + +AC_ARG_ENABLE([autotools-deprecation], + AS_HELP_STRING([--disable-autotools-deprecation], + [Building with autotools is deprecated, passing this argument overrides this error.]), + [ test "$enableval" != "no" && deprecation_message ], + [ deprecation_message ] +) + AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index f55d243dd..9e17053a7 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -918,7 +918,8 @@ autoreconf --install --force --with-resolvconf=no \ --with-netconfig=no \ --with-config-dns-rc-manager-default=%{dns_rc_manager_default} \ - --with-config-logging-backend-default=%{logging_backend_default} + --with-config-logging-backend-default=%{logging_backend_default} \ + --disable-autotools-deprecation %make_build From 17ec5da34abea47fa1adeb7b5c3b2d8ec1fe1de8 Mon Sep 17 00:00:00 2001 From: Jan Vaclav Date: Mon, 6 May 2024 14:42:59 +0200 Subject: [PATCH 2/3] contrib/fedora: update scripts to expect autotools deprecation (cherry picked from commit 7b4acf938cfcdbc129c8280db1cbc57f35f55699) --- contrib/fedora/rpm/build_clean.sh | 1 + contrib/fedora/rpm/configure-for-system.sh | 1 + tools/create-exports-NetworkManager.sh | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/fedora/rpm/build_clean.sh b/contrib/fedora/rpm/build_clean.sh index d06d43414..c1b0f408f 100755 --- a/contrib/fedora/rpm/build_clean.sh +++ b/contrib/fedora/rpm/build_clean.sh @@ -272,6 +272,7 @@ if [[ $NO_DIST != 1 ]]; then \ --with-iptables=/usr/sbin/iptables \ --with-nft=/usr/sbin/nft \ + --disable-autotools-deprecation \ \ || die "Error autogen.sh" if [[ $QUICK == 1 ]]; then diff --git a/contrib/fedora/rpm/configure-for-system.sh b/contrib/fedora/rpm/configure-for-system.sh index acf5eb9c2..1af647d51 100755 --- a/contrib/fedora/rpm/configure-for-system.sh +++ b/contrib/fedora/rpm/configure-for-system.sh @@ -514,6 +514,7 @@ else --with-netconfig=no \ --with-config-dns-rc-manager-default="$P_DNS_RC_MANAGER_DEFAULT" \ --with-config-logging-backend-default="$P_LOGGING_BACKEND_DEFAULT" \ + --disable-autotools-deprecation \ ; fi diff --git a/tools/create-exports-NetworkManager.sh b/tools/create-exports-NetworkManager.sh index ef4b381a6..855d83752 100755 --- a/tools/create-exports-NetworkManager.sh +++ b/tools/create-exports-NetworkManager.sh @@ -26,7 +26,8 @@ _build() { --with-modem-manager-1 \ --with-ofono \ --with-more-asserts \ - --with-more-logging + --with-more-logging \ + --disable-autotools-deprecation make -j20 } From fa747f647838daefda11f211ba9abea685c6f464 Mon Sep 17 00:00:00 2001 From: Jan Vaclav Date: Mon, 6 May 2024 15:03:39 +0200 Subject: [PATCH 3/3] gitlab-ci: ignore autotools deprecation We still need the tests to run on autotools builds too, so we must pass the argument. (cherry picked from commit 5f72b251b19adf22ed602837e69afd1617eeff5e) --- .gitlab-ci.yml | 12 ++++++------ .gitlab-ci/ci.template | 2 +- contrib/scripts/nm-ci-run.sh | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e2a4e171..f1f4ac0f0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,11 +57,11 @@ variables: # # This is done by running `ci-fairy generate-template` and possibly bumping # ".default_tag". - ALPINE_TAG: 'tag-ec0f564800e3' - CENTOS_TAG: 'tag-b114f45d4a4e' - DEBIAN_TAG: 'tag-318ea804326f' - FEDORA_TAG: 'tag-b114f45d4a4e' - UBUNTU_TAG: 'tag-318ea804326f' + ALPINE_TAG: 'tag-ed94fd969369' + CENTOS_TAG: 'tag-dc93a9c129f8' + DEBIAN_TAG: 'tag-3766b6cf1e7d' + FEDORA_TAG: 'tag-dc93a9c129f8' + UBUNTU_TAG: 'tag-3766b6cf1e7d' ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh' CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh' @@ -552,7 +552,7 @@ check-tree: - date '+%Y%m%d-%H%M%S'; git ls-files -z -- 'po/*.po' | xargs -0 -n1 msgfmt -vc - date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-code-format.sh -n - date '+%Y%m%d-%H%M%S'; ci-fairy generate-template && git diff --exit-code - - date '+%Y%m%d-%H%M%S'; ./autogen.sh && [ "$(LANG=C make -C po update-po 2>&1 1>/dev/null | grep -c 'warning:')" = 0 ] + - date '+%Y%m%d-%H%M%S'; ./autogen.sh --disable-autotools-deprecation && [ "$(LANG=C make -C po update-po 2>&1 1>/dev/null | grep -c 'warning:')" = 0 ] pages: stage: deploy diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index f88c0a08a..192b77140 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -211,7 +211,7 @@ check-tree: - date '+%Y%m%d-%H%M%S'; git ls-files -z -- 'po/*.po' | xargs -0 -n1 msgfmt -vc - date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-code-format.sh -n - date '+%Y%m%d-%H%M%S'; ci-fairy generate-template && git diff --exit-code - - date '+%Y%m%d-%H%M%S'; ./autogen.sh && [ "$(LANG=C make -C po update-po 2>&1 1>/dev/null | grep -c 'warning:')" = 0 ] + - date '+%Y%m%d-%H%M%S'; ./autogen.sh --disable-autotools-deprecation && [ "$(LANG=C make -C po update-po 2>&1 1>/dev/null | grep -c 'warning:')" = 0 ] pages: stage: deploy diff --git a/contrib/scripts/nm-ci-run.sh b/contrib/scripts/nm-ci-run.sh index e385ef1e8..162b9da18 100755 --- a/contrib/scripts/nm-ci-run.sh +++ b/contrib/scripts/nm-ci-run.sh @@ -188,6 +188,7 @@ run_autotools() { \ --enable-ifcfg-rh=yes \ --enable-ifupdown=yes \ + --disable-autotools-deprecation \ \ #end