summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.52.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-connectivity/networkmanager/networkmanager_1.52.0.bb')
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager_1.52.0.bb319
1 files changed, 319 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.52.0.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.52.0.bb
new file mode 100644
index 0000000000..b8c6a936ad
--- /dev/null
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.52.0.bb
@@ -0,0 +1,319 @@
1SUMMARY = "NetworkManager is a program for providing detection and \
2configuration for systems to automatically connect to networks."
3
4DESCRIPTION = "NetworkManager is a program for providing detection and \
5configuration for systems to automatically connect to networks. \
6NetworkManager's functionality can be useful for both wireless and wired \
7networks. For wireless networks, NetworkManager prefers known wireless \
8networks and has the ability to switch to the most reliable network. \
9NetworkManager-aware applications can switch from online and offline mode. \
10NetworkManager also prefers wired connections over wireless ones, has support \
11for modem connections and certain types of VPN."
12
13HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager"
14SECTION = "net/misc"
15
16LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
17LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
18 file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
19"
20
21DEPENDS = " \
22 glib-2.0 \
23 python3-pygobject-native \
24 coreutils-native \
25 intltool-native \
26 libxslt-native \
27 libnl \
28 libnvme \
29 udev \
30 util-linux \
31 util-linux-libuuid \
32 libndp \
33 curl \
34 dbus \
35"
36DEPENDS:append:class-target = " bash-completion"
37
38inherit meson gettext update-rc.d systemd gobject-introspection update-alternatives upstream-version-is-even pkgconfig
39
40SRC_URI = " \
41 git://github.com/NetworkManager/NetworkManager.git;protocol=https;branch=main;tag=${PV} \
42 file://${BPN}.initd \
43 file://enable-dhcpcd.conf \
44 file://enable-iwd.conf \
45"
46SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}"
47
48SRCREV = "995a28fa1ccc54ad22e794294c3c6783cc3f30ed"
49
50
51# ['auto', 'symlink', 'file', 'netconfig', 'resolvconf']
52NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT ??= "auto"
53
54# ['dhclient', 'dhcpcd', 'internal', 'nettools']
55NETWORKMANAGER_DHCP_DEFAULT ??= "internal"
56
57# The default gets detected based on whether /usr/sbin/nft or /usr/sbin/iptables is installed, with nftables preferred.
58# ['', 'iptables', 'nftables']
59NETWORKMANAGER_FIREWALL_DEFAULT ??= "nftables"
60
61EXTRA_OEMESON = "\
62 -Difcfg_rh=false \
63 -Dtests=yes \
64 -Dudev_dir=${nonarch_base_libdir}/udev \
65 -Dlibpsl=false \
66 -Dqt=false \
67 -Dconfig_dns_rc_manager_default=${NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT} \
68 -Dconfig_dhcp_default=${NETWORKMANAGER_DHCP_DEFAULT} \
69 -Diptables=${sbindir}/iptables \
70 -Dnft=${sbindir}/nft \
71"
72
73# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template
74# avoids:
75# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'?
76CFLAGS:append:libc-musl = " \
77 -DRTLD_DEEPBIND=0 \
78"
79
80PACKAGECONFIG ??= "readline nss ifupdown dnsmasq nmcli \
81 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \
82 ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
83 ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit ppp', d)} \
84 ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \
85 ${@bb.utils.contains('DISTRO_FEATURES_BACKFILL_CONSIDERED', 'gobject-introspection-data', '', 'vala', d)} \
86"
87
88inherit ${@bb.utils.contains('PACKAGECONFIG', 'vala', 'vala', '', d)}
89
90PACKAGECONFIG[systemd] = "\
91 -Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\
92 -Dsystemdsystemunitdir=no -Dsystemd_journal=false -Dsession_tracking=no\
93"
94PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false,polkit"
95PACKAGECONFIG[bluez5] = "-Dbluez5_dun=true,-Dbluez5_dun=false,bluez5"
96# consolekit is not picked by shlibs, so add it to RDEPENDS too
97PACKAGECONFIG[consolekit] = "-Dsession_tracking_consolekit=true,-Dsession_tracking_consolekit=false,consolekit,consolekit"
98PACKAGECONFIG[modemmanager] = "-Dmodem_manager=true,-Dmodem_manager=false,modemmanager mobile-broadband-provider-info"
99PACKAGECONFIG[ppp] = "-Dppp=true -Dpppd=${sbindir}/pppd,-Dppp=false,ppp"
100PACKAGECONFIG[dnsmasq] = "-Ddnsmasq=${bindir}/dnsmasq"
101PACKAGECONFIG[nss] = "-Dcrypto=nss,,nss"
102PACKAGECONFIG[resolvconf] = "-Dresolvconf=${base_sbindir}/resolvconf,-Dresolvconf=no,,resolvconf"
103PACKAGECONFIG[gnutls] = "-Dcrypto=gnutls,,gnutls"
104PACKAGECONFIG[crypto-null] = "-Dcrypto=null"
105PACKAGECONFIG[wifi] = "-Dwext=true -Dwifi=true,-Dwext=false -Dwifi=false"
106PACKAGECONFIG[iwd] = "-Diwd=true,-Diwd=false"
107PACKAGECONFIG[ifupdown] = "-Difupdown=true,-Difupdown=false"
108PACKAGECONFIG[cloud-setup] = "-Dnm_cloud_setup=true,-Dnm_cloud_setup=false"
109PACKAGECONFIG[nmcli] = "-Dnmcli=true,-Dnmcli=false"
110PACKAGECONFIG[nmtui] = "-Dnmtui=true,-Dnmtui=false,libnewt"
111PACKAGECONFIG[readline] = "-Dreadline=libreadline,,readline"
112PACKAGECONFIG[libedit] = "-Dreadline=libedit,,libedit"
113PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson"
114PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no"
115PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux"
116PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false"
117PACKAGECONFIG[dhcpcd] = "-Ddhcpcd=${base_sbindir}/dhcpcd,-Ddhcpcd=no,,dhcpcd"
118PACKAGECONFIG[dhclient] = "-Ddhclient=yes,-Ddhclient=no,,dhcp"
119PACKAGECONFIG[concheck] = "-Dconcheck=true,-Dconcheck=false"
120PACKAGECONFIG[adsl] = ",,"
121PACKAGECONFIG[wwan] = ",,"
122# The following PACKAGECONFIG is used to determine whether NM is managing /etc/resolv.conf itself or not
123PACKAGECONFIG[man-resolv-conf] = ",,"
124
125
126PACKAGES =+ " \
127 libnm \
128 ${PN}-adsl \
129 ${PN}-bluetooth \
130 ${PN}-cloud-setup \
131 ${PN}-nmcli \
132 ${PN}-nmcli-bash-completion \
133 ${PN}-nmtui \
134 ${PN}-wifi \
135 ${PN}-wwan \
136 ${PN}-ovs \
137 ${PN}-ppp \
138 ${PN}-daemon \
139"
140
141SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-cloud-setup"
142INITSCRIPT_PACKAGES = "${PN}-daemon"
143
144NETWORKMANAGER_PLUGINDIR = "${libdir}/NetworkManager/${PV}"
145NETWORKMANAGER_DISPATCHERDIR = "${nonarch_libdir}/NetworkManager/dispatcher.d"
146
147
148SUMMARY:libnm = "Libraries for adding NetworkManager support to applications"
149FILES:libnm = "\
150 ${libdir}/libnm.so.* \
151 ${libdir}/girepository-1.0/NM-1.0.typelib \
152"
153
154SUMMARY:${PN}-adsl = "ADSL device plugin for NetworkManager"
155FILES:${PN}-adsl = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-adsl.so"
156RDEPENDS:${PN}-adsl += "${PN}-daemon"
157
158SUMMARY:${PN}-bluetooth = "Bluetooth device plugin for NetworkManager"
159FILES:${PN}-bluetooth = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-bluetooth.so"
160RDEPENDS:${PN}-bluetooth += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG', 'bluez5', '${PN}-wwan bluez5', '', d)}"
161
162SUMMARY:${PN}-cloud-setup = "Automatically configure NetworkManager in cloud"
163FILES:${PN}-cloud-setup = " \
164 ${libexecdir}/nm-cloud-setup \
165 ${systemd_system_unitdir}/nm-cloud-setup.service \
166 ${systemd_system_unitdir}/nm-cloud-setup.timer \
167 ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \
168 ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \
169"
170RDEPENDS:${PN}-cloud-setup += "${PN}-daemon"
171ALLOW_EMPTY:${PN}-cloud-setup = "1"
172SYSTEMD_SERVICE:${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}"
173
174SUMMARY:${PN}-nmcli = "NetworkManager command line client"
175FILES:${PN}-nmcli = " \
176 ${bindir}/nmcli \
177"
178RDEPENDS:${PN}-nmcli += "${PN}-daemon"
179
180SUMMARY:${PN}-nmcli-bash-completion = "NetworkManager command line client bash completion"
181FILES:${PN}-nmcli-bash-completion = "${datadir}/bash-completion/completions/nmcli"
182RDEPENDS:${PN}-nmcli-bash-completion = "bash-completion"
183
184SUMMARY:${PN}-nmtui = "NetworkManager curses-based UI"
185FILES:${PN}-nmtui = " \
186 ${bindir}/nmtui \
187 ${bindir}/nmtui-edit \
188 ${bindir}/nmtui-connect \
189 ${bindir}/nmtui-hostname \
190"
191RDEPENDS:${PN}-nmtui += "${PN}-daemon"
192
193SUMMARY:${PN}-wifi = "Wifi plugin for NetworkManager"
194FILES:${PN}-wifi = "\
195 ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wifi.so \
196 ${libdir}/NetworkManager/conf.d/enable-iwd.conf \
197"
198def get_wifi_deps(d):
199 packageconfig = (d.getVar('PACKAGECONFIG') or "").split()
200 if 'wifi' in packageconfig:
201 if 'iwd' in packageconfig:
202 return 'iwd'
203 else:
204 return 'wpa-supplicant'
205 else:
206 return ''
207RDEPENDS:${PN}-wifi += "${PN}-daemon ${@get_wifi_deps(d)}"
208
209SUMMARY:${PN}-wwan = "Mobile broadband device plugin for NetworkManager"
210FILES:${PN}-wwan = "\
211 ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wwan.so \
212 ${NETWORKMANAGER_PLUGINDIR}/libnm-wwan.so \
213"
214RDEPENDS:${PN}-wwan += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','modemmanager','modemmanager','',d)}"
215
216SUMMARY:${PN}-ovs = "Open vSwitch device plugin for NetworkManager"
217FILES:${PN}-ovs = "\
218 ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-ovs.so \
219 ${systemd_system_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf \
220"
221RDEPENDS:${PN}-ovs += "${PN}-daemon"
222
223SUMMARY:${PN}-ppp = "PPP plugin for NetworkManager"
224FILES:${PN}-ppp = "\
225 ${NETWORKMANAGER_PLUGINDIR}/libnm-ppp-plugin.so \
226 ${libdir}/pppd/*/nm-pppd-plugin.so \
227"
228RDEPENDS:${PN}-ppp += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','ppp','ppp','',d)}"
229
230FILES:${PN}-dev += " \
231 ${libdir}/pppd/*/*.la \
232 ${libdir}/NetworkManager/*.la \
233 ${NETWORKMANAGER_PLUGINDIR}/*.la \
234 ${datadir}/dbus-1/interfaces/*.xml \
235"
236
237SUMMARY:${PN}-daemon += "The NetworkManager daemon"
238FILES:${PN}-daemon += " \
239 ${bindir}/nm-online \
240 ${datadir}/dbus-1 \
241 ${datadir}/polkit-1 \
242 ${libdir}/NetworkManager \
243 ${libexecdir} \
244 ${localstatedir}/lib/NetworkManager \
245 ${NETWORKMANAGER_DISPATCHERDIR} \
246 ${nonarch_base_libdir}/udev/* \
247 ${nonarch_libdir}/firewalld \
248 ${nonarch_libdir}/NetworkManager/conf.d \
249 ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \
250 ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \
251 ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \
252 ${nonarch_libdir}/NetworkManager/system-connections \
253 ${nonarch_libdir}/NetworkManager/VPN \
254 ${sbindir}/NetworkManager \
255 ${sysconfdir}/init.d/network-manager \
256 ${sysconfdir}/NetworkManager \
257 ${sysconfdir}/resolv-conf.NetworkManager \
258 ${sysconfdir}/sysconfig/network-scripts \
259 ${systemd_system_unitdir} \
260"
261RDEPENDS:${PN}-daemon += "\
262 ${@bb.utils.contains('PACKAGECONFIG', 'ifupdown', 'bash', '', d)} \
263"
264RRECOMMENDS:${PN}-daemon += "\
265 ${NETWORKMANAGER_FIREWALL_DEFAULT} \
266 ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \
267"
268INITSCRIPT_NAME:${PN}-daemon = "network-manager"
269SYSTEMD_SERVICE:${PN}-daemon = "\
270 NetworkManager.service \
271 NetworkManager-dispatcher.service \
272"
273RCONFLICTS:${PN}-daemon += "connman"
274ALTERNATIVE_PRIORITY = "100"
275ALTERNATIVE:${PN}-daemon = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','resolv-conf','',d)}"
276ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv-conf.NetworkManager','',d)}"
277ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv.conf','',d)}"
278
279
280# The networkmanager package is an empty meta package which weakly depends on all the compiled features.
281# Install this package to get all plugins and related dependencies installed. Alternatively just install
282# plugins and related dependencies e.g. by installing networkmanager-wifi or networkmanager-wwan
283# packages to the firmware.
284ALLOW_EMPTY:${PN} = "1"
285RRECOMMENDS:${PN} += "\
286 ${@bb.utils.contains('PACKAGECONFIG','adsl','${PN}-adsl','',d)} \
287 ${@bb.utils.contains('PACKAGECONFIG','bluez5','${PN}-bluetooth','',d)} \
288 ${@bb.utils.contains('PACKAGECONFIG','cloud-setup','${PN}-cloud-setup','',d)} \
289 ${@bb.utils.contains('PACKAGECONFIG','nmcli','${PN}-nmcli','',d)} \
290 ${@bb.utils.contains('PACKAGECONFIG','nmtui','${PN}-nmtui','',d)} \
291 ${@bb.utils.contains('PACKAGECONFIG','wifi','${PN}-wifi','',d)} \
292 ${@bb.utils.contains('PACKAGECONFIG','wwan','${PN}-wwan','',d)} \
293 ${@bb.utils.contains('PACKAGECONFIG','ovs','${PN}-ovs','',d)} \
294 ${@bb.utils.contains('PACKAGECONFIG','ppp','${PN}-ppp','',d)} \
295"
296
297do_install:append() {
298 install -Dm 0755 ${UNPACKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager
299
300 rm -rf ${D}/run ${D}${localstatedir}/run
301
302 if ${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','true','false',d)}; then
303 # For read-only filesystem, do not create links during bootup
304 ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager
305
306 # systemd v210 and newer do not need this rule file
307 rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules
308 fi
309
310 # Enable iwd if compiled
311 if ${@bb.utils.contains('PACKAGECONFIG','iwd','true','false',d)}; then
312 install -Dm 0644 ${UNPACKDIR}/enable-iwd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-iwd.conf
313 fi
314
315 # Enable dhcpd if compiled
316 if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then
317 install -Dm 0644 ${UNPACKDIR}/enable-dhcpcd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-dhcpcd.conf
318 fi
319}