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
The client connection management had nothing to
do with the WopiTestServer and it was there
for convenience. The issue was that it was
not available to tests that do not need
the custom WopiTestServer and depending
on it would make them unnecessarily
complicated.
This adds a new intermediary class to manage
client connections in tests. The reason
this logic didn't move to UnitWSD or even
UnitBase is simply because the client
connection logic depends on the helpers
namespace and other test-specific code
that isn't available in COOLWSD. In short,
UnitBase and UnitWSD are primarily an
interface that COOLWSD and co depend on
and cannot contain test-specific logic
that isn't linked to coolwsd.
We also move the UnitWebSocket helper class.
Change-Id: I79567774164e137349dc162482529578f150353c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
zstd provides for much faster compression server-side, as well
as better decompression.
zstd allows us to de-compress a keyframe and several deltas in a
single call in JS, so it is necessar to add a terminator to the
delta stream so that we can detect when to flush the buffer we
are working on - so the next delta applies to the correct data.
Change-Id: I0e292e3a697b4902d6488b7c04deaba2d1485e94
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
This is a full round-trip http fuzzer.
It can achieve >1000 iterations per second
on a single 2 Ghz core, even while going
through the network loopback layer.
The advantage is that more networking code
is fuzzed this way, including not just
the http code, but also the sockets.
Change-Id: I75d21bd0e25221ee6621097a2605d62c4bb2ae4d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This adds support for code-coverage HTML reporting.
To achieve this, we must use file-linking in jails
so that we can update the coverage data (.gcda files)
from the jails. This means that creating jails is
slower than with bind-mounting and we need to
account for that in our timeouts.
We also can't kill child processes with SIGKILL,
which is un-catchable. Instead, we use SIGTERM
and dump the profile data before exiting.
Change-Id: I16fa534f6ed42f7133014d841bb024423315e0a4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
coolwsd_fuzzer predates actual fuzzing
with libfuzzer and is currently unsused.
Change-Id: Id095b165943ba14dbf525ddc607ad329f5d952d4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This reduces the build time significantly while also
minimizing the disk-space requirements for builds.
When configured with --enable-fuzzers the fuzzing
target binaries are built.
Change-Id: Ia8560d876f548d04ac085503e55a3a5dca90f590
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Apparently this breaks the build on at least
CentOS. Reverting for now.
This reverts commit 23f02b8929.
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: Ie8f00bbc53a63098b473d625846c0b6fd4e074bd
There are no deprecated API currently in use,
but that is a moving target as we upgrade openssl.
This prevents any accidental use of deprecated API
and will reveal any deprecated API used in any
particular build.
Change-Id: I969f7f7c4efe163d4704dea9aab45c09550baa40
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
An initial set of seven of these, easy to add more as/when needed.
Change-Id: I6c65e052d00f9eaa10adee3c9464043e4c594848
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>