[Libreoffice-commits] online.git: 3 commits - loolwsd/debian loolwsd/loolwsd.spec.in

Jan Holesovsky kendy at collabora.com
Fri Jan 8 00:25:54 PST 2016


 loolwsd/debian/loolwsd.postinst |    8 +++++---
 loolwsd/loolwsd.spec.in         |    7 ++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit f74db161dd437e119921c313d1d672ae94bd8e95
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Jan 8 09:24:47 2016 +0100

    loolwsd: Change the group too.

diff --git a/loolwsd/debian/loolwsd.postinst b/loolwsd/debian/loolwsd.postinst
index fd02df5..59d734f 100755
--- a/loolwsd/debian/loolwsd.postinst
+++ b/loolwsd/debian/loolwsd.postinst
@@ -7,7 +7,7 @@ case "$1" in
 	setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolwsd || true
 
 	adduser --quiet --system --group --home /opt/lool lool
-	mkdir -p /var/cache/loolwsd && chmod og+w /var/cache/loolwsd
+	mkdir -p /var/cache/loolwsd && chown lool: /var/cache/loolwsd
 	rm -rf /var/cache/loolwsd/*
 
 	# We assume that the LibreOffice to be used is built TDF-style
@@ -16,8 +16,8 @@ case "$1" in
 
 	rm -rf /opt/lool
 	mkdir -p /opt/lool/child-roots
-	chown lool /opt/lool
-	chown lool /opt/lool/child-roots
+	chown lool: /opt/lool
+	chown lool: /opt/lool/child-roots
 
 	su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate /opt/collaboraoffice5.0 >/dev/null"
 	;;
diff --git a/loolwsd/loolwsd.spec.in b/loolwsd/loolwsd.spec.in
index 3c4c89b..a45eea4 100644
--- a/loolwsd/loolwsd.spec.in
+++ b/loolwsd/loolwsd.spec.in
@@ -72,7 +72,7 @@ setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolbroker
 getent group %{group} >/dev/null || groupadd -r %{group}
 getent passwd %{owner} >/dev/null || useradd -g %{group} -r %{owner}
 
-mkdir -p /var/cache/loolwsd && chmod og+w /var/cache/loolwsd
+mkdir -p /var/cache/loolwsd && chown %{owner}: /var/cache/loolwsd
 rm -rf /var/cache/loolwsd/*
 
 # Figure out where LO is installed, let's hope it is not a mount point
@@ -82,8 +82,8 @@ loolparent=`cd ${loroot} && cd .. && /bin/pwd`
 
 rm -rf ${loolparent}/lool
 mkdir -p ${loolparent}/lool/child-roots
-chown %{owner} ${loolparent}/lool
-chown %{owner} ${loolparent}/lool/child-roots
+chown %{owner}: ${loolparent}/lool
+chown %{owner}: ${loolparent}/lool/child-roots
 
 su %{owner} -c "loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} >/dev/null"
 
commit 5aded99950deef0b99eb6aa05631241aa68eb50e
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Jan 8 09:22:28 2016 +0100

    loolwsd: Cleanup child-roots in postinst (as we do in .rpm's too).

diff --git a/loolwsd/debian/loolwsd.postinst b/loolwsd/debian/loolwsd.postinst
index b929aa7..fd02df5 100755
--- a/loolwsd/debian/loolwsd.postinst
+++ b/loolwsd/debian/loolwsd.postinst
@@ -14,10 +14,11 @@ case "$1" in
 	# and installs in /opt/collaboraoffice5.0, and that /opt/lool is
 	# on the same file system
 
+	rm -rf /opt/lool
 	mkdir -p /opt/lool/child-roots
+	chown lool /opt/lool
 	chown lool /opt/lool/child-roots
 
-	rm -rf /opt/lool/systemplate
 	su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate /opt/collaboraoffice5.0 >/dev/null"
 	;;
 
commit 475436e66b33c668a3e51d260dda72f63d41b906
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Jan 8 09:11:58 2016 +0100

    loolwsd: Remove the cache content after installation.
    
    The new versions may change the behaviour substantially, let's be on the safe
    side.

diff --git a/loolwsd/debian/loolwsd.postinst b/loolwsd/debian/loolwsd.postinst
index c00c723..b929aa7 100755
--- a/loolwsd/debian/loolwsd.postinst
+++ b/loolwsd/debian/loolwsd.postinst
@@ -8,6 +8,7 @@ case "$1" in
 
 	adduser --quiet --system --group --home /opt/lool lool
 	mkdir -p /var/cache/loolwsd && chmod og+w /var/cache/loolwsd
+	rm -rf /var/cache/loolwsd/*
 
 	# We assume that the LibreOffice to be used is built TDF-style
 	# and installs in /opt/collaboraoffice5.0, and that /opt/lool is
diff --git a/loolwsd/loolwsd.spec.in b/loolwsd/loolwsd.spec.in
index 8bb1122..3c4c89b 100644
--- a/loolwsd/loolwsd.spec.in
+++ b/loolwsd/loolwsd.spec.in
@@ -73,6 +73,7 @@ getent group %{group} >/dev/null || groupadd -r %{group}
 getent passwd %{owner} >/dev/null || useradd -g %{group} -r %{owner}
 
 mkdir -p /var/cache/loolwsd && chmod og+w /var/cache/loolwsd
+rm -rf /var/cache/loolwsd/*
 
 # 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


More information about the Libreoffice-commits mailing list