[Libreoffice-commits] core.git: download.lst external/boost
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 18 11:21:45 UTC 2020
download.lst | 5 +--
external/boost/repack_tarball.sh | 60 +++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 2 deletions(-)
New commits:
commit 996f0e6a0f39434e6e1b1b450262d97af60d663d
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Mar 2 12:57:42 2020 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Wed Mar 18 12:21:23 2020 +0100
repack the boost tarball to be smaller and faster
The tarball is almost 100MiB and it unpacks to roughly 0.75GiB,
because it contains tons of generated html docs and other stuff that
is not needed for building. Unpacking it on Cygwin takes several
minutes (done in parallel, but still) and even on Linux the unpacking
takes longer than the actual compilation.
Change-Id: Ied9f3059530f4e9a856170ec3fcc304631ff8e0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89825
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/download.lst b/download.lst
index 9a8a6681c0e2..9983fc0386b1 100644
--- a/download.lst
+++ b/download.lst
@@ -6,8 +6,9 @@ export APR_SHA256SUM := 1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c7
export APR_TARBALL := apr-1.5.2.tar.gz
export APR_UTIL_SHA256SUM := 976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19
export APR_UTIL_TARBALL := apr-util-1.5.4.tar.gz
-export BOOST_SHA256SUM := d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
-export BOOST_TARBALL := boost_1_71_0.tar.bz2
+# please repack the tarball using external/boost/repack_tarball.sh
+export BOOST_SHA256SUM := 35e06a3bd7cd8f66be822c7d64e80c2b6051a181e9e897006917cb8e7988a543
+export BOOST_TARBALL := boost_1_71_0.tar.xz
export BREAKPAD_SHA256SUM := 7060149be16a8789b0ccf596bdeaf63115f03f520acb508f72a14686fb311cb9
export BREAKPAD_TARBALL := breakpad.zip
export BSH_SHA256SUM := 9e93c73e23aff644b17dfff656444474c14150e7f3b38b19635e622235e01c96
diff --git a/external/boost/repack_tarball.sh b/external/boost/repack_tarball.sh
new file mode 100755
index 000000000000..ed27875f6def
--- /dev/null
+++ b/external/boost/repack_tarball.sh
@@ -0,0 +1,60 @@
+#! /bin/sh
+
+# Repack the boost tarball as xz (much faster to unpack) and remove
+# a lot of needless files such as generated html docs.
+
+tarball="$1"
+
+if test -z "$tarball" -o ! -f "$tarball"; then
+ echo "Usage: $0 <tarball>"
+ exit 1
+fi
+
+tmpdir=$(mktemp -d)
+
+if ! test -d "$tmpdir"; then
+ echo mktemp failed
+ exit 1
+fi
+
+echo Unpacking "$tarball" ...
+tar x -C "$tmpdir" -f "$tarball"
+if test $? -ne 0; then
+ echo tar x failed
+ rm -rf "$tmpdir"
+ exit 1
+fi
+
+echo Removing unnecessary files ...
+find "$tmpdir" \( -name doc -o -name test -o -name example \) -type d -prune -print0 | xargs -0 rm -r
+if test $? -ne 0; then
+ echo file removal failed
+ rm -rf "$tmpdir"
+ exit 1
+fi
+
+name="$(basename "$tarball" | sed 's/\.tar.*$//').tar.xz"
+dir=$(ls "$tmpdir")
+
+echo Creating "$name" ...
+# To make the tarball reproducible, use a timestamp of a file inside the tarball (they all seem to have the same mtime).
+if ! test -f "$tmpdir/$dir/README.md"; then
+ echo timestamp retrieval failed, check the script
+ rm -rf "$tmpdir"
+ exit 1
+fi
+# Many of the options are to make the tarball reproducible.
+LC_ALL=C tar c -C "$tmpdir" --xz -f "$(pwd)/$name" --format=gnu --sort=name --owner=0 --group=0 --mode=go=rX,u=rwX --mtime "$tmpdir/$dir/README.md" "$dir"
+if test $? -ne 0; then
+ echo tar c failed
+ rm -rf "$tmpdir"
+ exit 1
+fi
+
+echo Cleaning up ...
+rm -rf "$tmpdir"
+
+sha256sum "$name"
+
+echo Done.
+exit 0
More information about the Libreoffice-commits
mailing list