Commit d50ca353 authored by Otto Kekäläinen's avatar Otto Kekäläinen

Deb: clean up, strip legacy and simplify autobake-deb.sh

parent 8c038239
#!/bin/bash #!/bin/bash
#
# Build MariaDB .deb packages. # Build MariaDB .deb packages for test and release at mariadb.org
# Based on OurDelta .deb packaging scripts, which are in turn based on Debian #
# MySQL packages.
# Exit immediately on any error # Exit immediately on any error
set -e set -e
# Debug script and command lines
#set -x
# On Buildbot, don't run the mysql-test-run test suite as part of build. # On Buildbot, don't run the mysql-test-run test suite as part of build.
# It takes a lot of time, and we will do a better test anyway in # It takes a lot of time, and we will do a better test anyway in
# Buildbot, running the test suite from installed .debs on a clean VM. # Buildbot, running the test suite from installed .debs on a clean VM.
...@@ -21,29 +17,23 @@ then ...@@ -21,29 +17,23 @@ then
export DEB_BUILD_OPTIONS="nocheck" export DEB_BUILD_OPTIONS="nocheck"
fi fi
# Don't include test suite package on Travis-CI to make the build time shorter # Travis-CI optimizations
if [[ $TRAVIS ]] if [[ $TRAVIS ]]
then then
# On Travis-CI, the log must stay under 4MB so make the build less verbose
sed -i -e '/Add support for verbose builds/,+2d' debian/rules
# Don't include test suite package on Travis-CI to make the build time shorter
sed '/Package: mariadb-test-data/,+26d' -i debian/control sed '/Package: mariadb-test-data/,+26d' -i debian/control
sed '/Package: mariadb-test/,+34d' -i debian/control sed '/Package: mariadb-test/,+34d' -i debian/control
fi fi
export MARIADB_OPTIONAL_DEBS=""
# Find major.minor version. # Look up distro-version specific stuff
#
source ./VERSION
UPSTREAM="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}${MYSQL_VERSION_EXTRA}"
PATCHLEVEL="+maria"
LOGSTRING="MariaDB build"
# Look up distro-version specific stuff.
# Always keep the actual packaging as up-to-date as possible following the latest # Always keep the actual packaging as up-to-date as possible following the latest
# Debian policy and targetting Debian Sid. Then case-by-case run in autobake-deb.sh # Debian policy and targetting Debian Sid. Then case-by-case run in autobake-deb.sh
# tests for backwards compatibility and strip away parts on older builders. # tests for backwards compatibility and strip away parts on older builders.
CODENAME="$(lsb_release -sc)"
# If libcrack2 (>= 2.9.0) is not available (before Debian Jessie and Ubuntu Trusty) # If libcrack2 (>= 2.9.0) is not available (before Debian Jessie and Ubuntu Trusty)
# clean away the cracklib stanzas so the package can build without them. # clean away the cracklib stanzas so the package can build without them.
if ! apt-cache madison libcrack2-dev | grep 'libcrack2-dev *| *2\.9' >/dev/null 2>&1 if ! apt-cache madison libcrack2-dev | grep 'libcrack2-dev *| *2\.9' >/dev/null 2>&1
...@@ -74,30 +64,25 @@ then ...@@ -74,30 +64,25 @@ then
sed '/mariadb-service-convert/d' -i debian/mariadb-server-10.2.install sed '/mariadb-service-convert/d' -i debian/mariadb-server-10.2.install
fi fi
# On Travis-CI, the log must stay under 4MB so make the build less verbose # Adjust changelog, add new version
if [[ $TRAVIS ]]
then
sed -i -e '/Add support for verbose builds/,+2d' debian/rules
fi
# Adjust changelog, add new version.
#
echo "Incrementing changelog and starting build scripts" echo "Incrementing changelog and starting build scripts"
# Find major.minor version
source ./VERSION
UPSTREAM="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}${MYSQL_VERSION_EXTRA}"
PATCHLEVEL="+maria"
LOGSTRING="MariaDB build"
CODENAME="$(lsb_release -sc)"
dch -b -D ${CODENAME} -v "${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automatic build with ${LOGSTRING}." dch -b -D ${CODENAME} -v "${UPSTREAM}${PATCHLEVEL}~${CODENAME}" "Automatic build with ${LOGSTRING}."
echo "Creating package version ${UPSTREAM}${PATCHLEVEL}~${CODENAME} ... " echo "Creating package version ${UPSTREAM}${PATCHLEVEL}~${CODENAME} ... "
# Build the package. # Build the package
# Pass -I so that .git and other unnecessary temporary and source control files # Pass -I so that .git and other unnecessary temporary and source control files
# will be ignored by dpkg-source when createing the tar.gz source package # will be ignored by dpkg-source when creating the tar.gz source package.
# Use -b to build binary only packages as there is no need to waste time on # Use -b to build binary only packages as there is no need to waste time on
# generating the source package. # generating the source package.
fakeroot dpkg-buildpackage -us -uc -I -b fakeroot dpkg-buildpackage -us -uc -I -b
[ -e debian/autorm-file ] && rm -vf `cat debian/autorm-file`
echo "Build complete" echo "Build complete"
# end of autobake script
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment