summaryrefslogtreecommitdiff
path: root/debian/autobake-deb.sh
diff options
context:
space:
mode:
authorOtto Kekäläinen <otto@kekalainen.net>2020-04-10 19:31:18 +0300
committerVicențiu-Marian Ciorbaru <vicentiu@mariadb.org>2020-04-23 10:07:07 +0300
commit86f59e86152d3cf8a6f1b961975fa8a3021d1584 (patch)
tree78b697ee5e8e3a48d4decbb552e6c3f6a79b1f51 /debian/autobake-deb.sh
parent03119c589026f9a8f499255291624f71ba2e9e04 (diff)
downloadmariadb-git-86f59e86152d3cf8a6f1b961975fa8a3021d1584.tar.gz
Deb: Use 'eatmydata' when available to build faster with less disk I/O
Diffstat (limited to 'debian/autobake-deb.sh')
-rwxr-xr-xdebian/autobake-deb.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh
index dbd044d87c6..21c9a0ddd2b 100755
--- a/debian/autobake-deb.sh
+++ b/debian/autobake-deb.sh
@@ -128,10 +128,17 @@ then
BUILDPACKAGE_FLAGS="-b"
fi
+# Use eatmydata is available to build faster with less I/O, skipping fsync()
+# during the entire build process (safe because a build can always be restarted)
+if which eatmydata > /dev/null
+then
+ BUILDPACKAGE_PREPEND=eatmydata
+fi
+
# Build the package
# Pass -I so that .git and other unnecessary temporary and source control files
# will be ignored by dpkg-source when creating the tar.gz source package.
-fakeroot dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS
+fakeroot $BUILDPACKAGE_PREPEND dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS
# If the step above fails due to missing dependencies, you can manually run
# sudo mk-build-deps debian/control -r -i