1. jjacky
  2. kalu

Commits

jjacky  committed d3fd064

kalu-updater: environment variables were unset, which could cause issues on some post_{install,upgrade} scripts, fixed

The sysupgrade is ran from kalu-dbus, which is automatically started through DBus. When starting something, DBus does clear all environment variables, which could cause problems is some scripts (e.g. mkinitcpio with autodetect hook, and the lack of a PATH defined).
This is fixed by using a bash script to source /etc/profile (and therefore restore a proper environment) before launching kalu-dbus (See https://bbs.archlinux.org/viewtopic.php?id=136784)

  • Participants
  • Parent commits b4825ae
  • Branches default

Comments (0)

Files changed (3)

File Makefile

View file
 install:
 	install -D -m755 kalu $(DESTDIR)/usr/bin/kalu
 	install -D -m755 kalu-dbus $(DESTDIR)/usr/bin/kalu-dbus
+	install -D -m755 kalu-dbus-launcher $(DESTDIR)/usr/bin/kalu-dbus-launcher
 	install -D -m644 kalu.1.gz $(DESTDIR)/usr/share/man/man1/kalu.1.gz
 	install -D -m644 index.html $(DESTDIR)usr/share/doc/kalu/html/index.html
 	install -D -m644 arch_linux_48x48_icon_by_painlessrob.png $(DESTDIR)usr/share/pixmaps/kalu.png

File kalu-dbus-launcher

View file
+#!/bin/bash
+# we need to source /etc/profile to restore environment variables, most notably the PATH might be
+# required for some scripts ran during a sysupgrade (e.g. mkinitcpio on new kernel)
+. /etc/profile
+kalu-dbus

File org.jjk.kalu.service

View file
 [D-BUS Service]
 Name=org.jjk.kalu
-Exec=/usr/bin/kalu-dbus
+Exec=/usr/bin/kalu-dbus-launcher
 User=root