Compare commits

...

10 Commits

Author SHA1 Message Date
Fernando Fernandez Mancera
99f22526ec merge: branch 'ff/drop_autotools_jobs'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1956
2024-05-31 16:53:50 +02:00
Fernando Fernandez Mancera
f6be3c0cb1 gitlab: move Fedora rawhide and C9S to tier 2
As discussed [1], we are using a lot of resources from freedesktop org.
Let's reduce the number of distributions tested in tier1 to just one.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1549
2024-05-31 16:53:02 +02:00
Fernando Fernandez Mancera
dda6e9515f gitlab: drop the autotools jobs
As we are dropping autotools in 1.50, we can drop the autotools jobs. It
would also help to lower the load on freedesktop pipeline.
2024-05-31 16:53:02 +02:00
Stanislas Faye
44f7dd88af merge: branch 'sf/remove-features-from-rhel10'
rpm: Disable team and ifcfg-rh only in rhel distros and rhel-10+

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1948
2024-05-31 11:34:19 +00:00
Stanislas FAYE
10d4557720 Make team obsoletes in rhel-10 only if NM-team is not enabled in the rpm 2024-05-31 11:33:58 +00:00
Stanislas FAYE
3f3472c971 Use the versions number from which packages are obsoleted directly instead of using global variables 2024-05-31 11:33:58 +00:00
Stanislas FAYE
613f16de51 rpm: Disable team and ifcfg-rh only in rhel distros and rhel-10+
Resolves: https://issues.redhat.com/browse/RHEL-32948
2024-05-31 11:33:58 +00:00
Íñigo Huguet
3bb642697a merge: branch 'ih/conf4sys_meson'
contrib: configure-for-system: use meson by default and allow specifying the build directory

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1947
2024-05-31 07:08:47 +00:00
Íñigo Huguet
714d02697f contrib: configure-for-system: use meson by default
With the deprecation of autotools, use meson by default. For the moment,
it's still possible to build with autotools passing -a/--autotools.

Additionally, as we allow to specify different build directories other
than './build', let's not asume that the user wants to overwrite it
by default. Instead, the script will asume ./build if the user doesn't
specify the build directory, but only if it doesn't exist. If it does,
the user will have to force overwritting it with `--meson ./build`.
2024-05-31 07:08:22 +00:00
Íñigo Huguet
a07627fdcc contrib: configure-for-system: specify meson build dir
Instead of forcing to use ./build directory, let's make the the user
specify what directory he wants to use. This will allow to have multiple
build directories with different configurations as meson is designed to
allow, without having to overwrite the existing build one.
2024-05-31 07:08:22 +00:00
6 changed files with 93 additions and 146 deletions

View File

@@ -59,11 +59,11 @@ variables:
#
# This is done by running `ci-fairy generate-template` and possibly bumping
# ".default_tag".
ALPINE_TAG: 'tag-75ecbb5bcef4'
CENTOS_TAG: 'tag-0de3c2e2d9ed'
DEBIAN_TAG: 'tag-1ccef04c657b'
FEDORA_TAG: 'tag-0de3c2e2d9ed'
UBUNTU_TAG: 'tag-1ccef04c657b'
ALPINE_TAG: 'tag-4cf5505b3b7d'
CENTOS_TAG: 'tag-f78e39f6e045'
DEBIAN_TAG: 'tag-f7bdc50d0819'
FEDORA_TAG: 'tag-f78e39f6e045'
UBUNTU_TAG: 'tag-f7bdc50d0819'
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
@@ -111,19 +111,7 @@ tier1:fedora:40@prep:
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
tier1:fedora:rawhide@prep:
extends:
- .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: 'rawhide'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
tier1:centos:stream9@prep:
tier2:centos:stream9@prep:
extends:
- .fdo.container-build@centos
stage: prep
@@ -134,6 +122,22 @@ tier1:centos:stream9@prep:
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
when: manual
allow_failure: true
tier2:fedora:rawhide@prep:
extends:
- .fdo.container-build@fedora
stage: prep
variables:
GIT_STRATEGY: none
FDO_DISTRIBUTION_VERSION: 'rawhide'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
when: manual
allow_failure: true
tier2:debian:sid@prep:
extends:
@@ -342,13 +346,9 @@ t_fedora:40:
parallel:
matrix:
- NM_TEST_SELECT_RUN:
- autotools+gcc+docs+valgrind
- meson+gcc+docs+valgrind
- autotools+clang
- meson+clang
- rpm+autotools
- rpm+meson
- tarball+autotools
- tarball+meson
- tarball
- subtree
@@ -360,57 +360,31 @@ t_fedora:40:
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
t_fedora:rawhide:
extends:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts
stage: tier1
parallel:
matrix:
- NM_TEST_SELECT_RUN:
- autotools+gcc+docs+valgrind
- meson+gcc+docs+valgrind
- autotools+clang
- meson+clang
- rpm+autotools
- rpm+meson
- tarball+autotools
- tarball+meson
- tarball
- subtree
variables:
FDO_DISTRIBUTION_VERSION: 'rawhide'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "tier1:fedora:rawhide@prep"
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
t_centos:stream9:
extends:
- .build@template
- .fdo.distribution-image@centos
- .nm_artifacts_debug
stage: tier1
parallel:
matrix:
- NM_TEST_SELECT_RUN:
- autotools+gcc+docs+valgrind
- meson+gcc+docs+valgrind
- autotools+clang
- meson+clang
- rpm+autotools
- rpm+meson
- tarball+autotools
- tarball+meson
- tarball
- subtree
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: 'stream9'
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
needs:
- "tier1:centos:stream9@prep"
- "tier2:centos:stream9@prep"
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
t_fedora:rawhide:
extends:
- .build@template
- .fdo.distribution-image@fedora
- .nm_artifacts_debug
stage: tier2
variables:
FDO_DISTRIBUTION_VERSION: 'rawhide'
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
needs:
- "tier2:fedora:rawhide@prep"
rules:
- if: $CI_PIPELINE_SOURCE != 'schedule'
@@ -650,9 +624,9 @@ pages:
when: never
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'main'
dependencies:
- "t_fedora:40: [autotools+gcc+docs+valgrind]"
- "t_fedora:40: [meson+gcc+docs+valgrind]"
needs:
- "t_fedora:40: [autotools+gcc+docs+valgrind]"
- "t_fedora:40: [meson+gcc+docs+valgrind]"
# triage:issues:
# stage: triage

View File

@@ -156,13 +156,9 @@ t_{{distro.name}}:{{version}}:
parallel:
matrix:
- NM_TEST_SELECT_RUN:
- autotools+gcc+docs+valgrind
- meson+gcc+docs+valgrind
- autotools+clang
- meson+clang
- rpm+autotools
- rpm+meson
- tarball+autotools
- tarball+meson
- tarball
- subtree
@@ -237,9 +233,9 @@ pages:
when: never
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'main'
dependencies:
- "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [autotools+gcc+docs+valgrind]"
- "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [meson+gcc+docs+valgrind]"
needs:
- "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [autotools+gcc+docs+valgrind]"
- "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [meson+gcc+docs+valgrind]"
# triage:issues:
# stage: triage

View File

@@ -24,14 +24,17 @@ distributions:
tier: 1
versions:
- '40'
- rawhide
- name: centos
tier: 1
versions:
- 'stream9'
# TIER 2: distribution versions that will or might use the current NM version.
# Run when doing a release.
- name: centos
tier: 2
versions:
- 'stream9'
- name: fedora
tier: 2
versions:
- rawhide
- name: debian
tier: 2
versions:

View File

@@ -57,13 +57,9 @@ check_run_assert() {
# These are the supported $NM_TEST_SELECT_RUN values.
local _CHECK_RUN_LIST=(
autotools+gcc+docs+valgrind
meson+gcc+docs+valgrind
autotools+clang
meson+clang
rpm+autotools
rpm+meson
tarball+autotools
tarball+meson
tarball
subtree
@@ -110,17 +106,13 @@ check_run_clean() {
return 0
}
if check_run_clean autotools+gcc+docs+valgrind ; then
BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
mv build/INST/share/gtk-doc/html "$ARTIFACT_DIR/docs-html"
if check_run_clean meson+gcc+docs+valgrind ; then
BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
mv INST/share/gtk-doc/html "$ARTIFACT_DIR/docs-html"
fi
check_run_clean meson+gcc+docs+valgrind && BUILD_TYPE=meson CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
check_run_clean autotools+clang && BUILD_TYPE=autotools CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
check_run_clean meson+clang && BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
check_run_clean rpm+autotools && test $IS_FEDORA = 1 -o $IS_CENTOS = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -W meson
check_run_clean rpm+meson && test $IS_FEDORA = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
check_run_clean meson+clang && BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
check_run_clean rpm+meson && test $IS_FEDORA = 1 && ./contrib/fedora/rpm/build_clean.sh -g -w crypto_gnutls -w debug -w iwd -w test -w meson
if check_run_clean tarball && [ "$NM_BUILD_TARBALL" = 1 ]; then
SIGN_SOURCE=0 ./contrib/fedora/rpm/build_clean.sh -r
@@ -129,41 +121,7 @@ if check_run_clean tarball && [ "$NM_BUILD_TARBALL" = 1 ]; then
do_clean
fi
if check_run_clean tarball+autotools; then
BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
pushd ./build
# dist & build with autotools
make distcheck -j$(nproc)
# build with meson
DISTSRC="./distsrc-$RANDOM"
mkdir $DISTSRC
tar xvf ./NetworkManager-1*.tar.xz -C $DISTSRC --strip-components=1
pushd $DISTSRC
BUILD_TYPE=meson CC=gcc WITH_DOCS=1 ../../contrib/scripts/nm-ci-run.sh
popd
popd
do_clean
fi
if check_run_clean tarball+meson; then
BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
pushd ./build
# dist with meson/ninja
ninja dist
# build with autotools
DISTSRC="./distsrc-$RANDOM"
mkdir $DISTSRC
tar xvf ./meson-dist/NetworkManager-1*.tar.xz -C $DISTSRC --strip-components=1
pushd $DISTSRC
BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 ../../contrib/scripts/nm-ci-run.sh
popd
rm -rf $DISTSRC
popd
do_clean
fi
check_run_clean tarball+meson && BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
###############################################################################
@@ -202,7 +160,7 @@ fi
if [ "$NM_BUILD_TARBALL" = 1 ]; then
do_clean
if check_run autotools+gcc+docs+valgrind ; then
if check_run meson+gcc+docs+valgrind ; then
mv "$ARTIFACT_DIR/docs-html/" ./
fi
if check_run tarball ; then

View File

@@ -259,11 +259,26 @@ Obsoletes: NetworkManager < %{obsoletes_ifcfg_rh}
Requires: wpa_supplicant >= 1:1.1
%endif
%if 0%{?rhel} && 0%{?rhel} >= 10
%if 0%{without team}
Obsoletes: NetworkManager-team < 1:1.47.5-3
%endif
Obsoletes: NetworkManager-initscripts-ifcfg-rh < 1:1.47.5-3
Obsoletes: NetworkManager-dispatcher-routing-rules < 1:1.47.5-3
%endif
Conflicts: NetworkManager-vpnc < 1:0.7.0.99-1
Conflicts: NetworkManager-openvpn < 1:0.7.0.99-1
Conflicts: NetworkManager-pptp < 1:0.7.0.99-1
Conflicts: NetworkManager-openconnect < 0:0.7.0.99-1
Conflicts: kde-plasma-networkmanagement < 1:0.9-0.49.20110527git.nm09
%if 0%{?rhel} && 0%{?rhel} >= 10
%if 0%{without team}
Conflicts: NetworkManager-team <= 1:1.47.5-3
%endif
Conflicts: NetworkManager-initscripts-ifcfg-rh <= 1:1.47.5-3
Conflicts: NetworkManager-dispatcher-routing-rules <= 1:1.47.5-3
%endif
BuildRequires: make
BuildRequires: gcc

View File

@@ -30,7 +30,7 @@ vars_with_vals() {
}
usage() {
echo "$ $0 [-m|--meson] [-a|--autotools] [-s|--show] [-B|--no-build] [-h|--help]"
echo "$ $0 [-m|--meson <builddir>] [-a|--autotools] [-s|--show] [-B|--no-build] [-h|--help]"
echo ""
echo "Configure NetworkManager in a way that is similar to when building"
echo "RPMs of NetworkManager for Fedora/RHEL. The effect is that \`make install\`"
@@ -149,7 +149,9 @@ P_NOBUILD="${NOBUILD-0}"
P_DEBUG="${DEBUG-1}"
P_BUILD_TYPE="${BUILD_TYPE-}"
P_BUILD_TYPE="${BUILD_TYPE-meson}"
P_MESON_BUILDDIR="${MESON_BUILDDIR-./build}"
[ -n "$MESON_BUILDDIR" ] && P_MESON_BUILDDIR_FORCE=1
P_CFLAGS="${CFLAGS-}"
P_CC="${CC-$((! command -v gcc && command -v clang) &>/dev/null && echo clang || echo gcc)}"
@@ -306,22 +308,15 @@ else
P_CFLAGS="-g -O2 -fexceptions${P_CFLAGS:+ }$P_CFLAGS"
fi
if [ -z "$P_BUILD_TYPE" ] ; then
if [ -d ./build -a ! -f ./configure ] ; then
P_BUILD_TYPE=meson
elif [ ! -d ./build -a -f ./configure ] ; then
P_BUILD_TYPE=autotools
else
P_BUILD_TYPE=autotools
fi
fi
while [[ $# -gt 0 ]] ; do
A="$1"
shift
case "$A" in
--meson|-m)
P_BUILD_TYPE=meson
P_MESON_BUILDDIR="$1"
P_MESON_BUILDDIR_FORCE=1
shift
;;
--autotools|-a)
P_BUILD_TYPE=autotools
@@ -343,11 +338,19 @@ while [[ $# -gt 0 ]] ; do
esac
done
if [ "$P_BUILD_TYPE" = meson -a "$P_MESON_BUILDDIR_FORCE" != 1 ]; then
if [ -d "$P_MESON_BUILDDIR" ]; then
echo "Build directory '$P_MESON_BUILDDIR' chosen by default, but it exists and will be overwritten." \
"If you really want that, pass '--meson \"$P_MESON_BUILDDIR\"'." >&2
exit 1
fi
fi
vars_with_vals
if [ "$P_BUILD_TYPE" == meson ] ; then
MESON_RECONFIGURE=
if test -d "./build/" ; then
if test -d "$P_MESON_BUILDDIR" ; then
MESON_RECONFIGURE="--reconfigure"
fi
@@ -355,7 +358,8 @@ if [ "$P_BUILD_TYPE" == meson ] ; then
env \
CC="$P_CC" \
CFLAGS="$P_CFLAGS" \
meson \
meson setup\
$MESON_RECONFIGURE \
--buildtype=plain \
--prefix="$D_PREFIX" \
--libdir="$D_LIBDIR" \
@@ -372,11 +376,6 @@ if [ "$P_BUILD_TYPE" == meson ] ; then
--sharedstatedir="$D_SHAREDSTATEDIR" \
--wrap-mode=nodownload \
--auto-features=enabled \
\
build \
\
$MESON_RECONFIGURE \
\
-Db_ndebug=false \
--warnlevel 2 \
$(args_enable "$P_TEST" --werror) \
@@ -429,6 +428,8 @@ if [ "$P_BUILD_TYPE" == meson ] ; then
-Dnetconfig=no \
-Dconfig_dns_rc_manager_default="$P_DNS_RC_MANAGER_DEFAULT" \
-Dconfig_logging_backend_default="$P_LOGGING_BACKEND_DEFAULT" \
\
"$P_MESON_BUILDDIR" \
;
else
if ! test -x ./configure ; then
@@ -520,7 +521,7 @@ fi
if ! bool "$P_NOBUILD" ; then
if [ "$P_BUILD_TYPE" == meson ] ; then
$SHOW_CMD ninja -C build
$SHOW_CMD ninja -C "$P_MESON_BUILDDIR"
else
$SHOW_CMD make -j 10
fi