diff options
Diffstat (limited to 'meta/recipes-connectivity/connman/connman.inc')
-rw-r--r-- | meta/recipes-connectivity/connman/connman.inc | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc index 35a7eed0a9..ff3aff5f1f 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman.inc @@ -13,9 +13,9 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" -inherit autotools pkgconfig systemd update-rc.d bluetooth +inherit autotools pkgconfig systemd update-rc.d update-alternatives -DEPENDS = "dbus glib-2.0 ppp iptables readline" +DEPENDS = "dbus glib-2.0 ppp readline" INC_PR = "r20" @@ -31,10 +31,9 @@ EXTRA_OECONF += "\ " PACKAGECONFIG ??= "wispr \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd','systemd', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wifi', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', '3g','3g', '', d)} \ + iptables \ " # If you want ConnMan to support VPN, add following statement into @@ -43,7 +42,7 @@ PACKAGECONFIG ??= "wispr \ PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant, wpa-supplicant" -PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, ${BLUEZ}, ${BLUEZ}" +PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" @@ -52,13 +51,16 @@ PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2t PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux" # WISPr support for logging into hotspots, requires TLS PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," +PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat" +PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables" +PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard" INITSCRIPT_NAME = "connman" INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ." python __anonymous () { - systemd_packages = "${PN}" - pkgconfig = d.getVar('PACKAGECONFIG', True) + systemd_packages = "${PN} ${PN}-wait-online" + pkgconfig = d.getVar('PACKAGECONFIG') if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split(): systemd_packages += " ${PN}-vpn" d.setVar('SYSTEMD_PACKAGES', systemd_packages) @@ -68,6 +70,11 @@ SYSTEMD_SERVICE_${PN} = "connman.service" SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service" SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service" +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" +ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" + do_install_append() { if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then install -d ${D}${sysconfdir}/init.d @@ -88,6 +95,11 @@ do_install_append() { # Automake 1.12 won't install empty directories, but we need the # plugins directory to be present for ownership mkdir -p ${D}${libdir}/connman/plugins + + # For read-only filesystem, do not create links during bootup + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman + fi } # These used to be plugins, but now they are core @@ -116,20 +128,20 @@ def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): python populate_packages_prepend() { depmap = dict(pppd="ppp") - multilib_prefix = (d.getVar("MLPREFIX", True) or "") + multilib_prefix = (d.getVar("MLPREFIX") or "") hook = lambda file,pkg,x,y,z: \ add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False) plugin_dir = d.expand('${libdir}/connman/plugins/') plugin_name = d.expand('${PN}-plugin-%s') - do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \ + do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ '${PN} plugin for %s', extra_depends='', hook=hook, prepend=True ) hook = lambda file,pkg,x,y,z: \ add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True) plugin_dir = d.expand('${libdir}/connman/plugins-vpn/') plugin_name = d.expand('${PN}-plugin-vpn-%s') - do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \ + do_split_packages(d, plugin_dir, r'^(.*).so$', plugin_name, \ '${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True ) } @@ -145,7 +157,7 @@ RDEPENDS_${PN}-client ="${PN}" FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ ${libdir}/connman/plugins \ - ${sysconfdir} ${sharedstatedir} ${localstatedir} \ + ${sysconfdir} ${sharedstatedir} ${localstatedir} ${datadir} \ ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \ ${datadir}/dbus-1/system-services/* \ ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf" |