networkmanager: switch to meson

- Switch to meson build-system
- Removed 0003-install-firewalld-to-var-libdir-rather-than-hardcod-.patch
  nm-shared.xml gets installed into /usr/lib/firewalld/zones where also
  firewalld installs its xml files. Not 100% sure this is as it was
  before but it seams to be consistent with firewalld.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Adrian Freihofer
2022-03-02 21:05:47 +01:00
committed by Khem Raj
parent 3b4fe17edb
commit b5a5ffb033
5 changed files with 71 additions and 151 deletions
@@ -1,22 +0,0 @@
From 9bcf4c81a559d1e7deac47b2e510d7f1e5837a02 Mon Sep 17 00:00:00 2001
From: Pablo Saavedra <psaavedra@igalia.com>
Date: Tue, 13 Mar 2018 17:36:20 +0100
Subject: [PATCH] Fixed configure.ac: Fix pkgconfig sysroot locations
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 65ceffb..ad4b0fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -561,7 +561,7 @@ if test "$have_jansson" = "yes"; then
AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled])
AC_CHECK_TOOLS(READELF, [eu-readelf readelf])
- JANSSON_LIBDIR=`$PKG_CONFIG --variable=libdir jansson`
+ JANSSON_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}`$PKG_CONFIG --variable=libdir jansson`
JANSSON_SONAME=`$READELF -d $JANSSON_LIBDIR/libjansson.so |sed -n 's/.*SONAME.*\[[\([^]]*\)]]/\1/p'`
if test "$JANSSON_SONAME" = ""; then
@@ -0,0 +1,27 @@
From 3894ddf5f677a42ed01d676b68e25a414fd8a0ce Mon Sep 17 00:00:00 2001
From: Adrian Freihofer <adrian.freihofer@siemens.com>
Date: Sun, 29 Aug 2021 15:50:35 +0200
Subject: [PATCH] do-not-ask-host-for-ifcfg-defaults
---
meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 3c4be61509..8833c62fa3 100644
--- a/meson.build
+++ b/meson.build
@@ -304,8 +304,8 @@ else
distro = 'unknown'
endif
-enable_ifcfg_rh = get_option('ifcfg_rh') or (distro == 'redhat')
-enable_ifupdown = get_option('ifupdown') or (distro == 'debian')
+enable_ifcfg_rh = get_option('ifcfg_rh')
+enable_ifupdown = get_option('ifupdown')
config_plugins_default = get_option('config_plugins_default')
if config_plugins_default == ''
--
2.31.1
@@ -1,60 +0,0 @@
From d0dead0478a070b96f37bd3b310443eaa8c93a25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
Date: Mon, 5 Jul 2021 00:42:23 +0200
Subject: [PATCH] Do not create settings settings/property documentation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
It was tried to get this work by adding python3-pygobject-native to DEPENDS but
compile could not find (configure passed) python module gi.
Anyway it is not necessary for us to have the settings/property docs.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Vinicius Aquino <voa.aquino@gmail.com>
---
Makefile.am | 5 -----
configure.ac | 5 -----
2 files changed, 10 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 5a62070..3d0ebcd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1860,15 +1860,10 @@ src/libnm-client-impl/libnm.typelib: src/libnm-client-impl/libnm.gir
INTROSPECTION_GIRS += src/libnm-client-impl/NM-1.0.gir
libnm_noinst_data = \
- src/nmcli/generate-docs-nm-settings-nmcli.xml \
- man/nm-settings-docs-dbus.xml \
- man/nm-settings-docs-nmcli.xml \
src/libnm-client-impl/nm-property-infos-dbus.xml \
src/libnm-client-impl/nm-property-infos-ifcfg-rh.xml \
src/libnm-client-impl/nm-property-infos-keyfile.xml \
src/libnm-client-impl/nm-property-infos-nmcli.xml \
- src/libnm-client-impl/nm-settings-docs-gir.xml \
- src/libnmc-setting/settings-docs-input.xml \
$(NULL)
noinst_DATA += $(libnm_noinst_data)
diff --git a/configure.ac b/configure.ac
index 8fe23de..dc24850 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1258,11 +1258,6 @@ GTK_DOC_CHECK(1.0)
# check if we can build setting property documentation
build_docs=no
if test -n "$INTROSPECTION_MAKEFILE"; then
- # If g-i is installed we know we have python, but we might not have pygobject
- if ! "$PYTHON" -c 'from gi.repository import GObject' > /dev/null 2>&1; then
- AC_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)])
- fi
-
AC_PATH_PROG(PERL, perl)
if test -z "$PERL"; then
AC_MSG_ERROR([--enable-introspection requires perl])
--
2.31.1
@@ -1,30 +0,0 @@
From 6388b16b93ba805f8877a94f47509f701250812f Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 6 Jul 2020 19:33:54 -0700
Subject: [PATCH] install firewalld to var-libdir rather than hardcod lib
The oe install firewalld (split packages) to ${libdir}/firewalld/zones
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 358b01a..5745339 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4778,7 +4778,7 @@ data/server.conf: $(srcdir)/data/server.conf.in
$(AM_V_GEN) $(data_edit) $< >$@
if WITH_FIREWALLD_ZONE
-firewalldzonedir = $(prefix)/lib/firewalld/zones
+firewalldzonedir = $(libdir)/firewalld/zones
firewalldzone_DATA = data/nm-shared.xml
endif
--
2.21.0
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
"
DEPENDS = " \
coreutils-native \
intltool-native \
libxslt-native \
libnl \
@@ -16,32 +17,37 @@ DEPENDS = " \
libndp \
libnewt \
curl \
dbus \
"
inherit gnomebase gettext update-rc.d systemd vala gobject-introspection gtk-doc update-alternatives upstream-version-is-even
GNOMEBASEBUILDCLASS = "meson"
inherit gnomebase gettext update-rc.d systemd gobject-introspection gtk-doc update-alternatives upstream-version-is-even
SRC_URI = " \
${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \
file://${BPN}.initd \
file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
file://0002-Do-not-create-settings-settings-property-documentati.patch \
file://0003-install-firewalld-to-var-libdir-rather-than-hardcod-.patch \
file://0001-do-not-ask-host-for-ifcfg-defaults.patch \
"
SRC_URI[sha256sum] = "faa389c9e9ca78243cfab4a8bed6db132f82e5b5e66bb9d44af93379d1348398"
S = "${WORKDIR}/NetworkManager-${PV}"
EXTRA_OECONF = " \
--disable-ifcfg-rh \
--disable-more-warnings \
--with-iptables=${sbindir}/iptables \
--with-tests \
--with-nmtui=yes \
--with-udev-dir=${nonarch_base_libdir}/udev \
--with-dhclient=no \
--with-dhcpcd=no \
--with-dhcpcanon=no \
--with-netconfig=no \
# ['auto', 'symlink', 'file', 'netconfig', 'resolvconf']
NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT ??= "auto"
# ['dhcpcanon', 'dhclient', 'dhcpcd', 'internal', 'nettools']
NETWORKMANAGER_DHCP_DEFAULT ??= "internal"
EXTRA_OEMESON = "\
-Difcfg_rh=false \
-Dtests=yes \
-Dnmtui=true \
-Dudev_dir=${nonarch_base_libdir}/udev \
-Dlibpsl=false \
-Dqt=false \
-Dconfig_dns_rc_manager_default=${NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT} \
-Dconfig_dhcp_default=${NETWORKMANAGER_DHCP_DEFAULT} \
-Ddhcpcanon=false \
"
# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template
@@ -52,7 +58,7 @@ CFLAGS:append:libc-musl = " \
"
do_compile:prepend() {
export GIR_EXTRA_LIBS_PATH="${B}/src/libnm-client-impl/.libs"
export GI_TYPELIB_PATH="${B}}/src/libnm-client-impl${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
}
PACKAGECONFIG ??= "nss ifupdown dnsmasq nmcli \
@@ -64,33 +70,32 @@ PACKAGECONFIG ??= "nss ifupdown dnsmasq nmcli \
inherit ${@bb.utils.contains('PACKAGECONFIG', 'nmcli', 'bash-completion', '', d)}
PACKAGECONFIG[systemd] = " \
--with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd, \
--without-systemdsystemunitdir, \
PACKAGECONFIG[systemd] = "\
-Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\
-Dsystemdsystemunitdir=no -Dsystemd_journal=false -Dsession_tracking=no\
"
PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit"
PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false,polkit"
PACKAGECONFIG[bluez5] = "-Dbluez5_dun=true,-Dbluez5_dun=false,bluez5"
# consolekit is not picked by shlibs, so add it to RDEPENDS too
PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq"
PACKAGECONFIG[nss] = "--with-crypto=nss,,nss"
PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf,,,resolvconf"
PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls"
PACKAGECONFIG[wifi] = "--with-wext=yes --enable-wifi=yes,--with-wext=no --enable-wifi=no,,wpa-supplicant"
PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown"
PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free"
PACKAGECONFIG[cloud-setup] = "--with-nm-cloud-setup=yes,--with-nm-cloud-setup=no"
PACKAGECONFIG[nmcli] = "--with-nmcli=yes,--with-nmcli=no,readline"
PACKAGECONFIG[ovs] = "--enable-ovs,--disable-ovs,jansson"
PACKAGECONFIG[audit] = "--with-libaudit,--without-libaudit,audit"
PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
PACKAGECONFIG[consolekit] = "-Dsession_tracking_consolekit=true,-Dsession_tracking_consolekit=false,consolekit,consolekit"
PACKAGECONFIG[modemmanager] = "-Dmodem_manager=true,-Dmodem_manager=false,modemmanager mobile-broadband-provider-info"
PACKAGECONFIG[ppp] = "-Dppp=true,-Dppp=false,ppp,ppp"
PACKAGECONFIG[dnsmasq] = "-Ddnsmasq=${bindir}/dnsmasq"
PACKAGECONFIG[nss] = "-Dcrypto=nss,,nss"
PACKAGECONFIG[resolvconf] = "-Dresolvconf=${base_sbindir}/resolvconf,-Dresolvconf=no,,resolvconf"
PACKAGECONFIG[gnutls] = "-Dcrypto=gnutls,,gnutls"
PACKAGECONFIG[wifi] = "-Dwext=true -Dwifi=true,-Dwext=false -Dwifi=false"
PACKAGECONFIG[ifupdown] = "-Difupdown=true,-Difupdown=false"
PACKAGECONFIG[cloud-setup] = "-Dnm_cloud_setup=true,-Dnm_cloud_setup=false"
PACKAGECONFIG[nmcli] = "-Dnmcli=true,-Dnmcli=false"
PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson"
PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no"
PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux"
PACKAGES =+ " \
${PN}-nmcli ${PN}-nmcli-doc \
${PN}-nmtui ${PN}-nmtui-doc \
${PN}-adsl ${PN}-cloud-setup \
${PN}-nmcli ${PN}-nmcli-doc \
${PN}-nmtui ${PN}-nmtui-doc \
${PN}-adsl ${PN}-cloud-setup \
"
SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup"