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