upstart session for dbus has hard coded .cache directory

Bug #1250668 reported by Cuero
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Description: Ubuntu 13.10
Release: 13.10

Package: dbus
Architecture: amd64
Version: 1.6.12-0ubuntu10

The file /usr/share/upstart/sessions/dbus.conf contains a hardcoded path to the .cache directory, making the use of XDG_CACHE_HOME variable non working.

The fix could to change line
echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >$HOME/.cache/upstart/dbus-session
into
echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >${XDG_CACHE_HOME:-$HOME/.cache}/upstart/dbus-session

I tested it and it works for me...

Cuero (cuerob)
affects: upstart (Ubuntu) → dbus (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dbus (Ubuntu):
status: New → Confirmed
Cuero (cuerob)
affects: dbus (Ubuntu) → upstart (Ubuntu)
James Hunt (jamesodhunt)
affects: upstart (Ubuntu) → dbus (Ubuntu)
Revision history for this message
Cuero (cuerob) wrote :

I had changed to upstart package as this file is indeed in the upstart package. Is there a reason why you moved it back to dbus ?
dpkg -L upsstart list this file /usr/share/upstart/sessions/dbus.conf

Revision history for this message
James Hunt (jamesodhunt) wrote :

Actually that file lives in the dbus package:

$ dpkg -L upstart|grep dbus.conf
$ dpkg -L dbus|grep dbus.conf
/usr/share/upstart/sessions/dbus.conf
/etc/init/dbus.conf
$

Revision history for this message
Cuero (cuerob) wrote :

Ha yes you are totally right, sorry for the mistake. I got confused, some of those conf file are provided by upstart (like the one for logrotate).
Sorry for the confusion.
I actually changed the package because I figured that there was no activity at all on that bug even though it seemed a quick/obvious fix.
I should probably provide a patch rather than an textual description.
Thx, anyway.

Revision history for this message
Simon McVittie (smcv) wrote :

As of dbus/1.10.6-1ubuntu2 (the relevant change seems to have been in 1.8.12-1ubuntu1), the Upstart job creates that directory but then doesn't do anything with it, because the session bus address is now stored in XDG_RUNTIME_DIR.

This is one of several ways in which the Upstart job is far more complicated than it needs to be, for which I'll open a separate bug.

Revision history for this message
Simon McVittie (smcv) wrote :

> far more complicated than it needs to be

That may have been overstating it; in the absence of systemd-style socket activation, there's a limit to how much it can be simplified without having things try to connect to dbus-daemon before it's running :-(

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.