[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-1' - 4 commits - configure.ac debian/changelog debian/control debian/rules loleaflet/images loleaflet/src loolwsd.spec.in

Pedro Pinto Silva (via logerrit) logerrit at kemper.freedesktop.org
Thu Mar 19 15:39:31 UTC 2020


 configure.ac                                     |    2 
 debian/changelog                                 |   46 +++++---
 debian/control                                   |   18 ++-
 debian/rules                                     |    4 
 loleaflet/images/lc_submenu_bringtofront.svg     |    1 
 loleaflet/images/lc_submenu_rotateright.svg      |    1 
 loleaflet/images/lc_submenu_setanchoratchar.svg  |   53 +++++++++
 loleaflet/images/lc_submenu_wrapoff.svg          |   12 ++
 loleaflet/src/control/Control.JSDialogBuilder.js |   12 ++
 loolwsd.spec.in                                  |  123 ++++++++++++++---------
 10 files changed, 204 insertions(+), 68 deletions(-)

New commits:
commit b0097c8ab45a1b70c54f3a693fb4d3a5c454a7ab
Author:     Pedro Pinto Silva <pedro.silva at collabora.com>
AuthorDate: Thu Mar 19 15:35:24 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Mar 19 16:37:56 2020 +0100

    Mobile: mobile wizard: improve aditional ids by making them dependent ...
    
    of their respective children uno commands and add icons
    
    Change-Id: Iae1fb597272a684539700ed0732cfd19d43724f6
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90755
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/loleaflet/images/lc_submenu_bringtofront.svg b/loleaflet/images/lc_submenu_bringtofront.svg
new file mode 100644
index 000000000..7caa5b828
--- /dev/null
+++ b/loleaflet/images/lc_submenu_bringtofront.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m2.9492188 14c-.5263 0-.9492188.422919-.9492188.949219v6.101562c0 .5263.4229188.949219.9492188.949219h8.1015622c.5263 0 .949219-.422919.949219-.949219v-2.050781h-1v2h-8v-6h1v-1z" fill="#808080"/><path d="m3 15v6h8v-2h-6c-.554 0-1-.446-1-1v-3z" fill="#fff"/><path d="m12.949219 2c-.5263 0-.949219.4229187-.949219.9492188v2.0507812h1v-2h8v6h-1v1h1.050781c.5263 0 .949219-.4229188.949219-.9492188v-6.1015624c0-.5263-.422919-.9492188-.949219-.9492188z" fill="#808080"/><path d="m13 3v2h6c.554 0 1 .446 1 1v3h1v-6z" fill="#fff"/><rect fill="#eac282" height="12" ry="1.254237" width="14" x="5" y="6"/></svg>
\ No newline at end of file
diff --git a/loleaflet/images/lc_submenu_rotateright.svg b/loleaflet/images/lc_submenu_rotateright.svg
new file mode 100644
index 000000000..40e86d9b3
--- /dev/null
+++ b/loleaflet/images/lc_submenu_rotateright.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g transform="matrix(-1 0 0 1 23.999864 0)"><path d="m1.499971 21.5h7.000029v-15.0000002z" fill="#4d82b8" fill-rule="evenodd" stroke="#4d82b8" stroke-linecap="round" stroke-linejoin="round"/><path d="m10.5 14.5v7.000008h11.999999z" fill="#fff" fill-rule="evenodd" stroke="#808080" stroke-linecap="round" stroke-linejoin="round"/><g transform="matrix(0 -1 -1 0 30.992857 27)"><path d="m21.5 16.5-2.995 2.992879-3.005-2.992879" fill="none" stroke="#4d82b8" stroke-linecap="round" stroke-linejoin="round"/><path d="m13.5 11.007943c-.276142 0-.5.223858-.5.5s.223858.5.5.5h2c1.380712 0 2.5 1.119287 2.5 2.5h.0059v.423829 4.068228h1v-4.068228-.5c-.0059-2.154663-1.88341-3.373799-3.5059-3.423829z" fill="#4d82b8" fill-rule="evenodd"/></g></g></svg>
\ No newline at end of file
diff --git a/loleaflet/images/lc_submenu_setanchoratchar.svg b/loleaflet/images/lc_submenu_setanchoratchar.svg
new file mode 100644
index 000000000..94262ca3d
--- /dev/null
+++ b/loleaflet/images/lc_submenu_setanchoratchar.svg
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   viewBox="0 0 24 24"
+   version="1.1"
+   id="svg4"
+   sodipodi:docname="lc_submenu_setanchoratchar.svg"
+   inkscape:version="0.92.4 (unknown)">
+  <metadata
+     id="metadata10">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs8" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="748"
+     inkscape:window-height="480"
+     id="namedview6"
+     showgrid="false"
+     inkscape:zoom="9.8333333"
+     inkscape:cx="12"
+     inkscape:cy="12"
+     inkscape:window-x="0"
+     inkscape:window-y="30"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg4" />
+  <path
+     d="m12 2a3 3 0 0 0 -3 3 3 3 0 0 0 2 2.8261719v1.1738281h-2c-.554 0-1 .446-1 1s .446 1 1 1h2v8.929688c-1.7029249-.217027-3.2936626-.97202-4.5332031-2.164063l1.0625-.744141a.9842562 1.0907768 0 0 0 -.5195313-2.021484.9842562 1.0907768 0 0 0 -.53125.177734l-3.9980468 2.792969a.9842562 1.0907768 0 1 0 1.0507812 1.845703l1.2773438-.892578c1.8749123 1.949387 4.4631707 3.074058 7.1914062 3.076172 2.728857-.001543 5.317991-1.126379 7.193359-3.076172l1.275391.892578a.98425669 1.0907768 0 1 0 1.050781-1.845703l-3.998047-2.792969a.98425669 1.0907768 0 0 0 -.53125-.177734.98425669 1.0907768 0 0 0 -.519531 2.021484l1.068359.748047c-1.24124 1.192002-2.8347 1.946875-4.539062 2.16211v-8.931641h2c .554 0 1-.446 1-1s-.446-1-1-1h-2v-1.1757812a3 3 0 0 0 2-2.8242188 3 3 0 0 0 -3-3zm0 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1-1 1 1 0 0 1 1-1z"
+     fill="#4d82b8"
+     id="path2" />
+</svg>
diff --git a/loleaflet/images/lc_submenu_wrapoff.svg b/loleaflet/images/lc_submenu_wrapoff.svg
new file mode 100644
index 000000000..b34b507e0
--- /dev/null
+++ b/loleaflet/images/lc_submenu_wrapoff.svg
@@ -0,0 +1,12 @@
+<svg version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <rect x="2" y="3" width="20" height="1" ry=".44607" fill="#808080"/>
+ <g fill="#808080">
+  <rect x="2" y="6" width="20" height="1" ry=".44607"/>
+  <rect x="2" y="21" width="20" height="1" ry=".44607"/>
+  <rect x="2" y="12" width="20" height="1" ry=".44607"/>
+  <rect x="2" y="18" width="20" height="1" ry=".44607"/>
+  <rect x="2" y="9" width="20" height="1" ry=".44607"/>
+  <rect x="2" y="15" width="20" height="1" ry=".44607"/>
+ </g>
+ <rect x="7" y="8" width="10" height="9" ry="1" fill="#4d82b8"/>
+</svg>
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index f9f536a8e..125dbae90 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1660,8 +1660,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
 
 L.Control.JSDialogBuilder.generateIDForSubMenu = function(menuStructure) {
 	for (var child = 0; child < menuStructure['children'].length; ++child) {
-		if (menuStructure['children'][child]['command'] === '.uno:SetAnchorAtChar') {
-			menuStructure['id'] = 'submenu_anchor';
+		if (menuStructure['children'][child]['command'] === '.uno:SetAnchorAtChar' || menuStructure['children'][child]['command'] === '.uno:WrapOff' || menuStructure['children'][child]['command'] === '.uno:BringToFront' || menuStructure['children'][child]['command'] === '.uno:RotateRight') {
+			var tempstring = menuStructure['children'][child]['command'];
+			tempstring = tempstring.substring(5);
+			menuStructure['id'] = 'submenu_' + tempstring.toLowerCase();
 			break;
 		}
 	}
commit 3b1d7123149058e577c99e2a3c8b68563ac96e5c
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Mar 19 14:35:20 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Mar 19 16:37:35 2020 +0100

    mobile: better way to generate ID for submenus.
    
    We don't have any other information for the submenu
    only it's text and it's children, so let's use
    the children's command to find out what submenu we have
    here.
    
    Change-Id: I188186142fc1dbe483fcce5b5456e0cb1524382e
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90750
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index e6c8f5eeb..f9f536a8e 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1659,8 +1659,12 @@ L.Control.JSDialogBuilder = L.Control.extend({
 });
 
 L.Control.JSDialogBuilder.generateIDForSubMenu = function(menuStructure) {
-	if (menuStructure['text'] === 'Anchor')
-		menuStructure['id'] = 'submenu_anchor';
+	for (var child = 0; child < menuStructure['children'].length; ++child) {
+		if (menuStructure['children'][child]['command'] === '.uno:SetAnchorAtChar') {
+			menuStructure['id'] = 'submenu_anchor';
+			break;
+		}
+	}
 };
 
 L.Control.JSDialogBuilder.getMenuStructureForMobileWizard = function(menu, mainMenu, itemCommand) {
@@ -1711,8 +1715,8 @@ L.Control.JSDialogBuilder.getMenuStructureForMobileWizard = function(menu, mainM
 			element = this.getMenuStructureForMobileWizard(menu.items[menuItem], false, menuItem);
 			if (element)
 				menuStructure['children'].push(element);
-			this.generateIDForSubMenu(menuStructure);
 		}
+		this.generateIDForSubMenu(menuStructure);
 	}
 
 	return menuStructure;
commit 0d531cc0b5fb14509c4e3d0684fd082f93808b44
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Mar 19 11:23:18 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Mar 19 16:37:23 2020 +0100

    mobile: add a method to generate ID for submenus.
    
    Change-Id: I45c2865573eb6b9d070fc6c36f4f1369e2ac3172
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90739
    Tested-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index f0171fb41..e6c8f5eeb 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1658,6 +1658,11 @@ L.Control.JSDialogBuilder = L.Control.extend({
 	}
 });
 
+L.Control.JSDialogBuilder.generateIDForSubMenu = function(menuStructure) {
+	if (menuStructure['text'] === 'Anchor')
+		menuStructure['id'] = 'submenu_anchor';
+};
+
 L.Control.JSDialogBuilder.getMenuStructureForMobileWizard = function(menu, mainMenu, itemCommand) {
 	if (itemCommand.includes('sep'))
 		return null;
@@ -1706,6 +1711,7 @@ L.Control.JSDialogBuilder.getMenuStructureForMobileWizard = function(menu, mainM
 			element = this.getMenuStructureForMobileWizard(menu.items[menuItem], false, menuItem);
 			if (element)
 				menuStructure['children'].push(element);
+			this.generateIDForSubMenu(menuStructure);
 		}
 	}
 
commit 4f59ad57f11ad2cfb2f4d89c4f946f7b791139cb
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Mon Dec 9 18:09:48 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Mar 19 16:35:51 2020 +0100

    Bump package version to 4.2.1-1 and update deb/rpm package files
    
    Change-Id: I935425f644f373acdd4bf8d073ec8be3f29313b8

diff --git a/configure.ac b/configure.ac
index efd54b872..0160a587e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.63])
 
-AC_INIT([loolwsd], [master], [libreoffice at lists.freedesktop.org])
+AC_INIT([loolwsd], [4.2.1], [libreoffice at 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..81c2ad6c6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,25 +1,41 @@
-loolwsd (1.8.2-1) unstable; urgency=medium
+loolwsd (4.2.1-1) unstable; urgency=medium
 
-  * Fix crash in Impress.
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=CODE-4.2.1-1
 
- -- Jan Holesovsky <kendy at collabora.com>  Thu, 11 Aug 2016 16:46:00 +0100
+ -- Andras Timar <andras.timar at collabora.com>  Thu, 19 Mar 2020 12:53:00 +0100
 
-loolwsd (1.8.0-1) unstable; urgency=medium
+loolwsd (4.2.0-6) unstable; urgency=medium
 
-  [ Tor Lillqvist ]
-  * Back to packaging this for Debian.
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=CODE-4.2.0-6
 
-  [ Jan Holesovsky ]
-  * Update to match Collabora Office 5.1
+ -- Andras Timar <andras.timar at collabora.com>  Wed, 04 Mar 2020 11:26:00 +0100
 
- -- Jan Holesovsky <kendy at collabora.com>  Fri, 05 Aug 2016 16:51:54 +0100
+loolwsd (4.2.0-5) unstable; urgency=medium
 
-loolwsd (1.0.0-1) unstable; urgency=low
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=CODE-4.2.0-5
 
-  * Initial release
+ -- Andras Timar <andras.timar at collabora.com>  Tue, 25 Feb 2020 11:58:00 +0100
 
-  * Local Variables:
-  * Mode: fundamental
-  * End:
+loolwsd (4.2.0-4) unstable; urgency=medium
 
- -- Tor Lillqvist <tml at collabora.com>  Fri, 15 May 2015 11:10:20 +0300
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=CODE-4.2.0-4
+
+ -- Andras Timar <andras.timar at collabora.com>  Tue, 28 Jan 2020 18:58:00 +0100
+
+loolwsd (4.2.0-3) unstable; urgency=medium
+
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=CODE-4.2.0-3
+
+ -- Andras Timar <andras.timar at collabora.com>  Thu, 09 Jan 2020 22:12:00 +0100
+
+loolwsd (4.2.0-2) unstable; urgency=medium
+
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=CODE-4.2.0-2
+
+ -- Andras Timar <andras.timar at collabora.com>  Fri, 20 Dec 2019 13:27:00 +0100
+
+loolwsd (4.2.0-1) unstable; urgency=medium
+
+  * https://cgit.freedesktop.org/libreoffice/online/log/?h=CODE-4.2.0-1
+
+ -- Andras Timar <andras.timar at collabora.com>  Tue, 10 Dec 2019 20:47:00 +0100
diff --git a/debian/control b/debian/control
index 532367872..5184feb1d 100644
--- a/debian/control
+++ b/debian/control
@@ -2,13 +2,27 @@ Source: loolwsd
 Section: web
 Priority: optional
 Maintainer: Andras Timar <andras.timar at 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},
+ locales-all, adduser, expat, fontconfig, cpio, libcap2-bin,
+ collaboraofficebasis6.2-calc,
+ collaboraofficebasis6.2-core,
+ collaboraofficebasis6.2-graphicfilter,
+ collaboraofficebasis6.2-images,
+ collaboraofficebasis6.2-impress,
+ collaboraofficebasis6.2-ooofonts,
+ collaboraofficebasis6.2-writer,
+ collaboraoffice6.2,
+ collaboraoffice6.2-ure,
+ collaboraofficebasis6.2-en-us,
+ collaboraofficebasis6.2-draw,
+ collaboraofficebasis6.2-extension-pdf-import,
+ collaboraofficebasis6.2-ooolinguistic
 Description: LibreOffice Online WebSocket Daemon
  LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice
  services.
diff --git a/debian/rules b/debian/rules
index d675675c0..feb980c95 100644
--- 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.spec.in b/loolwsd.spec.in
index d78760e82..40de72f8b 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -17,34 +17,40 @@ Vendor:         %{vendor}
 Summary:        LibreOffice Online WebSocket Daemon
 License:        MPL
 Source0:        loolwsd- at 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
+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
+
+%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:       %{lo_rpm_list}
-Requires:       systemd
+Requires:       collaboraoffice6.2 collaboraoffice6.2-ure collaboraofficebasis6.2-core collaboraofficebasis6.2-writer collaboraofficebasis6.2-impress collaboraofficebasis6.2-graphicfilter collaboraofficebasis6.2-en-US collaboraofficebasis6.2-calc collaboraofficebasis6.2-ooofonts collaboraofficebasis6.2-images collaboraofficebasis6.2-draw collaboraofficebasis6.2-extension-pdf-import collaboraofficebasis6.2-ooolinguistic
 Requires(post): coreutils grep sed
-%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 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/collaboraoffice6.2/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
 %endif
+
 %if 0%{?name_suffix:1}
 Provides:       loleaflet = 1.5.8, loolwsd
 %else
@@ -64,28 +70,31 @@ Obsoletes:      loleaflet <= 1.5.8
 %configure \
 	--enable-silent-rules \
 	--with-lokit-path=bundled/include \
-	--with-lo-path=%{loroot} \
+	--with-lo-path=/opt/collaboraoffice6.2 \
 	--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
+%if 0%{?rhel}
+install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service
 install -D -m 644 sysconfig.loolwsd %{buildroot}/etc/sysconfig/loolwsd
-%else
+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
-%endif
 mkdir -p %{buildroot}/etc/cron.d
 echo "#Remove old tiles once every 10 days at midnight" > %{buildroot}/etc/cron.d/loolwsd.cron
 echo "0 0 */1 * * root find /var/cache/loolwsd -type f -a -atime +10 -exec rm {} \;" >> %{buildroot}/etc/cron.d/loolwsd.cron
@@ -94,6 +103,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
@@ -104,27 +114,33 @@ echo "account    required     pam_unix.so" >>  %{buildroot}/etc/pam.d/loolwsd
 /usr/share/loolwsd/loleaflet
 /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.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
 %{_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/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
 
@@ -134,17 +150,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_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 -- 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
 
-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} >= 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.2
 loolparent=`cd ${loroot} && cd .. && /bin/pwd`
 
 rm -rf ${loolparent}/lool
@@ -155,7 +175,19 @@ chown lool:lool ${loolparent}/lool/child-roots
 fc-cache ${loroot}/share/fonts/truetype
 loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} >/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_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} >= 7
 %systemd_post loolwsd.service
 %else
 %if 0%{?suse_version}
@@ -164,9 +196,8 @@ loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} >/dev/null 2>
 %endif
 %endif
 
-
 %preun
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?rhel} >= 7
 %systemd_preun loolwsd.service
 %else
 %if 0%{?suse_version}
@@ -175,7 +206,7 @@ loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} >/dev/null 2>
 %endif
 
 %postun
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?rhel} >= 7
 %systemd_postun loolwsd.service
 %else
 %if 0%{?suse_version}


More information about the Libreoffice-commits mailing list