Commit graph

92 commits

Author SHA1 Message Date
Andras Timar
92f44a4695 On-disk cache was removed long ago, clean-up in packaging
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2eeaed12af6ac8789151b95a9c2a2aa1fd72573b
2021-01-26 21:10:50 +01:00
Martin Hoffmann
fff344afed fix build.sh: wrong directory after poco install
After compiling and installing poco the script is left in the wrong path, resulting core to be deployed underneath poco directory which breaks configure --with-lo-path later on.

Signed-off-by: Martin Hoffmann <mhoffmann@pro-nets.de>
Change-Id: I46c5b77e44eebead08c8a7fb857c229900a23570
2021-01-26 13:59:26 +01:00
Andras Timar
8b0af828ef Revert "docker: do not modify loolwsd.xml, use command line parameters instead"
This reverts commit 93dfff7dad.
Reason: #1264 and #1235
2021-01-18 15:12:29 +01:00
Andras Timar
289a51db58 Fix #895: build poco from source, link poco statically, add openSUSE target, and other fixes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I525ee004771ad335e41e4602e044d4fd8d8a19bc
2021-01-11 11:46:52 +01:00
Michael Meeks
317dffb817 Optimize copy of jails to hard-linking with new capability.
In some cases we cannot do a fast bind-mount of the files we want
in our jail since we don't have cap_sys_admin for loolmount inside
eg. docker.

Thus we need to fallback to hard-linking, however various security
systems namespace parts of our tree, such that link() fails with
EXDEV even across the (apparently) same file-system.

As such we need to assemble a copy of what we want to hard-link
close to our jails. However, this needs to be owned by root / the
system to avoid having writable files shared between jails. Hence
we need cap_chown in addition to cap_fowner, to get ownership right
and then hard-link.

Change-Id: Iba0ef46ddbc1c03f3dc7177bc1ec1755624135db
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-01-04 15:05:36 +00:00
Ashod Nakashian
3e86ed373c docker: disable logging colors
Colors in docker only add noise in the form
of the escape codes around the log entries.
Best to disable colored logging in docker.

Change-Id: I15c62910856eb37e41585be7b7bbe78ce5456283
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-09 17:19:58 +01:00
Andras Timar
d8bda129d7 docker: narrow down permission changes, binaries in systemplate should be owned by root
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I371c8445c12a10d52c4645a460d626a8a0e0e33b
2020-12-04 21:23:11 +01:00
Andras Timar
93dfff7dad docker: do not modify loolwsd.xml, use command line parameters instead
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I12b1791ef9480cb3391caf292d0e9208323765e0
2020-12-04 15:02:15 +01:00
Andras Timar
418743df89 systemd was installed for /etc/localtime, so numeric user id of lool shifted to 104
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibdbc54eeddc47bbe5a1a852b8d1319299b5fa837
2020-12-01 12:38:50 +01:00
Andras Timar
4a13c650f4 docker: README typo
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ideadb508f2cb3db7cfdd0098a1d580f1caf1eb36
2020-11-30 22:28:54 +01:00
Andras Timar
99bd298878 docker: fix syntax error and a typo
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia2eb07301efeaed4350571657fb6a21280b4c2de
2020-11-27 12:32:24 +01:00
Andras Timar
75947daccc docker: RHEL8: Install cpio (missing dependency needed by loolwsd-systemplate-setup)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0224e3bcabf84fb44e5ec9937bd0e765f5a64324
2020-11-23 15:22:28 +01:00
Andras Timar
93870d7e08 typo in docker/README
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I134187c8f88aa115796d850be2c6d9b0e29bc8a1
2020-11-22 22:41:42 +01:00
Andras Timar
06623247f0 typo in docker/README
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib9305de89421540f6341d96318f639dde100b69b
2020-11-22 22:40:02 +01:00
Andras Timar
34b8ff08f6 Docker bits
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I4b4d8f9d6ccb8648d5d75e6abff751d1b37e8773
2020-11-22 22:19:34 +01:00
Andras Timar
34bc966d68 change product name
Change-Id: Ic34d324c952364442d3f4f9f0758676ab57c8a9a
2020-10-02 14:18:28 +02:00
Andras Timar
0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Ashod Nakashian
5c9988f2e3 wsd: faster jail setup via bind-mount
loolmount now works and supports mounting and
unmounting, plus numerous improvements,
refactoring, logging, etc..  When enabled,
binding improves the jail setup time by anywhere
from 2x to orders of magnitude (in docker, f.e.).

A new config entry mount_jail_tree controls
whether mounting is used or the old method of
linking/copying of jail contents. It is set to
true by default and falls back to linking/copying.
A test mount is done when the setting is enabled,
and if mounting fails, it's disabled to avoid noise.

Temporarily disabled for unit-tests until we can
cleanup lingering mounts after Jenkins aborts our
build job. In a future patch we will have mount/jail
cleanup as part of make.

The network/system files in /etc that need frequent
refreshing are now updated in systemplate to make
their most recent version available in the jails.
These files can change during the course of loolwsd
lifetime, and are unlikely to be updated in
systemplate after installation at all. We link to
them in the systemplate/etc directory, and if that
fails, we copy them before forking each kit
instance to have the latest.

This reworks the approach used to bind-mount the
jails and the templates such that the total is
now down to only three mounts: systemplate, lo, tmp.

As now systemplate and lotemplate are shared, they
must be mounted as readonly, this means that user/
must now be moved into tmp/user/ which is writable.

The mount-points must be recursive, because we mount
lo/ within the mount-point of systemplate (which is
the root of the jail). But because we (re)bind
recursively, and because both systemplate and
lotemplate are mounted for each jails, we need to
make them unbindable, so they wouldn't multiply the
mount-points for each jails (an explosive growth!)
Contrarywise, we don't want the mount-points to
be shared, because we don't expect to add/remove
mounts after a jail is created.

The random temp directory is now created and set
correctly, plus many logging and other improvements.

Change-Id: Iae3fda5e876cf47d2cae6669a87b5b826a8748df
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92829
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 05:42:43 +02:00
Andras Timar
ac71e9c63a we don't have to depend on locales-all
... after 15ced64d32

Change-Id: If08624d4c9614f3616af7f39c7bc636aebaf749b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95024
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-01 19:32:42 +02:00
Marco Marinello
16f72821bd Enhance docker build system: reduce created layers
Signed-off-by: Marco Marinello <marinello@libreoffice.org>
Change-Id: If12a84b3adb82dad3bf7ef7ea423e8bdfac1650e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94261
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-05-20 08:35:03 +02:00
Christian Lohmaier
d6b8a37eb1 set INSTDIR again in and check for dockerfile in proper location
f'up fix to 607ddbff46

Change-Id: Idbb5191afcb9baab5c58e43e1b2511493491f029
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94291
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-15 22:30:14 +02:00
Marco Marinello
607ddbff46 Enhance build system: support multiple OS as host and pull the image before build
Change-Id: Ic9875dd1aa49335df83cc6a8492144450f725f31
Signed-off-by: Marco Marinello <marinello@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92665
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-05-14 10:08:56 +02:00
Andras Timar
e92f31ca86 docker: generate the WOPI proof key at container startup
Change-Id: Ic2d8dedcc7aff2a33ef5e26d986a1302fc6941fa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92851
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-24 20:05:55 +02:00
Andras Timar
25bc0a1088 Proof: add loolwsd-generate-proof-key helper script
Change-Id: Ibbd99b6431b1a2992c520d3fad5f52d0770905f6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92788
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-23 19:36:06 +02:00
Samuel Mehrbrodt
f4c76b9f87 Fix log message in docker build script
Change-Id: Ifdd931b5ae75137669126ee544d0c9eae9fe7777
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91403
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-04-02 08:49:45 +02:00
Gary Kim
60b116f91e Fix docker script pushing to Docker Hub even when set not to
Change-Id: I7506c65b5412f3fd7faadcc387a54b8dfe472650
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90890
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-03-23 13:34:42 +01:00
Andras Timar
59993fb9d1 docker: don't start another shell, let the loolwsd process have the PID 1
(Suggested by Ralf Becker)
e024a6c2a3 (r37648923)

Change-Id: Ifa519739686facb41eb9e85b68ebe547e008db34
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90019
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-03-05 21:11:30 +01:00
Marco Marinello
11c12a2729 Variabilize online git source
Signed-off-by: Marco Marinello <marinello@libreoffice.org>
Change-Id: If8f9103972952b98193ca6d1501844422b8aae54
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89483
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-03-02 01:53:29 +01:00
Marco Marinello
0326037cbf Add a README for docker directory
Signed-off-by: Marco Marinello <marinello@libreoffice.org>
Change-Id: I0cc9da9945763c48afd01ea231d9dfb5bb384d71
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89482
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-25 22:45:43 +01:00
Marco Marinello
fdba30ea4d Add more flags to docker compilation
Signed-off-by: Marco Marinello <marinello@libreoffice.org>
Change-Id: Ib5a49613ed36eec0d8ab8178b13e302cd5d8da4e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89080
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-02-20 14:07:30 +01:00
Andras Timar
0009343003 docker: non-root container
Change-Id: I30b48fa193fe06ee42752e8ba4883c5221b28924
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88435
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-17 18:31:36 +01:00
Andras Timar
ef37f40665 docker: expose port 9980 in Dockerfile (useful for inter-container communication)
Change-Id: I9596dfe4909a904d458ed054d71ab4fea45adebe
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88434
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-17 15:55:38 +01:00
Andras Timar
62fe72b275 it's a docker anti-pattern to get the latest fixes during image build
Change-Id: I9950fb99fdc2f6dad7e2781c6cd663215271ec51
Reviewed-on: https://gerrit.libreoffice.org/78645
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-12-21 23:02:10 +01:00
Samuel Mehrbrodt
0068d8b2d9 docker: Allow to build different branches in core+online
Change-Id: Ifbd705fc95ae225858ccd582ed2e0150a40f6a93
Reviewed-on: https://gerrit.libreoffice.org/85254
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-12-17 08:24:32 +01:00
Andras Timar
bc608f41d5 With switch to Weblate, downloadpootle.sh script became obsolete
Change-Id: I85447800a2547d2e9142b59ce60ee3c242e7234d
2019-12-13 12:29:31 +01:00
Gary Kim
997113697e docker: add missing dependencies
The docker container is missing some dependencies
so cannot start properly.

Change-Id: Icfa7b318370d331ecf2935f166b3cfb3b57379c8
Reviewed-on: https://gerrit.libreoffice.org/83939
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-11-28 14:05:34 +01:00
Samuel Mehrbrodt
05831c52f7 One -f should be enough
Change-Id: Iac8a6cb9fe7a6da41c3d7120bafa62e5847f2c98
Reviewed-on: https://gerrit.libreoffice.org/80510
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-10-09 09:14:49 +02:00
Andras Timar
340b2ad8d4 docker: run git clean before git pull
Fixes:
https://ci.libreoffice.org/job/lo_online_docker_master/118/console

Change-Id: Ib7f228cdbb191f0a397849fb6adf20b37591c1c1
2019-10-09 08:54:24 +02:00
Andras Timar
db176ee45b 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 <ashnakash@gmail.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-10-08 09:36:44 +02:00
Andras Timar
e268299aa2 Since LibreOfficeOnline.conf has --disable-gui, we don't need these packages
Change-Id: Ic57af67bf50774c3cafdb26737ee4eeac2f54da0
Reviewed-on: https://gerrit.libreoffice.org/78852
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-13 11:01:45 +02:00
Andras Timar
becb72a6a9 tdf#121983 is fixed, remove the hack here
Change-Id: I93bfc410d21b6283c4566586b4240f1c3556ee0e
Reviewed-on: https://gerrit.libreoffice.org/78647
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-05 23:57:21 +02:00
Andras Timar
d5cf8afd57 docker: install selective set of poco libraries, only what we need
Change-Id: I2776b6817696fbc8d5f24a35165e26bf5ff8c4af
Reviewed-on: https://gerrit.libreoffice.org/78646
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-05 23:57:03 +02:00
Samuel Mehrbrodt
3b9255bb41 Use pkill to kill process instead of killall
Using killall does not work, it gives 'no process found'.

Change-Id: I0e528ab8c0f6f0c4cb06ea5e6c436aecf2274688
Reviewed-on: https://gerrit.libreoffice.org/74679
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-06-25 11:35:50 +02:00
Andras Timar
c13fe19667 docker: fix SSL cert generation with OpenSSL 1.1.1
Change-Id: I1534cd3d3da19ac17e65571e6e2f7e7b0a8e61ca
Reviewed-on: https://gerrit.libreoffice.org/73953
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-06-13 13:18:40 +02:00
Samuel Mehrbrodt
0a243e0924 Move build options to distro-config
Change-Id: I41963698fafd9d75732c015761d065712e45b40f
Reviewed-on: https://gerrit.libreoffice.org/73804
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-06-12 09:36:45 +02:00
Samuel Mehrbrodt
55e00b4f0c Fix docker build (removed configure option)
Change-Id: I6528a3954958803cc651554b8fb6fa7e4d514352
Reviewed-on: https://gerrit.libreoffice.org/73800
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-06-11 09:10:08 +02:00
Samuel Mehrbrodt
45aaec3207 No more jake
Change-Id: I21187241142031cd324e63aebf03ce8ca949411d
Reviewed-on: https://gerrit.libreoffice.org/72757
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 15:55:21 +02:00
Samuel Mehrbrodt
ae6471d845 More specific instructions for setcap nopasswd exception
Change-Id: I1f151650331987c598f5a9d98d0f3a11542c12bd
Reviewed-on: https://gerrit.libreoffice.org/72756
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 15:55:04 +02:00
Jan Holesovsky
3a03f50784 Revert "Adapt paths to new package name"
It is not a good idea to change the configuration directory, it will affect all the existing installations.

And the service is called loolwsd - so the configuration should be called that way too.

This reverts commit 9278574289.

Change-Id: I7e6eee644e21ad2dd842742585d16133ff8e36c9
Reviewed-on: https://gerrit.libreoffice.org/72730
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 12:06:06 +02:00
Samuel Mehrbrodt
9278574289 Adapt paths to new package name
After 1dbbc5acc7

Change-Id: I64a12fb13bc8f9371821b2d5969941bfddc2514a
Reviewed-on: https://gerrit.libreoffice.org/72728
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-22 10:27:33 +02:00