diff options
-rw-r--r-- | meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch | 24 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch | 50 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch | 72 | ||||
-rw-r--r-- | meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb (renamed from meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb) | 28 |
4 files changed, 3 insertions, 171 deletions
diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch b/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch deleted file mode 100644 index 913566dce9..0000000000 --- a/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | Subject: [PATCH] Search for cython3 | ||
2 | MIME-Version: 1.0 | ||
3 | Content-Type: text/plain; charset=UTF-8 | ||
4 | Content-Transfer-Encoding: 8bit | ||
5 | |||
6 | Upstream-Status: Inappropriate | ||
7 | |||
8 | Signed-off-by: Markus Volk <f_l_k@gmx.net> | ||
9 | --- | ||
10 | meson.build | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | --- a/module/meson.build 2022-02-10 08:49:35.000000000 +0100 | ||
14 | +++ b/module/meson.build 2022-03-29 12:58:03.456193737 +0200 | ||
15 | @@ -1,4 +1,4 @@ | ||
16 | -cython = find_program('cython', required: true) | ||
17 | +cython = find_program('cython3', required: true) | ||
18 | |||
19 | blueman_c = custom_target( | ||
20 | 'blueman_c', | ||
21 | |||
22 | -- | ||
23 | 2.14.3 | ||
24 | |||
diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch b/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch deleted file mode 100644 index cc448b4ffd..0000000000 --- a/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 37f24a9bd62f0a8f3e37eaddd33f2f0c9d3aaa0a Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Fri, 1 Apr 2022 23:12:17 -0700 | ||
4 | Subject: [PATCH] meson: add pythoninstalldir option | ||
5 | |||
6 | In case of cross build, using host python to determine the python | ||
7 | site-packages directory for target is not feasible, add a new option | ||
8 | pythoninstalldir to fix the issue. | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/blueman-project/blueman/pull/1699] | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | --- | ||
14 | meson.build | 7 ++++++- | ||
15 | meson_options.txt | 1 + | ||
16 | 2 files changed, 7 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/meson.build b/meson.build | ||
19 | index e12d0ce6..e84457a5 100644 | ||
20 | --- a/meson.build | ||
21 | +++ b/meson.build | ||
22 | @@ -26,7 +26,12 @@ pkgdatadir = join_paths([prefix, get_option('datadir'), package_name]) | ||
23 | bindir = join_paths([prefix, get_option('bindir')]) | ||
24 | libexecdir = join_paths([prefix, get_option('libexecdir')]) | ||
25 | schemadir = join_paths(['share', 'glib-2.0', 'schemas']) | ||
26 | -pythondir = pyinstall.get_install_dir() | ||
27 | +pythoninstalldir = get_option('pythoninstalldir') | ||
28 | +if pythoninstalldir != '' | ||
29 | + pythondir = join_paths([prefix, pythoninstalldir]) | ||
30 | +else | ||
31 | + pythondir = join_paths([prefix, python.sysconfig_path('purelib')]) | ||
32 | +endif | ||
33 | |||
34 | if get_option('policykit') | ||
35 | have_polkit = 'True' | ||
36 | diff --git a/meson_options.txt b/meson_options.txt | ||
37 | index 177d9ab8..3e397d8e 100644 | ||
38 | --- a/meson_options.txt | ||
39 | +++ b/meson_options.txt | ||
40 | @@ -2,6 +2,7 @@ option('runtime_deps_check', type: 'boolean', value: true, description: 'Disable | ||
41 | option('dhcp-config-path', type: 'string', value: '/etc/dhcp3/dhcpd.conf', description: 'Set dhcp3 server configuration path') | ||
42 | option('policykit', type: 'boolean', value: true, description: 'Enable policykit support') | ||
43 | option('pulseaudio', type: 'boolean', value: true, description: 'Enable PulseAudio support') | ||
44 | +option('pythoninstalldir', type: 'string', description: 'Path to python site-packages dir relative to ${prefix}') | ||
45 | option('systemdsystemunitdir', type: 'string', description: 'Path to systemd system unit dir relative to ${prefix}') | ||
46 | option('systemduserunitdir', type: 'string', description: 'Path to systemd user unit dir relative to ${prefix}') | ||
47 | option('sendto-plugins', type: 'array', choices: ['Caja', 'Nemo', 'Nautilus'], value: ['Caja', 'Nemo', 'Nautilus'], description: 'Install sendto plugins for various filemanagers') | ||
48 | -- | ||
49 | 2.34.1 | ||
50 | |||
diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch b/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch deleted file mode 100644 index 282d821374..0000000000 --- a/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | Fix fail to enable bluetooth issue | ||
2 | |||
3 | When launch blueman-manager while bluetooth is disable, it may fails | ||
4 | with error: | ||
5 | |||
6 | Failed to enable bluetooth | ||
7 | |||
8 | Because when get bluetooth status right after change its status, the | ||
9 | status may not be updated that plugin applet/KillSwitch.py sets the | ||
10 | bluetooth status via method of another dbus service which doesn't return | ||
11 | immediately. | ||
12 | |||
13 | Provides a new dbus method for PowerManager which checks whether dbus | ||
14 | method SetBluetoothStatus() has finished. Then it makes sure to get | ||
15 | right bluetooth status. | ||
16 | |||
17 | Upstream-Status: Inappropriate | ||
18 | Send to upstream but not accepted: | ||
19 | https://github.com/blueman-project/blueman/pull/1121 | ||
20 | |||
21 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
22 | --- | ||
23 | blueman/Functions.py | 10 ++++++++++ | ||
24 | blueman/plugins/applet/PowerManager.py | 4 ++++ | ||
25 | 2 files changed, 14 insertions(+) | ||
26 | |||
27 | diff --git a/blueman/Functions.py b/blueman/Functions.py | ||
28 | index 3917f42..b4d5eae 100644 | ||
29 | --- a/blueman/Functions.py | ||
30 | +++ b/blueman/Functions.py | ||
31 | @@ -80,6 +80,16 @@ def check_bluetooth_status(message: str, exitfunc: Callable[[], Any]) -> None: | ||
32 | return | ||
33 | |||
34 | applet.SetBluetoothStatus('(b)', True) | ||
35 | + | ||
36 | + timeout = time.time() + 10 | ||
37 | + while applet.GetRequestStatus(): | ||
38 | + time.sleep(0.1) | ||
39 | + if time.time() > timeout: | ||
40 | + # timeout 5s has been set in applet/PowerManager.py | ||
41 | + # so it should NOT reach timeout here | ||
42 | + logging.warning('Should NOT reach timeout.') | ||
43 | + break | ||
44 | + | ||
45 | if not applet.GetBluetoothStatus(): | ||
46 | print('Failed to enable bluetooth') | ||
47 | exitfunc() | ||
48 | diff --git a/blueman/plugins/applet/PowerManager.py b/blueman/plugins/applet/PowerManager.py | ||
49 | index c2f7bc3..bf6c99f 100644 | ||
50 | --- a/blueman/plugins/applet/PowerManager.py | ||
51 | +++ b/blueman/plugins/applet/PowerManager.py | ||
52 | @@ -63,6 +63,7 @@ class PowerManager(AppletPlugin, StatusIconProvider): | ||
53 | self._add_dbus_signal("BluetoothStatusChanged", "b") | ||
54 | self._add_dbus_method("SetBluetoothStatus", ("b",), "", self.request_power_state) | ||
55 | self._add_dbus_method("GetBluetoothStatus", (), "b", self.get_bluetooth_status) | ||
56 | + self._add_dbus_method("GetRequestStatus", (), "b", self.get_request_status) | ||
57 | |||
58 | def on_unload(self) -> None: | ||
59 | self.parent.Plugins.Menu.unregister(self) | ||
60 | @@ -196,6 +197,9 @@ class PowerManager(AppletPlugin, StatusIconProvider): | ||
61 | def get_bluetooth_status(self) -> bool: | ||
62 | return self.current_state | ||
63 | |||
64 | + def get_request_status(self): | ||
65 | + return self.request_in_progress | ||
66 | + | ||
67 | def on_adapter_property_changed(self, _path: str, key: str, value: Any) -> None: | ||
68 | if key == "Powered": | ||
69 | if value and not self.current_state: | ||
70 | -- | ||
71 | 2.31.1 | ||
72 | |||
diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb index 0374d23f0c..5aa3b2bd55 100644 --- a/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb +++ b/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb | |||
@@ -8,16 +8,11 @@ inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache u | |||
8 | 8 | ||
9 | REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" | 9 | REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" |
10 | 10 | ||
11 | SRC_URI = " \ | 11 | SRC_URI = "git://github.com/blueman-project/blueman.git;protocol=https;branch=2-4-stable" |
12 | git://github.com/blueman-project/blueman.git;protocol=https;branch=2-3-stable \ | ||
13 | file://0001-Search-for-cython3.patch \ | ||
14 | file://0002-fix-fail-to-enable-bluetooth.patch \ | ||
15 | file://0001-meson-add-pythoninstalldir-option.patch \ | ||
16 | " | ||
17 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
18 | SRCREV = "c85e7afb8d6547d4c35b7b639124de8e999c3650" | 13 | SRCREV = "7bcf919ad6ac0ee9a8c66b18b0ca98af877d4c8f" |
19 | 14 | ||
20 | EXTRA_OEMESON = "-Druntime_deps_check=false -Dpythoninstalldir=${@noprefix('PYTHON_SITEPACKAGES_DIR', d)}" | 15 | EXTRA_OEMESON = "-Druntime_deps_check=false" |
21 | 16 | ||
22 | SYSTEMD_SERVICE:${PN} = "${BPN}-mechanism.service" | 17 | SYSTEMD_SERVICE:${PN} = "${BPN}-mechanism.service" |
23 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" | 18 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" |
@@ -61,23 +56,6 @@ do_install:append() { | |||
61 | ${D}${bindir}/blueman-tray | 56 | ${D}${bindir}/blueman-tray |
62 | } | 57 | } |
63 | 58 | ||
64 | do_install:append() { | ||
65 | install -d ${D}${datadir}/polkit-1/rules.d | ||
66 | cat >${D}${datadir}/polkit-1/rules.d/51-blueman.rules <<EOF | ||
67 | /* Allow users in wheel group to use blueman feature requiring root without authentication */ | ||
68 | polkit.addRule(function(action, subject) { | ||
69 | if ((action.id == "org.blueman.network.setup" || | ||
70 | action.id == "org.blueman.dhcp.client" || | ||
71 | action.id == "org.blueman.rfkill.setstate" || | ||
72 | action.id == "org.blueman.pppd.pppconnect") && | ||
73 | subject.isInGroup("wheel")) { | ||
74 | |||
75 | return polkit.Result.YES; | ||
76 | } | ||
77 | }); | ||
78 | EOF | ||
79 | } | ||
80 | |||
81 | USERADD_PACKAGES = "${PN}" | 59 | USERADD_PACKAGES = "${PN}" |
82 | USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" | 60 | USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" |
83 | 61 | ||