Commit a94403bb authored by Thomas Haller's avatar Thomas Haller

build: merge branch 'build-cleanup-and-disable-ebpf'

- make contrib/rpm similar to master.

- make .gitlab-ci.yml similar to master.

- disable eBPF everywhere. Now it must be explicitly disabled.
  It seems to break unit tests on gitlab-ci, with something that
  looks like a kernel issue. Or maybe ulimit -l is so small?
  Anyway, disable it for now as there are problems with it.
parents eee2eda4 3443a800
Pipeline #30022 passed with stage
in 38 minutes and 29 seconds
......@@ -18,6 +18,8 @@ stages:
.fedora_script: &fedora_script
stage: test
script:
- date '+%Y%m%d-%H%M%S'; uname -a
- date '+%Y%m%d-%H%M%S'; dnf list --installed
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; CI=gitlab BUILD_TYPE=autotools CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
- date '+%Y%m%d-%H%M%S'; rm -rf /tmp/nm-docs-html; mv build/INST/share/gtk-doc/html /tmp/nm-docs-html
- date '+%Y%m%d-%H%M%S'; git clean -fdx ; CI=gitlab BUILD_TYPE=meson CC=gcc WITH_DOCS=1 contrib/scripts/nm-ci-run.sh
......@@ -48,12 +50,17 @@ build_f28:
paths:
- docs-html
build_f_latest:
build_f29:
<<: *fedora_install
image: fedora:latest
image: fedora:29
<<: *fedora_script
build_f_rawhide:
build_f30:
<<: *fedora_install
image: fedora:30
<<: *fedora_script
build_frawhide:
<<: *fedora_install
image: fedora:rawhide
<<: *fedora_script
......
......@@ -529,7 +529,8 @@ esac
AC_ARG_WITH(ebpf,
AS_HELP_STRING([--with-ebpf=yes|no|auto], [Build with eBPF support (default: auto)]),
[], [with_ebpf=auto])
if test "$with_ebpf" = "yes" -o "$with_ebpf" = "auto"; then
# 'auto' means 'false' because there are still some issues.
if test "$with_ebpf" = "yes" ; then
AC_CHECK_HEADER(linux/bpf.h, [have_ebpf=yes], [have_ebpf=no])
else
have_ebpf=no
......
......@@ -97,10 +97,37 @@
%global with_modem_manager_1 0
%endif
%if 0%{?fedora} || 0%{?rhel} <= 7
%if 0%{?fedora} >= 31 || 0%{?rhel} > 7
%global dhcp_default internal
%else
%global dhcp_default dhclient
%endif
%if 0%{?fedora} || 0%{?rhel} > 7
%global logging_backend_default journal
%global dns_rc_manager_default symlink
%else
%global dhcp_default internal
%global logging_backend_default syslog
%global dns_rc_manager_default file
%endif
%if 0%{?rhel}
%global config_plugins_default ifcfg-rh,ibft
%global ibft_enabled yes
%else
%global config_plugins_default ifcfg-rh
%global ibft_enabled no
%endif
%if 0%{?fedora}
# Altough eBPF would be available on Fedora's kernel, it seems
# we often get SELinux denials (rh#1651654). But even aside them,
# bpf(BPF_MAP_CREATE, ...) randomly fails with EPERM. That might
# be related to `ulimit -l`. Anyway, this is not usable at the
# moment.
%global ebpf_enabled no
%else
%global ebpf_enabled no
%endif
###############################################################################
......@@ -137,6 +164,11 @@ Obsoletes: NetworkManager < %{obsoletes_device_plugins}
Obsoletes: NetworkManager < %{obsoletes_ppp_plugin}
Obsoletes: NetworkManager-wimax < 1.2
%if 0%{?rhel} && 0%{?rhel} <= 7
# Kept for RHEL to ensure that wired 802.1x works out of the box
Requires: wpa_supplicant >= 1:1.1
%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
......@@ -256,7 +288,12 @@ Summary: Bluetooth device plugin for NetworkManager
Group: System Environment/Base
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Requires: NetworkManager-wwan = %{epoch}:%{version}-%{release}
%if 0%{?rhel} && 0%{?rhel} <= 7
# No Requires:bluez to prevent it being installed when updating
# to the split NM package
%else
Requires: bluez >= 4.101-5
%endif
Obsoletes: NetworkManager < %{obsoletes_device_plugins}
Obsoletes: NetworkManager-bt
......@@ -272,8 +309,12 @@ Group: System Environment/Base
BuildRequires: teamd-devel
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
Obsoletes: NetworkManager < %{obsoletes_device_plugins}
%if 0%{?fedora} || 0%{?rhel} >= 8
# Team was split from main NM binary between 0.9.10 and 1.0
# We need this Obsoletes in addition to the one above
# (git:3aede801521ef7bff039e6e3f1b3c7b566b4338d).
Obsoletes: NetworkManager < 1.0.0
%endif
%description team
This package contains NetworkManager support for team devices.
......@@ -307,7 +348,12 @@ This package contains NetworkManager support for Wifi and OLPC devices.
Summary: Mobile broadband device plugin for NetworkManager
Group: System Environment/Base
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%if 0%{?rhel} && 0%{?rhel} <= 7
# No Requires:ModemManager to prevent it being installed when updating
# to the split NM package
%else
Requires: ModemManager
%endif
Obsoletes: NetworkManager < %{obsoletes_device_plugins}
%description wwan
......@@ -475,6 +521,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
%build
%if %{with meson}
%meson \
-Db_ndebug=false \
--warnlevel 2 \
%if %{with test}
--werror \
......@@ -545,10 +592,13 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
-Dconcheck=true \
%if 0%{?fedora}
-Dlibpsl=true \
-Debpf=true \
%else
-Dlibpsl=false \
%endif
%if %{ebpf_enabled} != yes
-Debpf=false \
%else
-Debpf=true \
%endif
-Dsession_tracking=systemd \
-Dsuspend_resume=systemd \
......@@ -558,14 +608,20 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
-Dtests=yes \
-Dvalgrind=no \
-Difcfg_rh=true \
%if %{ibft_enabled} != yes
-Dibft=false \
%else
-Dibft=true \
%endif
-Difupdown=false \
%if %{with ppp}
-Dpppd_plugin_dir=%{_libdir}/pppd/%{ppp_version} \
-Dppp=true \
%endif
-Ddist_version=%{version}-%{release} \
-Dconfig_plugins_default='ifcfg-rh' \
-Dconfig_dns_rc_manager_default=symlink \
-Dconfig_logging_backend_default=journal \
-Dconfig_plugins_default=%{config_plugins_default} \
-Dconfig_dns_rc_manager_default=%{dns_rc_manager_default} \
-Dconfig_logging_backend_default=%{logging_backend_default} \
-Djson_validation=true \
%if %{with libnm_glib}
-Dlibnm_glib=true
......@@ -661,11 +717,10 @@ intltoolize --automake --copy --force
--enable-concheck \
%if 0%{?fedora}
--with-libpsl \
--with-ebpf \
%else
--without-libpsl \
--without-ebpf \
%endif
--with-ebpf=%{ebpf_enabled} \
--with-session-tracking=systemd \
--with-suspend-resume=systemd \
--with-systemdsystemunitdir=%{systemd_dir} \
......@@ -679,14 +734,16 @@ intltoolize --automake --copy --force
%endif
--with-valgrind=no \
--enable-ifcfg-rh=yes \
--enable-config-plugin-ibft=%{ibft_enabled} \
--enable-ifupdown=no \
%if %{with ppp}
--with-pppd-plugin-dir=%{_libdir}/pppd/%{ppp_version} \
--enable-ppp=yes \
%endif
--with-dist-version=%{version}-%{release} \
--with-config-plugins-default='ifcfg-rh' \
--with-config-dns-rc-manager-default=symlink \
--with-config-logging-backend-default=journal \
--with-config-plugins-default=%{config_plugins_default} \
--with-config-dns-rc-manager-default=%{dns_rc_manager_default} \
--with-config-logging-backend-default=%{logging_backend_default} \
--enable-json-validation \
%if %{with libnm_glib}
--with-libnm-glib
......@@ -801,7 +858,7 @@ fi
%systemd_postun
%if 0%{?fedora} < 28
%if (0%{?fedora} && 0%{?fedora} < 28) || 0%{?rhel}
%post glib -p /sbin/ldconfig
%postun glib -p /sbin/ldconfig
......
......@@ -98,6 +98,8 @@ run_autotools() {
--enable-tests=yes \
--with-crypto=$_WITH_CRYPTO \
\
--with-ebpf=no \
\
--with-libnm-glib=yes \
--with-iwd=yes \
--with-ofono=yes \
......@@ -167,6 +169,8 @@ run_meson() {
-D crypto=$_WITH_CRYPTO \
-D docs=$_WITH_DOCS \
\
-D ebpf=false \
\
-D libnm_glib=true \
-D iwd=true \
-D ofono=true \
......
......@@ -437,7 +437,8 @@ config_h.set10('HAVE_SELINUX', enable_selinux)
# eBPF support
ebpf_opt = get_option('ebpf')
if ebpf_opt == 'false'
# 'auto' means 'false', because there are still issues.
if ebpf_opt != 'true'
enable_ebpf = false
else
enable_ebpf = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment