diff options
3 files changed, 100 insertions, 32 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-dhcpcd.conf b/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-dhcpcd.conf new file mode 100644 index 0000000000..8da4fe0487 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-dhcpcd.conf | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | [main] | ||
| 2 | dhcp=dhcpcd | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-iwd.conf b/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-iwd.conf new file mode 100644 index 0000000000..abb5937341 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-iwd.conf | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | [device] | ||
| 2 | wifi.iwd.autoconnect=yes | ||
| 3 | wifi.backend=iwd | ||
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.36.0.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.36.0.bb index 18541cbc03..2f8b616a68 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.36.0.bb +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.36.0.bb | |||
| @@ -26,6 +26,8 @@ inherit gnomebase gettext update-rc.d systemd gobject-introspection gtk-doc upda | |||
| 26 | SRC_URI = " \ | 26 | SRC_URI = " \ |
| 27 | ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ | 27 | ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ |
| 28 | file://${BPN}.initd \ | 28 | file://${BPN}.initd \ |
| 29 | file://enable-dhcpcd.conf \ | ||
| 30 | file://enable-iwd.conf \ | ||
| 29 | file://0001-do-not-ask-host-for-ifcfg-defaults.patch \ | 31 | file://0001-do-not-ask-host-for-ifcfg-defaults.patch \ |
| 30 | " | 32 | " |
| 31 | SRC_URI[sha256sum] = "faa389c9e9ca78243cfab4a8bed6db132f82e5b5e66bb9d44af93379d1348398" | 33 | SRC_URI[sha256sum] = "faa389c9e9ca78243cfab4a8bed6db132f82e5b5e66bb9d44af93379d1348398" |
| @@ -61,7 +63,7 @@ do_compile:prepend() { | |||
| 61 | export GI_TYPELIB_PATH="${B}}/src/libnm-client-impl${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}" | 63 | export GI_TYPELIB_PATH="${B}}/src/libnm-client-impl${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}" |
| 62 | } | 64 | } |
| 63 | 65 | ||
| 64 | PACKAGECONFIG ??= "nss ifupdown dnsmasq nmcli \ | 66 | PACKAGECONFIG ??= "readline nss ifupdown dnsmasq nmcli vala \ |
| 65 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ | 67 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ |
| 66 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ | 68 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ |
| 67 | ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \ | 69 | ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \ |
| @@ -69,6 +71,7 @@ PACKAGECONFIG ??= "nss ifupdown dnsmasq nmcli \ | |||
| 69 | " | 71 | " |
| 70 | 72 | ||
| 71 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'nmcli', 'bash-completion', '', d)} | 73 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'nmcli', 'bash-completion', '', d)} |
| 74 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'vala', 'vala', '', d)} | ||
| 72 | 75 | ||
| 73 | PACKAGECONFIG[systemd] = "\ | 76 | PACKAGECONFIG[systemd] = "\ |
| 74 | -Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\ | 77 | -Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\ |
| @@ -85,22 +88,40 @@ PACKAGECONFIG[nss] = "-Dcrypto=nss,,nss" | |||
| 85 | PACKAGECONFIG[resolvconf] = "-Dresolvconf=${base_sbindir}/resolvconf,-Dresolvconf=no,,resolvconf" | 88 | PACKAGECONFIG[resolvconf] = "-Dresolvconf=${base_sbindir}/resolvconf,-Dresolvconf=no,,resolvconf" |
| 86 | PACKAGECONFIG[gnutls] = "-Dcrypto=gnutls,,gnutls" | 89 | PACKAGECONFIG[gnutls] = "-Dcrypto=gnutls,,gnutls" |
| 87 | PACKAGECONFIG[wifi] = "-Dwext=true -Dwifi=true,-Dwext=false -Dwifi=false" | 90 | PACKAGECONFIG[wifi] = "-Dwext=true -Dwifi=true,-Dwext=false -Dwifi=false" |
| 91 | PACKAGECONFIG[iwd] = "-Diwd=true,-Diwd=false" | ||
| 88 | PACKAGECONFIG[ifupdown] = "-Difupdown=true,-Difupdown=false" | 92 | PACKAGECONFIG[ifupdown] = "-Difupdown=true,-Difupdown=false" |
| 89 | PACKAGECONFIG[cloud-setup] = "-Dnm_cloud_setup=true,-Dnm_cloud_setup=false" | 93 | PACKAGECONFIG[cloud-setup] = "-Dnm_cloud_setup=true,-Dnm_cloud_setup=false" |
| 90 | PACKAGECONFIG[nmcli] = "-Dnmcli=true,-Dnmcli=false" | 94 | PACKAGECONFIG[nmcli] = "-Dnmcli=true,-Dnmcli=false" |
| 95 | PACKAGECONFIG[readline] = "-Dreadline=libreadline,,readline" | ||
| 96 | PACKAGECONFIG[libedit] = "-Dreadline=libedit,,libedit" | ||
| 91 | PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson" | 97 | PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson" |
| 92 | PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no" | 98 | PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no" |
| 93 | PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux" | 99 | PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux" |
| 100 | PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false" | ||
| 101 | PACKAGECONFIG[dhcpcd] = "-Ddhcpcd=yes,-Ddhcpcd=no,,dhcpcd" | ||
| 102 | PACKAGECONFIG[dhclient] = "-Ddhclient=yes,-Ddhclient=no,,dhcp" | ||
| 103 | PACKAGECONFIG[concheck] = "-Dconcheck=true,-Dconcheck=false" | ||
| 104 | |||
| 94 | 105 | ||
| 95 | PACKAGES =+ " \ | 106 | PACKAGES =+ " \ |
| 107 | ${PN}-adsl \ | ||
| 108 | ${PN}-bluetooth \ | ||
| 109 | ${PN}-cloud-setup \ | ||
| 96 | ${PN}-nmcli ${PN}-nmcli-doc \ | 110 | ${PN}-nmcli ${PN}-nmcli-doc \ |
| 97 | ${PN}-nmtui ${PN}-nmtui-doc \ | 111 | ${PN}-nmtui ${PN}-nmtui-doc \ |
| 98 | ${PN}-adsl ${PN}-cloud-setup \ | 112 | ${PN}-wifi \ |
| 113 | ${PN}-wwan \ | ||
| 114 | ${PN}-ovs ${PN}-ovs-doc \ | ||
| 115 | ${PN}-ppp \ | ||
| 99 | " | 116 | " |
| 100 | 117 | ||
| 101 | SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup" | 118 | SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup" |
| 102 | 119 | ||
| 103 | FILES:${PN}-adsl = "${libdir}/NetworkManager/${PV}/libnm-device-plugin-adsl.so" | 120 | NETWORKMANAGER_PLUGINDIR = "${libdir}/NetworkManager/${PV}" |
| 121 | |||
| 122 | FILES:${PN}-adsl = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-adsl.so" | ||
| 123 | |||
| 124 | FILES:${PN}-bluetooth = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-bluetooth.so" | ||
| 104 | 125 | ||
| 105 | FILES:${PN}-cloud-setup = " \ | 126 | FILES:${PN}-cloud-setup = " \ |
| 106 | ${libexecdir}/nm-cloud-setup \ | 127 | ${libexecdir}/nm-cloud-setup \ |
| @@ -112,9 +133,54 @@ FILES:${PN}-cloud-setup = " \ | |||
| 112 | ALLOW_EMPTY:${PN}-cloud-setup = "1" | 133 | ALLOW_EMPTY:${PN}-cloud-setup = "1" |
| 113 | SYSTEMD_SERVICE:${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}" | 134 | SYSTEMD_SERVICE:${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}" |
| 114 | 135 | ||
| 136 | FILES:${PN}-nmcli = " \ | ||
| 137 | ${bindir}/nmcli \ | ||
| 138 | " | ||
| 139 | |||
| 140 | FILES:${PN}-nmcli-doc = " \ | ||
| 141 | ${mandir}/man1/nmcli* \ | ||
| 142 | " | ||
| 143 | |||
| 144 | FILES:${PN}-nmtui = " \ | ||
| 145 | ${bindir}/nmtui \ | ||
| 146 | ${bindir}/nmtui-edit \ | ||
| 147 | ${bindir}/nmtui-connect \ | ||
| 148 | ${bindir}/nmtui-hostname \ | ||
| 149 | " | ||
| 150 | |||
| 151 | FILES:${PN}-nmtui-doc = " \ | ||
| 152 | ${mandir}/man1/nmtui* \ | ||
| 153 | " | ||
| 154 | |||
| 155 | FILES:${PN}-wifi = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wifi.so" | ||
| 156 | |||
| 157 | FILES:${PN}-wwan = "\ | ||
| 158 | ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wwan.so \ | ||
| 159 | ${NETWORKMANAGER_PLUGINDIR}/libnm-wwan.so \ | ||
| 160 | " | ||
| 161 | |||
| 162 | FILES:${PN}-ovs = "\ | ||
| 163 | ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-ovs.so \ | ||
| 164 | ${systemd_system_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf \ | ||
| 165 | " | ||
| 166 | |||
| 167 | FILES:${PN}-ovs-doc = "\ | ||
| 168 | ${mandir}/man7/nm-openvswitch.7* \ | ||
| 169 | " | ||
| 170 | |||
| 171 | FILES:${PN}-ppp = "\ | ||
| 172 | ${NETWORKMANAGER_PLUGINDIR}/libnm-ppp-plugin.so \ | ||
| 173 | ${libdir}/pppd/*/nm-pppd-plugin.so \ | ||
| 174 | " | ||
| 175 | |||
| 176 | FILES:${PN}-dev += " \ | ||
| 177 | ${libdir}/pppd/*/*.la \ | ||
| 178 | ${libdir}/NetworkManager/*.la \ | ||
| 179 | ${NETWORKMANAGER_PLUGINDIR}/*.la \ | ||
| 180 | " | ||
| 181 | |||
| 115 | FILES:${PN} += " \ | 182 | FILES:${PN} += " \ |
| 116 | ${libexecdir} \ | 183 | ${libexecdir} \ |
| 117 | ${libdir}/NetworkManager/${PV}/*.so \ | ||
| 118 | ${libdir}/NetworkManager \ | 184 | ${libdir}/NetworkManager \ |
| 119 | ${libdir}/firewalld/zones \ | 185 | ${libdir}/firewalld/zones \ |
| 120 | ${nonarch_libdir}/NetworkManager/conf.d \ | 186 | ${nonarch_libdir}/NetworkManager/conf.d \ |
| @@ -128,42 +194,29 @@ FILES:${PN} += " \ | |||
| 128 | ${datadir}/dbus-1 \ | 194 | ${datadir}/dbus-1 \ |
| 129 | ${nonarch_base_libdir}/udev/* \ | 195 | ${nonarch_base_libdir}/udev/* \ |
| 130 | ${systemd_system_unitdir} \ | 196 | ${systemd_system_unitdir} \ |
| 131 | ${libdir}/pppd \ | ||
| 132 | " | 197 | " |
| 133 | 198 | ||
| 134 | RRECOMMENDS:${PN} += "iptables \ | 199 | RRECOMMENDS:${PN} += "\ |
| 200 | iptables \ | ||
| 135 | ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ | 201 | ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ |
| 202 | ${@bb.utils.contains('PACKAGECONFIG','adsl','${PN}-adsl','',d)} \ | ||
| 203 | ${@bb.utils.contains('PACKAGECONFIG','bluez5','${PN}-bluetooth','',d)} \ | ||
| 204 | ${@bb.utils.contains('PACKAGECONFIG','cloud-setup','${PN}-cloud-setup','',d)} \ | ||
| 205 | ${@bb.utils.contains('PACKAGECONFIG','nmcli','${PN}-nmcli','',d)} \ | ||
| 206 | ${@bb.utils.contains('PACKAGECONFIG','nmtui','${PN}-nmtui','',d)} \ | ||
| 207 | ${@bb.utils.contains('PACKAGECONFIG','wifi','${PN}-wifi','',d)} \ | ||
| 208 | ${@bb.utils.contains('PACKAGECONFIG','wwan','${PN}-wwan','',d)} \ | ||
| 209 | ${@bb.utils.contains('PACKAGECONFIG','ovs','${PN}-ovs','',d)} \ | ||
| 210 | ${@bb.utils.contains('PACKAGECONFIG','ppp','${PN}-ppp','',d)} \ | ||
| 136 | " | 211 | " |
| 137 | RCONFLICTS:${PN} = "connman" | 212 | RCONFLICTS:${PN} = "connman" |
| 138 | 213 | ||
| 139 | FILES:${PN}-dev += " \ | ||
| 140 | ${datadir}/NetworkManager/gdb-cmd \ | ||
| 141 | ${libdir}/pppd/*/*.la \ | ||
| 142 | ${libdir}/NetworkManager/*.la \ | ||
| 143 | ${libdir}/NetworkManager/${PV}/*.la \ | ||
| 144 | " | ||
| 145 | |||
| 146 | FILES:${PN}-nmcli = " \ | ||
| 147 | ${bindir}/nmcli \ | ||
| 148 | " | ||
| 149 | |||
| 150 | FILES:${PN}-nmcli-doc = " \ | ||
| 151 | ${mandir}/man1/nmcli* \ | ||
| 152 | " | ||
| 153 | |||
| 154 | FILES:${PN}-nmtui = " \ | ||
| 155 | ${bindir}/nmtui \ | ||
| 156 | ${bindir}/nmtui-edit \ | ||
| 157 | ${bindir}/nmtui-connect \ | ||
| 158 | ${bindir}/nmtui-hostname \ | ||
| 159 | " | ||
| 160 | |||
| 161 | FILES:${PN}-nmtui-doc = " \ | ||
| 162 | ${mandir}/man1/nmtui* \ | ||
| 163 | " | ||
| 164 | 214 | ||
| 165 | INITSCRIPT_NAME = "network-manager" | 215 | INITSCRIPT_NAME = "network-manager" |
| 166 | SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'NetworkManager.service NetworkManager-dispatcher.service', '', d)}" | 216 | SYSTEMD_SERVICE:${PN} = "\ |
| 217 | NetworkManager.service \ | ||
| 218 | NetworkManager-dispatcher.service \ | ||
| 219 | " | ||
| 167 | 220 | ||
| 168 | ALTERNATIVE_PRIORITY = "100" | 221 | ALTERNATIVE_PRIORITY = "100" |
| 169 | ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" | 222 | ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" |
| @@ -182,4 +235,14 @@ do_install:append() { | |||
| 182 | # systemd v210 and newer do not need this rule file | 235 | # systemd v210 and newer do not need this rule file |
| 183 | rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules | 236 | rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules |
| 184 | fi | 237 | fi |
| 238 | |||
| 239 | # Enable iwd if compiled | ||
| 240 | if ${@bb.utils.contains('PACKAGECONFIG','iwd','true','false',d)}; then | ||
| 241 | install -Dm 0644 ${WORKDIR}/enable-iwd.conf ${D}${libdir}/NetworkManager/conf.d/enable-iwd.conf | ||
| 242 | fi | ||
| 243 | |||
| 244 | # Enable dhcpd if compiled | ||
| 245 | if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then | ||
| 246 | install -Dm 0644 ${WORKDIR}/enable-dhcpcd.conf ${D}${libdir}/NetworkManager/conf.d/enable-dhcpcd.conf | ||
| 247 | fi | ||
| 185 | } | 248 | } |
