Makefile.am                   |   10 +++++-----
 configure.ac                  |   37 ++++++++++++++++++++-----------------
 docker/l10n-docker-nightly.sh |    2 +-
 docker/scripts/run-lool.sh    |    2 +-
 loleaflet/README              |    2 +-
 loolwsd.xml.in                |    1 -
 test/run_unit.sh.in           |    3 ---
 wsd/LOOLWSD.cpp               |    3 +--
 wsd/README                    |    2 +-
 9 files changed, 30 insertions(+), 32 deletions(-)

New commits:
commit db176ee45baae93ab4411c23d32ae1d0f608352b
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Tue Oct 1 10:35:38 2019 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Tue Oct 8 09:36:44 2019 +0200

    Remove lo_template_path option
    
    It was not very useful to let this setting configurable by the user.
    On the other hand, old path in config file caused issues after
    upgrade. It is better to decide the location of LOKit core
    during compilation. From now on the --with-lo-path configure
    option is compulsory.
    
    Change-Id: Icdcbc21bde5dad329fdb6e30ed17efde6b0e73de
    Reviewed-on: https://gerrit.libreoffice.org/79943
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/Makefile.am b/Makefile.am
index b30e6bfe9..01e2dd120 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -287,7 +287,7 @@ run: all @JAILS_PATH@
        @cp $(abs_top_srcdir)/test/data/hello.ods 
$(abs_top_srcdir)/test/data/hello-world.ods
        @cp $(abs_top_srcdir)/test/data/hello.odp 
$(abs_top_srcdir)/test/data/hello-world.odp
        @echo
-       ./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" 
--o:lo_template_path="@LO_PATH@" \
+       ./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" \
                          --o:child_root_path="@JAILS_PATH@" 
--o:storage.filesystem[@allow]=true \
                          
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
                          --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" 
\
@@ -311,7 +311,7 @@ run-valgrind: all @JAILS_PATH@
        @cp $(abs_top_srcdir)/test/data/hello.ods 
$(abs_top_srcdir)/test/data/hello-world.ods
        @cp $(abs_top_srcdir)/test/data/hello.odp 
$(abs_top_srcdir)/test/data/hello-world.odp
        valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes \
-               ./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" 
--o:lo_template_path="@LO_PATH@" \
+               ./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" \
                          --o:child_root_path="@JAILS_PATH@" 
--o:storage.filesystem[@allow]=true \
                          
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
                          --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" 
\
@@ -327,7 +327,7 @@ run-gdb: all @JAILS_PATH@
        @cp $(abs_top_srcdir)/test/data/hello.odp 
$(abs_top_srcdir)/test/data/hello-world.odp
        gdb --tui --args \
                ./loolwsd --o:security.capabilities="false" \
-                         --o:sys_template_path="@SYSTEMPLATE_PATH@" 
--o:lo_template_path="@LO_PATH@" \
+                         --o:sys_template_path="@SYSTEMPLATE_PATH@" \
                          --o:child_root_path="@JAILS_PATH@" 
--o:storage.filesystem[@allow]=true \
                          
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
                          --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" 
\
@@ -343,7 +343,7 @@ run-callgrind: all @JAILS_PATH@
        @cp $(abs_top_srcdir)/test/data/hello.odp 
$(abs_top_srcdir)/test/data/hello-world.odp
        valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes 
--num-callers=50 --error-limit=no --trace-children=yes \
                ./loolwsd --o:security.capabilities="false" \
-                         --o:sys_template_path="@SYSTEMPLATE_PATH@" 
--o:lo_template_path="@LO_PATH@" \
+                         --o:sys_template_path="@SYSTEMPLATE_PATH@" \
                          --o:child_root_path="@JAILS_PATH@" 
--o:storage.filesystem[@allow]=true \
                          
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
                          --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" 
\
@@ -359,7 +359,7 @@ run-strace: all @JAILS_PATH@
        @cp $(abs_top_srcdir)/test/data/hello.odp 
$(abs_top_srcdir)/test/data/hello-world.odp
        strace -o strace.log -f -tt -s 256 \
                ./loolwsd --o:security.capabilities="false" \
-                         --o:sys_template_path="@SYSTEMPLATE_PATH@" 
--o:lo_template_path="@LO_PATH@" \
+                         --o:sys_template_path="@SYSTEMPLATE_PATH@" \
                          --o:child_root_path="@JAILS_PATH@" 
--o:storage.filesystem[@allow]=true \
                          
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
                          --o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" 
\
diff --git a/configure.ac b/configure.ac
index b14ac3745..dd71eda5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -506,29 +506,32 @@ AS_IF([test -n "$LOKIT_PATH"],
       [CPPFLAGS="$CPPFLAGS -I${LOKIT_PATH}"])
 lokit_msg="$LOKIT_PATH"
 
-LO_PATH="/usr/lib64/libreoffice"
+AC_MSG_CHECKING([for LibreOffice path])
+if test -n "$with_lo_path"; then
+    # strip trailing '/' from LO_PATH, 'ln -s' with such path will otherwise 
fail
+    LO_PATH="${with_lo_path%/}"
+    AC_MSG_RESULT([found])
+else
+    AC_MSG_RESULT([not found])
+    AC_MSG_ERROR([LibreOffice path must be configured: --with-lo-path])
+fi
+
 JAIL_PATH=not-set
 SYSTEMPLATE_PATH=not-set
 have_lo_path=false
 AC_MSG_CHECKING([whether to run tests against a LibreOffice])
-if test -n "$with_lo_path"; then
-   # strip trailing '/' from LO_PATH, 'ln -s' with such path will otherwise 
fail
-   LO_PATH="${with_lo_path%/}"
-   version_file="$with_lo_path/program/versionrc"
-   if test -f $version_file; then
-     JAILS_PATH="\${abs_top_builddir}/jails"
-     SYSTEMPLATE_PATH="\${abs_top_builddir}/systemplate"
-     have_lo_path=true
-     lo_msg="test against $LO_PATH"
-     AC_MSG_RESULT([yes])
-   else
-     lo_msg="no integration tests"
-     AC_MSG_RESULT([no])
-   fi
+version_file="$with_lo_path/program/versionrc"
+if test -f $version_file; then
+    JAILS_PATH="\${abs_top_builddir}/jails"
+    SYSTEMPLATE_PATH="\${abs_top_builddir}/systemplate"
+    have_lo_path=true
+    lo_msg="test against $LO_PATH"
+    AC_MSG_RESULT([yes])
 else
-   lo_msg="no integration tests"
-   AC_MSG_RESULT([no])
+    lo_msg="no integration tests"
+    AC_MSG_RESULT([no])
 fi
+
 AC_SUBST(LO_PATH)
 AC_DEFINE_UNQUOTED([LO_PATH],["$LO_PATH"],[Path to LibreOffice installation])
 AC_SUBST(JAILS_PATH)
diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index 85fc4d38b..1015b24f6 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -81,7 +81,7 @@ cp -a libreoffice/instdir "$INSTDIR"/opt/libreoffice
 
 # build
 ( cd online && ./autogen.sh ) || exit 1
-( cd online && ./configure --prefix=/usr --sysconfdir=/etc 
--localstatedir=/var --enable-silent-rules 
--with-lokit-path="$BUILDDIR"/libreoffice/include 
--with-lo-path="$INSTDIR"/opt/libreoffice $ONLINE_EXTRA_BUILD_OPTIONS) || exit 1
+( cd online && ./configure --prefix=/usr --sysconfdir=/etc 
--localstatedir=/var --enable-silent-rules 
--with-lokit-path="$BUILDDIR"/libreoffice/include 
--with-lo-path=/opt/libreoffice $ONLINE_EXTRA_BUILD_OPTIONS) || exit 1
 ( cd online/loleaflet/po && ../../scripts/downloadpootle.sh )
 ( cd online/loleaflet && make l10n) || exit 1
 ( cd online && scripts/locorestrings.py "$BUILDDIR"/online 
"$BUILDDIR"/libreoffice/translations )
diff --git a/docker/scripts/run-lool.sh b/docker/scripts/run-lool.sh
index b76b43ee6..227eb5116 100755
--- a/docker/scripts/run-lool.sh
+++ b/docker/scripts/run-lool.sh
@@ -43,4 +43,4 @@ perl -pi -e "s/<password (.*)>.*<\/password>/<password 
\1>${password}<\/password
 ) &
 
 # Start loolwsd
-su -c "/usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate 
--o:lo_template_path=/opt/libreoffice --o:child_root_path=/opt/lool/child-roots 
--o:file_server_root_path=/usr/share/loolwsd ${extra_params}" -s /bin/bash lool
+su -c "/usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate 
--o:child_root_path=/opt/lool/child-roots 
--o:file_server_root_path=/usr/share/loolwsd ${extra_params}" -s /bin/bash lool
diff --git a/loleaflet/README b/loleaflet/README
index 5e93024f9..536ae1257 100644
--- a/loleaflet/README
+++ b/loleaflet/README
@@ -71,7 +71,7 @@ To see an example:
 
 * run loolwsd, like:
 
-    ./loolwsd --o:sys_template_path=${SYSTEMPLATE} 
--o:lo_template_path=${MASTER}/instdir --o:child_root_path=${ROOTFORJAILS}
+    ./loolwsd --o:sys_template_path=${SYSTEMPLATE} 
--o:child_root_path=${ROOTFORJAILS}
 
 Note that this will, by default, set the loolwsd's file server's root to the 
parent directory of loolwsd,
 which means you can access all the files in loleaflet using /loleaflet/ path. 
It is advised to set
diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 517ce68ea..baa42874d 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -6,7 +6,6 @@
     <allowed_languages desc="List of supported languages of Writing Aids 
(spell checker, grammar checker, thesaurus, hyphenation) on this instance. 
Allowing too many has negative effect on startup performance." default="de_DE 
en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru">de_DE en_GB en_US es_ES fr_FR it 
nl pt_BR pt_PT ru</allowed_languages>
 
     <sys_template_path desc="Path to a template tree with shared libraries etc 
to be used as source for chroot jails for child processes." type="path" 
relative="true" default="systemplate"></sys_template_path>
-    <lo_template_path desc="Path to a LibreOffice installation tree to be 
copied (linked) into the jails for child processes. Should be on the same file 
system as systemplate." type="path" relative="false" 
default="@LO_PATH@"></lo_template_path>
     <child_root_path desc="Path to the directory under which the chroot jails 
for the child processes will be created. Should be on the same file system as 
systemplate and lotemplate. Must be an empty directory." type="path" 
relative="true" default="jails"></child_root_path>
 
     <server_name desc="Hostname:port of the server running loolwsd. If empty, 
it's derived from the request." type="string" default=""></server_name>
diff --git a/test/run_unit.sh.in b/test/run_unit.sh.in
index d8f957caf..582dbf27e 100755
--- a/test/run_unit.sh.in
+++ b/test/run_unit.sh.in
@@ -88,7 +88,6 @@ if test "z$tst" == "z"; then
      echo "Executing external tests"
      ${trace} \
      ${abs_top_builddir}/loolwsd --o:sys_template_path="$systemplate_path" \
-                                 --o:lo_template_path="$lo_path" \
                                  --o:child_root_path="$jails_path" \
                                  --o:storage.filesystem[@allow]=true \
                                  --o:logging.level=trace \
@@ -128,7 +127,6 @@ else # newer unit tests.
     echo "Running $tst | $tst_log ...";
     if ${trace} \
        ${abs_top_builddir}/loolwsd --o:sys_template_path="$systemplate_path" \
-                                   --o:lo_template_path="$lo_path" \
                                    --o:child_root_path="$jails_path" \
                                    --o:storage.filesystem[@allow]=true \
                                    --o:logging.level=trace \
@@ -144,7 +142,6 @@ else # newer unit tests.
         echo "============================================================="
         echo "Test failed on unit: $tst re-run with:"
         echo "   $ gdb --args ${abs_top_builddir}/loolwsd 
--o:sys_template_path=\"$systemplate_path\" \\"
-        echo "         --o:lo_template_path=\"$lo_path\" \\"
         echo "         --o:child_root_path=\"$jails_path\" \\"
         echo "         --o:storage.filesystem[@allow]=true \\"
         echo "         --o:logging.level=trace \\"
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index b460d75d8..e217fcc34 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -796,7 +796,6 @@ void LOOLWSD::initialize(Application& self)
             { "child_root_path", "jails" },
             { "file_server_root_path", "loleaflet/.." },
             { "lo_jail_subpath", "lo" },
-            { "lo_template_path", LO_PATH },
             { "logging.anonymize.filenames", "false" }, // Deprecated.
             { "logging.anonymize.usernames", "false" }, // Deprecated.
             // { "logging.anonymize.anonymize_user_data", "false" }, // Do not 
set to fallback on filename/username.
@@ -1056,7 +1055,7 @@ void LOOLWSD::initialize(Application& self)
 #endif
 
     SysTemplate = getPathFromConfig("sys_template_path");
-    LoTemplate = getPathFromConfig("lo_template_path");
+    LoTemplate = LO_PATH;
     ChildRoot = getPathFromConfig("child_root_path");
     ServerName = config().getString("server_name");
 
diff --git a/wsd/README b/wsd/README
index 30d9b3766..25d17db43 100644
--- a/wsd/README
+++ b/wsd/README
@@ -108,7 +108,7 @@ chroot system, and directory for the jails:
 To run loolwsd the way it is supposed to eventually be run "for real", you can
 now do:
 
-    ./loolwsd --o:sys_template_path=${SYSTEMPLATE} 
--o:lo_template_path=${MASTER}/instdir --o:child_root_path=${ROOTFORJAILS}
+    ./loolwsd --o:sys_template_path=${SYSTEMPLATE} 
--o:child_root_path=${ROOTFORJAILS}
 
 The ${SYSTEMPLATE} is a directory tree set up using the
 loolwsd-systemplate-setup script here. (It should not exist before
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to