[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2020-08-26 Thread Ashod Nakashian (via logerrit)
 loolwsd-systemplate-setup |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b6da68b0f75b313294b42cf782420d0a30422058
Author: Ashod Nakashian 
AuthorDate: Wed Aug 26 11:52:39 2020 -0400
Commit: Andras Timar 
CommitDate: Wed Aug 26 18:00:18 2020 +0200

systemplate: do not soft-link to host filesystem in the jail

Files soft-linked from the jail will reference those in the
chroot and not the real/root filesystem. We can only get
away with hard-links in this case. Failing that, we must
copy the file and check at runtime. Hard-linking most
commonly fails due to cross-device linkage, which is
prohibited.

Change-Id: I4d43fd2ac47c42edd59de9baba5b38a78c879f6e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101417
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index ea04a03de..649b1efd5 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -69,8 +69,8 @@ cpio -p -d -L $CHROOT
 for file in hosts nsswitch.conf resolv.conf passwd group host.conf timezone 
localtime
 do
 #echo "Linking/Copying /etc/$file"
-# Prefer hard linking, fallback to soft linking, and finally to just 
copying.
-ln -f /etc/$file $CHROOT/etc/ 2> /dev/null || ln -f -s /etc/$file 
$CHROOT/etc/ || cp /etc/$file $CHROOT/etc/ || echo "Failed to link or copy 
$file"
+# Prefer hard-linking, fallback to just copying (do *not* use soft-linking 
because that would be relative to the jail).
+ln -f /etc/$file $CHROOT/etc/ 2> /dev/null || cp /etc/$file $CHROOT/etc/ 
|| echo "Failed to link or copy $file"
 done
 
 # Link dev/random and dev/urandom to ../tmp/dev/.
@@ -79,6 +79,7 @@ mkdir -p $CHROOT/dev
 mkdir -p $CHROOT/tmp/dev
 for file in random urandom
 do
+# This link is relative anyway, so can be soft.
 ln -f ../tmp/dev/$file $CHROOT/dev/ 2> /dev/null || ln -f -s 
../tmp/dev/$file $CHROOT/dev/ || echo "Failed to link dev/$file"
 done
 
@@ -89,6 +90,7 @@ mkdir -p $CHROOT/lo
 # In case the original path is different from
 for path in $INSTDIR $INSTDIR_LOGICAL
 do
+# Create a soft-link, as it's a relative directory path (can't be a 
hard-link).
 INSTDIR_PARENT="$(dirname "$CHROOT/$path")"
 mkdir -p $INSTDIR_PARENT
 ln -f -s `realpath --relative-to=$INSTDIR_PARENT $CHROOT/lo` $CHROOT/$path
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2018-12-02 Thread Libreoffice Gerrit user
 loolwsd-systemplate-setup |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 1dbc88a32bff317b5249078586797aae72f431fe
Author: Andras Timar 
AuthorDate: Sun Dec 2 14:30:28 2018 +0100
Commit: Andras Timar 
CommitDate: Sun Dec 2 18:32:34 2018 +0100

Fix domain name resolution from jail by adding required libs to systemplate

Originally all was good, then ad21717498cc214d5d5d5c0ff378238552137e2f
removed these files from jail, therefore name resolution broke, then
ac7d67f43e2b82dcc841ca2ecae91e668eb90613 added back libnss_* libs from one 
location, which
happened to work on developer's computer, then 
4e5528e5f8b6abbd9ca715d5ac0ec410cbc783af,
b4f15c714ae5fb5208f4267a76effe8c4f54a4e7, and 
9c0ab7215568b53ce4a26de00900f9c6fa36b508
added back etc/hosts etc/nsswitch.conf etc/resolv.conf that were also 
needed for proper
name resolution, finally this patch adds some more possible locations of 
Name Service
Switch (NSS) libs, therefore it makes sure that the required libnss_* 
shared libs
are found e.g. on Debian based systems. Also, testing with 
libreoffice/online docker image
has shown that libresolv.so.2 is also required in systemplate for name 
resolution, although
on some other systems it was not needed (preload?).

This fixes two bugs:
1) Linked images in documents were not displayed on certain systems
2) Insert image from WOPI host did not work on certain systems

Change-Id: I5d09a65341050f0f729bdbc46977c0f686ac023c
Reviewed-on: https://gerrit.libreoffice.org/64426
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index b70861834..09d5265fc 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -24,7 +24,8 @@ cd / || exit 1
 find etc/hosts etc/nsswitch.conf etc/resolv.conf \
  etc/ld.so.* \
  lib/ld-* lib64/ld-* \
- lib64/libnss_* \
+ lib/libnss_* lib64/libnss_* lib/*/libnss_* \
+ lib/libresolv* lib64/libresolv* lib/*/libresolv* \
  var/cache/fontconfig \
  etc/fonts \
  etc/localtime \
@@ -41,7 +42,8 @@ find etc/hosts etc/nsswitch.conf etc/resolv.conf \
 find etc/fonts \
  etc/resolv.conf \
  lib/ld-* lib64/ld-* \
- lib64/libnss_* \
+ lib/libnss_* lib64/libnss_* lib/*/libnss_* \
+ lib/libresolv* lib64/libresolv* lib/*/libresolv* \
  usr/lib/*/libsqlite* \
-type l 2>/dev/null
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2018-11-22 Thread Libreoffice Gerrit user
 loolwsd-systemplate-setup |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 052c033e920cf6906a9e0c9b27381b2ae234f231
Author: Andras Timar 
AuthorDate: Thu Nov 22 14:23:57 2018 +0100
Commit: Andras Timar 
CommitDate: Thu Nov 22 14:28:21 2018 +0100

tdf#121429 PDF writing needs NSS libs in systemplate (2)

Change-Id: I3724114867986a7ff2494b6b360b1680d7661bcc

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 95ccba0f7..b70861834 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -31,8 +31,8 @@ find etc/hosts etc/nsswitch.conf etc/resolv.conf \
  usr/lib/locale/en_US.utf8 \
  usr/lib/locale/C.UTF-8 \
  usr/lib/locale/locale_archive \
- usr/lib/x86_64-linux-gnu/nss/*.so \
- usr/lib/x86_64-linux-gnu/libsqlite3.so.* \
+ usr/lib/*/nss/*.so \
+ usr/lib/*/libsqlite* \
  usr/share/zoneinfo/* \
  usr/share/liblangtag \
  usr/share/hyphen \
@@ -42,6 +42,7 @@ find etc/fonts \
  etc/resolv.conf \
  lib/ld-* lib64/ld-* \
  lib64/libnss_* \
+ usr/lib/*/libsqlite* \
-type l 2>/dev/null
 
 # Go through the LO shared objects and check what system libraries
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2018-11-21 Thread Libreoffice Gerrit user
 loolwsd-systemplate-setup |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9606c29d64bc7526a4a65848613b8ee288936ed2
Author: Andras Timar 
AuthorDate: Wed Nov 21 15:50:44 2018 +0100
Commit: Andras Timar 
CommitDate: Wed Nov 21 21:59:40 2018 +0100

tdf#121429 PDF writing needs NSS libs in systemplate

Change-Id: I478058168d8288a1e9bced66ba58b1bb26e556bb
Reviewed-on: https://gerrit.libreoffice.org/63721
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index adeedeb2d..95ccba0f7 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -31,6 +31,8 @@ find etc/hosts etc/nsswitch.conf etc/resolv.conf \
  usr/lib/locale/en_US.utf8 \
  usr/lib/locale/C.UTF-8 \
  usr/lib/locale/locale_archive \
+ usr/lib/x86_64-linux-gnu/nss/*.so \
+ usr/lib/x86_64-linux-gnu/libsqlite3.so.* \
  usr/share/zoneinfo/* \
  usr/share/liblangtag \
  usr/share/hyphen \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2018-11-01 Thread Libreoffice Gerrit user
 loolwsd-systemplate-setup |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9c0ab7215568b53ce4a26de00900f9c6fa36b508
Author: Andras Timar 
AuthorDate: Thu Nov 1 17:25:44 2018 +0100
Commit: Andras Timar 
CommitDate: Thu Nov 1 17:25:44 2018 +0100

typo: missing backslash

Change-Id: I194420d64a2541000e6bc7eb52d3cec8883e32d4

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 527523dc6..adeedeb2d 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -21,7 +21,7 @@ cd / || exit 1
 # into the template tree of system files for the chroot jails.
 
 # First essential files and shared objects
-find etc/hosts etc/nsswitch.conf etc/resolv.conf
+find etc/hosts etc/nsswitch.conf etc/resolv.conf \
  etc/ld.so.* \
  lib/ld-* lib64/ld-* \
  lib64/libnss_* \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2018-11-01 Thread Libreoffice Gerrit user
 loolwsd-systemplate-setup |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b4f15c714ae5fb5208f4267a76effe8c4f54a4e7
Author: Andras Timar 
AuthorDate: Thu Nov 1 17:17:40 2018 +0100
Commit: Andras Timar 
CommitDate: Thu Nov 1 17:17:40 2018 +0100

Fix networking in the chroot (again)

Change-Id: I60a6f5f99577e4336b1ec117e28650d677ed7d63

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index d68e8255a..527523dc6 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -21,7 +21,8 @@ cd / || exit 1
 # into the template tree of system files for the chroot jails.
 
 # First essential files and shared objects
-find etc/ld.so.* \
+find etc/hosts etc/nsswitch.conf etc/resolv.conf
+ etc/ld.so.* \
  lib/ld-* lib64/ld-* \
  lib64/libnss_* \
  var/cache/fontconfig \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2018-10-30 Thread Libreoffice Gerrit user
 loolwsd-systemplate-setup |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4e5528e5f8b6abbd9ca715d5ac0ec410cbc783af
Author: Andras Timar 
AuthorDate: Tue Oct 30 21:17:53 2018 +0100
Commit: Andras Timar 
CommitDate: Tue Oct 30 21:33:03 2018 +0100

/etc/resolv.conf can be a symlink

Change-Id: I23396e598306b7c8ab1498962ab5c09150c6795b
Reviewed-on: https://gerrit.libreoffice.org/62674
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 986a83aee..d68e8255a 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -36,6 +36,7 @@ find etc/ld.so.* \
 -type f 2>/dev/null
 
 find etc/fonts \
+ etc/resolv.conf \
  lib/ld-* lib64/ld-* \
  lib64/libnss_* \
-type l 2>/dev/null
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2018-06-15 Thread Andras Timar
 loolwsd-systemplate-setup |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6c42c2bc91d9cffc89cbccce1a083638aefbd9b3
Author: Andras Timar 
Date:   Fri Jun 15 15:04:25 2018 +0200

redirect stderr of find to /dev/null, non existing search paths can be 
ignored

Change-Id: Icf2a77f8cd78da2f9d4ff7adc11308cb96464e65

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 50cc5aa92..3eed41ae6 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -34,11 +34,11 @@ find etc/passwd etc/group etc/hosts \
  usr/share/zoneinfo/* \
  usr/share/liblangtag \
  usr/share/hyphen \
--type f
+-type f 2>/dev/null
 
 find etc/fonts \
  lib/ld-* lib64/ld-* \
-   -type l
+   -type l 2>/dev/null
 
 # Go through the LO shared objects and check what system libraries
 # they link to.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2018-03-10 Thread Michael Meeks
 loolwsd-systemplate-setup |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 501d36824b6fd7a99383c4d0be8c67516bef84f4
Author: Michael Meeks 
Date:   Sat Mar 10 13:50:43 2018 +

Clean up un-used pcf fonts from the systemplate to shrink it.

Also drop ~/docs/ copying for devs - too generic a name.

Change-Id: Ib9416e23fa7f09ec923e03551c6c7b85bc3defe3

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 263a489a9..56ca87d20 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -80,13 +80,15 @@ if [ -h usr/share/fonts/ghostscript ]; then
 cp -r -p -L /usr/share/ghostscript/fonts usr/share/ghostscript
 fi
 
+# Remove obsolete & unused bitmap fonts
+find usr/share -name '*.pcf' | xargs rm -f
+find usr/share -name '*.pcf.gz' | xargs rm -f
+
 # Debugging only hackery to avoid confusion.
 if test "z$ENABLE_DEBUG" != "z" -a "z$HOME" != "z"; then
 echo "Copying development users's fonts into systemplate"
 mkdir -p $CHROOT/$HOME
-mkdir -p $CHROOT/$HOME/docs
 test -d $HOME/.fonts && cp -r -p -L $HOME/.fonts $CHROOT/$HOME
-test -d $HOME/docs && cp -r -p -L $HOME/docs $CHROOT/$HOME
 fi
 
 exit 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2017-10-30 Thread Andras Timar
 loolwsd-systemplate-setup |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 61a2d94f2b34392f83eb4d62d8ced459eed58bab
Author: Andras Timar 
Date:   Mon Oct 30 11:01:14 2017 +0100

copy system hyphenation dictionaries to systemplate

Change-Id: Ie7e5a2644436d5de61f65b2d8ec5201471100787

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 8fb23552..263a489a 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -36,6 +36,7 @@ find etc/passwd etc/group etc/hosts \
  usr/lib/locale/locale_archive \
  usr/share/zoneinfo/* \
  usr/share/liblangtag \
+ usr/share/hyphen \
  usr/lib/libpng* usr/lib64/libpng* lib/*-linux-gnu/libpng* \
  usr/lib/*-linux-gnu/liblcms2* \
 -type f
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2017-09-22 Thread Andras Timar
 loolwsd-systemplate-setup |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 017f82a84d6312a8692b11146ddf8d1c6fd9ddd3
Author: Andras Timar 
Date:   Fri Sep 22 17:04:29 2017 +0200

no error if systemplate dir is existing

Change-Id: I10aba648688ba92150efa41449190a3ba425f03c
Reviewed-on: https://gerrit.libreoffice.org/42663
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 1bd4bd66..8fb23552 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -9,7 +9,7 @@ INSTDIR=$2
 
 test -d "$INSTDIR" || { echo "No such directory: $INSTDIR"; exit 1; }
 
-mkdir $CHROOT || exit 1
+mkdir -p $CHROOT || exit 1
 
 CHROOT=`cd $CHROOT && /bin/pwd`
 INSTDIR=`cd $INSTDIR && /bin/pwd`
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2017-03-27 Thread Samuel Mehrbrodt
 loolwsd-systemplate-setup |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0b129c05a99345e7c82d630e7722b10494ed7b85
Author: Samuel Mehrbrodt 
Date:   Mon Mar 27 11:57:43 2017 +0200

Find libpng on Ubuntu also

Change-Id: Ib0ed1b26ddac1aca6381650c85e17a4b1a6d017f
Reviewed-on: https://gerrit.libreoffice.org/35749
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 8bb41870..729220c3 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -36,7 +36,7 @@ find etc/passwd etc/group etc/hosts \
  usr/lib/locale/locale_archive \
  usr/share/zoneinfo/* \
  usr/share/liblangtag \
- usr/lib/libpng* usr/lib64/libpng* \
+ usr/lib/libpng* usr/lib64/libpng* lib/*-linux-gnu/libpng* \
 -type f
 
 find etc/fonts \
@@ -44,7 +44,7 @@ find etc/fonts \
  lib/libnss_* lib64/libnss_* lib/*-linux-gnu/libnss*\
  lib/libcap* lib64/libcap* lib/*-linux-gnu/libcap* \
  lib/libattr* lib/*-linux-gnu/libattr* \
- usr/lib/libpng* usr/lib64/libpng* \
+ usr/lib/libpng* usr/lib64/libpng* lib/*-linux-gnu/libpng* \
 -type l
 
 # Go through the LO shared objects and check what system libraries
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd-systemplate-setup

2017-01-05 Thread Henry Castro
 loolwsd-systemplate-setup |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit 6e7f8b860d498a668741ec5984f3dd97de32dbd2
Author: Henry Castro 
Date:   Thu Jan 5 17:05:08 2017 -0400

script: remove POCO libraries from systemplate

This is no longer need it

diff --git a/loolwsd-systemplate-setup b/loolwsd-systemplate-setup
index 9a47b40..8bb4187 100755
--- a/loolwsd-systemplate-setup
+++ b/loolwsd-systemplate-setup
@@ -6,7 +6,6 @@ test $# -eq 2 || { echo "Usage: $0 /dev/null
-done |
-grep -v dynamic | cut -d " " -f 3 | grep -E '^(/lib|/usr)' | sort -u | sed -e 
's,^/,,'
 ) |
 
 # Can't use -l because then symlinks won't be handled well enough.
@@ -71,7 +62,6 @@ grep -v dynamic | cut -d " " -f 3 | grep -E '^(/lib|/usr)' | 
sort -u | sed -e 's
 cpio -p -d -L $CHROOT
 
 mkdir -p $CHROOT/tmp
-mkdir -p $CHROOT/usr/bin/
 
 # /usr/share/fonts needs to be taken care of separately because the
 # directory time stamps must be preserved for fontconfig to trust
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits