From 6b2b05ee1cf977c1fc3594d2c8f9dffce3db499e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Sat, 21 Feb 2015 15:09:00 -0800 Subject: [PATCH] Fixes to build_deb_packages script to allow running on Docker --- tools/distpackages/build_deb_packages.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/distpackages/build_deb_packages.sh b/tools/distpackages/build_deb_packages.sh index f9cf8023402..a5f945bd9a1 100755 --- a/tools/distpackages/build_deb_packages.sh +++ b/tools/distpackages/build_deb_packages.sh @@ -35,7 +35,13 @@ mkdir -p $deb_dest version='0.8.0.0' -arch=`uname -p` +if [ -f /.dockerinit ]; then + # We're in Docker where uname -p returns "unknown". + arch=x86_64 +else + arch=`uname -p` +fi + if [ $arch != "x86_64" ] then echo Unsupported architecture. @@ -77,13 +83,14 @@ do # create symlinks to shared libraries for libname in $arch_lib_dir/*.a do - base=`basename -s .a $libname` + base=`basename $libname .a` ln -s $base.so.$version $arch_lib_dir/$base.so done fi # Adjust mode for some files in the package find $tmp_dir/$pkg_name -type d | xargs chmod 755 + find $tmp_dir/$pkg_name -type d | xargs chmod a-s find $tmp_dir/$pkg_name -type f | xargs chmod 644 chmod 755 $tmp_dir/$pkg_name/DEBIAN/{postinst,postrm}