Makefile.am | 3 configure.ac | 2 debian/changelog | 174 +++++++++++++++++++++++++++++++++++++++++++++ debian/control | 3 debian/loolwsd.postinst.in | 4 + debian/loolwsd.postrm | 3 debian/loolwsd.service | 2 debian/rules | 4 - loolwsd.init.rhel6 | 49 ++++++++++++ loolwsd.init.sle11 | 68 +++++++++++++++++ loolwsd.spec.in | 174 ++++++++++++++++++++++++++++++++++----------- 11 files changed, 439 insertions(+), 47 deletions(-)
New commits: commit 7b5df360ebe30ecd9bf69da30ccefd426c668ee3 Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Sun Dec 9 17:18:12 2018 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sun Dec 9 17:19:10 2018 +0100 [cp] Packaging bits Change-Id: Ib1e421ae13be534eed5afafb65520448697284e5 diff --git a/Makefile.am b/Makefile.am index a70bb68a7..14d64158a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -239,6 +239,8 @@ dist-hook: EXTRA_DIST = discovery.xml \ favicon.ico \ loolkitconfig.xcu \ + loolwsd.init.rhel6 \ + loolwsd.init.sle11 \ loolwsd.spec \ loolwsd.xml.in \ loolwsd.service \ @@ -253,6 +255,7 @@ EXTRA_DIST = discovery.xml \ debian/changelog \ debian/control \ debian/loolwsd.postinst \ + debian/loolwsd.postrm \ etc/key.pem \ etc/cert.pem \ etc/ca-chain.cert.pem \ diff --git a/configure.ac b/configure.ac index fbde02a02..54b58a7f4 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.63]) -AC_INIT([loolwsd], [master], [libreoffice@lists.freedesktop.org]) +AC_INIT([loolwsd], [4.0.0], [libreoffice@lists.freedesktop.org]) LT_INIT([shared, disable-static, dlopen]) AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability]) diff --git a/debian/changelog b/debian/changelog index 56cbc5563..4c2eb01c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,177 @@ +loolwsd (4.0.0-1) unstable; urgency=medium + + * see the git log: http://col.la/cool4 + + -- Andras Timar <andras.ti...@collabora.com> Sun, 09 Dec 2018 07:00:00 +0100 + +loolwsd (3.4.0-8) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Fri, 05 Oct 2018 17:00:00 +0200 + +loolwsd (3.4.0-7) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Tue, 02 Oct 2018 16:00:00 +0200 + +loolwsd (3.4.0-6) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 19 Sep 2018 08:00:00 +0200 + +loolwsd (3.4.0-5) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 12 Sep 2018 21:30:00 +0200 + +loolwsd (3.4.0-4) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Tue, 11 Sep 2018 21:30:00 +0200 + +loolwsd (3.4.0-3) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Fri, 30 Aug 2018 08:30:00 +0200 + +loolwsd (3.4.0-2) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Thu, 28 Aug 2018 10:50:00 +0200 + +loolwsd (3.4.0-1) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Jan Holesovsky <ke...@collabora.com> Fri, 17 Aug 2018 17:00:00 +0200 + +loolwsd (3.3.1-3) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Thu, 07 Jul 2018 18:10:00 +0200 + +loolwsd (3.3.1-2) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Thu, 05 Jul 2018 21:10:00 +0200 + +loolwsd (3.3.1-1) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Tue, 03 Jul 2018 23:10:00 +0200 + +loolwsd (3.3.0-3) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 27 Jun 2018 12:50:00 +0200 + +loolwsd (3.3.0-2) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 20 Jun 2018 07:50:00 +0200 + +loolwsd (3.3.0-1) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 30 May 2018 09:00:00 +0100 + +loolwsd (3.2.0-4) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 25 Apr 2018 12:00:00 +0100 + +loolwsd (3.2.0-3) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Tue, 17 Apr 2018 08:00:00 +0100 + +loolwsd (3.2.0-2) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 11 Apr 2018 21:00:00 +0100 + +loolwsd (3.2.0-1) unstable; urgency=medium + + * see the git log: http://col.la/cool3 + + -- Andras Timar <andras.ti...@collabora.com> Thu, 05 Apr 2018 23:00:00 +0100 + +loolwsd (3.1.0-3) unstable; urgency=medium + + * see the git log: http://col.la/cool31 + + -- Andras Timar <andras.ti...@collabora.com> Tue, 27 Feb 2018 15:26:00 +0100 + +loolwsd (3.1.0-2) unstable; urgency=medium + + * see the git log: http://col.la/cool31 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 21 Feb 2018 01:26:00 +0100 + +loolwsd (3.1.0-1) unstable; urgency=medium + + * see the git log: http://col.la/cool31 + + -- Andras Timar <andras.ti...@collabora.com> Thu, 15 Feb 2018 22:00:00 +0100 + +loolwsd (3.0.0-7) unstable; urgency=medium + + * see the git log: http://col.la/cool30 + + -- Andras Timar <andras.ti...@collabora.com> Mon, 29 Jan 2018 10:00:00 +0100 + +loolwsd (3.0.0-6) unstable; urgency=medium + + * see the git log: http://col.la/cool30 + + -- Andras Timar <andras.ti...@collabora.com> Thu, 24 Jan 2018 21:00:00 +0100 + +loolwsd (3.0.0-5) unstable; urgency=medium + + * see the git log: http://col.la/cool30 + + -- Andras Timar <andras.ti...@collabora.com> Tue, 23 Jan 2018 12:10:00 +0100 + +loolwsd (3.0.0-4) unstable; urgency=medium + + * see the git log: http://col.la/cool30 + + -- Andras Timar <andras.ti...@collabora.com> Mon, 18 Dec 2017 21:20:00 +0100 + +loolwsd (3.0.0-3) unstable; urgency=medium + + * see the git log: http://col.la/cool30 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 06 Dec 2017 11:20:00 +0100 + +loolwsd (3.0.0-2) unstable; urgency=medium + + * see the git log: http://col.la/cool30 + + -- Andras Timar <andras.ti...@collabora.com> Wed, 29 Nov 2017 15:20:00 +0100 + +loolwsd (3.0.0-1) unstable; urgency=medium + + * see the git log: http://col.la/cool30 + + -- Andras Timar <andras.ti...@collabora.com> Thu, 16 Nov 2017 17:20:00 +0100 + loolwsd (1.8.2-1) unstable; urgency=medium * Fix crash in Impress. diff --git a/debian/control b/debian/control index c5497b564..cf64111c8 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,8 @@ 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, fontconfig, libsm6, libssl1.0.0, libxinerama1, libxrender1, libgl1-mesa-glx, libcups2, cpio, libcap2-bin, libxcb-render0, libxcb-shm0, collaboraofficebasis6.0-calc (>= 6.0.10.17), collaboraofficebasis6.0-core (>= 6.0.10.17), collaboraofficebasis6.0-graphicfilter (>= 6.0.10.17), collaboraofficebasis6.0-images (>= 6.0.10.17), collaboraofficebasis6.0-impress (>= 6.0.10.17), collaboraofficebasis6.0-ooofonts (>= 6.0.10.17), collaboraofficebasis6.0-writer (>= 6.0.10.17), collaboraoffice6.0 (>= 6.0.10.17), collaboraoffice6.0-ure (>= 6.0.10.17), collaboraofficebasis6.0-en-us (>= 6.0.10.17), collaboraofficebasis6.0-draw (>= 6.0.10.17), collaboraofficebasis6.0-extension-pdf-import (>= 6.0.10.17), collaboraofficebasis6.0-ooolinguistic (>= 6.0.10.17), collaboraoffice6.0-dict-en (>= 6.0.10.17) +Conflicts: collaboraofficebasis6.0-gnome-integration, collaboraofficebasis6.0-kde-integration Description: LibreOffice Online WebSocket Daemon LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice services. diff --git a/debian/loolwsd.postinst.in b/debian/loolwsd.postinst.in index ef2ba9eb1..110db43b6 100755 --- a/debian/loolwsd.postinst.in +++ b/debian/loolwsd.postinst.in @@ -24,6 +24,10 @@ case "$1" in fc-cache @LO_PATH@/share/fonts/truetype su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate @LO_PATH@ >/dev/null 2>&1" + cat << EOF > /etc/apt/apt.conf.d/25loolwsd +// Rebuild systemplate of LibreOffice Online +DPkg::Post-Invoke { "echo Updating loolwsd systemplate;su lool --shell=/bin/sh -c 'loolwsd-systemplate-setup /opt/lool/systemplate @LO_PATH@ >/dev/null 2>&1'"; }; +EOF ;; esac diff --git a/debian/loolwsd.postrm b/debian/loolwsd.postrm new file mode 100755 index 000000000..d4e1fd993 --- /dev/null +++ b/debian/loolwsd.postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +rm /etc/apt/apt.conf.d/25loolwsd diff --git a/debian/loolwsd.service b/debian/loolwsd.service index d43d59078..63a4b22eb 100644 --- a/debian/loolwsd.service +++ b/debian/loolwsd.service @@ -4,7 +4,7 @@ After=network.target [Service] EnvironmentFile=-/etc/sysconfig/loolwsd -ExecStart=/usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd +ExecStart=/usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice6.0 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd User=lool KillMode=control-group Restart=always diff --git a/debian/rules b/debian/rules index d675675c0..feb980c95 100755 --- a/debian/rules +++ b/debian/rules @@ -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="" diff --git a/loolwsd.init.rhel6 b/loolwsd.init.rhel6 new file mode 100644 index 000000000..0ee6f5f0c --- /dev/null +++ b/loolwsd.init.rhel6 @@ -0,0 +1,49 @@ +#!/bin/bash +# +# chkconfig: 35 90 12 +# description: loolwsd server +# + +# Get function from functions library +. /etc/init.d/functions + +# Start the service loolwsd +start() { + echo -n $"Starting loolwsd server: " + su lool -c "/usr/bin/loolwsd --version --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice6.0 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd --o:logging.file[@enable]=true" & + ### Create the lock file ### + touch /var/lock/subsys/loolwsd + success $"loolwsd server startup" + echo +} + +# Stop the service loolwsd +stop() { + echo -n $"Stopping loolwsd server: " + killproc loolwsd + ### Now, delete the lock file ### + rm -f /var/lock/subsys/loolwsd + echo +} + +### main logic ### +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status loolwsd + ;; + restart|reload|condrestart) + stop + start + ;; + *) + echo $"Usage: $0 {start|stop|restart|reload|status}" + exit 1 +esac + +exit 0 diff --git a/loolwsd.init.sle11 b/loolwsd.init.sle11 new file mode 100644 index 000000000..0a9f14489 --- /dev/null +++ b/loolwsd.init.sle11 @@ -0,0 +1,68 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: loolwsd +# Default-Start: 3 5 +# Default-Stop: 0 1 2 4 6 +# Short-Description: LibreOffice Online Websocket Daemon +# Description: LibreOffice Online Websocket Daemon +### END INIT INFO + +RETVAL=0 +prog="loolwsd" + +# Source function library. +. /etc/rc.status +rc_reset + +LOOLWSD=/usr/bin/loolwsd +PID_FILE=/var/run/loolwsd.pid + +case "$1" in + start) + echo -n "Starting $prog " + /sbin/startproc -u lool -p $PID_FILE $LOOLWSD --version --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice6.0 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd --o:logging.file[@enable]=true 2>/dev/null + rc_status -v + ;; + + stop) + echo -n "Shutting down $prog " + /sbin/killproc -p $PID_FILE $LOOLWSD -TERM + rc_status -v + ;; + + restart) + $0 stop + $0 start + rc_status + ;; + + reload) + echo -n "Reload service $prog " + killproc $LOOLWSD -HUP + rc_status -v + ;; + + force-reload) + $0 reload + ;; + + status) + echo -n "Checking for service $prog" + /sbin/checkproc $LOOLWSD + rc_status -v + ;; + + condrestart|try-restart) + $0 status + if test $? = 0; then + $0 restart + else + rc_reset # Not running is not a failure. + fi + rc_status + ;; + *) + echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 1 +esac +rc_exit diff --git a/loolwsd.spec.in b/loolwsd.spec.in index 929bff10b..9289821bf 100644 --- a/loolwsd.spec.in +++ b/loolwsd.spec.in @@ -13,37 +13,70 @@ Name: loolwsd %endif Version: @PACKAGE_VERSION@ Release: 1%{?dist} -Vendor: %{vendor} -Summary: LibreOffice Online WebSocket Daemon +%if 0%{?suse_version} == 1110 +Group: Productivity/Office/Suite +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%endif +Vendor: Collabora +Summary: LibreOffice On-Line WebSocket Daemon License: MPL Source0: loolwsd-@package_vers...@.tar.gz BuildRequires: libcap-devel libpng-devel poco-devel >= 1.7.5 + +# Red Hat and CentOS %if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: libpcap kernel-headers -%else -%if 0%{?suse_version} +%endif + +# openSUSE and SLES12 +%if 0%{?suse_version} >= 1300 BuildRequires: libcap-progs linux-glibc-devel systemd-rpm-macros %endif + +# SLES11SP4 +%if 0%{?suse_version} == 1110 +BuildRequires: libcap-progs %endif -Requires: %{lo_rpm_list} -Requires: systemd +Requires: collaboraoffice6.0 >= 6.0.10.17 collaboraoffice6.0-ure >= 6.0.10.17 collaboraofficebasis6.0-core >= 6.0.10.17 collaboraofficebasis6.0-writer >= 6.0.10.17 collaboraofficebasis6.0-impress >= 6.0.10.17 collaboraofficebasis6.0-graphicfilter >= 6.0.10.17 collaboraofficebasis6.0-en-US >= 6.0.10.17 collaboraofficebasis6.0-calc >= 6.0.10.17 collaboraofficebasis6.0-ooofonts >= 6.0.10.17 collaboraofficebasis6.0-images >= 6.0.10.17 collaboraofficebasis6.0-draw >= 6.0.10.17 collaboraofficebasis6.0-extension-pdf-import >= 6.0.10.17 collaboraofficebasis6.0-ooolinguistic >= 6.0.10.17 collaboraoffice6.0-dict-en >= 6.0.10.17 +Conflicts: collaboraofficebasis6.0-kde-integration collaboraofficebasis6.0-gnome-integration Requires(post): coreutils grep sed +%if 0%{?rhel} == 6 +# loolwsd dependencies +Requires: keyutils-libs krb5-libs libattr libcap libcom_err libgcc libpng libselinux openssl pcre zlib +Requires: poco-crypto >= 1.7.8 poco-foundation >= 1.7.8 poco-json >= 1.7.8 poco-net >= 1.7.8 poco-netssl >= 1.7.8 poco-util >= 1.7.8 poco-xml >= 1.7.8 +# Collabora Office dependencies (unfortunately Collabora Office RPM packages do not have real dependencies) +Requires: avahi-libs cups-libs dbus-libs expat fontconfig freetype gnutls libdrm libgcc libgcrypt libgpg-error libICE libSM libtasn1 libuuid libX11 libXau libxcb libXdamage libXext libXfixes libXinerama libXrender libXxf86vm mesa-dri-drivers mesa-libGL +%endif %if 0%{?fedora} || 0%{?rhel} >= 7 # loolwsd dependencies +Requires: systemd 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 +# Collabora Office dependencies (unfortunately Collabora Office RPM packages do not have real dependencies) +Requires: avahi-libs cups-libs dbus-libs fontconfig freetype libdrm libICE libSM libuuid libX11 libXau libxcb libXdamage libXext libXfixes libXinerama libXrender libxshmfence libXxf86vm mesa-libGL mesa-libglapi +%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 +Requires: libcap2 libpng12-0 %{fillup_prereq} %endif + +%if 0%{?suse_version} >= 1300 +Requires: systemd +Requires: libopenssl1_0_0 libpcre1 libz1 +Requires: libPocoCrypto60 >= 1.9.0 libPocoFoundation60 >= 1.9.0 libPocoJSON60 >= 1.9.0 libPocoNet60 >= 1.9.0 libPocoNetSSL60 >= 1.9.0 libPocoUtil60 >= 1.9.0 libPocoXML60 >= 1.9.0 +# Collabora Office dependencies (unfortunately Collabora Office RPM packages do not have real dependencies) +# cd /opt/collaboraoffice6.0/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: Mesa-libGL1 Mesa-libglapi0 cups-libs fontconfig krb5 libavahi-client3 libavahi-common3 libavahi-glib1 libbz2-1 libcom_err2 libdbus-1-3 libdrm2 libexpat1 libfreetype6 libkeyutils1 libpng16-16 libuuid1 libICE6 libselinux1 libSM6 libX11-6 libX11-xcb1 libXau6 libxcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libXdamage1 libXext6 libXfixes3 libXrender1 libxshmfence1 libXxf86vm1 +%endif + +# SLES11SP4 +%if 0%{?suse_version} == 1110 +Requires: libattr libopenssl0_9_8 pcre zlib +Requires: libPocoCrypto49 >= 1.7.9 libPocoFoundation49 >= 1.7.9 libPocoJSON49 >= 1.7.9 libPocoNet49 >= 1.7.9 libPocoNetSSL49 >= 1.7.9 libPocoUtil49 >= 1.7.9 libPocoXML49 >= 1.7.9 +Requires: cups-libs fontconfig freetype2 glibc keyutils-libs krb5 libcom_err2 libdrm libexpat1 libgcc_s1 libstdc++6 libuuid1 Mesa pcre xorg-x11-libICE xorg-x11-libs xorg-x11-libSM xorg-x11-libX11 xorg-x11-libXau xorg-x11-libxcb xorg-x11-libXext xorg-x11-libXfixes xorg-x11-libXrender %endif %if 0%{?name_suffix:1} Provides: loleaflet = 1.5.8, loolwsd @@ -64,27 +97,40 @@ Obsoletes: loleaflet <= 1.5.8 %configure \ --enable-silent-rules \ --with-lokit-path=bundled/include \ - --with-lo-path=%{loroot} \ + --with-lo-path=/opt/collaboraoffice6.0 \ --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%{?rhel} == 6 +install -d -m 755 %{buildroot}/etc/init.d +install -D -m 755 loolwsd.init.rhel6 %{buildroot}/etc/init.d/loolwsd +%endif +%if 0%{?suse_version} == 1110 +install -d -m 755 %{buildroot}/etc/init.d +install -D -m 755 loolwsd.init.sle11 %{buildroot}/etc/init.d/loolwsd +%endif %if 0%{?fedora} || 0%{?rhel} >= 7 +install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service install -D -m 644 sysconfig.loolwsd %{buildroot}/etc/sysconfig/loolwsd -%else -%if 0%{?suse_version} +%endif +%if 0%{?suse_version} >= 1300 +install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service install -D -m 644 sysconfig.loolwsd %{buildroot}/var/adm/fillup-templates %endif +%if 0%{?rhel} > 0 +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 mkdir -p %{buildroot}/etc/cron.d echo "#Remove old tiles once every 10 days at midnight" > %{buildroot}/etc/cron.d/loolwsd.cron @@ -94,6 +140,7 @@ 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/loolforkit @@ -106,69 +153,116 @@ echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/loolwsd /usr/share/doc/loolwsd/README.vars /usr/share/doc/loolwsd/protocol.txt /usr/share/doc/loolwsd/reference.md -/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 -%{_unitdir}/loolwsd.service +/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 +%if 0%{?rhel} == 6 || 0%{?suse_version} == 1110 +/etc/init.d/loolwsd +%endif %if 0%{?fedora} || 0%{?rhel} >= 7 +%{_unitdir}/loolwsd.service %config(noreplace) /etc/sysconfig/loolwsd -%else -%if 0%{?suse_version} -/var/adm/fillup-templates/sysconfig.loolwsd %endif +%if 0%{?suse_version} >= 1300 +%{_unitdir}/loolwsd.service +/var/adm/fillup-templates/sysconfig.loolwsd %endif %config(noreplace) /etc/cron.d/loolwsd.cron %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 %pre -%if 0%{?suse_version} +%if 0%{?suse_version} >= 1300 %service_add_pre loolwsd.service %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_mknod,cap_sys_chroot=ep /usr/bin/loolforkit +# 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 -- Mesa arts atk atlas avahi-libs cairo cups-filters cups-libs dbus-1 dbus-1-glib dbus-glib dbus-libs dyninst enscript expat font-util fontconfig fonts-config freetype freetype2 gdk-pixbuf2 glib2 glibc glibc-locale gnutls graphviz gstreamer gstreamer-plugins-base gtk2 ifnteuro kernel keyutils-libs krb5 krb5-libs libICE libICE6 libSM libSM6 libX11 libX11-6 libXau libXau6 libXcomposite libXcomposite1 libXcursor libXcursor1 libXdamage libXdamage1 libXext libXext6 libXfixes libXfixes3 libXi libXi6 libXinerama libXinerama1 libXrender libXrender1 libXxf86vm libatk-1_0-0 libavahi-client3 libavahi-common3 libbz2-1 libcairo2 libcap libcap-ng libcap2 libcom_err libcom_err2 libdatrie1 libdbus-1-3 libdrm libexpat1 libffi libffi4 libfreetype6 libgcc libgcc_s1 libgcrypt libgdk_pixbuf-2_0-0 libgio-2_0-0 libglib-2_0-0 libgmodule-2_0-0 libgobject-2_0-0 libgpg-error libgraphite2-3 libgstinterfaces-0_10-0 libgstreamer-0_10-0 libgthread-2_0-0 libgtk-2_0-0 libharfbuzz0 libiscsi libkeyutils1 l iblangtag liblangtag1 libopenssl0_9_8 libopenssl1_0_0 libpango-1_0-0 libpcre1 libpixman-1-0 libpng libpng12 libpng12-0 libpng15-15 libpng16-16 libselinux libselinux1 libstdc++ libstdc++6 libtasn1 libthai0 libuuid libuuid1 libxcb libxcb-render0 libxcb-shm0 libxcb1 libxshmfence libz1 lsb mariadb-libs mesa-dri-drivers mesa-libEGL mesa-libGL mesa-libgbm mesa-libglapi mysql-libs netcfg nss-mdns nss-softokn-freebl openssl-libs pango pcre pixman qt3 redhat-lsb-core samba-client samba-winbind samba-winbind-clients setup sssd sssd-client systemd-libs timezone tzdata xorg-x11-libICE xorg-x11-libSM xorg-x11-libX11 xorg-x11-libXau xorg-x11-libXext xorg-x11-libXfixes xorg-x11-libXrender xorg-x11-libs xorg-x11-libxcb xterm xulrunner zlib -mkdir -p /var/cache/loolwsd && chown lool:lool /var/cache/loolwsd -rm -rf /var/cache/loolwsd/* +echo -ne "Triggered update of loolwsd systemplate..." + +%if 0%{?rhel} == 6 +if [ -f /var/lock/subsys/loolwsd ]; then LOOLWSD_IS_ACTIVE=1; else LOOLWSD_IS_ACTIVE=0; fi +%endif + +%if 0%{?suse_version} == 1110 +if [ -f /var/run/loolwsd.pid ]; then LOOLWSD_IS_ACTIVE=1; else LOOLWSD_IS_ACTIVE=0; fi +%endif + +%if 0%{?rhel} == 6 || 0%{?suse_version} == 1110 +if [ $LOOLWSD_IS_ACTIVE == "1" ]; then /etc/init.d/loolwsd stop; fi +%endif + +%if 0%{?fedora} || 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/collaboraoffice6.0 loolparent=`cd ${loroot} && cd .. && /bin/pwd` rm -rf ${loolparent}/lool mkdir -p ${loolparent}/lool/child-roots + chown lool:lool ${loolparent}/lool chown lool:lool ${loolparent}/lool/child-roots fc-cache ${loroot}/share/fonts/truetype su lool -c "loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} >/dev/null 2>&1" +%if 0%{?rhel} == 6 || 0%{?suse_version} == 1110 +if [ $LOOLWSD_IS_ACTIVE == "1" ]; then /etc/init.d/loolwsd start; fi +%endif + +%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1300 +if [ $LOOLWSD_IS_ACTIVE == "1" ]; then systemctl start loolwsd; fi +%endif + +echo " Done." + +%post +setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit + +mkdir -p /var/cache/loolwsd && chown lool:lool /var/cache/loolwsd +rm -rf /var/cache/loolwsd/* + +%if 0%{?rhel} == 6 || 0%{?suse_version} == 1110 +touch /var/log/loolwsd.log && chown lool:lool /var/log/loolwsd.log +%endif + %if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_post loolwsd.service %else -%if 0%{?suse_version} +%if 0%{?suse_version} >= 1300 %service_add_post loolwsd.service %{fillup_only -n loolwsd} %endif %endif - %preun %if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_preun loolwsd.service %else -%if 0%{?suse_version} +%if 0%{?suse_version} >= 1300 %service_del_preun loolwsd.service %endif %endif @@ -177,7 +271,7 @@ su lool -c "loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} > %if 0%{?fedora} || 0%{?rhel} >= 7 %systemd_postun loolwsd.service %else -%if 0%{?suse_version} +%if 0%{?suse_version} >= 1300 %service_del_postun loolwsd.service %endif %endif _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits