* [PATCH] dbus 1.4.1: create UUIDDIR in postinst
@ 2011-05-27 13:40 Koen Kooi
2011-05-27 13:42 ` Koen Kooi
2011-05-27 13:47 ` Phil Blundell
0 siblings, 2 replies; 5+ messages in thread
From: Koen Kooi @ 2011-05-27 13:40 UTC (permalink / raw)
To: openembedded-core; +Cc: Koen Kooi
This fixes dbus usage in non-sysV init systems.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
meta/recipes-core/dbus/dbus.inc | 4 ++++
meta/recipes-core/dbus/dbus_1.4.1.bb | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 2a5f8bd..75a4d9d 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -49,13 +49,17 @@ pkg_postinst_dbus() {
MESSAGEUSER=messagebus
MESSAGEHOME=/var/run/dbus
+ UUIDDIR=/var/lib/dbus
mkdir -p $MESSAGEHOME || true
+ mkdir -p $UUIDDIR || true
chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup "$MESSAGEUSER"
chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || \
adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password \
--ingroup "$MESSAGEUSER" "$MESSAGEUSER"
+ chown "$MESSAGEUSER"."$MESSAGEUSER" "$UUIDDIR"
+
grep -q netdev: /etc/group || addgroup netdev
chown root:"$MESSAGEUSER" /usr/libexec/dbus-daemon-launch-helper
diff --git a/meta/recipes-core/dbus/dbus_1.4.1.bb b/meta/recipes-core/dbus/dbus_1.4.1.bb
index 1c8aeaa..f65ef35 100644
--- a/meta/recipes-core/dbus/dbus_1.4.1.bb
+++ b/meta/recipes-core/dbus/dbus_1.4.1.bb
@@ -1,6 +1,6 @@
include dbus.inc
-PR = "r4"
+PR = "r5"
SRC_URI[md5sum] = "99cb057700c0455fb68f8d57902f77ac"
SRC_URI[sha256sum] = "caa1a0ded2d0f2e95c1d4ec7e3c8bd44834928c5b0ed41a7189963f3593983bd"
--
1.6.6.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] dbus 1.4.1: create UUIDDIR in postinst
2011-05-27 13:40 [PATCH] dbus 1.4.1: create UUIDDIR in postinst Koen Kooi
@ 2011-05-27 13:42 ` Koen Kooi
2011-05-27 13:47 ` Phil Blundell
1 sibling, 0 replies; 5+ messages in thread
From: Koen Kooi @ 2011-05-27 13:42 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
For the attentive reader, the sysV script still has the check for the dir, so it will get created if it fails for some reason in the postinst. Cleaning up the sysV cript is a bigger task for another day.
Op 27 mei 2011, om 15:40 heeft Koen Kooi het volgende geschreven:
> This fixes dbus usage in non-sysV init systems.
>
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
> meta/recipes-core/dbus/dbus.inc | 4 ++++
> meta/recipes-core/dbus/dbus_1.4.1.bb | 2 +-
> 2 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> index 2a5f8bd..75a4d9d 100644
> --- a/meta/recipes-core/dbus/dbus.inc
> +++ b/meta/recipes-core/dbus/dbus.inc
> @@ -49,13 +49,17 @@ pkg_postinst_dbus() {
>
> MESSAGEUSER=messagebus
> MESSAGEHOME=/var/run/dbus
> + UUIDDIR=/var/lib/dbus
>
> mkdir -p $MESSAGEHOME || true
> + mkdir -p $UUIDDIR || true
> chgrp "$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || addgroup "$MESSAGEUSER"
> chown "$MESSAGEUSER"."$MESSAGEUSER" "$MESSAGEHOME" 2>/dev/null || \
> adduser --system --home "$MESSAGEHOME" --no-create-home --disabled-password \
> --ingroup "$MESSAGEUSER" "$MESSAGEUSER"
>
> + chown "$MESSAGEUSER"."$MESSAGEUSER" "$UUIDDIR"
> +
> grep -q netdev: /etc/group || addgroup netdev
>
> chown root:"$MESSAGEUSER" /usr/libexec/dbus-daemon-launch-helper
> diff --git a/meta/recipes-core/dbus/dbus_1.4.1.bb b/meta/recipes-core/dbus/dbus_1.4.1.bb
> index 1c8aeaa..f65ef35 100644
> --- a/meta/recipes-core/dbus/dbus_1.4.1.bb
> +++ b/meta/recipes-core/dbus/dbus_1.4.1.bb
> @@ -1,6 +1,6 @@
> include dbus.inc
>
> -PR = "r4"
> +PR = "r5"
>
> SRC_URI[md5sum] = "99cb057700c0455fb68f8d57902f77ac"
> SRC_URI[sha256sum] = "caa1a0ded2d0f2e95c1d4ec7e3c8bd44834928c5b0ed41a7189963f3593983bd"
> --
> 1.6.6.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dbus 1.4.1: create UUIDDIR in postinst
2011-05-27 13:40 [PATCH] dbus 1.4.1: create UUIDDIR in postinst Koen Kooi
2011-05-27 13:42 ` Koen Kooi
@ 2011-05-27 13:47 ` Phil Blundell
2011-05-27 13:55 ` Koen Kooi
1 sibling, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2011-05-27 13:47 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Koen Kooi
On Fri, 2011-05-27 at 15:40 +0200, Koen Kooi wrote:
> + mkdir -p $UUIDDIR || true
Why "|| true"? If this creation fails then the following chown will
surely fail as well, except with a different and less illuminating error
message.
> + chown "$MESSAGEUSER"."$MESSAGEUSER" "$UUIDDIR"
The dot syntax is nonstandard and obsolescent. It would be better to
use ":" there.
p.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dbus 1.4.1: create UUIDDIR in postinst
2011-05-27 13:47 ` Phil Blundell
@ 2011-05-27 13:55 ` Koen Kooi
2011-05-27 15:13 ` Phil Blundell
0 siblings, 1 reply; 5+ messages in thread
From: Koen Kooi @ 2011-05-27 13:55 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Op 27 mei 2011, om 15:47 heeft Phil Blundell het volgende geschreven:
> On Fri, 2011-05-27 at 15:40 +0200, Koen Kooi wrote:
>> + mkdir -p $UUIDDIR || true
>
> Why "|| true"? If this creation fails then the following chown will
> surely fail as well, except with a different and less illuminating error
> message.
>
>> + chown "$MESSAGEUSER"."$MESSAGEUSER" "$UUIDDIR"
>
> The dot syntax is nonstandard and obsolescent. It would be better to
> use ":" there.
I matched the postinst for these additionsm, but I can cleanup the complete postinst if you wish.
regards,
Koen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dbus 1.4.1: create UUIDDIR in postinst
2011-05-27 13:55 ` Koen Kooi
@ 2011-05-27 15:13 ` Phil Blundell
0 siblings, 0 replies; 5+ messages in thread
From: Phil Blundell @ 2011-05-27 15:13 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, 2011-05-27 at 15:55 +0200, Koen Kooi wrote:
> I matched the postinst for these additionsm, but I can cleanup the complete postinst if you wish.
I see you did that already in your v2 patch. Thanks.
p.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-27 15:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27 13:40 [PATCH] dbus 1.4.1: create UUIDDIR in postinst Koen Kooi
2011-05-27 13:42 ` Koen Kooi
2011-05-27 13:47 ` Phil Blundell
2011-05-27 13:55 ` Koen Kooi
2011-05-27 15:13 ` Phil Blundell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox