It will launch the gui at the end if found
It's much faster than valgrind+massif
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ied5a00ab634f78bbb0dd24a48a83ae4293183cd4
Re-using an inherited file descriptor to /dev/urandom frees us
from problems with mount options including 'nodev' and removes a
capability from the set we need.
Change-Id: I70337e923f802d7efbd3159c11a4e39f6529b6e6
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
WebSocketSession is used exclusively for tests,
so it's best that it is located in the test
directory.
Change-Id: I88333d619902df7991c3f26b94ed309246446ae0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Removed all MOBILEAPP preprocessor conditionals from Util.hpp/.cpp
Added isMobileApp function to help remove further conditionals.
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I038a4db47ec2a2c7bb10f5696df5571b13bd9a61
Prettier is a code formatter for javascript/typescript. It's relatively
common to see complaints about style in pull requests or inconsistent
style getting in to Collabora Online. Also, without a formatter it's
harder for editors to automatically format code in sensible and
consistent ways
Prettier doesn't have many options, but those which it does have I have
set to the closest values to current behavior (e.g. single quotes) in
order to minimize unnecessary changes
This commit doesn't format all existing files. Doing so would cause
blames, cherry-picks and diffs to become much less useful. Instead, we
use browser/.beforeprettier to list all files that would need to be
changed, and this file is ignored. You are encouraged but not required
to set your editor's equivalent of 'editor.formatOnSaveMode' to only
format changed lines
This commit also does format of docstatefunctions.js, previously it did
not in to check that an incorrectly-formatted file could fail CI. Now it
does to make sure that formatting fixes the issue. This file was chosen
because it is very new and very small.
Change-Id: Ie6067f34aa658f887e149a08aebd0180b2354005
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
StateRecorder.hpp split from ChildSession.cpp
KitWebSocketHandler.[ch]pp split from Kit.cpp.
ThreadPool.hpp split from RenderTiles.hpp
Expose headers for KitSocketPoll and Document
at the same time.
Not clear we need the DocumentManagerInterface anymore.
Conditionally compile out Document::createSession for unittest
dependency breaking, and avoid Rlimit::handleSetrlimitCommand
likewise.
Make makePropertyValue a private method of Kit.cpp.
clang-format new files.
Change-Id: I47a1d6afe20165f156b477a931b94c916cff4b9d
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
We also create a new sub-directory for WOPI
code, which helps better organize things and
isolate it from Mobile App builds, which have
no need for it.
Change-Id: Id6dbbd450f35c9c0eb8460de12330cff2e3e5576
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The baseline is EL7, and systemd is assumed.
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibc43996e8b23007876ee8fa0d7dcf8478b217aa0
This moves ClientRequestDispatcher and all
its direct exclusive dependencies to its
own file and adjusts formatting.
No functional changes were performed,
although namespaces were restored and
other minor changes were done for
consistency.
The resulting file is still rather large
at around 2000 lines, but that makes
COOLWSD.cpp smaller by about 30% now.
Change-Id: I59bcd997ad08702ce7029c6791095e75ad9b23b0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Should save time in CI for simple JS errors.
Change-Id: Ib7e1ab68795cab12f8f5ec461cfed6e84986f440
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
RequestVettingStation is designed to
vet requests before allocating further
resources. Specifically, it is to be
used to verify whether the resource
requested exists and whether or not
the request is allowed and authenticated.
All of this is designed to be done
asynchronously, for performance reasons.
Change-Id: I399fa7bc91741ffee065a6d41acca0756eedc939
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
As discussed [on Matrix](https://col.la/suppresseslintindevelopment) the
set of things we want to pick up in CI and development are different.
Specifically, there are some things that only get in the way during
development but should not be allowed in merged code. Examples are
'debugger' statemens, dead code (e.g. resulting from 'if (false)') and
unused variables.
After #7822 there are no more eslint warnings, so we can use it as a
separate state for these issues that should only block in CI.
This commit make make check run eslint and fail if it receives any
warnings, and changes those 3 errors so that they only emit warnings.
It's expected that there are more annoying warnings which I've missed,
if you have any please make a followup change!
This commit explicitly does not deal with formatting-related
issues (e.g. requiring single quotes for strings in eslint) as though
they can be annoying there's no reason why they should change between
development and master... another followup to improve linting experience
could be to use an autoformatter so the computer fixes the formatting
for you, however that's out-of-scope for this commit
Change-Id: I036afac5ef5056a9cc2effc21e31165aa1436ad2
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Added build rules for coolwsd-inproc and some run command to use it.
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I4138ff7337bc354b0221070105dd34ea9ef19691
Extract some functions from ForKit.cpp and COOLWSD.cpp to new files
so we can do a kit in process mode without using ifdef directives.
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I7529f8f46a8026318244666b27d1ce72ed5ad4ca
StorageConnectionManager centralizes the
connection creation and management of
Storage sockets and related bits.
This is needed as we move to a more async
model of communicating with the Storage.
Change-Id: I7a44c95c113bbc536e922b5aa3f7cf9b71917c22
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Failed with:
fuzzer/HttpEcho.cpp:111:17: error: 'removeSockets' is a private member of 'SocketPoll'
And:
kit/Delta.hpp:208:(.text._ZN14DeltaGenerator14DeltaBitmapRow7initRowEPKjj[_ZN14DeltaGenerator14DeltaBitmapRow7initRowEPKjj]+0x127): undefined reference to `simd_initPixRowSimd'
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I6d980698b43ca3545d9eae5f40eabaf4e442ca17
just enough to get the same results as before
https://github.com/CollaboraOnline/online/issues/7165
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I109c9b8f1e7935782c72e0179aa0ed48712eadb6
Split it out as a C file, to avoid accidental C++ header inclusion,
and C is a cross-platform assembler anyway so a good match.
Change-Id: I6c042781713aecaf143b9663af8377659a7deaf1
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
* simplified the tooling a bit: use coolconfig for creating
RSA key pairs for WOPI Proof headers.
* got rid of a dependency: ssh-keygen, towards leaner docker images
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Iaf468b5c8585d45027f512bb0a287ab77afb1ea9
In some cases jail cleaning up may fail.
In such a case, we still want to be able
to build a fresh set of binaries, which
are used to run coolwsd --cleanup.
Since cleaning up the jails and the
systemplate are not strictly required
to building, we now only emmit a warning
and move on.
Change-Id: I4ebf7772cf767b579810247c427d86efa5a6d3ad
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The clang linker doesn't need -pthread and
warns of unknown command-line option.
This detects clang and forgoes the -pthread
flag to the linker.
Change-Id: I658cd887c567a5beeeae0e6e1b6d596231894c1b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We'd like to build distro independent rpm packages.
Distro specific macros and other code were removed.
The empty environment file for systemd was removed, it can be
easily created by the user, if necessary.
The obsolete trigger for rebuilding the systemplate was removed,
because we no longer copy system libs to systemplate.
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0ac9be8f72a7089e38349abc1dff0d39b0410e44
Best to have all .cpp files in compile_commands.json
so they can all benefit from the tools that leverage
it. So now we recursively generate the file for all
.cpp files in all subdirectories. Most notably, now
all test files are included.
Change-Id: I312d812463607b32fe6b9e83b10900c17ae86185
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This is how I imagine that this stuff should work:
- In one tree you build with --host=wasm32-local-emscripten. This
results in only the WASM binary being built, containing C++ code
from Collabora Office core and C++ code from Online (to a similar
extent as in the iOS, Android, and gtk apps). No HTML and JS for the
client's browser is produced in this tree. The embedded filesystem
from the corresponding WASM core build could be copied into this
tree for use as below. (Or, alternatively the build in the other
tree could look into the config.status file in this tree to figure
out where to pick up the embedded fs data file.)
- In another tree you build with --with-wasm-fallback=<path to the
above WASM tree>. Note that the C++ code will be built normally in
this case, for Linux. This build results in an otherwise normal COOL
build, with the added feature that the COOL server sends the whole
document file also to the COOL client whenever it is saved. The HTML
and JS browser code will have code that enables receiving the
document in this case, plus incremental updates to the document (if
possible), and code to detect that the connection to the COOL server
is broken and then fall back to using the local WASM in the
browser. Obviously the WASM binary and related JS and other data
(like the embedded file system from core) will have to be downloaded
into the client right at the start, to be present if the connection
breaks, but the WASM will likely not need to be started until
needed.
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I945c93451d3f5f0b1bc6ad8550da64e8e6453b6b
Copy the list of .cpp files from the Android project, assuming this will
be similar in scope.
Signed-off-by: Michael Stahl <michael.stahl@allotropia.de>
Change-Id: I57c7ad2f10d1867307ff4fcea3d0c650726d18d8
add zotero UI only if user is logged in
when zotero citation edit button is clicked,
fetch the library with zotero API.
Let user select what to insert
at this stage its not a complete solution but just first stage
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id67d8409bcd6416994713acd9ace495b24823fb0