forward port packaging bits to master branch

The next version of Collabora Online will be version 2021.
Development of version 2021 will be carried on master branch
for the time being.
The corresponding core branch is distro/collabora/co-2021

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9c97aaac711c9e1f1e48ed25066b169ea7e26e84
pull/1889/head
Andras Timar 2021-03-31 17:24:33 +02:00
parent 7588255b3d
commit 41c5cddc3d
6 changed files with 400 additions and 58 deletions

293
EULA 100644
View File

@ -0,0 +1,293 @@
End User License and Subscription Agreement
Collabora Office (“Software”)
An individual acting on their own behalf or on behalf of any corporate entity
which employs them or which they represent (“an Organisation”) represents that
he or she has the authority to enter into this agreement on behalf of that
Organisation. In this Licence Agreement, “You” includes both the reader and any
Organisation.
PLEASE READ THIS AGREEMENT CAREFULLY. BY PURCHASING, INSTALLING AND/OR USING
THE COLLABORA OFFICE SOFTWARE (INCLUDING ITS COMPONENTS), YOU AGREE TO THE
TERMS OF THIS LICENCE AND SUBSCRIPTION AGREEMENT AND ACKNOWLEDGE THAT YOU HAVE
READ AND UNDERSTAND THIS AGREEMENT.
IF YOU DO NOT AGREE WITH THESE TERMS PLEASE DO NOT DOWNLOAD, INSTALL OR USE THE
SOFTWARE OR SUBSCRIPTION SERVICES.
PARTIES. This software licence and subscription agreement (“Agreement”) is a
legally binding agreement between You and Collabora Productivity Limited,
incorporated and registered in England and Wales with company number 08644931
whose registered office is at The Platinum Building, St Johns Innovation Park,
Cambridge, CB4 0DS, United Kingdom (“Collabora”) and where applicable
references to Collabora shall also refer to its authorised resellers and third
party distributors from time to time.
SOFTWARE. The Software and each of its components are owned by Collabora or
other licensors and are protected as copyrighted works of authorship, and are
also protected under applicable database and other applicable laws. To the
extent that they are not accompanied by a separate Collabora software licence
agreement, any modification, update or upgrade to the Software that You may
download or receive, whether as Subscription Services detailed below or
otherwise, is included as Software and governed by the “Licenses” heading below
and generally by this Agreement.
LICENCES. Provided that You have subscribed to the Subscription Services as
detailed below and Your compliance with the other terms and conditions of this
Agreement, Collabora grants to You a perpetual, non-transferable, worldwide
licence (“Licence”) to reproduce and use copies of the Software within Your
Organization. The Software is licensed (not sold) to You. Accordingly no title
to or ownership of the Software is transferred to You. You should also be aware
that in addition to this grant of Licence, many of the individual components of
the Software are subject to open source licences, as detailed further below
under “Open Source Licences and Limitations”.
SUBSCRIPTION SERVICES. The Licence to reproduce and use a copy of the Software
is granted subject to the initial purchase by You of Software maintenance
and/or support services entitlements (“Subscription Services Entitlements”)
equivalent in number to the total number of units of the Software that you
intend to deploy, install or use in Your Organization.
The Subscription Services Entitlements entitle You during the subscription
period to make use of the following services (“Subscription Services”):
a) in the case of maintenance services, to any security fixes and Software
updates which may be issued by Collabora, including existing fixes from the
support services set out at (b), on the terms set out in this Agreement and
from time to time at http://www.CollaboraOffice.com/
b) in the case of support services, to fee based technical support on the
terms set out in this Agreement, or any separate agreement, and from time to
time at http://www.CollaboraOffice.com/.
All Subscription Services will be supplied in a professional manner in
accordance with generally accepted industry standards.
Unless the Subscription Services and Subscription Services Entitlements are set
out in a separate contract with Collabora, they are offered to You subject to
the terms set out in this Agreement.
IF THE SUBSCRIPTION SERVICES ENTITLEMENTS PERIOD EXPIRES AND IS NOT RENEWED
WITHIN 30 DAYS, ACCESS TO SUBSCRIPTION SERVICES IS TERMINATED. IF WITHIN THE
SUBSCRIPTION SERVICES ENTITLEMENT PERIOD YOU WISH TO INCREASE THE NUMBER OF
COPIES OF THE SOFTWARE YOUR ORGANISATION IS USING, YOU MUST PURCHASE ADDITIONAL
UNITS OF SUBSCRIPTION SERVICES ENTITLEMENTS EQUIVALENT TO THE NUMBER OF
ADDITIONAL SOFTWARE COPIES YOU WISH TO INSTALL. UPON RENEWAL OF YOUR
SUBSCRIPTION SERVICES ENTITLEMENTS, YOUR SUBMISSION OF A PURCHASE ORDER OR
PAYMENT OF FEES FOR SUBSCRIPTION SERVICES ENTITLEMENTS WILL BE DEEMED TO BE A
REPRESENTATION OF THE NUMBER OF COPIES OF THE SOFTWARE INSTALLED AT YOUR
ORGANISATION AT THAT TIME. COLLABORA RESERVES THE RIGHT AT ITS ENTIRE
DISCRETION TO CARRY OUT A LICENCE COMPLIANCE AUDIT AT ANY TIME.
HOME USE. Collabora grants primary users of Subscription Services Entitlements
and their immediate family members a License to reproduce and use copies of the
Software for Home Use as detailed below unless otherwise prohibited by any
applicable laws, policies or regulations. Home Use is usage outside the scope
of normal business that occurs primarily inside the home.
LICENSE COMPLIANCE AUDIT. Collabora may, upon fifteen (15) days advance notice
and at its expense, conduct an annual audit if You are an Organisation, during
your normal business hours, of Your use of the Software to verify compliance
with this Agreement and in particular Your commitment under the License herein
to purchase an equivalent number units of Subscription Services Entitlements.
You agree to keep records sufficient to certify your compliance with this
Agreement. Upon Collaboras or its authorized representatives reasonable
written commitment(s) to safeguard your confidential information, you shall
fully cooperate with such audit and provide any necessary assistance and access
to records and computers. If an audit reveals that you have or at any time had
unlicensed installation, use of, or access to the Software, You will promptly
acquire sufficient Subscription Services Entitlements to cover any shortage. If
a shortage of 5% or more is found, you must reimburse Collabora for the costs
incurred in the audit and acquire the necessary additional Subscription
Services Entitlements within 30 days.
EVALUATION LICENCE. An evaluation licence is granted when You deploy, install
or use an evaluation version of the Software or You are granted a time limited,
non-exclusive and non-transferable licence by Collabora for evaluation
purposes. The Software is licensed to You for the sole purpose of evaluating
the Software and only for a specified evaluation period of 30 days. After 30
days You must either purchase an equivalent Subscription Services Entitlement
from Collabora, or destroy and stop using the Software. If You purchase the
Subscription Service Entitlement before the expiration of the evaluation time,
You have a valid licence and You do not need to destroy the Software.
OPEN SOURCE LICENCES/REQUIREMENTS. Many of the individual components included
in the Software are licensed primarily pursuant to Mozilla Public License v2.0
open source licence, in addition to other open source licences identified in
the documentation or located in the source code or binary code for the
component. For these the source code form of the Software is made available at
all times under the terms of such licences.
Whilst this Agreement in no way limits Your rights under such licences, nor is
it intended to supersede or conflict with the licence terms or obligations for
use of any individual open source component, the Mozilla Public License v2.0
has been utilised to license the majority of the components comprising the
Software because it allows the imposition (as is set out in its paragraph
3.2(b)) of the conditions of this Agreement on the free distribution of
Software in its Executable Form.
For the avoidance of doubt, Collabora branding, theme data and Collabora Marks
are not made available under an Open Source license.
MAINTENANCE SERVICES.
1) By purchasing maintenance services You are entitled to install and use all
upgrades and updates made commercially available by Collabora during the period
covered by the maintenance services subscription, up to the number of
installations for which You have purchase maintenance services.
2) Any “update” means a fix or compilation of fixes released by Collabora to
correct operational errors (a defect that prevents it from operating
substantially as intended, where such intent shall be deduced based on a
competent inspection of the source code and documentation) in the Software. An
“upgrade” means any new version of the Software which bears the same product
name, including version changes evidenced by a number immediately after the
name of the Software.
3) If a question arises as to whether a release by Collabora is an upgrade or
an update or a new Software product, Collaboras opinion will prevail provided
that Collabora treats the product offering the same for its end users generally.
4) If Collabora commercially releases any upgrade or updates, it will make such
upgrades or updates available to You within a reasonable period of time after
they become commercially available, although Collabora cannot guarantee any
specific turnaround times and/or regular release intervals.
5) At its sole discretion Collabora will determine whether to eliminate an
operational error by means of issuing an update. Collabora will inform you by
email (to the address given on registration of the maintenance services) as
soon as new updates are released at the Collabora website.
6) Maintenance services do not include integration services, installation of
upgrades or updates, support services or any other benefits not expressly
described in this Agreement.
SUPPORT SERVICES
By purchasing an entitlement to Level 3 technical support, services will be
provided on certain terms which include:
- allocation of a severity level for each support case and any variations on
this;
- Collaboras work availability times, initial response time and the
communication frequency for each support case based on such allocated case
severity level;
- Your limit on the number of support cases that You can report for each such
allocated case severity level (although for the avoidance of doubt, any unused
limit cannot be refunded and expires at the end of the Subscription Services
Entitlement period unless otherwise agreed).
The specific terms are subject to change from time to time and accordingly are
set out at http://www.CollaboraOffice.com/, unless separately agreed with You
such as in a purchase order. You are urged to check these terms again now
before proceeding with any purchase of Subscription Services Entitlements.
Alternatively, Collabora also entitle You to purchase the support services
entitlement from a reseller or other intermediary rather than from Collabora
directly. If You have purchased the services entitlement from such a party
please check with them if any support service entitlement terms have been
separately negotiated between them and Collabora, as any such terms are deemed
to be incorporated into this Agreement and shall take precedence over any
conflicting terms set out at http://www.CollaboraOffice.com/ or on a purchase
order.
LIMITATIONS AND EXCLUSIONS
1) Collabora offers no rights other than those expressly granted to You in this
Agreement. Except as agreed to under a separate written agreement with
Collabora or in the licence terms accompanying a particular component, to the
maximum extent permitted under applicable law (and not applicable to claims
relating to death or personal injury caused by negligence or fraudulent
misrepresentation) the Software is provided and licensed "as is" without any
warranties of any kind, express or implied, including any implied warranties of
quality, title, non-infringement, non-interruption or fitness for a particular
purpose.
2) The Software is only compatible with certain computers and operating
systems. It is not warranted for non-compatible systems or for incorrect or
unauthorised use, being use which is not in accordance with the Documentation.
Please contact Collabora for information about compatibility or incorrect use.
3) The Software may include or be bundled with other software programmes or
services licensed or sold by an entity other than Collabora. Collabora does not
warrant non-Collabora products or services, which are provided on an "as is"
basis. Please see the third party entity regarding remedies.
4) No right or licence, express or implied, is granted under this Agreement
with respect to any trademark, trade name or service mark (“Mark”) of
Collabora. If You distribute any open source component of the Software, You
must remove all Marks except those used to identify Collaboras ownership or
licensing of the component. In addition you may not vary, delete or obscure any
notices of proprietary rights or any product identification or restrictions on
or in the Software.
5) Neither Collabora nor any of its licensors, subsidiaries, contractors or
employees will in any case be liable for any incidental, consequential,
indirect or economic damages arising out of the use of or inability to use the
Software or Subscription Services, including without limitation loss of
profits, business or data, even if advised of the possibility of those damages.
In particular, as files may be altered or damaged in the course of Collabora
providing Subscription Services, You agree to take appropriate measures to
isolate and back up Your systems.
6) Notwithstanding (5) above, in no event will Collabora's aggregate liability
for damages (whether in one instance or a series of instances) exceed 1.25
times the amount paid by You for the Subscription Services Entitlements out of
which such claim arose.
7) Upon any default in Collaboras provision of Subscription Services,
Collabora's only obligation is to either correct the Subscription Services so
that they comply with this warranty or at its option refund the amount You paid
to Collabora for the portion of such Services that fail to comply with this
warranty and in such event You may elect to terminate this Agreement with
immediate effect.
GENERAL TERMS
1) This Agreement may not be transferred or assigned without the prior written
approval of Collabora.
2) This Agreement will terminate if You fail to comply with any term or
condition of this Agreement.
3) Unless explicitly indicated otherwise, this Agreement sets forth the entire
understanding and agreement between You and Collabora and may be amended or
modified only by a written agreement agreed to by You and Collabora. No
licensor, distributor, or reseller is authorised to modify this Agreement
whether formally or informally.
4) No waiver of any right under this Agreement will be effective unless in
writing. No waiver of any past or present right will be deemed to be a waiver
of any future right arising under this Agreement.
5) If any provision in this Agreement is invalid or unenforceable, that
provision will be construed, limited, modified or, if necessary, severed, to
the extent necessary, to eliminate its invalidity or unenforceability, and the
other provisions of this Agreement will remain unaffected.
6) Any products or technical information provided under this Agreement may be
subject to trade laws of various countries including U.S. export controls. Both
You and Collabora each agree to comply with all export control regulations and
to obtain any required licenses or classification to export, re-export or
import deliverables and Collabora assumes no responsibility for the Your
failure to comply with any such necessary export control laws, rules or
regulations.
7) If You are an Organisation You agree that you will not use the Software in
breach of any relevant laws in the country in which you use the Software, and
you agree to implement internal safeguards to prevent any unauthorized copying,
distribution, installation, or use of, or access to, the Software.
8) You may make a reasonable number of copies of the Software over and above
the number of units of Software for which you have purchased Subscription
Services Entitlements, purely for backup, archival or other security purposes.
In so doing You will not be in breach of the terms of this Agreement.
9) Without regard to conflict of laws rules and principles or the United
Nations Convention of Contracts for the International Sale of Goods, this
Agreement is governed by the laws of England, and any action relating to this
Agreement may only be brought before the courts of England.
EULA 2020-04-07
------------------------------------------------------------------------------
Collabora Productivity Ltd.
The Platinum Building
St Johns Innovation Park
Cambridge
CB4 0DS
United Kingdom
Registered in England and Wales with company number 08644931
Telephone: +44 (0)1223 362967
E-mail: libreoffice@collabora.com
Web: http://CollaboraOffice.com

View File

@ -38,7 +38,8 @@ dist_doc_DATA = wsd/README \
wsd/README.vars \
wsd/protocol.txt \
wsd/reference.md \
wsd/metrics.txt
wsd/metrics.txt \
EULA
loolwsddatadir = @LOOLWSD_DATADIR@
@ -330,6 +331,7 @@ EXTRA_DIST = discovery.xml \
etc/nginx/loolwsd.conf \
scripts/unocommands.py \
scripts/refresh-git-hooks \
README.md \
$(man_MANS)
if ENABLE_LIBFUZZER

View File

@ -3,7 +3,7 @@
AC_PREREQ([2.63])
AC_INIT([loolwsd], [master], [https://github.com/CollaboraOnline/online/issues], [loolwsd], [https://collaboraonline.github.io/])
AC_INIT([loolwsd], [2021.0], [https://github.com/CollaboraOnline/online/issues], [loolwsd], [https://collaboraonline.github.io/])
LT_INIT([shared, disable-static, dlopen])
AM_INIT_AUTOMAKE([1.10 foreign subdir-objects tar-pax -Wno-portability])

18
debian/control vendored
View File

@ -2,13 +2,27 @@ Source: loolwsd
Section: web
Priority: optional
Maintainer: Andras Timar <andras.timar@collabora.com>
Build-Depends: debhelper (>= 9), dh-systemd (>= 1.3), libcap-dev, libcap2-bin, libpcre3-dev, libpng-dev, libpoco-dev (>= 1.7.5), linux-libc-dev, nodejs, python-polib, python-lxml, python3-polib, python3-lxml, fontconfig, libpam-dev, libcppunit-dev, pkg-config, devscripts, m4
Build-Depends: debhelper (>= 9), dh-systemd (>= 1.3), libcap-dev, libcap2-bin, libpcre3-dev, libpng-dev, linux-libc-dev, nodejs, python3-polib, python3-lxml, fontconfig, libpam-dev, libcppunit-dev, pkg-config, devscripts, m4
Standards-Version: 3.9.7
Package: loolwsd
Section: web
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, libssl1.0.0, libodbc1, libxinerama1, libxrender1, libcairo2, libgl1-mesa-glx, libcups2, libdbus-glib-1-2, cpio, libcap2-bin, ${lo:Depends}
Depends: ${shlibs:Depends}, ${misc:Depends},
adduser, expat, fontconfig, cpio, libcap2-bin, openssh-client, systemd,
collaboraofficebasis2021-calc,
collaboraofficebasis2021-core,
collaboraofficebasis2021-graphicfilter,
collaboraofficebasis2021-images,
collaboraofficebasis2021-impress,
collaboraofficebasis2021-ooofonts,
collaboraofficebasis2021-writer,
collaboraoffice2021,
collaboraoffice2021-ure,
collaboraofficebasis2021-en-us,
collaboraofficebasis2021-draw,
collaboraofficebasis2021-extension-pdf-import,
collaboraofficebasis2021-ooolinguistic
Description: Collabora Online WebSocket Daemon
LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice
services.

4
debian/rules vendored
View File

@ -19,7 +19,3 @@ override_dh_auto_test:
override_dh_installinit:
# no init.d scripts here, assume systemd
override_dh_gencontrol:
# put package names of LibreOffice here
# dh_gencontrol -- -Vlo:Depends=""

View File

@ -15,36 +15,42 @@ Version: @PACKAGE_VERSION@
Release: 1%{?dist}
Vendor: %{vendor}
Summary: Collabora Online WebSocket Daemon
License: MPL
License: EULA
Source0: loolwsd-@PACKAGE_VERSION@.tar.gz
BuildRequires: libcap-devel libpng-devel poco-devel >= 1.7.5 m4
%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: libpcap kernel-headers
%else
%if 0%{?suse_version}
BuildRequires: libcap-progs linux-glibc-devel systemd-rpm-macros
%endif
BuildRequires: libcap-devel libpng-devel pam-devel gcc-c++ cppunit-devel pam-devel fontconfig make
# Red Hat and CentOS
%if 0%{?rhel} == 7
BuildRequires: libpcap kernel-headers python36-polib python36-lxml
%endif
Requires: %{lo_rpm_list}
Requires: systemd
%if 0%{?rhel} == 8
BuildRequires: libpcap kernel-headers python3-polib python3-lxml
%endif
# openSUSE Leap 15.x, SLES12, SLES15
%if 0%{?suse_version}
BuildRequires: libcap-progs linux-glibc-devel systemd-rpm-macros python3-polib python3-lxml
%endif
Requires: collaboraoffice2021 collaboraoffice2021-ure collaboraofficebasis2021-core collaboraofficebasis2021-writer collaboraofficebasis2021-impress collaboraofficebasis2021-graphicfilter collaboraofficebasis2021-en-US collaboraofficebasis2021-calc collaboraofficebasis2021-ooofonts collaboraofficebasis2021-images collaboraofficebasis2021-draw collaboraofficebasis2021-extension-pdf-import collaboraofficebasis2021-ooolinguistic
Requires(post): coreutils grep sed cpio
%if 0%{?fedora} || 0%{?rhel} >= 7
%if 0%{?rhel}
# loolwsd dependencies
Requires: expat keyutils-libs krb5-libs libattr libcap libcom_err libgcc libpng libselinux openssl-libs pcre xz-libs zlib
Requires: poco-crypto >= 1.7.5 poco-foundation >= 1.7.5 poco-json >= 1.7.5 poco-net >= 1.7.5 poco-netssl >= 1.7.5 poco-util >= 1.7.5 poco-xml >= 1.7.5
# LibreOffice dependencies (unfortunately upstream LibreOffice RPM packages (from TDF) do not have real dependencies)
Requires: atk avahi-glib avahi-libs bzip2-libs cairo cups-libs dbus-glib dbus-libs fontconfig freetype GConf2 gdk-pixbuf2 glib2 gnome-vfs2 graphite2 gstreamer gstreamer-plugins-base gtk2 harfbuzz libdrm libffi libICE libSM libuuid libX11 libXau libxcb libXcomposite libXcursor libXdamage libXext libXfixes libXi libXinerama libXrandr libXrender libxshmfence libXt libXxf86vm mesa-libEGL mesa-libgbm mesa-libGL mesa-libglapi pango pixman
%else
Requires: systemd expat keyutils-libs krb5-libs libattr libcap libcom_err libgcc libpng libselinux openssh-clients openssl-libs pcre xz-libs zlib
# Collabora Office dependencies (unfortunately Collabora Office RPM packages do not have real dependencies)
Requires: expat fontconfig freetype libuuid bzip2-libs
%endif
%if 0%{?suse_version}
# loolwsd dependencies
Requires(post): libcap-progs
Requires: libcap2 libopenssl1_0_0 libpng12-0 libpcre1 libz1 %{?systemd_requires} %{fillup_prereq}
Requires: libPocoCrypto48 >= 1.7.8 libPocoFoundation48 >= 1.7.8 libPocoJSON48 >= 1.7.8 libPocoNet48 >= 1.7.8 libPocoNetSSL48 >= 1.7.8 libPocoUtil48 >= 1.7.8 libPocoXML48 >= 1.7.8
# LibreOffice dependencies (unfortunately upstream LibreOffice RPM packages (from TDF) do not have real dependencies)
Requires: Mesa-libEGL1 Mesa-libGL1 Mesa-libglapi0 cups-libs dbus-1-glib fontconfig libatk-1_0-0 libavahi-client3 libavahi-common3 libavahi-glib1 libbz2-1 libcairo2 libcom_err2 libdbus-1-3 libdrm2 libexpat1 libfreetype6 libgbm1 libgio-2_0-0 libglib-2_0-0 libgmodule-2_0-0 libgobject-2_0-0 libgraphite2-3 libgthread-2_0-0 libgtk-2_0-0 libharfbuzz0 libkeyutils1 liblzma5 libpixman-1-0 libpng16-16 libuuid1 libxml2 libffi4 libgbm1 libICE6 libselinux1 libSM6 libwayland-client0 libwayland-server0 libX11-6 libX11-xcb1 libXau6 libxcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libXdamage1 libXext6 libXfixes3 libXrender1 libxshmfence1 libXxf86vm1
%endif
Requires: systemd libopenssl1_0_0 libpcre1 libz1 libcap2 libpng12-0 %{fillup_prereq}
# Collabora Office dependencies (unfortunately Collabora Office RPM packages do not have real dependencies)
# cd /opt/collaboraoffice2021/program ; for i in soffice.bin *.so ;do ldd $i | grep '=>' | sed -e "s/^.*=> //" -e "s/ [(].*$//"; done | sort | uniq | xargs rpm -qf --qf="%{NAME}\n" | sort | uniq | grep -v collaboraoffice
Requires: fontconfig libbz2-1 libexpat1 libfreetype6 libpng16-16 libuuid1 openssh
%endif
%if 0%{?name_suffix:1}
Provides: loleaflet = 1.5.8, loolwsd
%else
@ -64,33 +70,41 @@ Obsoletes: loleaflet <= 1.5.8
%configure \
--enable-silent-rules \
--with-lokit-path=bundled/include \
--with-lo-path=%{loroot} \
--with-lo-path=/opt/collaboraoffice2021 \
--disable-setcap \
%if 0%{?config_options:1}
%{config_options}
%endif
make %{?_smp_mflags}
env BUILDING_FROM_RPMBUILD=yes make %{?_smp_mflags}
%check
#make check
#env BUILDING_FROM_RPMBUILD=yes make check
%install
make install DESTDIR=%{buildroot}
%__install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service
env BUILDING_FROM_RPMBUILD=yes make install DESTDIR=%{buildroot}
install -d -m 755 %{buildroot}/var/adm/fillup-templates
%if 0%{?fedora} || 0%{?rhel} >= 7
install -D -m 644 sysconfig.loolwsd %{buildroot}/etc/sysconfig/loolwsd
%else
%if 0%{?suse_version}
install -D -m 644 sysconfig.loolwsd %{buildroot}/var/adm/fillup-templates
%if 0%{?rhel}
install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service
# systemd in RHEL 7 does not understand these options
%if 0%{?rhel} <= 7
sed -i "/^ReadWritePaths/d;/^ProtectControlGroups/d;/^ProtectSystem/d" %{buildroot}%{_unitdir}/loolwsd.service
%endif
install -D -m 644 sysconfig.loolwsd %{buildroot}/etc/sysconfig/loolwsd
install -d -m 755 %{buildroot}/etc/httpd/conf
install -D -m 755 etc/apache2/loolwsd.conf %{buildroot}/etc/httpd/conf
rm %{buildroot}/etc/apache2/conf-available/loolwsd.conf
%endif
%if 0%{?suse_version}
install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service
install -D -m 644 sysconfig.loolwsd %{buildroot}/var/adm/fillup-templates
%endif
mkdir -p %{buildroot}/etc/pam.d
echo "auth required pam_unix.so" > %{buildroot}/etc/pam.d/loolwsd
echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd
%files
%defattr(-,root,root,-)
/usr/bin/loolwsd
/usr/bin/loolwsd-systemplate-setup
/usr/bin/loolwsd-generate-proof-key
@ -101,31 +115,38 @@ echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd
/usr/share/loolwsd/discovery.xml
/usr/share/loolwsd/favicon.ico
/usr/share/loolwsd/loleaflet
/usr/share/doc/loolwsd/EULA
/usr/share/doc/loolwsd/README
/usr/share/doc/loolwsd/README.vars
/usr/share/doc/loolwsd/metrics.txt
/usr/share/doc/loolwsd/protocol.txt
/usr/share/doc/loolwsd/reference.md
/usr/share/doc/loolwsd/metrics.txt
/usr/share/man/man1/loolwsd.1
/usr/share/man/man1/loolforkit.1
/usr/share/man/man1/loolconvert.1
/usr/share/man/man1/loolconfig.1
/usr/share/man/man1/loolwsd-systemplate-setup.1
/usr/share/man/man1/loolwsd-generate-proof-key.1
/usr/share/man/man1/loolwsd.1.gz
/usr/share/man/man1/loolforkit.1.gz
/usr/share/man/man1/loolconvert.1.gz
/usr/share/man/man1/loolconfig.1.gz
/usr/share/man/man1/loolwsd-systemplate-setup.1.gz
/usr/share/man/man1/loolwsd-generate-proof-key.1.gz
%{_unitdir}/loolwsd.service
%if 0%{?fedora} || 0%{?rhel} >= 7
%if 0%{?rhel}
%config(noreplace) /etc/sysconfig/loolwsd
%else
%endif
%if 0%{?suse_version}
/var/adm/fillup-templates/sysconfig.loolwsd
%endif
%endif
%config(noreplace) /etc/pam.d/loolwsd
%config(noreplace) %attr(640, lool, root) /etc/loolwsd/loolwsd.xml
%config /etc/loolwsd/loolkitconfig.xcu
%config(noreplace) /etc/nginx/snippets/loolwsd.conf
%if 0%{?suse_version} > 0
%config(noreplace) /etc/apache2/conf-available/loolwsd.conf
%endif
%if 0%{?rhel} > 0
%config(noreplace) /etc/httpd/conf/loolwsd.conf
%endif
%doc README
%doc README.md
%pre
%if 0%{?suse_version}
@ -133,15 +154,21 @@ echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd
%endif
getent group lool >/dev/null || groupadd -r lool
getent passwd lool >/dev/null || useradd -g lool -r lool
getent passwd lool >/dev/null || useradd -g lool -r lool -d /opt/lool -s /bin/bash
%post
setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit
setcap cap_sys_admin=ep /usr/bin/loolmount
# for filename in `find /opt/lool/systemplate -type f`;do stripped=$(echo -ne $filename | sed -e "s|/opt/lool/systemplate||");rpm -qf --qf="%{NAME}\n" $stripped;done | grep -v devel | grep -v 32bit | grep -v -- -fonts | sort | uniq
%triggerin -- expat fontconfig freetype freetype2 glibc glibc-locale kernel keyutils-libs krb5 krb5-libs libbz2-1 libcap libcap-ng libcap2 libexpat1 libfreetype6 libgcc libgcc_s1 libgcrypt libiscsi libpng libpng12 libpng12-0 libpng15-15 libpng16-16 libstdc++ libstdc++6 libuuid libuuid1 libz1 lsb nss-mdns nss-softokn-freebl pcre sssd sssd-client systemd-libs timezone tzdata zlib
echo -ne "Triggered update of loolwsd systemplate..."
%if 0%{?rhel} >= 7 || 0%{?suse_version} >= 1300
systemctl is-active -q loolwsd && LOOLWSD_IS_ACTIVE=1 || LOOLWSD_IS_ACTIVE=0
if [ $LOOLWSD_IS_ACTIVE == "1" ]; then systemctl stop loolwsd; fi
%endif
# Figure out where LO is installed, let's hope it is not a mount point
# Create a directory for loolwsd on the same file system
loroot=%{loroot}
loroot=/opt/collaboraoffice2021
loolparent=`cd ${loroot} && cd .. && /bin/pwd`
rm -rf ${loolparent}/lool
@ -153,7 +180,17 @@ fc-cache ${loroot}/share/fonts/truetype
loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} >/dev/null 2>&1
loolwsd-generate-proof-key >/dev/null 2>&1
%if 0%{?fedora} || 0%{?rhel} >= 7
%if 0%{?rhel} || 0%{?suse_version}
if [ $LOOLWSD_IS_ACTIVE == "1" ]; then systemctl start loolwsd; fi
%endif
echo " Done."
%post
setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit
setcap cap_sys_admin=ep /usr/bin/loolmount
%if 0%{?rhel} >= 7
%systemd_post loolwsd.service
%else
%if 0%{?suse_version}
@ -164,7 +201,7 @@ loolwsd-generate-proof-key >/dev/null 2>&1
%preun
%if 0%{?fedora} || 0%{?rhel} >= 7
%if 0%{?rhel} >= 7
%systemd_preun loolwsd.service
%else
%if 0%{?suse_version}
@ -173,7 +210,7 @@ loolwsd-generate-proof-key >/dev/null 2>&1
%endif
%postun
%if 0%{?fedora} || 0%{?rhel} >= 7
%if 0%{?rhel} >= 7
%systemd_postun loolwsd.service
%else
%if 0%{?suse_version}