Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 639434 - net-wireless/bluez REQUIRED_USE="user-session? ( systemd)" conflicts with sys-apps/dbus[user-session,-systemd]
Summary: net-wireless/bluez REQUIRED_USE="user-session? ( systemd)" conflicts with sys...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-12-01 20:21 UTC by Andreas Sturmlechner
Modified: 2019-03-31 09:09 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bluez-user-session.patch (bluez-user-session.patch,1.91 KB, patch)
2018-04-05 17:38 UTC, Andreas Sturmlechner
Details | Diff
bluez-user-session.patch (bluez-user-session.patch,2.27 KB, patch)
2018-04-05 17:56 UTC, Andreas Sturmlechner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sturmlechner gentoo-dev 2017-12-01 20:21:29 UTC
It should also work with sys-auth/elogind as an alternative logind implementation.

It is unclear yet if that means bluez needs changes to code or build system.
Comment 1 Pacho Ramos gentoo-dev 2018-01-03 14:39:43 UTC
To test if something more is needed you can simply try to see if you are able to send/receive files with, for example, bluedevil booting without systemd and with dbus and bluez compiled with user-session enabled
Comment 2 Sven Eden 2018-01-09 15:57:49 UTC
Hmm... I never had bluez in mind, but missing elogind support might be the reason why my bluetooth chip doesn't come online for a long time now. I never cared, as I do not use bluetooth, but I think I can test this.
Comment 3 Andreas Sturmlechner gentoo-dev 2018-02-16 21:40:40 UTC
Sven, did you have time to look into this?
Comment 4 Sven Eden 2018-03-08 09:14:31 UTC
(In reply to Andreas Sturmlechner from comment #3)
> Sven, did you have time to look into this?

Ah! I forgot to write. Damn...

Well, I had so much trouble with broadcom-sta, that I finally cracked and ripped that damn thing out. I now use am intel wifi card, which works remarkably well.

But although /etc/init.d/bluetooth enables bt, and I can scan for devices, nothing is ever found, and no connections can be established. IIRC a scan from my cell phone finds the Laptop, but can not pair either.

That said my tests were in a bit of a hurry, and I will test once more tonight and report back here at once.
Comment 5 Sven Eden 2018-03-08 18:47:25 UTC
Okay, I just tested this again.

 1) /etc/init.d/bluetooth start -> works, bluetooth is activated
 2) Plasma integration works so far.
 3) I found my phone from my Laptop.
 4) I *DID NOT* find my Laptop from my phone!
    (Both had visibility enabled)
 5) Pairing from my Laptop had both devices to show a PIN to confirm.
 6) After Confirmation, the phone said it was paired with the Laptop.
    But the Laptop said, pairing failed.
 7) All further attempts to pair the devices failed.

So there is definitely somthing awry. I'll have a look.
Comment 6 Sven Eden 2018-03-08 19:17:28 UTC
I am sorry, but the only thing that --enable-systemd does, is to install a dbus service file and a systemd unit file. The first starts the latter on demand, if anything tries to access org.bluez via dbus.

Otherwise there is absolutely no difference in neither configuration nor runtime behaviour.

The org.bluez.obex is already patched to support non-systemd systems. But that is only needed for file transfers.

However, systemd-logind is nowhere used, so there is nothing for elogind to be integrated into.
Comment 7 Sven Eden 2018-03-08 19:26:18 UTC
(In reply to Sven Eden from comment #5)
>  6) After Confirmation, the phone said it was paired with the Laptop.
>     But the Laptop said, pairing failed.
>  7) All further attempts to pair the devices failed.

Call me an idiot if you like, but I was too quick on this.

When I use the Bluetooth icon in the Plasma icon bar, and click on "connect", it fails, because the two devices *are* paired.

I just sent files via bluetooth between my Laptop and phone.

So, nothing for me to do here...
Comment 8 Andreas Sturmlechner gentoo-dev 2018-04-05 16:55:36 UTC
So, to recap, the patch that is applied by USE=-user-session in this ebuild (line 101) is only necessary if *systemd* is active. However, dbus[user-session,elogind] is a valid use-flag setting too (if that makes any sense, @Sven?), and would conflict here because of dbus[user-session=] and subsequent REQUIRED_USE="user-session ( systemd )".

Pacho, would it be possible to drop that REQUIRED_USE condition and apply the patch on the condition of `has_version "sys-apps/dbus[user-session,systemd]"`?
Comment 9 Andreas Sturmlechner gentoo-dev 2018-04-05 17:38:06 UTC
Created attachment 526652 [details, diff]
bluez-user-session.patch

Last sentence in above comment should have read `s/apply the patch/make the link/`. The patch, as I understand, is always required if !user-session and stays that way.
Comment 10 Andreas Sturmlechner gentoo-dev 2018-04-05 17:56:23 UTC
Created attachment 526658 [details, diff]
bluez-user-session.patch

fixed version
Comment 11 Pacho Ramos gentoo-dev 2018-04-05 22:09:36 UTC
The problem is that to get bluez working with dbus compiled with user-session you needed to run systemd, otherwise bluez wasn't working with dbus[user-session] and it needed -user-session then

Has anyone finally checked the comment #1 test case with elogind?
Comment 12 Amel Hodzic 2018-06-04 08:46:49 UTC
sys-apps/dbus:0

  (sys-apps/dbus-1.10.24:0/0::gentoo, ebuild scheduled for merge) conflicts with
    >=sys-apps/dbus-1.6:0/0=[-user-session] required by (net-wireless/bluez-5.49-r1:0/3::gentoo, installed)
                             ^^^^^^^^^^^^^
    >=sys-apps/dbus-1.6:=[-user-session] required by (net-wireless/bluez-5.49-r1:0/3::gentoo, installed)


```
equery u bluez sys-apps/dbus systemd
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for net-wireless/bluez-5.49-r1:
 U I
 - - abi_x86_32               : 32-bit (x86) libraries
 + + alsa                     : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - cups                     : Add support for CUPS (Common Unix Printing System)
 - - debug                    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 - - deprecated               : Build deprecated plugins
 - - doc                      : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 - - experimental             : Build experimental plugins
 - - extra-tools              : Install tools that upstream doesn't install on purpose by default. All this tools shouldn't be used. Then, please notify upstream about you still need them to let them know the situation.
 + + mesh                     : Add support for Bluetooth Mesh control application and advertising bearer.
 + + obex                     : Enable OBEX transfer support.
 + + python_targets_python2_7 : Build with Python 2.7
 + + readline                 : Enable support for libreadline, a GNU line-editing library that almost everyone wants
 + + systemd                  : Enable use of systemd-specific libraries and features like socket activation or session tracking
 - - test                     : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore
 - - test-programs            : Install tools for testing of various Bluetooth functions
 + + udev                     : Enable virtual/udev integration (device discovery, power and storage device support, etc)

 * Found these USE flags for sys-apps/dbus-1.10.24:
 U I
 + + X            : Add support for X11
 - - abi_x86_32   : 32-bit (x86) libraries
 - - debug        : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 - - doc          : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 - - elogind      : Use sys-auth/elogind for session tracking.
 - - static-libs  : Build static versions of dynamic libraries as well
 + + systemd      : Build with sys-apps/systemd at_console support
 - - test         : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore
 + - user-session : Enable user-session semantics for session bus under systemd

 * Found these USE flags for sys-apps/systemd-238-r7:
 U I
 - - abi_x86_32 : 32-bit (x86) libraries
 + + acl        : Add support for Access Control Lists
 - - apparmor   : Enable AppArmor support
 + + audit      : Enable support for sys-process/audit
 - - build      : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping [make stage1]
 + + cryptsetup : Enable cryptsetup tools (includes unit generator for crypttab)
 + + curl       : Enable support for uploading journals
 + + elfutils   : Enable coredump stacktraces in the journal
 + + gcrypt     : Enable sealing of journal files using gcrypt
 + + gnuefi     : Enable EFI boot manager and stub loader (built using sys-boot/gnu-efi)
 - - http       : Enable embedded HTTP server in journald
 - - idn        : Enable support for Internationalized Domain Names
 + + importd    : Enable import daemon
 + + kmod       : Enable kernel module loading via sys-apps/kmod
 - - libidn2    : If IDN support is enabled, use net-dns/libidn2 instead of net-dns/libidn
 + + lz4        : Enable lz4 compression for the journal
 + + lzma       : Support for LZMA (de)compression algorithm
 + + nat        : Enable support for network address translation in networkd
 + + pam        : Add support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
 + + pcre       : Add support for Perl Compatible Regular Expressions
 + + policykit  : Enable PolicyKit authentication support
 + + qrcode     : Enable qrcode output support in journal
 + + seccomp    : Enable seccomp (secure computing mode) to perform system call filtering at runtime to increase security of programs
 + + split-usr  : Enable this if /bin and /usr/bin are separate directories
 + + ssl        : Add support for SSL/TLS connections (Secure Socket Layer / Transport Layer Security)
 + + sysv-utils : Install sysvinit compatibility symlinks and manpages for init, telinit, halt, poweroff, reboot, runlevel, and shutdown
 - - test       : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore
 - - vanilla    : Disable Gentoo-specific behavior and compatibility quirks
 - - xkb        : Depend on x11-libs/libxkbcommon to allow logind to control the X11 keymap

```
Comment 13 Amel Hodzic 2018-06-04 08:49:02 UTC
Based on the previous messages, I would've thought that the bluez package wouldn't be requiring dbus[-user-session] on a systemd system.
Comment 14 Sven Eden 2018-06-21 14:28:30 UTC
Does not block elogind-support, as systemd-loing isn't concerned either.
Comment 15 Michael Palimaka (kensington) gentoo-dev 2019-03-25 11:15:33 UTC
I tested Andreas' patch using the procedure from comment #1 successfully. Pacho, can this patch be applied?
Comment 16 Pacho Ramos gentoo-dev 2019-03-25 20:41:48 UTC
(In reply to Michael Palimaka (kensington) from comment #15)
> I tested Andreas' patch using the procedure from comment #1 successfully.
> Pacho, can this patch be applied?

Sure, go ahead please 
Thanks!
Comment 17 Larry the Git Cow gentoo-dev 2019-03-30 09:59:50 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5d26a84beb1f94bf211dbfdb4d92c336ac2f9cc

commit a5d26a84beb1f94bf211dbfdb4d92c336ac2f9cc
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-03-28 14:55:26 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-03-30 09:58:21 +0000

    net-wireless/bluez: Unbreak REQUIRED_USE="user-session? ( systemd)"
    
    Bug: https://bugs.gentoo.org/639434
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 net-wireless/bluez/bluez-5.50-r2.ebuild | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)