<font size=2 face="sans-serif">Hello all,</font>
<br>
<br><font size=2 face="sans-serif">I tried to find some guide for contribution,
but </font><a href=http://lttng.org/contrib><font size=3 color=blue><u>http://lttng.org/contrib</u></font></a><font size=3>
</font><font size=2 face="sans-serif">insists that page is not found, so
please forgive me (and teach) where I do things in a non-standard way.</font>
<br>
<br><font size=2 face="sans-serif">Patch functionality - If LTTNG_HOME
environment variable exists, it is used instead of HOME.</font>
<br><font size=2 face="sans-serif">Reason for patch - We are trying to
deploy LTTng on a system where $HOME is on a filesystem mounted read-only,
but cannot afford to run lttng as a different user and cannot move the
home directories of users to writeable locations.</font>
<br><font size=2 face="sans-serif">Patch baseline: 2.2.0 rc2 </font>
<br>
<br><font size=2 face="sans-serif">This patch handles only UST. The next
email will be a patch against lttng-tools.</font>
<br>
<br><tt><font size=2>diff -ur lttng-ust-2.2.0-rc2-orig/liblttng-ust/lttng-ust-comm.c
lttng-ust-2.2.0-rc2/liblttng-ust/lttng-ust-comm.c</font></tt>
<br><tt><font size=2>--- lttng-ust-2.2.0-rc2-orig/liblttng-ust/lttng-ust-comm.c
2013-05-08 22:58:40.000000000 +0300</font></tt>
<br><tt><font size=2>+++ lttng-ust-2.2.0-rc2/liblttng-ust/lttng-ust-comm.c
2013-06-11 14:12:55.921673678 +0300</font></tt>
<br><tt><font size=2>@@ -189,6 +189,20 @@</font></tt>
<br><tt><font size=2> extern void lttng_ring_buffer_metadata_client_exit(void);</font></tt>
<br><tt><font size=2> </font></tt>
<br><tt><font size=2> /*</font></tt>
<br><tt><font size=2>+ * Returns the HOME directory path. Caller MUST NOT
free(3) the return pointer.</font></tt>
<br><tt><font size=2>+ */</font></tt>
<br><tt><font size=2>+static</font></tt>
<br><tt><font size=2>+char *get_lttng_home_dir(void)</font></tt>
<br><tt><font size=2>+{</font></tt>
<br><tt><font size=2>+ char *val = NULL;</font></tt>
<br><tt><font size=2>+ val = getenv("LTTNG_HOME");</font></tt>
<br><tt><font size=2>+ if (val != NULL)
{</font></tt>
<br><tt><font size=2>+
return val;</font></tt>
<br><tt><font size=2>+ }</font></tt>
<br><tt><font size=2>+ return getenv("HOME");</font></tt>
<br><tt><font size=2>+}</font></tt>
<br><tt><font size=2>+</font></tt>
<br><tt><font size=2>+/*</font></tt>
<br><tt><font size=2> * Force a read (imply TLS fixup for dlopen)
of TLS variables.</font></tt>
<br><tt><font size=2> */</font></tt>
<br><tt><font size=2> static</font></tt>
<br><tt><font size=2>@@ -230,7 +244,7 @@</font></tt>
<br><tt><font size=2>
assert(local_apps.allowed == 0);</font></tt>
<br><tt><font size=2>
return 0;</font></tt>
<br><tt><font size=2> }</font></tt>
<br><tt><font size=2>- home_dir = (const
char *) getenv("HOME");</font></tt>
<br><tt><font size=2>+ home_dir = (const
char *) get_lttng_home_dir();</font></tt>
<br><tt><font size=2> if (!home_dir)
{</font></tt>
<br><tt><font size=2>
WARN("HOME environment variable not set.
Disabling LTTng-UST per-user tracing.");</font></tt>
<br><tt><font size=2>
assert(local_apps.allowed == 0);</font></tt>
<br>
<br><font size=2 face="sans-serif">Thanks,</font>
<br>
<br><font size=2 color=#000080 face="sans-serif">Amit Margalit</font>
<br><font size=2 color=#808000 face="sans-serif">IBM XIV </font><font size=2 face="sans-serif">-
<i>Storage Reinvented</i></font>
<br><font size=2 face="sans-serif">XIV-NAS Development Team</font>
<br><font size=2 face="sans-serif">Tel. 03</font><font size=2 face="Arial">-689-7774</font>
<br><font size=2 face="Arial">Fax. 03-689-7230</font>