build: remove autotools configuration from scripts
This commit is contained in:
@@ -60,11 +60,11 @@ variables:
|
|||||||
#
|
#
|
||||||
# This is done by running `ci-fairy generate-template` and possibly bumping
|
# This is done by running `ci-fairy generate-template` and possibly bumping
|
||||||
# ".default_tag".
|
# ".default_tag".
|
||||||
ALPINE_TAG: 'tag-94fd546ecdd9'
|
ALPINE_TAG: 'tag-ee13da0f38c7'
|
||||||
CENTOS_TAG: 'tag-ec274fe113f5'
|
CENTOS_TAG: 'tag-5d3b59c9dd4b'
|
||||||
DEBIAN_TAG: 'tag-cae73089725c'
|
DEBIAN_TAG: 'tag-b274cbc4bddd'
|
||||||
FEDORA_TAG: 'tag-ec274fe113f5'
|
FEDORA_TAG: 'tag-5d3b59c9dd4b'
|
||||||
UBUNTU_TAG: 'tag-cae73089725c'
|
UBUNTU_TAG: 'tag-b274cbc4bddd'
|
||||||
|
|
||||||
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
||||||
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
||||||
@@ -680,7 +680,7 @@ coverity:
|
|||||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "weekly"
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "weekly"
|
||||||
script:
|
script:
|
||||||
- dnf install -y curl
|
- dnf install -y curl
|
||||||
- BUILD_TYPE=meson CC=gcc CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
|
- CC=gcc CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
|
||||||
- cd build
|
- cd build
|
||||||
- ../.gitlab-ci/coverity.sh download
|
- ../.gitlab-ci/coverity.sh download
|
||||||
- cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja
|
- cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja
|
||||||
|
@@ -261,7 +261,7 @@ coverity:
|
|||||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "weekly"
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "weekly"
|
||||||
script:
|
script:
|
||||||
- dnf install -y curl
|
- dnf install -y curl
|
||||||
- BUILD_TYPE=meson CC=gcc CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
|
- CC=gcc CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
|
||||||
- cd build
|
- cd build
|
||||||
- ../.gitlab-ci/coverity.sh download
|
- ../.gitlab-ci/coverity.sh download
|
||||||
- cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja
|
- cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja
|
||||||
|
@@ -107,11 +107,11 @@ check_run_clean() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if check_run_clean meson+gcc+docs+valgrind ; then
|
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
|
CC=gcc WITH_DOCS=1 WITH_VALGRIND=1 contrib/scripts/nm-ci-run.sh
|
||||||
mv INST/share/gtk-doc/html "$ARTIFACT_DIR/docs-html"
|
mv INST/share/gtk-doc/html "$ARTIFACT_DIR/docs-html"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check_run_clean meson+clang && BUILD_TYPE=meson CC=clang WITH_DOCS=0 contrib/scripts/nm-ci-run.sh
|
check_run_clean meson+clang && 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
|
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
|
if check_run_clean tarball && [ "$NM_BUILD_TARBALL" = 1 ]; then
|
||||||
@@ -121,7 +121,7 @@ if check_run_clean tarball && [ "$NM_BUILD_TARBALL" = 1 ]; then
|
|||||||
do_clean
|
do_clean
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check_run_clean tarball+meson && BUILD_TYPE=meson CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
|
check_run_clean tarball+meson && CC=gcc WITH_DOCS=1 CONFIGURE_ONLY=1 contrib/scripts/nm-ci-run.sh
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
@@ -21,8 +21,6 @@ usage() {
|
|||||||
echo " -g|--git: create tarball from current git HEAD (skips make dist)"
|
echo " -g|--git: create tarball from current git HEAD (skips make dist)"
|
||||||
echo " -Q|--quick: only create the distribution tarball, without running checks"
|
echo " -Q|--quick: only create the distribution tarball, without running checks"
|
||||||
echo " -N|--no-dist: skip creating the source tarball if you already did \`make dist\`"
|
echo " -N|--no-dist: skip creating the source tarball if you already did \`make dist\`"
|
||||||
echo " -m|--meson: (default) use meson to create the source tarball"
|
|
||||||
echo " -A|--autotools: use autotools to create the source tarball"
|
|
||||||
echo " -w|--with \$OPTION: pass --with \$OPTION to rpmbuild. For example --with debug"
|
echo " -w|--with \$OPTION: pass --with \$OPTION to rpmbuild. For example --with debug"
|
||||||
echo " -W|--without \$OPTION: pass --without \$OPTION to rpmbuild. For example --without debug"
|
echo " -W|--without \$OPTION: pass --without \$OPTION to rpmbuild. For example --without debug"
|
||||||
echo " -s|--snapshot TEXT: use TEXT as the snapshot version for the new package (overwrites \$NM_BUILD_SNAPSHOT environment)"
|
echo " -s|--snapshot TEXT: use TEXT as the snapshot version for the new package (overwrites \$NM_BUILD_SNAPSHOT environment)"
|
||||||
@@ -99,14 +97,6 @@ while [[ $# -gt 0 ]]; do
|
|||||||
IGNORE_DIRTY=1
|
IGNORE_DIRTY=1
|
||||||
SOURCE_FROM_GIT=1
|
SOURCE_FROM_GIT=1
|
||||||
;;
|
;;
|
||||||
-m|--meson)
|
|
||||||
[ "$USE_AUTOTOOLS" = 1 ] && die "conflicting argument: $A when building with autotools is requested";
|
|
||||||
USE_MESON=1
|
|
||||||
;;
|
|
||||||
-A|--autotools)
|
|
||||||
[ "$USE_MESON" = 1 ] && die "conflicting argument: $A when building with meson is explicitly requested";
|
|
||||||
USE_AUTOTOOLS=1
|
|
||||||
;;
|
|
||||||
-Q|--quick)
|
-Q|--quick)
|
||||||
QUICK=1
|
QUICK=1
|
||||||
;;
|
;;
|
||||||
@@ -203,96 +193,48 @@ get_version_meson() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [[ $NO_DIST != 1 ]]; then
|
if [[ $NO_DIST != 1 ]]; then
|
||||||
if [[ $USE_AUTOTOOLS != 1 ]]; then
|
meson setup "$GITDIR/build" \
|
||||||
meson setup "$GITDIR/build" \
|
--prefix=/usr \
|
||||||
--prefix=/usr \
|
--bindir=/usr/bin \
|
||||||
--bindir=/usr/bin \
|
--sbindir=/usr/sbin \
|
||||||
--sbindir=/usr/sbin \
|
--sysconfdir=/etc \
|
||||||
--sysconfdir=/etc \
|
--datadir=/usr/share \
|
||||||
--datadir=/usr/share \
|
--includedir=/usr/include \
|
||||||
--includedir=/usr/include \
|
--libdir=/usr/lib \
|
||||||
--libdir=/usr/lib \
|
--libexecdir=/usr/libexec \
|
||||||
--libexecdir=/usr/libexec \
|
--localstatedir=/var \
|
||||||
--localstatedir=/var \
|
--sharedstatedir=/var/lib \
|
||||||
--sharedstatedir=/var/lib \
|
--mandir=/usr/share/man \
|
||||||
--mandir=/usr/share/man \
|
--infodir=/usr/share/info \
|
||||||
--infodir=/usr/share/info \
|
-Ddocs=true \
|
||||||
-Ddocs=true \
|
-Dintrospection=true \
|
||||||
-Dintrospection=true \
|
-Difcfg_rh=true \
|
||||||
-Difcfg_rh=true \
|
-Difupdown=true \
|
||||||
-Difupdown=true \
|
-Dconfig_logging_backend_default=syslog \
|
||||||
-Dconfig_logging_backend_default=syslog \
|
-Dconfig_wifi_backend_default=wpa_supplicant \
|
||||||
-Dconfig_wifi_backend_default=wpa_supplicant \
|
-Dlibaudit=yes-disabled-by-default \
|
||||||
-Dlibaudit=yes-disabled-by-default \
|
-Dpolkit=true \
|
||||||
-Dpolkit=true \
|
-Dnm_cloud_setup=true \
|
||||||
-Dnm_cloud_setup=true \
|
-Ddhclient=/usr/sbin/dhclient \
|
||||||
-Ddhclient=/usr/sbin/dhclient \
|
-Dconfig_dhcp_default=internal \
|
||||||
-Dconfig_dhcp_default=internal \
|
-Dconfig_dns_rc_manager_default=auto \
|
||||||
-Dconfig_dns_rc_manager_default=auto \
|
-Diptables=/usr/sbin/iptables \
|
||||||
-Diptables=/usr/sbin/iptables \
|
-Dnft=/usr/bin/nft \
|
||||||
-Dnft=/usr/bin/nft \
|
|| die "Error meson setup"
|
||||||
|| die "Error meson setup"
|
|
||||||
|
|
||||||
VERSION="${VERSION:-$(get_version_meson || die "Could not read $VERSION")}"
|
VERSION="${VERSION:-$(get_version_meson || die "Could not read $VERSION")}"
|
||||||
if [[ $QUICK == 1 ]]; then
|
TEST_FLAG=""
|
||||||
meson dist --allow-dirty -C "$GITDIR/build/" --no-tests || die "Error meson dist"
|
if [[ $QUICK == 1 ]]; then
|
||||||
else
|
TEST_FLAG="--no-tests"
|
||||||
meson dist --allow-dirty -C "$GITDIR/build/" || die "Error meson dist with tests"
|
|
||||||
fi
|
|
||||||
export SOURCE="$(ls -1 "$GITDIR/build/meson-dist/NetworkManager-${VERSION}.tar.xz" 2>/dev/null | head -n1)"
|
|
||||||
else
|
|
||||||
./autogen.sh \
|
|
||||||
--with-runstatedir=/run \
|
|
||||||
--program-prefix= \
|
|
||||||
--prefix=/usr \
|
|
||||||
--exec-prefix=/usr \
|
|
||||||
--bindir=/usr/bin \
|
|
||||||
--sbindir=/usr/sbin \
|
|
||||||
--sysconfdir=/etc \
|
|
||||||
--datadir=/usr/share \
|
|
||||||
--includedir=/usr/include \
|
|
||||||
--libdir=/usr/lib \
|
|
||||||
--libexecdir=/usr/libexec \
|
|
||||||
--localstatedir=/var \
|
|
||||||
--sharedstatedir=/var/lib \
|
|
||||||
--mandir=/usr/share/man \
|
|
||||||
--infodir=/usr/share/info \
|
|
||||||
\
|
|
||||||
--disable-dependency-tracking \
|
|
||||||
--enable-gtk-doc \
|
|
||||||
--enable-introspection \
|
|
||||||
--enable-ifcfg-rh \
|
|
||||||
--enable-ifupdown \
|
|
||||||
--with-config-logging-backend-default=syslog \
|
|
||||||
--with-config-wifi-backend-default=wpa_supplicant \
|
|
||||||
--with-libaudit=yes-disabled-by-default \
|
|
||||||
--enable-polkit=yes \
|
|
||||||
--with-nm-cloud-setup=yes \
|
|
||||||
--with-dhclient=yes \
|
|
||||||
--with-config-dhcp-default=internal \
|
|
||||||
--with-config-dns-rc-manager-default=auto \
|
|
||||||
\
|
|
||||||
--with-iptables=/usr/sbin/iptables \
|
|
||||||
--with-nft=/usr/sbin/nft \
|
|
||||||
--disable-autotools-deprecation \
|
|
||||||
\
|
|
||||||
|| die "Error autogen.sh"
|
|
||||||
if [[ $QUICK == 1 ]]; then
|
|
||||||
make dist -j 7 || die "Error make dist"
|
|
||||||
else
|
|
||||||
make distcheck -j 7 || die "Error make distcheck"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
meson dist --allow-dirty -C "$GITDIR/build/" $TEST_FLAG || die "Error meson dist"
|
||||||
|
export SOURCE="$(ls -1 "$GITDIR/build/meson-dist/NetworkManager-${VERSION}.tar.xz" 2>/dev/null | head -n1)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ADD_WITH_TEST" == 1 ]]; then
|
if [[ "$ADD_WITH_TEST" == 1 ]]; then
|
||||||
WITH_LIST=("${WITH_LIST[@]}" "--with" "test")
|
WITH_LIST=("${WITH_LIST[@]}" "--with" "test")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$USE_AUTOTOOLS" != 1 ]]; then
|
|
||||||
WITH_LIST=("${WITH_LIST[@]}" "--with" "meson")
|
|
||||||
fi
|
|
||||||
|
|
||||||
export SOURCE_FROM_GIT
|
export SOURCE_FROM_GIT
|
||||||
export BUILDTYPE
|
export BUILDTYPE
|
||||||
export NM_RPMBUILD_ARGS="${WITH_LIST[@]}"
|
export NM_RPMBUILD_ARGS="${WITH_LIST[@]}"
|
||||||
|
@@ -30,7 +30,7 @@ vars_with_vals() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "$ $0 [-m|--meson <builddir>] [-a|--autotools] [-s|--show] [-B|--no-build] [-h|--help]"
|
echo "$ $0 [-m|--meson <builddir>] [-s|--show] [-B|--no-build] [-h|--help]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Configure NetworkManager in a way that is similar to when building"
|
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\`"
|
echo "RPMs of NetworkManager for Fedora/RHEL. The effect is that \`make install\`"
|
||||||
@@ -142,7 +142,6 @@ P_NOBUILD="${NOBUILD-0}"
|
|||||||
|
|
||||||
P_DEBUG="${DEBUG-1}"
|
P_DEBUG="${DEBUG-1}"
|
||||||
|
|
||||||
P_BUILD_TYPE="${BUILD_TYPE-meson}"
|
|
||||||
P_MESON_BUILDDIR="${MESON_BUILDDIR-./build}"
|
P_MESON_BUILDDIR="${MESON_BUILDDIR-./build}"
|
||||||
[ -n "$MESON_BUILDDIR" ] && P_MESON_BUILDDIR_FORCE=1
|
[ -n "$MESON_BUILDDIR" ] && P_MESON_BUILDDIR_FORCE=1
|
||||||
P_CFLAGS="${CFLAGS-}"
|
P_CFLAGS="${CFLAGS-}"
|
||||||
@@ -306,14 +305,10 @@ while [[ $# -gt 0 ]] ; do
|
|||||||
shift
|
shift
|
||||||
case "$A" in
|
case "$A" in
|
||||||
--meson|-m)
|
--meson|-m)
|
||||||
P_BUILD_TYPE=meson
|
|
||||||
P_MESON_BUILDDIR="$1"
|
P_MESON_BUILDDIR="$1"
|
||||||
P_MESON_BUILDDIR_FORCE=1
|
P_MESON_BUILDDIR_FORCE=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--autotools|-a)
|
|
||||||
P_BUILD_TYPE=autotools
|
|
||||||
;;
|
|
||||||
-s|--show)
|
-s|--show)
|
||||||
SHOW_CMD=show_cmd
|
SHOW_CMD=show_cmd
|
||||||
;;
|
;;
|
||||||
@@ -331,7 +326,7 @@ while [[ $# -gt 0 ]] ; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$P_BUILD_TYPE" = meson -a "$P_MESON_BUILDDIR_FORCE" != 1 ]; then
|
if [ "$P_MESON_BUILDDIR_FORCE" != 1 ]; then
|
||||||
if [ -d "$P_MESON_BUILDDIR" ]; then
|
if [ -d "$P_MESON_BUILDDIR" ]; then
|
||||||
echo "Build directory '$P_MESON_BUILDDIR' chosen by default, but it exists and will be overwritten." \
|
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
|
"If you really want that, pass '--meson \"$P_MESON_BUILDDIR\"'." >&2
|
||||||
@@ -341,181 +336,89 @@ fi
|
|||||||
|
|
||||||
vars_with_vals
|
vars_with_vals
|
||||||
|
|
||||||
if [ "$P_BUILD_TYPE" == meson ] ; then
|
MESON_RECONFIGURE=
|
||||||
MESON_RECONFIGURE=
|
if test -d "$P_MESON_BUILDDIR" ; then
|
||||||
if test -d "$P_MESON_BUILDDIR" ; then
|
MESON_RECONFIGURE="--reconfigure"
|
||||||
MESON_RECONFIGURE="--reconfigure"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$SHOW_CMD \
|
|
||||||
env \
|
|
||||||
CC="$P_CC" \
|
|
||||||
CFLAGS="$P_CFLAGS" \
|
|
||||||
meson setup\
|
|
||||||
$MESON_RECONFIGURE \
|
|
||||||
--buildtype=plain \
|
|
||||||
--prefix="$D_PREFIX" \
|
|
||||||
--libdir="$D_LIBDIR" \
|
|
||||||
--libexecdir="$D_LIBEXECDIR" \
|
|
||||||
--bindir="$D_BINDIR" \
|
|
||||||
--sbindir="$D_SBINDIR" \
|
|
||||||
--includedir="$D_INCLUDEDIR" \
|
|
||||||
--datadir="$D_DATADIR" \
|
|
||||||
--mandir="$D_MANDIR" \
|
|
||||||
--infodir="$D_INFODIR" \
|
|
||||||
--localedir="$D_DATADIR"/locale \
|
|
||||||
--sysconfdir="$D_SYSCONFDIR" \
|
|
||||||
--localstatedir="$D_LOCALSTATEDIR" \
|
|
||||||
--sharedstatedir="$D_SHAREDSTATEDIR" \
|
|
||||||
--wrap-mode=nodownload \
|
|
||||||
--auto-features=enabled \
|
|
||||||
-Db_ndebug=false \
|
|
||||||
--warnlevel 2 \
|
|
||||||
$(args_enable "$P_TEST" --werror) \
|
|
||||||
-Dnft="${D_SBINDIR}/nft" \
|
|
||||||
-Diptables="${D_SBINDIR}/iptables" \
|
|
||||||
-Ddhclient="${D_SBINDIR}/dhclient" \
|
|
||||||
-Ddhcpcanon=no \
|
|
||||||
-Ddhcpcd=no \
|
|
||||||
-Dconfig_dhcp_default="$P_DHCP_DEFAULT" \
|
|
||||||
"-Dcrypto=$P_CRYPTO" \
|
|
||||||
$(args_enable "$P_DEBUG" -Dmore_logging=true -Dmore_asserts=10000) \
|
|
||||||
$(args_enable "$(bool_not_true "$P_DEBUG")" -Dmore_logging=false -Dmore_asserts=0 ) \
|
|
||||||
-Dld_gc=true \
|
|
||||||
-Db_lto="$(bool_true "$P_LTO")" \
|
|
||||||
-Dlibaudit=yes-disabled-by-default \
|
|
||||||
-Dmodem_manager="$(bool_true "$P_MODEM_MANAGER_1")" \
|
|
||||||
$(args_enable "$P_WIFI" -Dwifi=true -Dwext="$(bool_true "$P_FEDORA")") \
|
|
||||||
$(args_enable "$(bool_not_true "$P_WIFI")" -Dwifi=false ) \
|
|
||||||
-Diwd="$(bool_true "$P_IWD")" \
|
|
||||||
-Dbluez5_dun="$(bool_true "$P_BLUETOOTH")" \
|
|
||||||
-Dnmtui="$(bool_true "$P_NMTUI")" \
|
|
||||||
-Dnm_cloud_setup="$(bool_true "$P_NM_CLOUD_SETUP")" \
|
|
||||||
-Dvapi=true \
|
|
||||||
-Dintrospection=true \
|
|
||||||
-Ddocs="$(bool_true "$P_REGEN_DOCS")" \
|
|
||||||
-Dteamdctl="$(bool_true "$P_TEAM")" \
|
|
||||||
-Dovs="$(bool_true "$P_OVS")" \
|
|
||||||
-Dselinux=true \
|
|
||||||
-Dpolkit=true \
|
|
||||||
-Dconfig_auth_polkit_default=true \
|
|
||||||
-Dmodify_system=true \
|
|
||||||
-Dconcheck=true \
|
|
||||||
-Dlibpsl="$(bool_true "$P_FEDORA")" \
|
|
||||||
-Debpf="$(bool_true "$P_EBPF_ENABLED")" \
|
|
||||||
-Dsession_tracking=systemd \
|
|
||||||
-Dsuspend_resume=systemd \
|
|
||||||
-Dsystemdsystemunitdir=/usr/lib/systemd/system \
|
|
||||||
-Dsystem_ca_path=/etc/pki/tls/cert.pem \
|
|
||||||
-Ddbus_conf_dir="$P_DBUS_SYS_DIR" \
|
|
||||||
-Dtests=yes \
|
|
||||||
-Dvalgrind=no \
|
|
||||||
-Difcfg_rh=true \
|
|
||||||
-Difupdown=false \
|
|
||||||
$(args_enable "$P_PPP" -Dppp=true -Dpppd="$D_SBINDIR/pppd" -Dpppd_plugin_dir="$D_LIBDIR/pppd/$P_PPP_VERSION") \
|
|
||||||
$(args_enable "$(bool_not_true "$P_PPP")" -Dppp=false ) \
|
|
||||||
-Dfirewalld_zone="$(bool_true "$P_FIREWALLD_ZONE}")" \
|
|
||||||
-Ddist_version="$P_VERSION-$P_RELEASE" \
|
|
||||||
$(args_enable "$P_CONFIG_PLUGINS_DEFAULT_IFCFG_RH" -Dconfig_plugins_default=ifcfg-rh) \
|
|
||||||
-Dresolvconf=no \
|
|
||||||
-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
|
|
||||||
if [ -z "$SHOW_CMD" ]; then
|
|
||||||
NOCONFIGURE=yes ./autogen.sh
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
$SHOW_CMD \
|
|
||||||
./configure \
|
|
||||||
--build=x86_64-redhat-linux-gnu \
|
|
||||||
--host=x86_64-redhat-linux-gnu \
|
|
||||||
--program-prefix= \
|
|
||||||
--prefix="$D_PREFIX" \
|
|
||||||
--exec-prefix=/usr \
|
|
||||||
--bindir="$D_BINDIR" \
|
|
||||||
--sbindir="$D_SBINDIR" \
|
|
||||||
--sysconfdir="$D_SYSCONFDIR" \
|
|
||||||
--datadir="$D_DATADIR" \
|
|
||||||
--includedir="$D_INCLUDEDIR" \
|
|
||||||
--libdir="$D_LIBDIR" \
|
|
||||||
--libexecdir="$D_LIBEXECDIR" \
|
|
||||||
--localstatedir="$D_LOCALSTATEDIR" \
|
|
||||||
--sharedstatedir="$D_SHAREDSTATEDIR" \
|
|
||||||
--mandir="$D_MANDIR" \
|
|
||||||
--infodir="$D_INFODIR" \
|
|
||||||
\
|
|
||||||
CC="$P_CC" \
|
|
||||||
CFLAGS="$P_CFLAGS" \
|
|
||||||
\
|
|
||||||
--enable-dependency-tracking=yes \
|
|
||||||
\
|
|
||||||
--with-runstatedir="$D_RUNDIR" \
|
|
||||||
--enable-silent-rules="$(bool_yes "$P_SILENT_RULES")" \
|
|
||||||
--enable-static=no \
|
|
||||||
--with-nft="${D_SBINDIR}/nft" \
|
|
||||||
--with-iptables="${D_SBINDIR}/iptables" \
|
|
||||||
--with-dhclient="${D_SBINDIR}/dhclient" \
|
|
||||||
--with-dhcpcd=no \
|
|
||||||
--with-dhcpcanon=no \
|
|
||||||
--with-config-dhcp-default="$P_DHCP_DEFAULT" \
|
|
||||||
--with-crypto="$P_CRYPTO" \
|
|
||||||
$(args_enable "$P_SANITIZER" --with-address-sanitizer=exec --enable-undefined-sanitizer="$( (bool "$P_FEDORA" || test "$P_RHEL" -ge 8) && echo yes || echo no)" ) \
|
|
||||||
$(args_enable "$(bool_not_true "$P_SANITIZER")" --with-address-sanitizer=no --enable-undefined-sanitizer=no ) \
|
|
||||||
$(args_enable "$P_DEBUG" --enable-more-logging=yes --with-more-asserts=10000) \
|
|
||||||
$(args_enable "$(bool_not_true "$P_DEBUG")" --enable-more-logging=no --with-more-asserts=0 ) \
|
|
||||||
--enable-ld-gc=yes \
|
|
||||||
--enable-lto="$(bool_yes "$P_LTO")" \
|
|
||||||
--with-libaudit=yes-disabled-by-default \
|
|
||||||
--with-modem-manager-1="$(bool_yes "$P_MODEM_MANAGER_1")" \
|
|
||||||
$(args_enable "$P_WIFI" --enable-wifi=yes --with-wext="$(bool_yes "$P_FEDORA")") \
|
|
||||||
$(args_enable "$(bool_not_true "$P_WIFI")" --enable-wifi=no ) \
|
|
||||||
--with-iwd="$(bool_yes "$P_IWD")" \
|
|
||||||
--enable-bluez5-dun="$(bool_yes "$P_BLUETOOTH")" \
|
|
||||||
--with-nmtui="$(bool_yes "$P_NMTUI")" \
|
|
||||||
--with-nm-cloud-setup="$(bool_yes "$P_NM_CLOUD_SETUP")" \
|
|
||||||
--enable-vala=yes \
|
|
||||||
--enable-introspection=yes \
|
|
||||||
--enable-gtk-doc="$(bool_yes "$P_REGEN_DOCS")" \
|
|
||||||
--enable-teamdctl="$(bool_yes "$P_TEAM")" \
|
|
||||||
--enable-ovs="$(bool_yes "$P_OVS")" \
|
|
||||||
--with-selinux=yes \
|
|
||||||
--enable-polkit=yes \
|
|
||||||
--enable-modify-system=yes \
|
|
||||||
--enable-concheck=yes \
|
|
||||||
--with-libpsl="$(bool_yes "$P_FEDORA")" \
|
|
||||||
--with-ebpf="$(bool_yes "$P_EBPF_ENABLED")" \
|
|
||||||
--with-session-tracking=systemd \
|
|
||||||
--with-suspend-resume=systemd \
|
|
||||||
--with-systemdsystemunitdir=/usr/lib/systemd/system \
|
|
||||||
--with-system-ca-path=/etc/pki/tls/cert.pem \
|
|
||||||
--with-dbus-sys-dir="$P_DBUS_SYS_DIR" \
|
|
||||||
--with-tests=yes \
|
|
||||||
--enable-more-warnings="$(bool "$P_TEST" && echo error || echo yes)" \
|
|
||||||
--with-valgrind=no \
|
|
||||||
--enable-ifcfg-rh=yes \
|
|
||||||
--enable-ifupdown=no \
|
|
||||||
$(args_enable "$P_PPP" --enable-ppp=yes --with-pppd="$D_SBINDIR/pppd" --with-pppd-plugin-dir="$D_LIBDIR/pppd/$P_PPP_VERSION") \
|
|
||||||
$(args_enable "$(bool_not_true "$P_PPP")" --enable-ppp=no ) \
|
|
||||||
--enable-firewalld-zone="$(bool_yes "$P_FIREWALLD_ZONE")" \
|
|
||||||
--with-dist-version="$P_VERSION-$P_RELEASE" \
|
|
||||||
$(args_enable "$P_CONFIG_PLUGINS_DEFAULT_IFCFG_RH" --with-config-plugins-default=ifcfg-rh) \
|
|
||||||
--with-resolvconf=no \
|
|
||||||
--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
|
fi
|
||||||
|
|
||||||
|
$SHOW_CMD \
|
||||||
|
env \
|
||||||
|
CC="$P_CC" \
|
||||||
|
CFLAGS="$P_CFLAGS" \
|
||||||
|
meson setup\
|
||||||
|
$MESON_RECONFIGURE \
|
||||||
|
--buildtype=plain \
|
||||||
|
--prefix="$D_PREFIX" \
|
||||||
|
--libdir="$D_LIBDIR" \
|
||||||
|
--libexecdir="$D_LIBEXECDIR" \
|
||||||
|
--bindir="$D_BINDIR" \
|
||||||
|
--sbindir="$D_SBINDIR" \
|
||||||
|
--includedir="$D_INCLUDEDIR" \
|
||||||
|
--datadir="$D_DATADIR" \
|
||||||
|
--mandir="$D_MANDIR" \
|
||||||
|
--infodir="$D_INFODIR" \
|
||||||
|
--localedir="$D_DATADIR"/locale \
|
||||||
|
--sysconfdir="$D_SYSCONFDIR" \
|
||||||
|
--localstatedir="$D_LOCALSTATEDIR" \
|
||||||
|
--sharedstatedir="$D_SHAREDSTATEDIR" \
|
||||||
|
--wrap-mode=nodownload \
|
||||||
|
--auto-features=enabled \
|
||||||
|
-Db_ndebug=false \
|
||||||
|
--warnlevel 2 \
|
||||||
|
$(args_enable "$P_TEST" --werror) \
|
||||||
|
-Dnft="${D_SBINDIR}/nft" \
|
||||||
|
-Diptables="${D_SBINDIR}/iptables" \
|
||||||
|
-Ddhclient="${D_SBINDIR}/dhclient" \
|
||||||
|
-Ddhcpcanon=no \
|
||||||
|
-Ddhcpcd=no \
|
||||||
|
-Dconfig_dhcp_default="$P_DHCP_DEFAULT" \
|
||||||
|
"-Dcrypto=$P_CRYPTO" \
|
||||||
|
$(args_enable "$P_DEBUG" -Dmore_logging=true -Dmore_asserts=10000) \
|
||||||
|
$(args_enable "$(bool_not_true "$P_DEBUG")" -Dmore_logging=false -Dmore_asserts=0 ) \
|
||||||
|
-Dld_gc=true \
|
||||||
|
-Db_lto="$(bool_true "$P_LTO")" \
|
||||||
|
-Dlibaudit=yes-disabled-by-default \
|
||||||
|
-Dmodem_manager="$(bool_true "$P_MODEM_MANAGER_1")" \
|
||||||
|
$(args_enable "$P_WIFI" -Dwifi=true -Dwext="$(bool_true "$P_FEDORA")") \
|
||||||
|
$(args_enable "$(bool_not_true "$P_WIFI")" -Dwifi=false ) \
|
||||||
|
-Diwd="$(bool_true "$P_IWD")" \
|
||||||
|
-Dbluez5_dun="$(bool_true "$P_BLUETOOTH")" \
|
||||||
|
-Dnmtui="$(bool_true "$P_NMTUI")" \
|
||||||
|
-Dnm_cloud_setup="$(bool_true "$P_NM_CLOUD_SETUP")" \
|
||||||
|
-Dvapi=true \
|
||||||
|
-Dintrospection=true \
|
||||||
|
-Ddocs="$(bool_true "$P_REGEN_DOCS")" \
|
||||||
|
-Dteamdctl="$(bool_true "$P_TEAM")" \
|
||||||
|
-Dovs="$(bool_true "$P_OVS")" \
|
||||||
|
-Dselinux=true \
|
||||||
|
-Dpolkit=true \
|
||||||
|
-Dconfig_auth_polkit_default=true \
|
||||||
|
-Dmodify_system=true \
|
||||||
|
-Dconcheck=true \
|
||||||
|
-Dlibpsl="$(bool_true "$P_FEDORA")" \
|
||||||
|
-Debpf="$(bool_true "$P_EBPF_ENABLED")" \
|
||||||
|
-Dsession_tracking=systemd \
|
||||||
|
-Dsuspend_resume=systemd \
|
||||||
|
-Dsystemdsystemunitdir=/usr/lib/systemd/system \
|
||||||
|
-Dsystem_ca_path=/etc/pki/tls/cert.pem \
|
||||||
|
-Ddbus_conf_dir="$P_DBUS_SYS_DIR" \
|
||||||
|
-Dtests=yes \
|
||||||
|
-Dvalgrind=no \
|
||||||
|
-Difcfg_rh=true \
|
||||||
|
-Difupdown=false \
|
||||||
|
$(args_enable "$P_PPP" -Dppp=true -Dpppd="$D_SBINDIR/pppd" -Dpppd_plugin_dir="$D_LIBDIR/pppd/$P_PPP_VERSION") \
|
||||||
|
$(args_enable "$(bool_not_true "$P_PPP")" -Dppp=false ) \
|
||||||
|
-Dfirewalld_zone="$(bool_true "$P_FIREWALLD_ZONE}")" \
|
||||||
|
-Ddist_version="$P_VERSION-$P_RELEASE" \
|
||||||
|
$(args_enable "$P_CONFIG_PLUGINS_DEFAULT_IFCFG_RH" -Dconfig_plugins_default=ifcfg-rh) \
|
||||||
|
-Dresolvconf=no \
|
||||||
|
-Dnetconfig=no \
|
||||||
|
-Dconfig_dns_rc_manager_default="$P_DNS_RC_MANAGER_DEFAULT" \
|
||||||
|
-Dconfig_logging_backend_default="$P_LOGGING_BACKEND_DEFAULT" \
|
||||||
|
\
|
||||||
|
"$P_MESON_BUILDDIR" \
|
||||||
|
;
|
||||||
|
|
||||||
if ! bool "$P_NOBUILD" ; then
|
if ! bool "$P_NOBUILD" ; then
|
||||||
if [ "$P_BUILD_TYPE" == meson ] ; then
|
$SHOW_CMD ninja -C "$P_MESON_BUILDDIR"
|
||||||
$SHOW_CMD ninja -C "$P_MESON_BUILDDIR"
|
|
||||||
else
|
|
||||||
$SHOW_CMD make -j 10
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# Arguments via environment variables:
|
# Arguments via environment variables:
|
||||||
# - CI
|
# - CI
|
||||||
# - CC
|
# - CC
|
||||||
# - BUILD_TYPE
|
|
||||||
# - CFLAGS
|
# - CFLAGS
|
||||||
# - WITH_DOCS
|
# - WITH_DOCS
|
||||||
|
|
||||||
@@ -50,23 +49,13 @@ grep -q '^NAME=.*\(Alpine\)' /etc/os-release && IS_ALPINE=1
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" == meson ]; then
|
|
||||||
_TRUE=true
|
|
||||||
_FALSE=false
|
|
||||||
elif [ "$BUILD_TYPE" == autotools ]; then
|
|
||||||
_TRUE=yes
|
|
||||||
_FALSE=no
|
|
||||||
else
|
|
||||||
die "invalid \$BUILD_TYPE \"$BUILD_TYPE\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
_WITH_CRYPTO="gnutls"
|
_WITH_CRYPTO="gnutls"
|
||||||
_WITH_WERROR=1
|
_WITH_WERROR=1
|
||||||
_WITH_LIBTEAM="$_TRUE"
|
_WITH_LIBTEAM="true"
|
||||||
_WITH_DOCS="$_TRUE"
|
_WITH_DOCS="true"
|
||||||
_WITH_SYSTEMD_LOGIND="$_TRUE"
|
_WITH_SYSTEMD_LOGIND="true"
|
||||||
if [ $IS_ALPINE = 1 ]; then
|
if [ $IS_ALPINE = 1 ]; then
|
||||||
_WITH_SYSTEMD_LOGIND="$_FALSE"
|
_WITH_SYSTEMD_LOGIND="false"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${NMTST_SEED_RAND+x}" ]; then
|
if [ -z "${NMTST_SEED_RAND+x}" ]; then
|
||||||
@@ -92,9 +81,9 @@ fi
|
|||||||
|
|
||||||
if [ "$WITH_DOCS" != "" ]; then
|
if [ "$WITH_DOCS" != "" ]; then
|
||||||
if _is_true "$WITH_DOCS"; then
|
if _is_true "$WITH_DOCS"; then
|
||||||
_WITH_DOCS="$_TRUE"
|
_WITH_DOCS="true"
|
||||||
else
|
else
|
||||||
_WITH_DOCS="$_FALSE"
|
_WITH_DOCS="false"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -149,149 +138,72 @@ _print_test_logs() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
run_autotools() {
|
|
||||||
NOCONFIGURE=1 ./autogen.sh
|
|
||||||
mkdir ./build
|
|
||||||
if [ "$_WITH_WERROR" == 1 ]; then
|
|
||||||
_WITH_WERROR_VAL="error"
|
|
||||||
else
|
|
||||||
_WITH_WERROR_VAL="yes"
|
|
||||||
fi
|
|
||||||
DISABLE_DEPENDENCY_TRACKING=
|
|
||||||
if [ $IS_ALPINE = 1 ]; then
|
|
||||||
DISABLE_DEPENDENCY_TRACKING='--disable-dependency-tracking'
|
|
||||||
fi
|
|
||||||
pushd ./build
|
|
||||||
../configure \
|
|
||||||
--prefix="$PWD/INST" \
|
|
||||||
$DISABLE_DEPENDENCY_TRACKING \
|
|
||||||
\
|
|
||||||
--enable-introspection=$_WITH_DOCS \
|
|
||||||
--enable-gtk-doc=$_WITH_DOCS \
|
|
||||||
--with-systemd-logind=$_WITH_SYSTEMD_LOGIND \
|
|
||||||
--enable-more-warnings="$_WITH_WERROR_VAL" \
|
|
||||||
--enable-tests=yes \
|
|
||||||
--with-crypto=$_WITH_CRYPTO \
|
|
||||||
\
|
|
||||||
--with-ebpf=no \
|
|
||||||
\
|
|
||||||
--with-iwd=yes \
|
|
||||||
--with-ofono=yes \
|
|
||||||
--enable-teamdctl=$_WITH_LIBTEAM \
|
|
||||||
\
|
|
||||||
--with-dhcpcanon=yes \
|
|
||||||
--with-dhcpcd=yes \
|
|
||||||
--with-dhclient=yes \
|
|
||||||
\
|
|
||||||
--with-netconfig=/bin/nowhere/netconfig \
|
|
||||||
--with-resolvconf=/bin/nowhere/resolvconf \
|
|
||||||
\
|
|
||||||
--enable-ifcfg-rh=yes \
|
|
||||||
--enable-ifupdown=yes \
|
|
||||||
--disable-autotools-deprecation \
|
|
||||||
\
|
|
||||||
#end
|
|
||||||
|
|
||||||
if [ "$CONFIGURE_ONLY" != 1 ]; then
|
|
||||||
make -j 6
|
|
||||||
make install
|
|
||||||
|
|
||||||
export NM_TEST_CLIENT_CHECK_L10N=1
|
|
||||||
|
|
||||||
if ! make check -j 6 -k ; then
|
|
||||||
_print_test_logs "first-test"
|
|
||||||
echo ">>>> RUN SECOND TEST (start)"
|
|
||||||
NMTST_DEBUG="debug,TRACE,no-expect-message" make check -k || :
|
|
||||||
echo ">>>> RUN SECOND TEST (done)"
|
|
||||||
_print_test_logs "second-test"
|
|
||||||
die "autotools test failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if _with_valgrind; then
|
|
||||||
if ! NMTST_USE_VALGRIND=1 make check -j 3 -k ; then
|
|
||||||
_print_test_logs "(valgrind test)"
|
|
||||||
die "autotools+valgrind test failed"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
run_meson() {
|
if [ "$_WITH_WERROR" == 1 ]; then
|
||||||
if [ "$_WITH_WERROR" == 1 ]; then
|
_WITH_WERROR_VAL="--werror"
|
||||||
_WITH_WERROR_VAL="--werror"
|
else
|
||||||
else
|
_WITH_WERROR_VAL=""
|
||||||
_WITH_WERROR_VAL=""
|
fi
|
||||||
|
|
||||||
|
meson setup build \
|
||||||
|
\
|
||||||
|
-Dprefix="$PWD/INST" \
|
||||||
|
\
|
||||||
|
--warnlevel 2 \
|
||||||
|
$_WITH_WERROR_VAL \
|
||||||
|
\
|
||||||
|
-D ld_gc=false \
|
||||||
|
-D session_tracking=no \
|
||||||
|
-D systemdsystemunitdir=no \
|
||||||
|
-D systemd_journal=false \
|
||||||
|
-D selinux=false \
|
||||||
|
-D libaudit=no \
|
||||||
|
-D libpsl=false \
|
||||||
|
-D vapi=false \
|
||||||
|
-D introspection=$_WITH_DOCS \
|
||||||
|
-D qt=false \
|
||||||
|
-D crypto=$_WITH_CRYPTO \
|
||||||
|
-D docs=$_WITH_DOCS \
|
||||||
|
\
|
||||||
|
-D ebpf=false \
|
||||||
|
\
|
||||||
|
-D iwd=true \
|
||||||
|
-D ofono=true \
|
||||||
|
-D teamdctl=$_WITH_LIBTEAM \
|
||||||
|
\
|
||||||
|
-D dhclient=/bin/nowhere/dhclient \
|
||||||
|
-D dhcpcanon=/bin/nowhere/dhcpcanon \
|
||||||
|
-D dhcpcd=/bin/nowhere/dhcpd \
|
||||||
|
\
|
||||||
|
-D netconfig=/bin/nowhere/netconfig \
|
||||||
|
-D resolvconf=/bin/nowhere/resolvconf \
|
||||||
|
\
|
||||||
|
-D ifcfg_rh=false \
|
||||||
|
-D ifupdown=true \
|
||||||
|
\
|
||||||
|
#end
|
||||||
|
|
||||||
|
export NM_TEST_CLIENT_CHECK_L10N=1
|
||||||
|
|
||||||
|
if [ "$CONFIGURE_ONLY" != 1 ]; then
|
||||||
|
ninja -C build -v
|
||||||
|
ninja -C build install
|
||||||
|
|
||||||
|
if ! meson test -C build -v --print-errorlogs ; then
|
||||||
|
echo ">>>> RUN SECOND TEST (start)"
|
||||||
|
NMTST_DEBUG="debug,TRACE,no-expect-message" \
|
||||||
|
meson test -C build -v --print-errorlogs || :
|
||||||
|
echo ">>>> RUN SECOND TEST (done)"
|
||||||
|
die "meson test failed"
|
||||||
fi
|
fi
|
||||||
meson setup build \
|
|
||||||
\
|
|
||||||
-Dprefix="$PWD/INST" \
|
|
||||||
\
|
|
||||||
--warnlevel 2 \
|
|
||||||
$_WITH_WERROR_VAL \
|
|
||||||
\
|
|
||||||
-D ld_gc=false \
|
|
||||||
-D session_tracking=no \
|
|
||||||
-D systemdsystemunitdir=no \
|
|
||||||
-D systemd_journal=false \
|
|
||||||
-D selinux=false \
|
|
||||||
-D libaudit=no \
|
|
||||||
-D libpsl=false \
|
|
||||||
-D vapi=false \
|
|
||||||
-D introspection=$_WITH_DOCS \
|
|
||||||
-D qt=false \
|
|
||||||
-D crypto=$_WITH_CRYPTO \
|
|
||||||
-D docs=$_WITH_DOCS \
|
|
||||||
\
|
|
||||||
-D ebpf=false \
|
|
||||||
\
|
|
||||||
-D iwd=true \
|
|
||||||
-D ofono=true \
|
|
||||||
-D teamdctl=$_WITH_LIBTEAM \
|
|
||||||
\
|
|
||||||
-D dhclient=/bin/nowhere/dhclient \
|
|
||||||
-D dhcpcanon=/bin/nowhere/dhcpcanon \
|
|
||||||
-D dhcpcd=/bin/nowhere/dhcpd \
|
|
||||||
\
|
|
||||||
-D netconfig=/bin/nowhere/netconfig \
|
|
||||||
-D resolvconf=/bin/nowhere/resolvconf \
|
|
||||||
\
|
|
||||||
-D ifcfg_rh=false \
|
|
||||||
-D ifupdown=true \
|
|
||||||
\
|
|
||||||
#end
|
|
||||||
|
|
||||||
export NM_TEST_CLIENT_CHECK_L10N=1
|
if _with_valgrind; then
|
||||||
|
if ! NMTST_USE_VALGRIND=1 meson test -C build -v --print-errorlogs ; then
|
||||||
if [ "$CONFIGURE_ONLY" != 1 ]; then
|
_print_test_logs "(valgrind test)"
|
||||||
ninja -C build -v
|
die "meson+valgrind test failed"
|
||||||
ninja -C build install
|
|
||||||
|
|
||||||
if ! meson test -C build -v --print-errorlogs ; then
|
|
||||||
echo ">>>> RUN SECOND TEST (start)"
|
|
||||||
NMTST_DEBUG="debug,TRACE,no-expect-message" \
|
|
||||||
meson test -C build -v --print-errorlogs || :
|
|
||||||
echo ">>>> RUN SECOND TEST (done)"
|
|
||||||
die "meson test failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if _with_valgrind; then
|
|
||||||
if ! NMTST_USE_VALGRIND=1 meson test -C build -v --print-errorlogs ; then
|
|
||||||
_print_test_logs "(valgrind test)"
|
|
||||||
die "meson+valgrind test failed"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" == autotools ]; then
|
|
||||||
run_autotools
|
|
||||||
elif [ "$BUILD_TYPE" == meson ]; then
|
|
||||||
run_meson
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$USE_CCACHE" = 1 ]; then
|
if [ "$USE_CCACHE" = 1 ]; then
|
||||||
|
@@ -13,24 +13,6 @@ die() {
|
|||||||
# plugins. Note that this depends on how NetworkManager and
|
# plugins. Note that this depends on how NetworkManager and
|
||||||
# the plugins are build. For example, compiling without
|
# the plugins are build. For example, compiling without
|
||||||
# --with-more-asserts will yield less symbols.
|
# --with-more-asserts will yield less symbols.
|
||||||
#
|
|
||||||
# _build re-builds NetworkManager with relevant compile time
|
|
||||||
# options to yield the most symbols.
|
|
||||||
_build() {
|
|
||||||
git clean -fdx
|
|
||||||
./autogen.sh --enable-ld-gc \
|
|
||||||
--enable-ifcfg-rh \
|
|
||||||
--enable-ifupdown \
|
|
||||||
--enable-teamdctl \
|
|
||||||
--enable-wifi \
|
|
||||||
--with-modem-manager-1 \
|
|
||||||
--with-ofono \
|
|
||||||
--with-more-asserts \
|
|
||||||
--with-more-logging \
|
|
||||||
--disable-autotools-deprecation
|
|
||||||
make -j20
|
|
||||||
}
|
|
||||||
|
|
||||||
_sort() {
|
_sort() {
|
||||||
LANG=C sort -u
|
LANG=C sort -u
|
||||||
}
|
}
|
||||||
@@ -75,16 +57,6 @@ pretty() {
|
|||||||
sed 's/.*/\t&;/'
|
sed 's/.*/\t&;/'
|
||||||
}
|
}
|
||||||
|
|
||||||
do_build() {
|
|
||||||
do_update
|
|
||||||
make
|
|
||||||
}
|
|
||||||
|
|
||||||
do_rebuild() {
|
|
||||||
_build
|
|
||||||
do_build
|
|
||||||
}
|
|
||||||
|
|
||||||
do_update() {
|
do_update() {
|
||||||
do_generate > ./src/core/NetworkManager.ver
|
do_generate > ./src/core/NetworkManager.ver
|
||||||
}
|
}
|
||||||
@@ -117,14 +89,6 @@ EOF
|
|||||||
test -f ./src/core/${libs}libNetworkManager.a || die "must be called from NetworkManager top build dir after building the tree"
|
test -f ./src/core/${libs}libNetworkManager.a || die "must be called from NetworkManager top build dir after building the tree"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
rebuild)
|
|
||||||
[ -n "$from_meson" ] && die "can't do a build when called from meson"
|
|
||||||
do_rebuild
|
|
||||||
;;
|
|
||||||
build)
|
|
||||||
[ -n "$from_meson" ] && die "can't do a build when called from meson"
|
|
||||||
do_build
|
|
||||||
;;
|
|
||||||
--called-from-build)
|
--called-from-build)
|
||||||
if test -z "${NM_BUILD_NO_CREATE_EXPORTS+x}"; then
|
if test -z "${NM_BUILD_NO_CREATE_EXPORTS+x}"; then
|
||||||
do_update
|
do_update
|
||||||
|
@@ -4,11 +4,6 @@ set -ex
|
|||||||
|
|
||||||
cd /NetworkManager
|
cd /NetworkManager
|
||||||
|
|
||||||
if [ -f ./config.log ] ; then
|
meson install -C build
|
||||||
make -j 5 install
|
|
||||||
else
|
|
||||||
meson install -C build
|
|
||||||
fi
|
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl restart NetworkManager.service
|
systemctl restart NetworkManager.service
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
alias m="make -j 8"
|
|
||||||
alias n="ninja -C build"
|
alias n="ninja -C build"
|
||||||
|
|
||||||
alias l='ls -l --color=auto'
|
alias l='ls -l --color=auto'
|
||||||
|
@@ -229,7 +229,6 @@ RUN dnf install -y \\
|
|||||||
libtool \\
|
libtool \\
|
||||||
libubsan \\
|
libubsan \\
|
||||||
libuuid-devel \\
|
libuuid-devel \\
|
||||||
make \\
|
|
||||||
meson \\
|
meson \\
|
||||||
mlocate \\
|
mlocate \\
|
||||||
mobile-broadband-provider-info-devel \\
|
mobile-broadband-provider-info-devel \\
|
||||||
|
@@ -35,9 +35,7 @@ usage() {
|
|||||||
echo " the automatism to always launch a D-Bus session"
|
echo " the automatism to always launch a D-Bus session"
|
||||||
echo " --no-launch-dbus|-D: prevent launching a D-Bus session"
|
echo " --no-launch-dbus|-D: prevent launching a D-Bus session"
|
||||||
echo " --no-libtool: when running with valgrind, the script tries automatically to"
|
echo " --no-libtool: when running with valgrind, the script tries automatically to"
|
||||||
echo " use libtool as necessary. This disables libtool usage"
|
echo " use libtool as necessary. This disables libtool usage"
|
||||||
echo " --make-first|-m: before running the test, make it (only works with autotools build)"
|
|
||||||
echo " --no-make-first|-M: disable --make-first option"
|
|
||||||
echo " --valgrind|-v: run under valgrind"
|
echo " --valgrind|-v: run under valgrind"
|
||||||
echo " --no-valgrind|-V: disable running under valgrind (overrides NMTST_USE_VALGRIND=1)"
|
echo " --no-valgrind|-V: disable running under valgrind (overrides NMTST_USE_VALGRIND=1)"
|
||||||
echo " -d: set NMTST_DEBUG=d"
|
echo " -d: set NMTST_DEBUG=d"
|
||||||
@@ -126,8 +124,6 @@ if [ "$CALLED_FROM_MAKE" == 1 ]; then
|
|||||||
NMTST_LAUNCH_DBUS=0
|
NMTST_LAUNCH_DBUS=0
|
||||||
fi
|
fi
|
||||||
TEST="$1"; shift
|
TEST="$1"; shift
|
||||||
NMTST_MAKE_FIRST=0
|
|
||||||
|
|
||||||
TEST_ARGV=("$@")
|
TEST_ARGV=("$@")
|
||||||
else
|
else
|
||||||
if [[ -z "${NMTST_USE_VALGRIND+x}" ]]; then
|
if [[ -z "${NMTST_USE_VALGRIND+x}" ]]; then
|
||||||
@@ -162,14 +158,6 @@ else
|
|||||||
NMTST_LIBTOOL=()
|
NMTST_LIBTOOL=()
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--make-first|-m)
|
|
||||||
NMTST_MAKE_FIRST=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--no-make-first|-M)
|
|
||||||
NMTST_MAKE_FIRST=0
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
"--valgrind"|-v)
|
"--valgrind"|-v)
|
||||||
NMTST_USE_VALGRIND=1
|
NMTST_USE_VALGRIND=1
|
||||||
shift;
|
shift;
|
||||||
@@ -235,14 +223,6 @@ fi
|
|||||||
|
|
||||||
[ -n "$TEST" ] || die "Missing test name. Specify it on the command line."
|
[ -n "$TEST" ] || die "Missing test name. Specify it on the command line."
|
||||||
|
|
||||||
if _is_true "$NMTST_MAKE_FIRST" 0; then
|
|
||||||
git_dir="$(readlink -f "$(git rev-parse --show-toplevel)")"
|
|
||||||
rel_path="$(realpath --relative-to="$git_dir" -m "$TEST" 2>/dev/null)" || die "cannot resolve test-name \"$TEST\". Did you call the script properly?"
|
|
||||||
cd "$git_dir"
|
|
||||||
make -j5 "$rel_path" || die "make of $TEST failed ($git_dir / $rel_path)"
|
|
||||||
cd - 1>/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -x "$TEST" ] || die "Test \"$TEST\" does not exist"
|
[ -x "$TEST" ] || die "Test \"$TEST\" does not exist"
|
||||||
TEST_PATH="$(readlink -f "$(dirname "$TEST")")"
|
TEST_PATH="$(readlink -f "$(dirname "$TEST")")"
|
||||||
TEST_NAME="${TEST##*/}"
|
TEST_NAME="${TEST##*/}"
|
||||||
|
@@ -1,56 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
die() {
|
|
||||||
echo "$@"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ "x$(LANG=C git clean -ndx)" != x ]]; then
|
|
||||||
die "The working directory is not clean. Refuse to run. Try \`git clean -dx -n\`"
|
|
||||||
fi
|
|
||||||
if [[ "x$(git status --porcelain)" != x ]]; then
|
|
||||||
die "The working directory has local changes. Refuse to run. Try \`git reset --hard\`"
|
|
||||||
fi
|
|
||||||
|
|
||||||
build_out_of_tree() {
|
|
||||||
local TARGET="$1"
|
|
||||||
local C="$2"
|
|
||||||
local M="$3"
|
|
||||||
(
|
|
||||||
git clean -fdx || return 1
|
|
||||||
NOCONFIGURE=x ./autogen.sh || return 1
|
|
||||||
mkdir -p x/y || return 1
|
|
||||||
cd x/y || return 1
|
|
||||||
../../configure $C $NMTST_CONFIGURE || return 1
|
|
||||||
make $TARGET $M $NMTST_MAKE || return 1
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
TARGETS=("$@")
|
|
||||||
if [ "${#TARGETS}" -lt 1 ]; then
|
|
||||||
TARGETS=(
|
|
||||||
dispatcher/nm-dispatcher
|
|
||||||
src/core/NetworkManager
|
|
||||||
src/core/dhcp/nm-dhcp-helper
|
|
||||||
src/core/ndisc/tests/test-ndisc-linux
|
|
||||||
src/core/platform/tests/monitor
|
|
||||||
src/nm-online/nm-online
|
|
||||||
src/nmcli/nmcli
|
|
||||||
src/nmtui/nmtui
|
|
||||||
$(git grep -h '\.l\?a\>' Makefile.am | sed 's/[a-zA-Z.0-9_-/]\+/\n\0\n/g' | sort -u | grep '\.l\?a$')
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
cd "$(dirname "$(readlink -f "$0")")/.."
|
|
||||||
|
|
||||||
IDX=($(seq 0 $((${#TARGETS[@]} - 1))))
|
|
||||||
IDX=($(printf '%s\n' "${IDX[@]}" | sort -R))
|
|
||||||
for idx in "${IDX[@]}"; do
|
|
||||||
TARGET="${TARGETS[$idx]}"
|
|
||||||
echo "### $idx: TARGET=$TARGET"
|
|
||||||
build_out_of_tree "$TARGET" "--enable-gtk-doc" "-j 5"
|
|
||||||
done
|
|
Reference in New Issue
Block a user