[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2018-11-07 Thread Bug Watch Updater
Launchpad has imported 9 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=98260.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.


On 2016-10-14T15:13:50+00:00 Michael Terry wrote:

Created attachment 127303
proposed patch

It would be nice if DBus added support for a runtime relocatable root in
Unix.  i.e. at runtime, be able to be run from /opt/dbus/ or some such,
without having that be a compile-time prefix.

I notice the Windows version has some basic support for this.  Detecting
its installation directory and treating paths as relative to that.

My specific use case is testing a snap [1] of a full desktop
environment.  This bundled in dbus and session services and all sorts of
things.  The session DBus was trying to activate services with their
compile-time hardcoded paths and not finding them.

And I bet similar use cases exist.

The plumbing already exists to fix those paths up, thanks to the Windows
support.

So I threw together a patch for the Unix side of things, to listen to
the new variable DBUS_ROOT.  If you prefer a different env name, let me
know.

[1] http://snapcraft.io/

Reply at:
https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/1633520/comments/0


On 2016-10-14T18:02:43+00:00 Simon McVittie wrote:

(In reply to Michael Terry from comment #0)
> So I threw together a patch for the Unix side of things, to listen to the
> new variable DBUS_ROOT.

libdbus and dbus-daemon are security-sensitive code, and in some
configurations the environment is attacker-controlled. Please don't rush
into this.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/1633520/comments/3


On 2016-10-14T18:10:50+00:00 Simon McVittie wrote:

Comment on attachment 127303
proposed patch

Review of attachment 127303:
-

For the session bus, it would seem reasonable to search XDG_DATA_DIRS
according to the basedir spec (). I'd rather do that than invent
a new environment variable.

I'm somewhat sceptical about the correctness of a Snap app-container
running its own dbus-daemon - a contained app doesn't sound a lot like a
login session to me (), and this is pretty much the
opposite of the direction that the "user-session" work has gone in
().

However, relocating a dbus-daemon with XDG_DATA_DIRS seems potentially
useful for regression testing or whatever (which is also the intended
purpose of most of the environment variables that Snap app-containers
(ab)use to pretend to be a namespace, AIUI).

---

What is your use case for relocating the system bus?

The system bus is a bus for the system. Running a separate system bus in
a container seems deeply inappropriate, unless the container is as close
to whole-system as things like lxc and Docker, in which case the chroot-
like environment will do the right thing anyway.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/1633520/comments/4


On 2016-10-14T18:16:53+00:00 Simon McVittie wrote:

(In reply to Simon McVittie from comment #2)
> For the session bus, it would seem reasonable to search XDG_DATA_DIRS
> according to the basedir spec
> ( html>). I'd rather do that than invent a new environment variable.

What I mean here is: take the logic we use for
, which I assume you're basically happy
with because you don't seem to have patched it, and apply it to finding
${datadir}/dbus-1/session.conf (taking the first one and ignoring any
that it "shadows" seems reasonable).

We implement  by behaving as though our
compile-time @DATADIR@ had been appended to XDG_DATA_DIRS; the same
would make sense for ${datadir}/dbus-1/session.conf.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/1633520/comments/5


On 2016-10-14T18:53:57+00:00 Michael Terry wrote:

Thank you for looking at this!

> Please don't rush into this.

Agreed.  I wanted to check with you folks before I actually did anything
on the Ubuntu side.

> What is your use case for relocating the system bus?

I don't have one.  I was just trying to be consistent with the other
changes.  I'm happy to drop those bits.

> I'm somewhat sceptical about the correctness of a 

[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-11-21 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: snapd (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  Confirmed
Status in snapd package in Ubuntu:
  Confirmed

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-11-21 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: dbus (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  Confirmed
Status in snapd package in Ubuntu:
  Confirmed

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-11-08 Thread Alberto Mardegan
I think we can use this one.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  New
Status in snapd package in Ubuntu:
  New

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-11-08 Thread Michael Terry
So mardy, is there a different bug about snapd growing support for dbus
activation or will we use this?  (just trying to keep track of it)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  New
Status in snapd package in Ubuntu:
  New

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-11-01 Thread Alberto Mardegan
1) Indeed, it wouldn't be as simple as a file copy, it should also
modify the path as you wrote.

2) I think we have the same use-case: unity8. I'm now working on getting
Online Accounts to work inside a unity8 snap, but we might want to move
away from a monolitic approach and deliver some session services as
snaps. My understanding is that there might be a lightdm snap which will
presumably start the dbus user session, and unity8 will be another snap
which has all the D-Bus services we need (online accounts, EDS, content
hub, etc.).

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  New
Status in snapd package in Ubuntu:
  New

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-10-31 Thread Michael Terry
Alberto, sure that could work in principle.  Good point.

- We'd have to not only copy the .service file, but modify its Exec=
line to point inside the correct snap and update the file when a new
snap version gets installed (or delete it if the new snap doesn't use
the file anymore, etc).

- What is the use case that you hit this with?  In my use case, both the
session dbus daemon and the session dbus .service are all inside a
monolithic snap.  But it sounds like you want multiple snaps to install
session .service files that can be run from another "session" snap?
Just curious what you're envisioning.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  New
Status in snapd package in Ubuntu:
  New

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-10-26 Thread Alberto Mardegan
Thanks Jamie, I've added snapd to this bug. Given that it's blocking me,
I happily volunteer to work on it.

Just please confirm that my understanding is correct: it will be a new
interface, whose slot will be implemented in snapd itself, and snaps
willing to use the auto-activation feature will have to declare a plug
with a parameter describing the service file to be installed (the name
of the service can be found inside the .service file). Is this correct?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  New
Status in snapd package in Ubuntu:
  New

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-10-26 Thread Alberto Mardegan
** Also affects: snapd (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  New
Status in snapd package in Ubuntu:
  New

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-10-26 Thread Jamie Strandboge
"Could snapd be so smart to copy the .service file into
/usr/share/dbus/services/ when the interface gets connected, and unlink
it when it gets disconnected?"

Yes it could and that sounds like a reasonable approach if it is
properly designed, but I think that is a different problem than what PR
#1613 is trying to solve. I mention "properly designed" because "when
the interface gets connected" would have to be expressed as a plug so
that it could be connected/disconnected and as such, likely a different
interface, such as 'dbus-activation-support' or something.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  New

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-10-26 Thread Alberto Mardegan
Hi Micheal, I also just stumbled on this problem. :-)

I wonder if this could be solved in a very different way, which does not
involve any changes to dbus-daemon. I've seen that for bug 1590679 we
are moving to a solution [1] in which the snap providing the D-Bus
service would declare an interface slot.

Could snapd be so smart to copy the .service file into
/usr/share/dbus/services/ when the interface gets connected, and unlink
it when it gets disconnected?

Or, if the proposed merge gets changes in such a way that the snap
declares a plug (rather than a slot), we might be able to use the
upcoming interface hooks so that the (privileged) snap providing the
slot would register interface hook that perform the linking/unlinking of
the .service files.

Opinions?

[1] https://github.com/snapcore/snapd/pull/1613

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  New

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1633520] Re: Support dbus runtime relocation

2016-10-14 Thread Ubuntu Foundations Team Bug Bot
** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to dbus in Ubuntu.
https://bugs.launchpad.net/bugs/1633520

Title:
  Support dbus runtime relocation

Status in D-Bus:
  Unknown
Status in dbus package in Ubuntu:
  New

Bug description:
  For example, when running in a snap.

  I ran into this while testing a unity8 desktop session snap.  Session
  services were being dbus-activated, but dbus was running the hardcoded
  paths in the session desktop files.  Which weren't pointed into the
  snap.

  DBus has support for relocating those paths, but it only does so on
  Windows.

  I've added a patch to support $DBUS_ROOT on Unix and relocate paths as
  needed.  I've linked the upstream bug here.  We may want to consider
  patching Ubuntu while we wait for it to land upstream.

  I've attached the patch here too.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dbus/+bug/1633520/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp