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.private/mmeeks/fixing
parent
57e7d22e28
commit
1f5b7b6def
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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>
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue