<font size=2 face="sans-serif">Thank you. Next time I'll send them as
attachments, as I did with lttng-tools patches.</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>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Mathieu Desnoyers <mathieu.desnoyers@efficios.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">Amit Margalit/Israel/IBM@IBMIL</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Cc:
</font><font size=1 face="sans-serif">lttng-dev@lists.lttng.org</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">07/08/2013 07:12 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [lttng-dev]
[RFC PATCH lttng-ust] Allow environment variable LTTNG_HOME
to override HOME</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>I've had issues with line wrapping, please fix your
email client next<br>
time.<br>
<br>
I merged it manually into the master branch:<br>
<br>
commit 3c6f6263bb2d87dc863c24a4edc59c2c959270b0<br>
Author: Amit Margalit <AMITM@il.ibm.com><br>
Date: Mon Jul 8 12:10:31 2013 -0400<br>
<br>
Allow environment variable LTTNG_HOME to override HOME<br>
<br>
Patch functionality - If LTTNG_HOME environment variable
exists, it is<br>
used instead of HOME. Reason for patch - We are trying
to deploy LTTng<br>
on a system where $HOME is on a filesystem mounted read-only,
but cannot<br>
afford to run lttng as a different user and cannot move the
home<br>
directories of users to writeable locations.<br>
<br>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com><br>
<br>
Thanks,<br>
<br>
Mathieu<br>
<br>
* Amit Margalit (AMITM@il.ibm.com) wrote:<br>
> Hello all,<br>
> <br>
> I tried to find some guide for contribution, but </font></tt><a href=http://lttng.org/contrib><tt><font size=2>http://lttng.org/contrib</font></tt></a><tt><font size=2>
<br>
> insists that page is not found, so please forgive me (and teach) where
I <br>
> do things in a non-standard way.<br>
> <br>
> Patch functionality - If LTTNG_HOME environment variable exists, it
is <br>
> used instead of HOME.<br>
> Reason for patch - We are trying to deploy LTTng on a system where
$HOME <br>
> is on a filesystem mounted read-only, but cannot afford to run lttng
as a <br>
> different user and cannot move the home directories of users to writeable
<br>
> locations.<br>
> Patch baseline: 2.2.0 rc2 <br>
> <br>
> This patch handles only UST. The next email will be a patch against
<br>
> lttng-tools.<br>
> <br>
> diff -ur lttng-ust-2.2.0-rc2-orig/liblttng-ust/lttng-ust-comm.c <br>
> lttng-ust-2.2.0-rc2/liblttng-ust/lttng-ust-comm.c<br>
> --- lttng-ust-2.2.0-rc2-orig/liblttng-ust/lttng-ust-comm.c
2013-05-08 <br>
> 22:58:40.000000000 +0300<br>
> +++ lttng-ust-2.2.0-rc2/liblttng-ust/lttng-ust-comm.c 2013-06-11
<br>
> 14:12:55.921673678 +0300<br>
> @@ -189,6 +189,20 @@<br>
> extern void lttng_ring_buffer_metadata_client_exit(void);<br>
> <br>
> /*<br>
> + * Returns the HOME directory path. Caller MUST NOT free(3) the return
<br>
> pointer.<br>
> + */<br>
> +static<br>
> +char *get_lttng_home_dir(void)<br>
> +{<br>
> + char *val = NULL;<br>
> + val = getenv("LTTNG_HOME");<br>
> + if (val != NULL) {<br>
> + return val;<br>
> + }<br>
> + return getenv("HOME");<br>
> +}<br>
> +<br>
> +/*<br>
> * Force a read (imply TLS fixup for dlopen) of TLS variables.<br>
> */<br>
> static<br>
> @@ -230,7 +244,7 @@<br>
> assert(local_apps.allowed
== 0);<br>
> return 0;<br>
> }<br>
> - home_dir = (const char *) getenv("HOME");<br>
> + home_dir = (const char *) get_lttng_home_dir();<br>
> if (!home_dir) {<br>
> WARN("HOME
environment variable not set. Disabling <br>
> LTTng-UST per-user tracing.");<br>
> assert(local_apps.allowed
== 0);<br>
> <br>
> Thanks,<br>
> <br>
> Amit Margalit<br>
> IBM XIV - Storage Reinvented<br>
> XIV-NAS Development Team<br>
> Tel. 03-689-7774<br>
> Fax. 03-689-7230<br>
> _______________________________________________<br>
> lttng-dev mailing list<br>
> lttng-dev@lists.lttng.org<br>
> </font></tt><a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev"><tt><font size=2>http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</font></tt></a><tt><font size=2><br>
<br>
<br>
-- <br>
Mathieu Desnoyers<br>
EfficiOS Inc.<br>
</font></tt><a href=http://www.efficios.com/><tt><font size=2>http://www.efficios.com</font></tt></a><tt><font size=2><br>
<br>
</font></tt>
<br>