debian/loolwsd.postinst.in    |    2 -
 docker/Dockerfile             |    2 -
 docker/l10n-docker-nightly.sh |   54 ++++++++++++++++++++++++++++++++----------
 loolwsd.spec.in               |    2 -
 4 files changed, 45 insertions(+), 15 deletions(-)

New commits:
commit e0c63e2a1170da0c2473bbd45e112d441efee6f9
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Tue Mar 5 09:53:45 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:08:02 2019 +0100

    Docker: Run autogen after branch has been checked out
    
    Change-Id: I14126b7344aa4d162738de7173803124b803ab28
    (cherry picked from commit e0b0d1c6dd13590260366dc9fdd63229ed3bb49e)

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index e65ea278f..dd9f999b5 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -72,7 +72,6 @@ fi
 # online repo
 if test ! -d online ; then
     git clone https://git.libreoffice.org/online online || exit 1
-    ( cd online && ./autogen.sh ) || exit 1
 fi
 
 ( cd online && git fetch --all && git checkout -f $LIBREOFFICE_BRANCH && git 
pull -r ) || exit 1
@@ -147,6 +146,7 @@ chrpath -r '$ORIGIN' 
"$INSTDIR"/opt/libreoffice/program/libcairo.so.2
 ##### loolwsd & loleaflet #####
 
 # build
+( cd online && ./autogen.sh ) || exit 1
 ( cd online && ./configure --prefix=/usr --sysconfdir=/etc 
--localstatedir=/var --enable-silent-rules 
--with-lokit-path="$BUILDDIR"/libreoffice/include 
--with-lo-path="$INSTDIR"/opt/libreoffice $ONLINE_EXTRA_BUILD_OPTIONS) || exit 1
 ( cd online/loleaflet/po && ../../scripts/downloadpootle.sh )
 ( cd online/loleaflet && make l10n) || exit 1
commit 270e8df57e662599b97dc6947a1997c4b56f0c86
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Fri Dec 21 12:26:53 2018 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:07:54 2019 +0100

    Docker: Clone from upstream repo
    
    Change-Id: I0977d3e0de5df0b4cac819559b67548e07a00583
    Reviewed-on: https://gerrit.libreoffice.org/65528
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    (cherry picked from commit fb51909217e1973933e9ccc45f831d6264749202)

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index 440f9fa94..e65ea278f 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -64,14 +64,14 @@ mkdir -p "$INSTDIR"
 
 # libreoffice repo
 if test ! -d libreoffice ; then
-    git clone git://anongit.freedesktop.org/libreoffice/core libreoffice || 
exit 1
+    git clone https://git.libreoffice.org/core libreoffice || exit 1
 fi
 
 ( cd libreoffice && git fetch --all && git checkout $LIBREOFFICE_BRANCH && ./g 
pull -r ) || exit 1
 
 # online repo
 if test ! -d online ; then
-    git clone git://anongit.freedesktop.org/libreoffice/online online || exit 1
+    git clone https://git.libreoffice.org/online online || exit 1
     ( cd online && ./autogen.sh ) || exit 1
 fi
 
commit 5066f24b0d1620374a50a78a5cb4c89c3c404810
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Tue Feb 5 19:55:57 2019 +0000
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:07:21 2019 +0100

    systemplate files should not be writable by lool user
    
    Change-Id: Ifb4fb7e5d5c1861b5e26bb6a710acb28e546c846
    Reviewed-on: https://gerrit.libreoffice.org/67425
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>
    (cherry picked from commit f1be65668c749526011faa39266f289522a9cf68)

diff --git a/debian/loolwsd.postinst.in b/debian/loolwsd.postinst.in
index ef2ba9eb1..942cbc695 100755
--- a/debian/loolwsd.postinst.in
+++ b/debian/loolwsd.postinst.in
@@ -23,7 +23,7 @@ case "$1" in
 
        fc-cache @LO_PATH@/share/fonts/truetype
 
-       su lool --shell=/bin/sh -c "loolwsd-systemplate-setup 
/opt/lool/systemplate @LO_PATH@ >/dev/null 2>&1"
+       loolwsd-systemplate-setup /opt/lool/systemplate @LO_PATH@ >/dev/null 
2>&1
        ;;
 
 esac
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 8f32fd8a5..164a6f6af 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -32,7 +32,7 @@ RUN rm -rf /opt/lool
 RUN mkdir -p /opt/lool/child-roots
 RUN chown lool: /opt/lool
 RUN chown lool: /opt/lool/child-roots
-RUN su lool --shell=/bin/sh -c "loolwsd-systemplate-setup 
/opt/lool/systemplate /opt/libreoffice >/dev/null 2>&1"
+RUN loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice 
>/dev/null 2>&1
 RUN touch /var/log/loolwsd.log
 RUN chown lool /var/log/loolwsd.log
 CMD bash /run-lool.sh
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index 929bff10b..e03abb2e0 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -152,7 +152,7 @@ chown lool:lool ${loolparent}/lool
 chown lool:lool ${loolparent}/lool/child-roots
 
 fc-cache ${loroot}/share/fonts/truetype
-su lool -c "loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} 
>/dev/null 2>&1"
+loolwsd-systemplate-setup ${loolparent}/lool/systemplate ${loroot} >/dev/null 
2>&1
 
 %if 0%{?fedora} || 0%{?rhel} >= 7
 %systemd_post loolwsd.service
commit 8d2f29b6c749a4f65d5c32bc51697174d20ba017
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Mon Feb 4 12:29:15 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:07:06 2019 +0100

    Docker: Fetch refs before checking out branch
    
    Change-Id: I581fad6dd90831cffceb1bbc7456749fca941a34
    (cherry picked from commit f4c5826edec559b0f77f1c037a7d0a895dec45eb)

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index b0d24d8e6..440f9fa94 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -67,7 +67,7 @@ if test ! -d libreoffice ; then
     git clone git://anongit.freedesktop.org/libreoffice/core libreoffice || 
exit 1
 fi
 
-( cd libreoffice && git checkout $LIBREOFFICE_BRANCH && ./g pull -r ) || exit 1
+( cd libreoffice && git fetch --all && git checkout $LIBREOFFICE_BRANCH && ./g 
pull -r ) || exit 1
 
 # online repo
 if test ! -d online ; then
@@ -75,7 +75,7 @@ if test ! -d online ; then
     ( cd online && ./autogen.sh ) || exit 1
 fi
 
-( cd online && git checkout -f $LIBREOFFICE_BRANCH && git pull -r ) || exit 1
+( cd online && git fetch --all && git checkout -f $LIBREOFFICE_BRANCH && git 
pull -r ) || exit 1
 
 ##### LibreOffice #####
 
commit cf51bde32aaf7078a5ad6851f0509c6200e92b46
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Thu Jan 31 10:04:24 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:06:58 2019 +0100

    Docker: Add env var for extra build options
    
    Change-Id: I6f3cb4c526aff5a0543c69143c961b5bc4a555e9
    (cherry picked from commit de4e89c6238d22cfcd9be5e22117ce6f7ff6e1a3)

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index aac06c7dc..b0d24d8e6 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -10,6 +10,7 @@
 # * DOCKER_HUB_TAG  - which Docker Hub tag to create
 # * LIBREOFFICE_BRANCH  - which branch to build (needs to exist in both core 
and online)
 # * LIBREOFFICE_BUILD_TARGET - which make target to run (in core repo)
+# * ONLINE_EXTRA_BUILD_OPTIONS - extra build options for online
 # * NO_DOCKER_IMAGE - if set, don't build the docker image itself, just do all 
the preps
 
 # check we can sudo without asking a pwd
@@ -146,7 +147,7 @@ chrpath -r '$ORIGIN' 
"$INSTDIR"/opt/libreoffice/program/libcairo.so.2
 ##### loolwsd & loleaflet #####
 
 # build
-( cd online && ./configure --prefix=/usr --sysconfdir=/etc 
--localstatedir=/var --enable-silent-rules 
--with-lokit-path="$BUILDDIR"/libreoffice/include 
--with-lo-path="$INSTDIR"/opt/libreoffice ) || exit 1
+( cd online && ./configure --prefix=/usr --sysconfdir=/etc 
--localstatedir=/var --enable-silent-rules 
--with-lokit-path="$BUILDDIR"/libreoffice/include 
--with-lo-path="$INSTDIR"/opt/libreoffice $ONLINE_EXTRA_BUILD_OPTIONS) || exit 1
 ( cd online/loleaflet/po && ../../scripts/downloadpootle.sh )
 ( cd online/loleaflet && make l10n) || exit 1
 ( cd online && scripts/locorestrings.py "$BUILDDIR"/online 
"$BUILDDIR"/libreoffice/translations )
commit d8c121ecd65f27bdcf6df0391da589f79bbd5e1b
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Thu Jan 31 09:50:52 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:06:44 2019 +0100

    Docker: Add option to skip docker image build
    
    Need to have this build differently in our env
    
    Change-Id: I8233dcf216c527a5238329f94b68836168648cfe
    (cherry picked from commit 8d2492c38421404c6ce3acb46078b3c6f28f6de7)

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index bff32dcbf..aac06c7dc 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -10,6 +10,7 @@
 # * DOCKER_HUB_TAG  - which Docker Hub tag to create
 # * LIBREOFFICE_BRANCH  - which branch to build (needs to exist in both core 
and online)
 # * LIBREOFFICE_BUILD_TARGET - which make target to run (in core repo)
+# * NO_DOCKER_IMAGE - if set, don't build the docker image itself, just do all 
the preps
 
 # check we can sudo without asking a pwd
 echo "Trying if sudo works without a password"
@@ -157,7 +158,10 @@ chrpath -r '$ORIGIN' 
"$INSTDIR"/opt/libreoffice/program/libcairo.so.2
 ( cd online && DESTDIR="$INSTDIR" make install ) || exit 1
 
 # Create new docker image
-
-cd "$SRCDIR"
-docker build --no-cache -t $DOCKER_HUB_REPO:$DOCKER_HUB_TAG . || exit 1
-docker push $DOCKER_HUB_REPO:$DOCKER_HUB_TAG || exit 1
+if [ -z "$NO_DOCKER_IMAGE" ]; then
+  cd "$SRCDIR"
+  docker build --no-cache -t $DOCKER_HUB_REPO:$DOCKER_HUB_TAG . || exit 1
+  docker push $DOCKER_HUB_REPO:$DOCKER_HUB_TAG || exit 1
+else
+  echo "Skipping docker image build"
+fi;
commit f6b02c87ac5cbb54401cc1341257ba98317b541a
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Mon Jan 28 12:14:36 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:06:33 2019 +0100

    Docker: add env var to change core build target
    
    Change-Id: Ida0410d6ff6515b479d4d431b4a1060e3430dd9d
    (cherry picked from commit adff9d1e2c9954ebdc7362dec8618e1bca297080)

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index 935e9b4e6..bff32dcbf 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -9,6 +9,7 @@
 # * DOCKER_HUB_REPO - which Docker Hub repo to use
 # * DOCKER_HUB_TAG  - which Docker Hub tag to create
 # * LIBREOFFICE_BRANCH  - which branch to build (needs to exist in both core 
and online)
+# * LIBREOFFICE_BUILD_TARGET - which make target to run (in core repo)
 
 # check we can sudo without asking a pwd
 echo "Trying if sudo works without a password"
@@ -32,6 +33,11 @@ if [ -z "$LIBREOFFICE_BRANCH" ]; then
 fi;
 echo "Building branch '$LIBREOFFICE_BRANCH'"
 
+if [ -z "$LIBREOFFICE_BUILD_TARGET" ]; then
+  LIBREOFFICE_BUILD_TARGET=""
+fi;
+echo "LibreOffice build target: '$LIBREOFFICE_BUILD_TARGET'"
+
 # check if we have jake
 which jake || { cat << EOF
 
@@ -127,7 +133,7 @@ cat > libreoffice/autogen.input << EOF
 EOF
 
 ( cd libreoffice && ./autogen.sh ) || exit 1
-( cd libreoffice && make ) || exit 1
+( cd libreoffice && make $LIBREOFFICE_BUILD_TARGET ) || exit 1
 
 # copy stuff
 mkdir -p "$INSTDIR"/opt/
commit c03fb863450266872b2db02663aadfaaec712d35
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Mon Jan 28 10:10:34 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:06:22 2019 +0100

    docker: Ignore errors when deleting instdir
    
    Building in docker, this is a volume which is undeletable
    
    Change-Id: I08c4fd87b1d7ca146f5d91c2cd26675191bd6047
    (cherry picked from commit 4bfdda1068042b849b640dde882e9af395ba5fe1)

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index 9ba4a39a3..935e9b4e6 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -49,7 +49,7 @@ BUILDDIR="$SRCDIR/builddir"
 mkdir -p "$BUILDDIR"
 cd "$BUILDDIR"
 
-rm -rf "$INSTDIR"
+rm -rf "$INSTDIR" || true
 mkdir -p "$INSTDIR"
 
 ##### cloning & updating #####
commit f07678e5dae6f8c95b175e386b8a40a9db5ad3b9
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Fri Dec 21 14:30:41 2018 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:06:06 2019 +0100

    Docker: Allow chosing which branch to build
    
    Add an env var for this, default is still "master"
    
    Change-Id: If6ded3509efe9bf5bbb5a1d82b0aa2e66ac2c133
    Reviewed-on: https://gerrit.libreoffice.org/65544
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    (cherry picked from commit f5fb312987cdd7707d76950586de064054540b65)

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index d7338b9ec..9ba4a39a3 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -8,6 +8,7 @@
 # -- Available env vars --
 # * DOCKER_HUB_REPO - which Docker Hub repo to use
 # * DOCKER_HUB_TAG  - which Docker Hub tag to create
+# * LIBREOFFICE_BRANCH  - which branch to build (needs to exist in both core 
and online)
 
 # check we can sudo without asking a pwd
 echo "Trying if sudo works without a password"
@@ -26,6 +27,11 @@ if [ -z "$DOCKER_HUB_TAG" ]; then
 fi;
 echo "Using Docker Hub Repository: '$DOCKER_HUB_REPO' with tag 
'$DOCKER_HUB_TAG'."
 
+if [ -z "$LIBREOFFICE_BRANCH" ]; then
+  LIBREOFFICE_BRANCH="master"
+fi;
+echo "Building branch '$LIBREOFFICE_BRANCH'"
+
 # check if we have jake
 which jake || { cat << EOF
 
@@ -53,7 +59,7 @@ if test ! -d libreoffice ; then
     git clone git://anongit.freedesktop.org/libreoffice/core libreoffice || 
exit 1
 fi
 
-( cd libreoffice && git checkout master && ./g pull -r ) || exit 1
+( cd libreoffice && git checkout $LIBREOFFICE_BRANCH && ./g pull -r ) || exit 1
 
 # online repo
 if test ! -d online ; then
@@ -61,7 +67,7 @@ if test ! -d online ; then
     ( cd online && ./autogen.sh ) || exit 1
 fi
 
-( cd online && git checkout -f master && git pull -r ) || exit 1
+( cd online && git checkout -f $LIBREOFFICE_BRANCH && git pull -r ) || exit 1
 
 ##### LibreOffice #####
 
commit c36a6f78f3b8c5b4b71448ea858e1744931679da
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Fri Dec 21 12:14:25 2018 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Mon Mar 18 09:05:41 2019 +0100

    docker: Allow using a different docker hub repo/tag
    
    Still defaults to libreoffice/online:master
    
    Change-Id: Ice1f27b273a63aa1e2e3ea87c7ac409004e8b214
    Reviewed-on: https://gerrit.libreoffice.org/65525
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    (cherry picked from commit a43ba457d6da34398247e6c10c47f7166fc0a93c)

diff --git a/docker/l10n-docker-nightly.sh b/docker/l10n-docker-nightly.sh
index 59ce780d3..d7338b9ec 100755
--- a/docker/l10n-docker-nightly.sh
+++ b/docker/l10n-docker-nightly.sh
@@ -5,6 +5,10 @@
 # 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/.
 
+# -- Available env vars --
+# * DOCKER_HUB_REPO - which Docker Hub repo to use
+# * DOCKER_HUB_TAG  - which Docker Hub tag to create
+
 # check we can sudo without asking a pwd
 echo "Trying if sudo works without a password"
 echo
@@ -13,6 +17,15 @@ echo "yourusername ALL=(ALL) NOPASSWD: ALL"
 echo
 sudo echo "works"
 
+# Check env variables
+if [ -z "$DOCKER_HUB_REPO" ]; then
+  DOCKER_HUB_REPO="libreoffice/online"
+fi;
+if [ -z "$DOCKER_HUB_TAG" ]; then
+  DOCKER_HUB_TAG="master"
+fi;
+echo "Using Docker Hub Repository: '$DOCKER_HUB_REPO' with tag 
'$DOCKER_HUB_TAG'."
+
 # check if we have jake
 which jake || { cat << EOF
 
@@ -134,5 +147,5 @@ chrpath -r '$ORIGIN' 
"$INSTDIR"/opt/libreoffice/program/libcairo.so.2
 # Create new docker image
 
 cd "$SRCDIR"
-docker build --no-cache -t libreoffice/online:master . || exit 1
-docker push libreoffice/online:master || exit 1
+docker build --no-cache -t $DOCKER_HUB_REPO:$DOCKER_HUB_TAG . || exit 1
+docker push $DOCKER_HUB_REPO:$DOCKER_HUB_TAG || exit 1
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to