[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - 2 commits - common/Seccomp.cpp loolwsd.init loolwsd.spec.in Makefile.am
Andras Timar
andras.timar at collabora.com
Tue Jul 4 11:12:31 UTC 2017
Makefile.am | 1 +
common/Seccomp.cpp | 2 +-
loolwsd.init | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
loolwsd.spec.in | 21 ++++++++++++++++++---
4 files changed, 69 insertions(+), 4 deletions(-)
New commits:
commit 51178c7830f4c84748fb38a086231dea9f1b4d1c
Author: Andras Timar <andras.timar at collabora.com>
Date: Tue Jul 4 13:08:20 2017 +0200
packaging for RHEL 6 / CentOS 6
Change-Id: I73f15f35aedbb1c1986663aeceaaec5af377a45b
diff --git a/Makefile.am b/Makefile.am
index 4d2e10e7..50919d61 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -190,6 +190,7 @@ dist-hook:
EXTRA_DIST = discovery.xml \
favicon.ico \
loolkitconfig.xcu \
+ loolwsd.init \
loolwsd.spec \
loolwsd.xml.in \
loolwsd.service \
diff --git a/loolwsd.init b/loolwsd.init
new file mode 100644
index 00000000..7c231e16
--- /dev/null
+++ b/loolwsd.init
@@ -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/collaboraoffice5.3 --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.spec.in b/loolwsd.spec.in
index 724ddc5d..853e920b 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -27,10 +27,10 @@ BuildRequires: libcap-progs systemd-rpm-macros
%endif
Requires: collaboraoffice5.3 >= 5.3.10.15 collaboraoffice5.3-ure >= 5.3.10.15 collaboraofficebasis5.3-core >= 5.3.10.15 collaboraofficebasis5.3-writer >= 5.3.10.15 collaboraofficebasis5.3-impress >= 5.3.10.15 collaboraofficebasis5.3-graphicfilter >= 5.3.10.15 collaboraofficebasis5.3-en-US >= 5.3.10.15 collaboraofficebasis5.3-calc >= 5.3.10.15 collaboraofficebasis5.3-en-US-res >= 5.3.10.15 collaboraofficebasis5.3-en-US-calc >= 5.3.10.15 collaboraofficebasis5.3-ooofonts >= 5.3.10.15 collaboraofficebasis5.3-images >= 5.3.10.15 collaboraofficebasis5.3-noto-fonts >= 5.3.10.15 collaboraofficebasis5.3-draw >= 5.3.10.15 collaboraofficebasis5.3-extension-pdf-import >= 5.3.10.15
-Requires: systemd
Requires(post): coreutils grep sed
%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
# Collabora Office dependencies (unfortunately Collabora Office RPM packages do not have real dependencies)
@@ -38,6 +38,7 @@ Requires: atk avahi-glib avahi-libs bzip2-libs cairo cups-libs dbus-glib d
%else
%if 0%{?suse_version}
# loolwsd dependencies
+Requires: systemd
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
@@ -76,12 +77,17 @@ env BUILDING_FROM_RPMBUILD=yes make %{?_smp_mflags}
%install
env BUILDING_FROM_RPMBUILD=yes make install DESTDIR=%{buildroot}
-%__install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service
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 %{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}
+install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service
install -D -m 644 sysconfig.loolwsd %{buildroot}/var/adm/fillup-templates
%endif
%endif
@@ -106,11 +112,15 @@ echo "0 0 */1 * * root find /var/cache/loolwsd -name \"*.png\" -a -atime +10 -ex
/usr/share/doc/loolwsd/README.vars
/usr/share/doc/loolwsd/protocol.txt
/usr/share/doc/loolwsd/reference.txt
-%{_unitdir}/loolwsd.service
+%if 0%{?rhel} == 6
+/etc/init.d/loolwsd
+%endif
%if 0%{?fedora} || 0%{?rhel} >= 7
+%{_unitdir}/loolwsd.service
%config(noreplace) /etc/sysconfig/loolwsd
%else
%if 0%{?suse_version}
+%{_unitdir}/loolwsd.service
/var/adm/fillup-templates/sysconfig.loolwsd
%endif
%endif
@@ -136,6 +146,11 @@ setcap cap_sys_admin=ep /usr/bin/loolmount
mkdir -p /var/cache/loolwsd && chown lool:lool /var/cache/loolwsd
rm -rf /var/cache/loolwsd/*
+%if 0%{?rhel} == 6
+touch /var/log/loolwsd.log && chown lool:lool /var/log/loolwsd.log
+%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=/opt/collaboraoffice5.3
commit fc852dfd6c2de6728428b1986053f882753f8d95
Author: Andras Timar <andras.timar at collabora.com>
Date: Tue Jul 4 09:26:02 2017 +0200
fix complation error on CentOS 6
Interestingly I got these in case of --disable-seccomp
/usr/include/linux/filter.h:25:2: error: ‘__u16’ does not name a type
/usr/include/linux/filter.h:25:2: error: ‘__u8’ does not name a type
(only on CentOS 6)
Change-Id: I1d3d70be6386fd2614d925ab57091b0b03413a89
diff --git a/common/Seccomp.cpp b/common/Seccomp.cpp
index 3cef8786..5ac929f5 100644
--- a/common/Seccomp.cpp
+++ b/common/Seccomp.cpp
@@ -13,6 +13,7 @@
#include "config.h"
+#if DISABLE_SECCOMP == 0
#include <dlfcn.h>
#include <ftw.h>
#include <malloc.h>
@@ -23,7 +24,6 @@
#include <sys/prctl.h>
#include <linux/audit.h>
#include <linux/filter.h>
-#if DISABLE_SECCOMP == 0
#include <linux/seccomp.h>
#endif
More information about the Libreoffice-commits
mailing list