buildd lingering: setup XDG_RUNTIME_DIR in .profile
[mirror/dsa-puppet.git] / modules / buildd / manifests / init.pp
index 2b9f0a6..4f5c291 100644 (file)
@@ -184,6 +184,15 @@ class buildd ($ensure=present) {
                        owner   => buildd,
                }
 
+               file { '/home/buildd/.profile':
+                       content  => @(EOT),
+                               export XDG_RUNTIME_DIR="/run/user/$UID"
+                               export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+                               | EOT
+                       group   => buildd,
+                       owner   => buildd,
+               }
+
                if ! $::buildd_key {
                        exec { 'create-buildd-key':
                                command => '/bin/su - buildd -c \'mkdir -p -m 02700 .ssh && ssh-keygen -C "`whoami`@`hostname` (`date +%Y-%m-%d`)" -P "" -f .ssh/id_rsa -q\'',