[lxc-devel] [PATCH] $(localstatedir) != $(prefix)/var
Guido Trotter
ultrotter at google.com
Fri Mar 27 20:38:22 UTC 2009
On Fri, Mar 27, 2009 at 8:37 PM, Guido Trotter <ultrotter at google.com> wrote:
> The current code assumes that localstatedir is equal to $(prefix)/var,
> thus failing for example on debian, where prefix is /usr and
> localstatedir is /var. This patch fixes this, and also sets the
> permission of $(localstatedir)/lxc to be 2777 rather than just 777 thus
> making it slightly better for concurrent usage by all users.
>
> Also, we need to take into account DESTDIR, when installing, to avoid
> altering the machine if we were supposed to install in a separate area,
> for example for packaging.
>
> Signed-off-by: Guido Trotter <ultrotter at quaqua.net>
(please apply this version. the previous one works, but is still
incomplete, regarding $(DESTDIR)! :)
Thanks,
Guido
> ---
> src/lxc/Makefile.am | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
> index 1c13c85..93b568a 100644
> --- a/src/lxc/Makefile.am
> +++ b/src/lxc/Makefile.am
> @@ -130,5 +130,6 @@ lxc_version_SOURCES = lxc_version.c
> lxc_version_LDADD = liblxc.la
>
> install-exec-local:
> - @mkdir -p $(localstatedir) && mkdir -p $(prefix)/var/lxc && \
> - chmod ugo+rw $(prefix)/var/lxc
> + @mkdir -p $(DESTDIR)$(localstatedir) && \
> + mkdir -p $(DESTDIR)$(localstatedir)/lxc && \
> + chmod 2777 $(DESTDIR)$(localstatedir)/lxc
> --
> 1.5.6.5
>
>
--
Guido Trotter
Google - Sysops Team
Google Ireland Ltd. : Registered in Ireland with company number 368047.
Gordon House, Barrow Street, Dublin 4, Ireland.
More information about the lxc-devel
mailing list