loolwsd: install and package SSL key and certs if SSL is enabled

This commit is contained in:
Andras Timar 2016-04-14 18:47:35 +02:00
parent bea5963aa7
commit 1f7da1f5a2
3 changed files with 14 additions and 7 deletions

View file

@ -12,6 +12,12 @@ loolwsdconfigdir = @LOOLWSD_CONFIGDIR@
loolwsdconfig_DATA = loolwsd.xml
if ENABLE_SSL
loolwsdconfig_DATA += etc/key.pem \
etc/cert.pem \
etc/ca-chain.cert.pem
endif
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -pthread -DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' -DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"'
@ -140,7 +146,7 @@ clean-cache:
# capabilities won't survive packaging anyway. Instead, handle it when
# installing the RPM or Debian package.
all-local: loolforkit certificates @JAILS_PATH@ $(SYSTEM_STAMP)
all-local: loolforkit @JAILS_PATH@ $(SYSTEM_STAMP)
if test "$$BUILDING_FROM_RPMBUILD" != yes; then \
sudo @SETCAP@ cap_fowner,cap_mknod,cap_sys_chroot=ep loolforkit; \
sudo @SETCAP@ cap_sys_admin=ep loolmount; \
@ -148,9 +154,3 @@ all-local: loolforkit certificates @JAILS_PATH@ $(SYSTEM_STAMP)
else \
echo "Skipping capability setting"; \
fi
certificates: etc/cert.pem etc/key.pem etc/ca-chain.cert.pem
if test "$$BUILDING_FROM_RPMBUILD" != yes; then \
sudo mkdir -p /etc/loolwsd ; \
sudo cp $? /etc/loolwsd/ ; \
fi

View file

@ -174,6 +174,8 @@ AS_IF([test "$enable_ssl" != "no"],
[AC_DEFINE([ENABLE_SSL],1,[Whether to enable SSL])],
[AC_DEFINE([ENABLE_SSL],0,[Whether to enable SSL])])
AM_CONDITIONAL([ENABLE_SSL], [test "$enable_ssl" != "no"])
ENABLE_SSL=
if test "$enable_ssl" != "no"; then
ssl_msg="ssl enabled"

View file

@ -77,6 +77,11 @@ tar cf - . | (cd %{buildroot}/usr/share/loolwsd/loleaflet && tar xf -)
%config(noreplace) /etc/cron.d/loolwsd.cron
%config(noreplace) /etc/loolwsd/loolwsd.xml
%if %{ssl_support} == "YES"
%config(noreplace) %attr(400, %{owner}, %{owner}) /etc/loolwsd/key.pem
%config(noreplace) /etc/loolwsd/cert.pem
%config(noreplace) /etc/loolwsd/ca-chain.cert.pem
%endif
%doc README