mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 10:14:41 +00:00
contrib: update "configure-for-system.sh" and start build
"configure-for-system.sh" is supposed to be in sync with NetworkManager.spec. Update for the recent changes. Also add a make/ninja call at the end. Almost always we want to build after the configure.
This commit is contained in:
parent
786ebecee9
commit
004464cfbd
|
@ -30,7 +30,7 @@ vars_with_vals() {
|
|||
}
|
||||
|
||||
usage() {
|
||||
echo "$ $0 [-m|--meson] [-a|--autotools] [-s|--show]"
|
||||
echo "$ $0 [-m|--meson] [-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\`"
|
||||
|
@ -145,6 +145,8 @@ show_cmd() {
|
|||
|
||||
SHOW_CMD=
|
||||
|
||||
P_NOBUILD="${NOBUILD-0}"
|
||||
|
||||
P_DEBUG="${DEBUG-1}"
|
||||
|
||||
P_BUILD_TYPE="${BUILD_TYPE-}"
|
||||
|
@ -331,6 +333,9 @@ while [[ $# -gt 0 ]] ; do
|
|||
usage
|
||||
exit 0
|
||||
;;
|
||||
-B|--no-build)
|
||||
P_NOBUILD=1
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
|
@ -375,8 +380,9 @@ if [ "$P_BUILD_TYPE" == meson ] ; then
|
|||
-Db_ndebug=false \
|
||||
--warnlevel 2 \
|
||||
$(args_enable "$P_TEST" --werror) \
|
||||
-Dnft=/usr/sbin/nft \
|
||||
-Diptables=/usr/sbin/iptables \
|
||||
-Dnft="${D_SBINDIR}/nft" \
|
||||
-Diptables="${D_SBINDIR}/iptables" \
|
||||
-Ddhclient="${D_SBINDIR}/dhclient" \
|
||||
-Ddhcpcanon=no \
|
||||
-Ddhcpcd=no \
|
||||
-Dconfig_dhcp_default="$P_DHCP_DEFAULT" \
|
||||
|
@ -407,13 +413,15 @@ if [ "$P_BUILD_TYPE" == meson ] ; then
|
|||
-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" -Dpppd_plugin_dir="$D_LIBDIR/pppd/$P_PPP_VERSION" -Dppp=true) \
|
||||
$(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) \
|
||||
|
@ -422,7 +430,6 @@ if [ "$P_BUILD_TYPE" == meson ] ; then
|
|||
-Dconfig_dns_rc_manager_default="$P_DNS_RC_MANAGER_DEFAULT" \
|
||||
-Dconfig_logging_backend_default="$P_LOGGING_BACKEND_DEFAULT" \
|
||||
;
|
||||
|
||||
else
|
||||
if ! test -x ./configure ; then
|
||||
if [ -z "$SHOW_CMD" ]; then
|
||||
|
@ -456,19 +463,19 @@ else
|
|||
--with-runstatedir="$D_RUNDIR" \
|
||||
--enable-silent-rules="$(bool_yes "$P_SILENT_RULES")" \
|
||||
--enable-static=no \
|
||||
--with-nft=/usr/sbin/nft \
|
||||
--with-iptables=/usr/sbin/iptables \
|
||||
--with-dhclient=yes \
|
||||
--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 "$( (bool "$P_FEDORA" || test "$P_RHEL" -ge 8) && echo --enable-undefined-sanitizer=yes || echo --enable-undefined-sanitizer=no)" ) \
|
||||
$(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 \
|
||||
"--$(bool_enable "$P_LTO")-lto" \
|
||||
--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")") \
|
||||
|
@ -490,6 +497,7 @@ else
|
|||
--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 \
|
||||
|
@ -497,7 +505,8 @@ else
|
|||
--with-valgrind=no \
|
||||
--enable-ifcfg-rh=yes \
|
||||
--enable-ifupdown=no \
|
||||
$(args_enable "$P_PPP" --with-pppd-plugin-dir="$D_LIBDIR/pppd/$P_PPP_VERSION" --enable-ppp=yes) \
|
||||
$(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) \
|
||||
|
@ -507,3 +516,11 @@ else
|
|||
--with-config-logging-backend-default="$P_LOGGING_BACKEND_DEFAULT" \
|
||||
;
|
||||
fi
|
||||
|
||||
if ! bool "$P_NOBUILD" ; then
|
||||
if [ "$P_BUILD_TYPE" == meson ] ; then
|
||||
$SHOW_CMD ninja -C build
|
||||
else
|
||||
$SHOW_CMD make -j 10
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue