All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/bluez5_utils: correct systemd service install
@ 2016-06-16 17:15 Martin Bark
  2016-06-16 20:14 ` Yann E. MORIN
  2016-06-18 13:38 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Martin Bark @ 2016-06-16 17:15 UTC (permalink / raw)
  To: buildroot

Commit d732fa4 add the BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD rule, however,
it is not correct.  The [Install] section of bluetooth.service is as
follows:

 [Install]
 WantedBy=bluetooth.target
 Alias=dbus-org.bluez.service

hence there are currently two mistakes:
 1) bluetooth.service is wanted by bluetooth.target not multi-user.target
 2) dbus-org.bluez.service is a missing alias to bluetooth.service

This commit fixes both these issues.

Signed-off-by: Martin Bark <martin@barkynet.com>
---
 package/bluez5_utils/bluez5_utils.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk
index ddc8c45..49cc7c2 100644
--- a/package/bluez5_utils/bluez5_utils.mk
+++ b/package/bluez5_utils/bluez5_utils.mk
@@ -77,9 +77,11 @@ BLUEZ5_UTILS_CONF_OPTS += --disable-systemd
 endif
 
 define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD
-	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants
 	ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
-		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/bluetooth.service
+		$(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants/bluetooth.service
+	ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
+		$(TARGET_DIR)/etc/systemd/system/dbus-org.bluez.service
 endef
 
 $(eval $(autotools-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 1/1] package/bluez5_utils: correct systemd service install
  2016-06-16 17:15 [Buildroot] [PATCH 1/1] package/bluez5_utils: correct systemd service install Martin Bark
@ 2016-06-16 20:14 ` Yann E. MORIN
  2016-06-16 20:59   ` Martin Bark
  2016-06-18 13:38 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2016-06-16 20:14 UTC (permalink / raw)
  To: buildroot

Martin, All,

On 2016-06-16 18:15 +0100, Martin Bark spake thusly:
> Commit d732fa4 add the BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD rule, however,
> it is not correct.  The [Install] section of bluetooth.service is as
> follows:
> 
>  [Install]
>  WantedBy=bluetooth.target
>  Alias=dbus-org.bluez.service
> 
> hence there are currently two mistakes:
>  1) bluetooth.service is wanted by bluetooth.target not multi-user.target
>  2) dbus-org.bluez.service is a missing alias to bluetooth.service
> 
> This commit fixes both these issues.
> 
> Signed-off-by: Martin Bark <martin@barkynet.com>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

However, the way we handle the systemd units is not tenable in the long
run. If the next version of bluez changes this unit, we'd have to keep
in sync. And so on for *all* packages.

I'd pretty much prefer we get something that automatically installs the
units in their correct location.

So, maybe we'd need a kind of cross systemctl helper, to provide us with
the means to install/remove units in $(O)/target/ instead of duplicating
the effort in all our packages...

I think a simple parser that interprets WantedBy, Alias and the likes
would be relatively easy to write...

Brought to you by the same "Famous Last Words (TM)" company that brought
you the cross ldconfig earlier!  ;-] )

Regards,
Yann E. MORIN.

> ---
>  package/bluez5_utils/bluez5_utils.mk | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk
> index ddc8c45..49cc7c2 100644
> --- a/package/bluez5_utils/bluez5_utils.mk
> +++ b/package/bluez5_utils/bluez5_utils.mk
> @@ -77,9 +77,11 @@ BLUEZ5_UTILS_CONF_OPTS += --disable-systemd
>  endif
>  
>  define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD
> -	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
> +	mkdir -p $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants
>  	ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
> -		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/bluetooth.service
> +		$(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants/bluetooth.service
> +	ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
> +		$(TARGET_DIR)/etc/systemd/system/dbus-org.bluez.service
>  endef
>  
>  $(eval $(autotools-package))
> -- 
> 2.7.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] package/bluez5_utils: correct systemd service install
  2016-06-16 20:14 ` Yann E. MORIN
@ 2016-06-16 20:59   ` Martin Bark
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Bark @ 2016-06-16 20:59 UTC (permalink / raw)
  To: buildroot

Yann,

On 16 June 2016 at 21:14, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Martin, All,
>
> On 2016-06-16 18:15 +0100, Martin Bark spake thusly:
>> Commit d732fa4 add the BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD rule, however,
>> it is not correct.  The [Install] section of bluetooth.service is as
>> follows:
>>
>>  [Install]
>>  WantedBy=bluetooth.target
>>  Alias=dbus-org.bluez.service
>>
>> hence there are currently two mistakes:
>>  1) bluetooth.service is wanted by bluetooth.target not multi-user.target
>>  2) dbus-org.bluez.service is a missing alias to bluetooth.service
>>
>> This commit fixes both these issues.
>>
>> Signed-off-by: Martin Bark <martin@barkynet.com>
>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> However, the way we handle the systemd units is not tenable in the long
> run. If the next version of bluez changes this unit, we'd have to keep
> in sync. And so on for *all* packages.
>
> I'd pretty much prefer we get something that automatically installs the
> units in their correct location.
>
> So, maybe we'd need a kind of cross systemctl helper, to provide us with
> the means to install/remove units in $(O)/target/ instead of duplicating
> the effort in all our packages...
>
> I think a simple parser that interprets WantedBy, Alias and the likes
> would be relatively easy to write...
>
> Brought to you by the same "Famous Last Words (TM)" company that brought
> you the cross ldconfig earlier!  ;-] )

Yes i agree, i was thinking the exact same thing.  The
XXX_INSTALL_INIT_SYSTEMD should be automatic since it's just mimicking
systemctl enable <service>.

Thanks

Martin

>
> Regards,
> Yann E. MORIN.
>
>> ---
>>  package/bluez5_utils/bluez5_utils.mk | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk
>> index ddc8c45..49cc7c2 100644
>> --- a/package/bluez5_utils/bluez5_utils.mk
>> +++ b/package/bluez5_utils/bluez5_utils.mk
>> @@ -77,9 +77,11 @@ BLUEZ5_UTILS_CONF_OPTS += --disable-systemd
>>  endif
>>
>>  define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD
>> -     mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
>> +     mkdir -p $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants
>>       ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
>> -             $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/bluetooth.service
>> +             $(TARGET_DIR)/etc/systemd/system/bluetooth.target.wants/bluetooth.service
>> +     ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \
>> +             $(TARGET_DIR)/etc/systemd/system/dbus-org.bluez.service
>>  endef
>>
>>  $(eval $(autotools-package))
>> --
>> 2.7.4
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/1] package/bluez5_utils: correct systemd service install
  2016-06-16 17:15 [Buildroot] [PATCH 1/1] package/bluez5_utils: correct systemd service install Martin Bark
  2016-06-16 20:14 ` Yann E. MORIN
@ 2016-06-18 13:38 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-06-18 13:38 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 16 Jun 2016 18:15:38 +0100, Martin Bark wrote:
> Commit d732fa4 add the BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD rule, however,
> it is not correct.  The [Install] section of bluetooth.service is as
> follows:
> 
>  [Install]
>  WantedBy=bluetooth.target
>  Alias=dbus-org.bluez.service
> 
> hence there are currently two mistakes:
>  1) bluetooth.service is wanted by bluetooth.target not multi-user.target
>  2) dbus-org.bluez.service is a missing alias to bluetooth.service
> 
> This commit fixes both these issues.
> 
> Signed-off-by: Martin Bark <martin@barkynet.com>
> ---
>  package/bluez5_utils/bluez5_utils.mk | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-06-18 13:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-16 17:15 [Buildroot] [PATCH 1/1] package/bluez5_utils: correct systemd service install Martin Bark
2016-06-16 20:14 ` Yann E. MORIN
2016-06-16 20:59   ` Martin Bark
2016-06-18 13:38 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.