unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* bluetooth-service: addition config vaules
@ 2021-12-10 12:35 Demis Balbach
  2021-12-11 13:57 ` Josselin Poiret
  0 siblings, 1 reply; 5+ messages in thread
From: Demis Balbach @ 2021-12-10 12:35 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

Hello,

I hope this is the proper mailing list to post to, if not please
redirect me.

I'd like to propose extending the possible config values for the
bluetooth-configuration.

At the moment, only `AutoEnable' is available. But there are more,
specifially:

main.conf:
--8<---------------cut here---------------start------------->8---
[General]
# Default adapter name
# Defaults to 'BlueZ X.YZ'
Name = BlueZ

# Automatically connect both A2DP and HFP/HSP profiles for incoming
# connections. Some headsets that support both profiles will only connect the
# other one automatically so the default setting of true is usually a good
# idea.
AutoConnect=true

# Enables Multi Profile Specification support. This allows to specify if
# system supports only Multiple Profiles Single Device (MPSD) configuration
# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
# Devices (MPMD) configurations.
# Possible values: "off", "single", "multiple"
MultiProfile = multiple
--8<---------------cut here---------------end--------------->8---

These are the ones I find particularly important and should be make
available to the service. But there are more:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/main.conf

ideally, we would add all of them.

If someone can explain to me how to test and submit it myself, I'll do
it. But I head that it's not as easy as submitting a patch for a
package. I believe a seasoned contributer could submit something way
faster.

In any case, 

Best regards / Mit freundlichen Grüßen,
Demis Balbach

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bluetooth-service: addition config vaules
  2021-12-10 12:35 bluetooth-service: addition config vaules Demis Balbach
@ 2021-12-11 13:57 ` Josselin Poiret
  2021-12-11 17:02   ` Demis Balbach
  2021-12-13 19:38   ` Demis Balbach
  0 siblings, 2 replies; 5+ messages in thread
From: Josselin Poiret @ 2021-12-11 13:57 UTC (permalink / raw)
  To: Demis Balbach, guix-devel; +Cc: dev

Hello,

Demis Balbach <db@minikn.xyz> writes:

> If someone can explain to me how to test and submit it myself, I'll do
> it. But I head that it's not as easy as submitting a patch for a
> package. I believe a seasoned contributer could submit something way
> faster.
>
> In any case, 
>
> Best regards / Mit freundlichen Grüßen,
> Demis Balbach

I think this is pretty approachable, especially given the fact that you
don't need to write the whole service from scratch.

All of the following takes place in gnu/services/desktop.scm: the
options given to the service via the bluetooth-configuration record end
up being inserted into the gexp that the bluetooth-directory procedure
returns, which is itself used to build the actual /etc/bluetooth/
directory for the system (see "G-Expressions" in the manual if you want
more info about gexps, although you won't need to manipulate them for
this).  The contents of the main.conf file are generated with the
bluetooth-configuration-file procedure, which contains only basic string
manipulation.

So, in order to add new options to the bluetooth service,
you would need to only modify the bluetooth-configuration record to add
them, with proper defaults, as well as add the relevant lines in
bluetooth-configuration-file.  As to testing, you could simply run `guix
system build some-test-system-conf.scm` and check that the resulting
/gnu/store/xxxx-system/etc/bluetooth/ folder contains the proper
configuration file.  Ideally, you would also test if the features
themselves end up working properly, but I am hopeful that bluetoothd
will handle them just as well.

Good luck!

Best,
Josselin Poiret


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bluetooth-service: addition config vaules
  2021-12-11 13:57 ` Josselin Poiret
@ 2021-12-11 17:02   ` Demis Balbach
  2021-12-13 19:38   ` Demis Balbach
  1 sibling, 0 replies; 5+ messages in thread
From: Demis Balbach @ 2021-12-11 17:02 UTC (permalink / raw)
  To: Josselin Poiret, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1948 bytes --]

On 2021-12-11 14:57, Josselin Poiret wrote:

> I think this is pretty approachable, especially given the fact that you
> don't need to write the whole service from scratch.
>
> All of the following takes place in gnu/services/desktop.scm: the
> options given to the service via the bluetooth-configuration record end
> up being inserted into the gexp that the bluetooth-directory procedure
> returns, which is itself used to build the actual /etc/bluetooth/
> directory for the system (see "G-Expressions" in the manual if you want
> more info about gexps, although you won't need to manipulate them for
> this).  The contents of the main.conf file are generated with the
> bluetooth-configuration-file procedure, which contains only basic string
> manipulation.
>
> So, in order to add new options to the bluetooth service,
> you would need to only modify the bluetooth-configuration record to add
> them, with proper defaults, as well as add the relevant lines in
> bluetooth-configuration-file.  As to testing, you could simply run `guix
> system build some-test-system-conf.scm` and check that the resulting
> /gnu/store/xxxx-system/etc/bluetooth/ folder contains the proper
> configuration file.  Ideally, you would also test if the features
> themselves end up working properly, but I am hopeful that bluetoothd
> will handle them just as well.
>
> Good luck!
>
> Best,
> Josselin Poiret

Hello Josselin,

I should have been more clear with my last message. Indeed I would be
able to add the additional config values to the service. I haven't done
so because I was told in order to get a service merged into Guix, one
has to provide a "test marionette" (I don't even know what that is since
it's not documented in the manual).

That's what was holding me back. But if that's not the case I'll gladly
submit a patch in the upcoming days.

-- 
Best regards / Mit freundlichen Grüßen,
Demis Balbach

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bluetooth-service: addition config vaules
  2021-12-11 13:57 ` Josselin Poiret
  2021-12-11 17:02   ` Demis Balbach
@ 2021-12-13 19:38   ` Demis Balbach
  2021-12-17 13:33     ` Demis Balbach
  1 sibling, 1 reply; 5+ messages in thread
From: Demis Balbach @ 2021-12-13 19:38 UTC (permalink / raw)
  To: Josselin Poiret, guix-devel

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

On 2021-12-11 14:57, Josselin Poiret wrote:

Hello,

I submitted a patch. ID: 52470.

Unfortunately I can't find it here for some reason:
https://issues.guix.gnu.org/52470

-- 
Best regards / Mit freundlichen Grüßen,
Demis Balbach

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bluetooth-service: addition config vaules
  2021-12-13 19:38   ` Demis Balbach
@ 2021-12-17 13:33     ` Demis Balbach
  0 siblings, 0 replies; 5+ messages in thread
From: Demis Balbach @ 2021-12-17 13:33 UTC (permalink / raw)
  To: Josselin Poiret, guix-devel

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

On 2021-12-13 20:38, Demis Balbach wrote:

Hello, I submitted a new patch, with the changes you recommended. I
don't know how emacs messed up the indentation on those lines. Actually,
it didn't mess it up, it default to indenting it like this, so I guess
there is a style guide in place emacs doesn't know about ...?

Patch-ID: 52575. 

-- 
Best regards / Mit freundlichen Grüßen,
Demis Balbach

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-17 13:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-10 12:35 bluetooth-service: addition config vaules Demis Balbach
2021-12-11 13:57 ` Josselin Poiret
2021-12-11 17:02   ` Demis Balbach
2021-12-13 19:38   ` Demis Balbach
2021-12-17 13:33     ` Demis Balbach

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).