Makefile.am | 8 ++++++-- kit/ForKit.cpp | 20 +++++++++++++++++--- loolkitconfig.xcu | 7 +++++++ loolwsd.spec.in | 1 + 4 files changed, 31 insertions(+), 5 deletions(-)
New commits: commit bf8f8f17384e0b31345eac20493d4b2acf670bd9 Author: Michael Meeks <michael.me...@collabora.com> Date: Sat Mar 11 21:47:21 2017 +0000 tdf#106488 - fix by disabling un-necessary locking for the kit. diff --git a/loolkitconfig.xcu b/loolkitconfig.xcu index 9ebddc7..d5dfd3a 100644 --- a/loolkitconfig.xcu +++ b/loolkitconfig.xcu @@ -1,4 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <oor:items xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<!-- tdf#106488 - reverse hostname lookup can go badly wrong --> +<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="UseLocking" oor:op="fuse"><value>false</value></prop></item> + </oor:items> commit 1f5b7b6def05ec767fe19a3455f4df5a46213360 Author: Michael Meeks <michael.me...@collabora.com> Date: Sat Mar 11 19:43:26 2017 +0000 Include config layer to override kit config simply. The config is read once during the forkit startup. Add a read-only user configuration layer, and also disable config writing: no writable user config. diff --git a/Makefile.am b/Makefile.am index 11272b7..319a5b8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,14 +14,18 @@ loolwsddata_DATA = discovery.xml \ loolwsdconfigdir = @LOOLWSD_CONFIGDIR@ -loolwsdconfig_DATA = loolwsd.xml +loolwsdconfig_DATA = loolwsd.xml \ + loolkitconfig.xcu ACLOCAL_AMFLAGS = -I m4 # quick and easy for now. include_paths = -I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/wsd -I${top_srcdir}/kit -AM_CPPFLAGS = -pthread -DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' -DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' ${include_paths} +AM_CPPFLAGS = -pthread -DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' \ + -DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' \ + -DDEBUG_ABSSRCDIR='"@abs_srcdir@"' \ + ${include_paths} AM_LDFLAGS = -pthread -Wl,-E loolforkit_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib loolforkit_nocaps_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp index fe81ac2..62c34c5 100644 --- a/kit/ForKit.cpp +++ b/kit/ForKit.cpp @@ -438,13 +438,27 @@ int main(int argc, char** argv) return Application::EXIT_USAGE; } - if (!std::getenv("LD_BIND_NOW")) + // Setup & check environment + std::string layers( + "xcsxcu:${BRAND_BASE_DIR}/share/registry " + "res:${BRAND_BASE_DIR}/share/registry " + "bundledext:${${BRAND_BASE_DIR}/program/lounorc:BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " + "sharedext:${${BRAND_BASE_DIR}/program/lounorc:SHARED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " + "userext:${${BRAND_BASE_DIR}/program/lounorc:UNO_USER_PACKAGES_CACHE}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini " +#if ENABLE_DEBUG // '*' denotes non-writable. + "user:*file://" DEBUG_ABSSRCDIR "/loolkitconfig.xcu " +#else + "user:*file://" LOOLWSD_CONFIGDIR "/loolkitconfig.xcu " +#endif + ); + ::setenv("CONFIGURATION_LAYERS", layers.c_str(), + 1 /* override */); + + if (!std::getenv("LD_BIND_NOW")) // must be set by parent. LOG_INF("Note: LD_BIND_NOW is not set."); if (!NoCapsForKit && !haveCorrectCapabilities()) - { return Application::EXIT_SOFTWARE; - } // Initialize LoKit if (!globalPreinit(loTemplate)) diff --git a/loolkitconfig.xcu b/loolkitconfig.xcu new file mode 100644 index 0000000..9ebddc7 --- /dev/null +++ b/loolkitconfig.xcu @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<oor:items xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + +</oor:items> diff --git a/loolwsd.spec.in b/loolwsd.spec.in index 4ef30e9..a26b53d 100644 --- a/loolwsd.spec.in +++ b/loolwsd.spec.in @@ -110,6 +110,7 @@ echo "0 0 */1 * * root find /var/cache/loolwsd -name \"*.png\" -a -atime +10 -ex %config(noreplace) /etc/cron.d/loolwsd.cron %config(noreplace) /etc/loolwsd/loolwsd.xml +%config /etc/loolwsd/loolkitconfig.xcu %doc README _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits