Files
tools/stx/toCOPY/pkgbuilder/setup.sh
hbai c5416a15ee pkgbuilder: Support 'jobs' option and tmpfs directory
This commit changes below to speed up package build:
a. pass '-j[jobs number]' argument to dpkg-build*
b. mount all short term contents on tmpfs for builder
c. Add configure line to use 'eatmydata'

Story: 2008846
Task: 44154

Signed-off-by: hbai <haiqing.bai@windriver.com>
Change-Id: If43e0dad26505b9f8a109c762b328b0b89d3b6a7
2022-01-11 11:39:54 +08:00

16 lines
472 B
Bash
Executable File

#!/bin/bash
if [ -f "/etc/fstab" ]; then
speed_up=`cat /etc/fstab | grep 'speeding up sbuild'`
[ "x${speed_up}" != "x" ] && exit 0
fi
cat >>/etc/fstab << EOF
# For speeding up sbuild/schroot and prevent SSD wear-out
tmpfs /var/lib/schroot/session tmpfs uid=root,gid=root,mode=0755 0 0
tmpfs /var/lib/schroot/union/overlay tmpfs uid=root,gid=root,mode=0755 0 0
tmpfs /var/lib/sbuild/build tmpfs uid=sbuild,gid=sbuild,mode=2770 0 0
EOF
mount -a