From 08573973522e4c0df76e2656c94af8cb3b670ec1 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 19 May 2015 13:20:16 +0300 Subject: [PATCH] Rename the systemplate setup script to better name and install it It was a bit misleading to have "chroot" in the name of the script as it isn't a chroot jail as such that the script is setting up, but a *template* that will be copied (hardlinked) into each chroot jail. The script should be installed, so that a loolwsd package can include it. We don't want to loolwsd use to depend on having the sources available, obviously. --- loolwsd/Makefile.am | 7 ++++++- loolwsd/README | 2 +- loolwsd/{setup-sys-chroot => loolwsd-systemplate-setup} | 0 3 files changed, 7 insertions(+), 2 deletions(-) rename loolwsd/{setup-sys-chroot => loolwsd-systemplate-setup} (100%) diff --git a/loolwsd/Makefile.am b/loolwsd/Makefile.am index e975479ae..733ddd889 100644 --- a/loolwsd/Makefile.am +++ b/loolwsd/Makefile.am @@ -1,5 +1,7 @@ bin_PROGRAMS = loolwsd +bin_SCRIPTS = loolwsd-systemplate-setup + loolwsd_SOURCES = LOOLWSD.cpp LOOLSession.cpp TileCache.cpp Util.cpp LOOLProtocol.cpp noinst_PROGRAMS = loadtest connect lokitclient @@ -18,10 +20,13 @@ clean-cache: # Intentionally don't use "*" below... Avoid risk of accidentally running rm -rf /* test -n "@LOOLWSD_CACHEDIR@" && rm -rf "@LOOLWSD_CACHEDIR@"/[0-9a-f] -# After building loolwsd, set its capabilities to allow chroot() +# After building loolwsd, set its capabilities to allow chroot(). Dot +# it already after a plain 'make' to allow for testing without +# installing. all-local: loolwsd if test `uname -s` = Linux; then \ sudo @SETCAP@ cap_sys_chroot=ep loolwsd; \ else \ sudo chown root loolwsd && sudo chmod u+s loolwsd; \ fi + diff --git a/loolwsd/README b/loolwsd/README index bdaf95a01..db35ad00e 100644 --- a/loolwsd/README +++ b/loolwsd/README @@ -71,7 +71,7 @@ Now you need to set up a minimal chroot system, and directory for the jails: ROOTFORJAILS=`pwd`/jails # or tweak for your system rm -Rf ${SYSTEMPLATE} # clean - ./setup-sys-chroot ${SYSTEMPLATE} ${MASTER}/instdir # build template + ./loolwsd-systemplate-setup ${SYSTEMPLATE} ${MASTER}/instdir # build template mkdir -p ${ROOTFORJAILS} # create location for transient jails. To run loolwsd the way it is supposed to eventually be run "for real", you can diff --git a/loolwsd/setup-sys-chroot b/loolwsd/loolwsd-systemplate-setup similarity index 100% rename from loolwsd/setup-sys-chroot rename to loolwsd/loolwsd-systemplate-setup