Accepting request 934690 from Base:System
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/934690 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bluez?expand=0&rev=183
This commit is contained in:
commit
6febe1a2cf
38
0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
Normal file
38
0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 90b72b787a6ae6b9b0bf8ece238e108e8607a433 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Sat, 9 Nov 2013 18:13:43 +0100
|
||||
Subject: [PATCH 1/2] obex: Use GLib helper function to manipulate paths
|
||||
|
||||
Instead of trying to do it by hand. This also makes sure that
|
||||
relative paths aren't used by the agent.
|
||||
---
|
||||
obexd/src/manager.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/obexd/src/manager.c b/obexd/src/manager.c
|
||||
index f84384ae4..285c07c37 100644
|
||||
--- a/obexd/src/manager.c
|
||||
+++ b/obexd/src/manager.c
|
||||
@@ -650,14 +650,14 @@ static void agent_reply(DBusPendingCall *call, void *user_data)
|
||||
DBUS_TYPE_STRING, &name,
|
||||
DBUS_TYPE_INVALID)) {
|
||||
/* Splits folder and name */
|
||||
- const char *slash = strrchr(name, '/');
|
||||
+ gboolean is_relative = !g_path_is_absolute(name);
|
||||
DBG("Agent replied with %s", name);
|
||||
- if (!slash) {
|
||||
- agent->new_name = g_strdup(name);
|
||||
+ if (is_relative) {
|
||||
+ agent->new_name = g_path_get_basename(name);
|
||||
agent->new_folder = NULL;
|
||||
} else {
|
||||
- agent->new_name = g_strdup(slash + 1);
|
||||
- agent->new_folder = g_strndup(name, slash - name);
|
||||
+ agent->new_name = g_path_get_basename(name);
|
||||
+ agent->new_folder = g_path_get_dirname(name);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.14.1
|
||||
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 23 09:52:32 UTC 2021 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||
|
||||
- Stop nuking the obex service, we support user systemd services
|
||||
just fine now. Following this, no longer hack the dbus service,
|
||||
leave it as a systemd service as upstream intended.
|
||||
- Split out obex in own package with it's needed enabledment as a
|
||||
systemd user service.
|
||||
- Add 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch:
|
||||
obex: Use GLib helper function to manipulate paths. Instead of
|
||||
trying to do it by hand. This also makes sure that relative paths
|
||||
aren't used by the agent. Patch from fedora.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 17 07:39:24 UTC 2021 - Stefan Seyfried <seife+obs@b1-systems.com>
|
||||
|
||||
|
39
bluez.spec
39
bluez.spec
@ -53,6 +53,9 @@ Patch6: 0002-Use-g_memdup2-everywhere.patch
|
||||
#
|
||||
# Move 43xx firmware path for RPi3 bluetooth support bsc#1140688
|
||||
Patch10: RPi-Move-the-43xx-firmware-into-lib-firmware.patch
|
||||
#
|
||||
# PATCH-FIX-UPSTREAM 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch -- obex: Use GLib helper function to manipulate paths
|
||||
Patch11: https://src.fedoraproject.org/rpms/bluez/raw/rawhide/f/0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
|
||||
# Upstream suggests to use btmon instead of hcidump and does not want those patches
|
||||
# => PATCH-FIX-OPENSUSE for those two :-)
|
||||
# fix some memory leak with malformed packet (reported upstream but not yet fixed)
|
||||
@ -184,15 +187,20 @@ Note that this package will go away before end of 2020, change your code
|
||||
to use the modern tools instead.
|
||||
%endif
|
||||
|
||||
%package obexd
|
||||
Summary: Object Exchange daemon for sharing content
|
||||
License: GPL-2.0-or-later
|
||||
Group: Hardware/Mobile
|
||||
Requires: bluez = %{version}
|
||||
|
||||
%description obexd
|
||||
Object Exchange daemon for sharing content.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autopatch -p1
|
||||
mkdir dbus-apis
|
||||
cp -a doc/*.txt dbus-apis/
|
||||
# FIXME: Change the dbus service to be a real service, not systemd launched
|
||||
sed -i "s:Exec=/bin/false:Exec=%{_libexecdir}/bluetooth/obexd:g" obexd/src/org.bluez.obex.service
|
||||
sed -i "/SystemdService=.*/d" obexd/src/org.bluez.obex.service
|
||||
# END FIXME
|
||||
|
||||
# for auto-enable subpackage
|
||||
sed -i '/^#AutoEnable=false/aAutoEnable=true' src/main.conf
|
||||
@ -242,10 +250,6 @@ install --mode=0644 -D %{SOURCE7} %{buildroot}/%{_sysconfdir}/modprobe.d/50-blue
|
||||
# no idea why this is suddenly necessary...
|
||||
install --mode 0755 -d %{buildroot}%{_localstatedir}/lib/bluetooth
|
||||
|
||||
# FIXME: Do not delete the systemd service once we support systemd user/session services
|
||||
rm %{buildroot}%{_userunitdir}/obex.service
|
||||
# end FIXME
|
||||
|
||||
## same as in fedora...
|
||||
# "make install" fails to install gatttool, used with Bluetooth Low Energy
|
||||
# boo#970628
|
||||
@ -318,6 +322,18 @@ touch -r %{SOURCE0} %{buildroot}%{_defaultdocdir}/%{name}/README-mesh.SUSE
|
||||
%post -n libbluetooth3 -p /sbin/ldconfig
|
||||
%postun -n libbluetooth3 -p /sbin/ldconfig
|
||||
|
||||
%pre obexd
|
||||
%systemd_user_pre obex.service
|
||||
|
||||
%post obexd
|
||||
%systemd_user_post obex.service
|
||||
|
||||
%preun obexd
|
||||
%systemd_user_preun obex.service
|
||||
|
||||
%postun obexd
|
||||
%systemd_user_postun obex.service
|
||||
|
||||
%files
|
||||
%doc AUTHORS ChangeLog README dbus-apis src/main.conf
|
||||
%if %{with mesh}
|
||||
@ -339,7 +355,6 @@ touch -r %{SOURCE0} %{buildroot}%{_defaultdocdir}/%{name}/README-mesh.SUSE
|
||||
%{_bindir}/mesh-cfgtest
|
||||
%{_mandir}/man8/bluetooth-meshd.8%{?ext_man}
|
||||
%endif
|
||||
%{_libexecdir}/bluetooth/obexd
|
||||
%{_bindir}/bluetoothctl
|
||||
%{_bindir}/btmon
|
||||
%if %{with mesh}
|
||||
@ -364,11 +379,15 @@ touch -r %{SOURCE0} %{buildroot}%{_defaultdocdir}/%{name}/README-mesh.SUSE
|
||||
%{_unitdir}/bluetooth-mesh.service
|
||||
%endif
|
||||
%{_datadir}/dbus-1/system-services/org.bluez.service
|
||||
%{_datadir}/dbus-1/services/org.bluez.obex.service
|
||||
# not packaged, boo#1151518
|
||||
###%%{_datadir}/dbus-1/system-services/org.bluez.mesh.service
|
||||
%{_datadir}/zsh/site-functions/_bluetoothctl
|
||||
|
||||
%files obexd
|
||||
%{_libexecdir}/bluetooth/obexd
|
||||
%{_datadir}/dbus-1/services/org.bluez.obex.service
|
||||
%{_userunitdir}/obex.service
|
||||
|
||||
%if %{with bluez_deprecated}
|
||||
%files deprecated
|
||||
%{_bindir}/gatttool
|
||||
|
Loading…
Reference in New Issue
Block a user