diff options
| author | Mathieu Dubois-Briand <mathieu.dubois-briand@hyprua.org> | 2022-10-06 08:30:12 +0200 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2022-10-30 14:47:43 -0400 |
| commit | 44d843ecad0e316b30d689b4b99e3f01b801d31e (patch) | |
| tree | 3b40473c27ca7bbc4648bf9fe65b7c292dd631ea /meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb | |
| parent | 8377de16245ae355dfe528bb69a7dae391f79331 (diff) | |
| download | meta-openembedded-44d843ecad0e316b30d689b4b99e3f01b801d31e.tar.gz | |
networkmanager: Update to 1.22.16
Update network manager stable branch to last version, allowing to fix
CVE-2020-10754.
Signed-off-by: Mathieu Dubois-Briand <mbriand@witekio.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb')
| -rw-r--r-- | meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb new file mode 100644 index 0000000000..a28372dd1f --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb | |||
| @@ -0,0 +1,167 @@ | |||
| 1 | SUMMARY = "NetworkManager" | ||
| 2 | HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" | ||
| 3 | SECTION = "net/misc" | ||
| 4 | |||
| 5 | LICENSE = "GPLv2+ & LGPLv2.1+" | ||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
| 7 | file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \ | ||
| 8 | " | ||
| 9 | |||
| 10 | DEPENDS = " \ | ||
| 11 | intltool-native \ | ||
| 12 | libxslt-native \ | ||
| 13 | libnl \ | ||
| 14 | libgudev \ | ||
| 15 | util-linux \ | ||
| 16 | libndp \ | ||
| 17 | libnewt \ | ||
| 18 | jansson \ | ||
| 19 | curl \ | ||
| 20 | " | ||
| 21 | |||
| 22 | inherit gnomebase gettext update-rc.d systemd bash-completion vala gobject-introspection gtk-doc update-alternatives upstream-version-is-even | ||
| 23 | |||
| 24 | SRC_URI = " \ | ||
| 25 | ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ | ||
| 26 | file://${BPN}.initd \ | ||
| 27 | file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ | ||
| 28 | file://0002-Do-not-create-settings-settings-property-documentati.patch \ | ||
| 29 | " | ||
| 30 | SRC_URI_append_libc-musl = " \ | ||
| 31 | file://musl/0001-Fix-build-with-musl-systemd-specific.patch \ | ||
| 32 | file://musl/0002-Fix-build-with-musl.patch \ | ||
| 33 | file://musl/0003-Fix-build-with-musl-for-n-dhcp4.patch \ | ||
| 34 | file://musl/0004-Fix-build-with-musl-systemd-specific.patch \ | ||
| 35 | " | ||
| 36 | SRC_URI[sha256sum] = "377aa053752eaa304b72c9906f9efcd9fbd5f7f6cb4cd4ad72425a68982cffc6" | ||
| 37 | |||
| 38 | S = "${WORKDIR}/NetworkManager-${PV}" | ||
| 39 | |||
| 40 | EXTRA_OECONF = " \ | ||
| 41 | --disable-firewalld-zone \ | ||
| 42 | --disable-ifcfg-rh \ | ||
| 43 | --disable-more-warnings \ | ||
| 44 | --with-iptables=${sbindir}/iptables \ | ||
| 45 | --with-tests \ | ||
| 46 | --with-nmtui=yes \ | ||
| 47 | --with-udev-dir=${nonarch_base_libdir}/udev \ | ||
| 48 | " | ||
| 49 | |||
| 50 | # stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template | ||
| 51 | # avoids: | ||
| 52 | # | ../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'? | ||
| 53 | CFLAGS_append_libc-musl = " \ | ||
| 54 | -DRTLD_DEEPBIND=0 \ | ||
| 55 | " | ||
| 56 | |||
| 57 | do_compile_prepend() { | ||
| 58 | export GIR_EXTRA_LIBS_PATH="${B}/libnm/.libs:${B}/libnm-glib/.libs:${B}/libnm-util/.libs" | ||
| 59 | } | ||
| 60 | |||
| 61 | PACKAGECONFIG ??= "nss ifupdown dhclient dnsmasq \ | ||
| 62 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ | ||
| 63 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ | ||
| 64 | ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \ | ||
| 65 | " | ||
| 66 | PACKAGECONFIG[systemd] = " \ | ||
| 67 | --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd, \ | ||
| 68 | --without-systemdsystemunitdir, \ | ||
| 69 | " | ||
| 70 | PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit" | ||
| 71 | PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5" | ||
| 72 | # consolekit is not picked by shlibs, so add it to RDEPENDS too | ||
| 73 | PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit" | ||
| 74 | PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager" | ||
| 75 | PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp" | ||
| 76 | # Use full featured dhcp client instead of internal one | ||
| 77 | PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client" | ||
| 78 | PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq" | ||
| 79 | PACKAGECONFIG[nss] = "--with-crypto=nss,,nss" | ||
| 80 | PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf,,,resolvconf" | ||
| 81 | PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls" | ||
| 82 | PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,,wpa-supplicant" | ||
| 83 | PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown" | ||
| 84 | PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free" | ||
| 85 | PACKAGECONFIG[cloud-setup] = "--with-nm-cloud-setup=yes,--with-nm-cloud-setup=no" | ||
| 86 | |||
| 87 | PACKAGES =+ " \ | ||
| 88 | ${PN}-nmtui ${PN}-nmtui-doc \ | ||
| 89 | ${PN}-adsl ${PN}-cloud-setup \ | ||
| 90 | " | ||
| 91 | |||
| 92 | SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup" | ||
| 93 | |||
| 94 | FILES_${PN}-adsl = "${libdir}/NetworkManager/${PV}/libnm-device-plugin-adsl.so" | ||
| 95 | |||
| 96 | FILES_${PN}-cloud-setup = " \ | ||
| 97 | ${libexecdir}/nm-cloud-setup \ | ||
| 98 | ${systemd_system_unitdir}/nm-cloud-setup.service \ | ||
| 99 | ${systemd_system_unitdir}/nm-cloud-setup.timer \ | ||
| 100 | ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \ | ||
| 101 | ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \ | ||
| 102 | " | ||
| 103 | ALLOW_EMPTY_${PN}-cloud-setup = "1" | ||
| 104 | SYSTEMD_SERVICE_${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}" | ||
| 105 | |||
| 106 | FILES_${PN} += " \ | ||
| 107 | ${libexecdir} \ | ||
| 108 | ${libdir}/NetworkManager/${PV}/*.so \ | ||
| 109 | ${libdir}/NetworkManager \ | ||
| 110 | ${nonarch_libdir}/NetworkManager/conf.d \ | ||
| 111 | ${nonarch_libdir}/NetworkManager/dispatcher.d \ | ||
| 112 | ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \ | ||
| 113 | ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \ | ||
| 114 | ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \ | ||
| 115 | ${nonarch_libdir}/NetworkManager/VPN \ | ||
| 116 | ${nonarch_libdir}/NetworkManager/system-connections \ | ||
| 117 | ${datadir}/polkit-1 \ | ||
| 118 | ${datadir}/dbus-1 \ | ||
| 119 | ${nonarch_base_libdir}/udev/* \ | ||
| 120 | ${systemd_system_unitdir} \ | ||
| 121 | ${libdir}/pppd \ | ||
| 122 | " | ||
| 123 | |||
| 124 | RRECOMMENDS_${PN} += "iptables \ | ||
| 125 | ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ | ||
| 126 | " | ||
| 127 | RCONFLICTS_${PN} = "connman" | ||
| 128 | |||
| 129 | FILES_${PN}-dev += " \ | ||
| 130 | ${datadir}/NetworkManager/gdb-cmd \ | ||
| 131 | ${libdir}/pppd/*/*.la \ | ||
| 132 | ${libdir}/NetworkManager/*.la \ | ||
| 133 | ${libdir}/NetworkManager/${PV}/*.la \ | ||
| 134 | " | ||
| 135 | |||
| 136 | FILES_${PN}-nmtui = " \ | ||
| 137 | ${bindir}/nmtui \ | ||
| 138 | ${bindir}/nmtui-edit \ | ||
| 139 | ${bindir}/nmtui-connect \ | ||
| 140 | ${bindir}/nmtui-hostname \ | ||
| 141 | " | ||
| 142 | |||
| 143 | FILES_${PN}-nmtui-doc = " \ | ||
| 144 | ${mandir}/man1/nmtui* \ | ||
| 145 | " | ||
| 146 | |||
| 147 | INITSCRIPT_NAME = "network-manager" | ||
| 148 | SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'NetworkManager.service NetworkManager-dispatcher.service', '', d)}" | ||
| 149 | |||
| 150 | ALTERNATIVE_PRIORITY = "100" | ||
| 151 | ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" | ||
| 152 | ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}" | ||
| 153 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" | ||
| 154 | |||
| 155 | do_install_append() { | ||
| 156 | install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager | ||
| 157 | |||
| 158 | rm -rf ${D}/run ${D}${localstatedir}/run | ||
| 159 | |||
| 160 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
| 161 | # For read-only filesystem, do not create links during bootup | ||
| 162 | ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager | ||
| 163 | |||
| 164 | # systemd v210 and newer do not need this rule file | ||
| 165 | rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules | ||
| 166 | fi | ||
| 167 | } | ||
