|
|
|
@ -0,0 +1,309 @@
|
|
|
|
|
# spec file for package coolwsd
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2015 Collabora
|
|
|
|
|
#
|
|
|
|
|
# This file is subject to the terms of the Mozilla Public
|
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
|
|
%global libo_version 7.6.3
|
|
|
|
|
|
|
|
|
|
%if 0%{?name_suffix:1}
|
|
|
|
|
Name: coolwsd%{name_suffix}
|
|
|
|
|
%else
|
|
|
|
|
Name: coolwsd
|
|
|
|
|
%endif
|
|
|
|
|
Version: 22.05.14.3
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Vendor: %{vendor}
|
|
|
|
|
Summary: Collabora Online WebSocket Daemon
|
|
|
|
|
# https://github.com/CollaboraOnline/online/blob/master/COPYING
|
|
|
|
|
License: MPL
|
|
|
|
|
Source0: coolwsd-%{version}.tar.gz
|
|
|
|
|
Source1: coolwsd.service
|
|
|
|
|
|
|
|
|
|
BuildRequires: cppunit-devel
|
|
|
|
|
BuildRequires: chromium
|
|
|
|
|
BuildRequires: fontconfig
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: libcap-devel
|
|
|
|
|
BuildRequires: libpng-devel
|
|
|
|
|
BuildRequires: libreoffice-core
|
|
|
|
|
BuildRequires: libreofficekit-devel >= %{libo_version}
|
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
BuildRequires: libzstd-devel >= 1.4.0
|
|
|
|
|
BuildRequires: m4
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: nodejs-devel
|
|
|
|
|
BuildRequires: npm
|
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
|
BuildRequires: poco-devel
|
|
|
|
|
BuildRequires: python3-polib
|
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} == 9
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# Si compilamos contra cierta versiónb libreofficekit, vamos a requerir un libreoffice de esa misma
|
|
|
|
|
# versióm o nos va a faltar funcionalidad y algo se podría romper.
|
|
|
|
|
Requires: libreoffice >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-calc >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-core >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-draw >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-graphicfilter >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-impress >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-langpack-en >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-math >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-pdfimport >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-ure >= %{libo_version}
|
|
|
|
|
Requires: libreoffice-writer >= %{libo_version}
|
|
|
|
|
|
|
|
|
|
Requires(post): coreutils grep sed cpio
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
# coolwsd dependencies
|
|
|
|
|
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
|
|
|
|
|
# Esta dependencia la debería jalar Libreoffice #TODO
|
|
|
|
|
Requires: harfbuzz >= 5.1.0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
# coolwsd dependencies
|
|
|
|
|
Requires(post): libcap-progs
|
|
|
|
|
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 /usr/lib64/libreoffice/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 libreoffice
|
|
|
|
|
Requires: fontconfig libbz2-1 libexpat1 libfreetype6 libpng16-16 libuuid1 openssh
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
%debug_package
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
libtoolize
|
|
|
|
|
aclocal
|
|
|
|
|
autoheader
|
|
|
|
|
automake --add-missing
|
|
|
|
|
autoreconf
|
|
|
|
|
scripts/refresh-git-hooks
|
|
|
|
|
|
|
|
|
|
# usando versión marrana (incluyendo una librería embebida)
|
|
|
|
|
%configure \
|
|
|
|
|
--disable-androidapp \
|
|
|
|
|
--disable-android-google-play \
|
|
|
|
|
--disable-iosapp \
|
|
|
|
|
--disable-setcap \
|
|
|
|
|
--disable-werror \
|
|
|
|
|
--enable-cypress \
|
|
|
|
|
--enable-debug \
|
|
|
|
|
--enable-silent-rules \
|
|
|
|
|
--with-dictionaries="en_US es_ES es_MX" \
|
|
|
|
|
--with-lokit-path=/usr/include/LibreOfficeKit \
|
|
|
|
|
--with-lo-path=/usr/lib64/libreoffice \
|
|
|
|
|
--with-vendor="Strepsirrhini"
|
|
|
|
|
%if 0%{?config_options:1}
|
|
|
|
|
%{config_options}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
env BUILDING_FROM_RPMBUILD=yes make %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
#env BUILDING_FROM_RPMBUILD=yes make check
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
env BUILDING_FROM_RPMBUILD=yes make install DESTDIR=%{buildroot}
|
|
|
|
|
install -d -m 755 %{buildroot}/var/adm/fillup-templates
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
install -D -m 444 %{SOURCE1} %{buildroot}%{_unitdir}/coolwsd.service
|
|
|
|
|
#install -D -m 444 coolwsd.service %{buildroot}%{_unitdir}/coolwsd.service
|
|
|
|
|
# systemd in RHEL 7 does not understand these options
|
|
|
|
|
%if 0%{?rhel} <= 7
|
|
|
|
|
sed -i "/^ReadWritePaths/d;/^ProtectControlGroups/d;/^ProtectSystem/d" %{buildroot}%{_unitdir}/coolwsd.service
|
|
|
|
|
%endif
|
|
|
|
|
install -D -m 644 sysconfig.coolwsd %{buildroot}/etc/sysconfig/coolwsd
|
|
|
|
|
install -d -m 755 %{buildroot}/etc/httpd/conf
|
|
|
|
|
install -D -m 755 etc/apache2/coolwsd.conf %{buildroot}/etc/httpd/conf
|
|
|
|
|
rm %{buildroot}/etc/apache2/conf-available/coolwsd.conf
|
|
|
|
|
%endif
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
install -D -m 444 %{SOURCE1} %{buildroot}%{_unitdir}/coolwsd.service
|
|
|
|
|
#install -D -m 444 coolwsd.service %{buildroot}%{_unitdir}/coolwsd.service
|
|
|
|
|
install -D -m 644 sysconfig.coolwsd %{buildroot}/var/adm/fillup-templates
|
|
|
|
|
%endif
|
|
|
|
|
mkdir -p %{buildroot}/etc/pam.d
|
|
|
|
|
echo "auth required pam_unix.so" > %{buildroot}/etc/pam.d/coolwsd
|
|
|
|
|
echo "account required pam_unix.so" >> %{buildroot}/etc/pam.d/coolwsd
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
/usr/bin/coolwsd
|
|
|
|
|
/usr/bin/loolwsd
|
|
|
|
|
/usr/bin/coolwsd-systemplate-setup
|
|
|
|
|
/usr/bin/loolwsd-systemplate-setup
|
|
|
|
|
/usr/bin/coolwsd-generate-proof-key
|
|
|
|
|
/usr/bin/coolforkit
|
|
|
|
|
/usr/bin/coolconvert
|
|
|
|
|
/usr/bin/coolconfig
|
|
|
|
|
/usr/bin/loolconfig
|
|
|
|
|
/usr/bin/coolmount
|
|
|
|
|
/usr/bin/coolstress
|
|
|
|
|
/usr/share/coolwsd/discovery.xml
|
|
|
|
|
/usr/share/coolwsd/favicon.ico
|
|
|
|
|
/usr/share/coolwsd/browser
|
|
|
|
|
/usr/share/doc/coolwsd/README
|
|
|
|
|
/usr/share/doc/coolwsd/README.vars
|
|
|
|
|
/usr/share/doc/coolwsd/metrics.txt
|
|
|
|
|
/usr/share/doc/coolwsd/protocol.txt
|
|
|
|
|
/usr/share/doc/coolwsd/reference.md
|
|
|
|
|
/usr/share/man/man1/coolwsd.1.gz
|
|
|
|
|
/usr/share/man/man1/coolforkit.1.gz
|
|
|
|
|
/usr/share/man/man1/coolconvert.1.gz
|
|
|
|
|
/usr/share/man/man1/coolconfig.1.gz
|
|
|
|
|
/usr/share/man/man1/coolwsd-systemplate-setup.1.gz
|
|
|
|
|
/usr/share/man/man1/coolwsd-generate-proof-key.1.gz
|
|
|
|
|
/usr/share/man/man1/coolmount.1.gz
|
|
|
|
|
/usr/share/man/man1/coolstress.1.gz
|
|
|
|
|
%{_unitdir}/coolwsd.service
|
|
|
|
|
%if 0%{?rhel}
|
|
|
|
|
%config(noreplace) /etc/sysconfig/coolwsd
|
|
|
|
|
%endif
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
/var/adm/fillup-templates/sysconfig.coolwsd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%config(noreplace) /etc/pam.d/coolwsd
|
|
|
|
|
%config(noreplace) %attr(640, cool, root) /etc/coolwsd/coolwsd.xml
|
|
|
|
|
%config /etc/coolwsd/coolkitconfig.xcu
|
|
|
|
|
%config(noreplace) /etc/nginx/snippets/coolwsd.conf
|
|
|
|
|
%if 0%{?suse_version} > 0
|
|
|
|
|
%config(noreplace) /etc/apache2/conf-available/coolwsd.conf
|
|
|
|
|
%endif
|
|
|
|
|
%if 0%{?rhel} > 0
|
|
|
|
|
%config(noreplace) /etc/httpd/conf/coolwsd.conf
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%doc README.md
|
|
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
%service_add_pre coolwsd.service
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
getent group cool >/dev/null || groupadd -r cool
|
|
|
|
|
getent passwd cool >/dev/null || useradd -g cool -r cool -d /opt/cool -s /bin/bash
|
|
|
|
|
|
|
|
|
|
# for filename in `find /opt/cool/systemplate -type f`;do stripped=$(echo -ne $filename | sed -e "s|/opt/cool/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 coolwsd systemplate..."
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} >= 7 || 0%{?suse_version} >= 1300
|
|
|
|
|
systemctl is-active -q coolwsd && COOLWSD_IS_ACTIVE=1 || COOLWSD_IS_ACTIVE=0
|
|
|
|
|
if [ $COOLWSD_IS_ACTIVE == "1" ]; then systemctl stop coolwsd; fi
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Figure out where LO is installed, let's hope it is not a mount point
|
|
|
|
|
# Create a directory for coolwsd on the same file system
|
|
|
|
|
loroot=/usr/lib64/libreoffice
|
|
|
|
|
coolparent=`cd ${loroot} && cd .. && /bin/pwd`
|
|
|
|
|
|
|
|
|
|
rm -rf ${coolparent}/cool
|
|
|
|
|
mkdir -p ${coolparent}/cool/child-roots
|
|
|
|
|
chown cool:cool ${coolparent}/cool
|
|
|
|
|
chown cool:cool ${coolparent}/cool/child-roots
|
|
|
|
|
|
|
|
|
|
fc-cache ${loroot}/share/fonts/truetype
|
|
|
|
|
coolwsd-systemplate-setup ${coolparent}/cool/systemplate ${loroot} >/dev/null 2>&1
|
|
|
|
|
coolwsd-generate-proof-key >/dev/null 2>&1
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} || 0%{?suse_version}
|
|
|
|
|
if [ $COOLWSD_IS_ACTIVE == "1" ]; then systemctl start coolwsd; fi
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
echo " Done."
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit
|
|
|
|
|
setcap cap_sys_admin=ep /usr/bin/coolmount
|
|
|
|
|
if [ -f /etc/loolwsd/loolwsd.xml ]; then /usr/bin/coolconfig migrateconfig --write; fi
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
|
%systemd_post coolwsd.service
|
|
|
|
|
%else
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
%service_add_post coolwsd.service
|
|
|
|
|
%{fillup_only -n coolwsd}
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
|
%systemd_preun coolwsd.service
|
|
|
|
|
%else
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
%service_del_preun coolwsd.service
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%if 0%{?rhel} >= 7
|
|
|
|
|
%systemd_postun coolwsd.service
|
|
|
|
|
%else
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
%service_del_postun coolwsd.service
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sat May 11 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 22.05.14.3-2
|
|
|
|
|
- Rebuilt for MSVSphere 9.4
|
|
|
|
|
|
|
|
|
|
* Tue Jan 16 2024 Sandino Araico Sánchez <sandino@sandino.net> - 22.05.14.3-2
|
|
|
|
|
- Subida de versión
|
|
|
|
|
- Dependencias de libreoffice >= 7.6.3
|
|
|
|
|
|
|
|
|
|
* Tue Jan 16 2024 Sandino Araico Sánchez <sandino@sandino.net> - 22.05.11.1-1
|
|
|
|
|
- Subida de versión
|
|
|
|
|
|
|
|
|
|
* Tue Jan 16 2024 Sandino Araico Sánchez <sandino@sandino.net> - 22.05.9.6-3
|
|
|
|
|
- Dependencia hacia harfbuzz >= 5.1.0
|
|
|
|
|
|
|
|
|
|
* Fri Aug 18 2023 Sandino Araico Sánchez <sandino@sandino.net> - 22.05.9.6-2
|
|
|
|
|
- 22.05.9.6 compila contra libreofficekit 7.5.5.2-4+gob.mx
|
|
|
|
|
- Opciones de compilación que usó @renichbon
|
|
|
|
|
- Archivo coolwsd.service que mandó @renichbon
|
|
|
|
|
|
|
|
|
|
* Tue May 09 2023 Sandino Araico Sánchez <sandino@sandino.net> - 22.05.9.6-1
|
|
|
|
|
- basado en el spec que subió @imcsk8 de coolwsd cp-22.05.5-4
|
|
|
|
|
- coolws 22.05.9.6 compila contra libreofficekit 7.5.3
|
|
|
|
|
|
|
|
|
|
* Mon Aug 03 2015 Mihai Varga
|
|
|
|
|
- added the cronjob
|
|
|
|
|
* Tue May 19 2015 Tor Lillqvist
|
|
|
|
|
- Initial RPM release
|