summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-04-14 09:48:22 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2023-04-14 09:48:22 +0300
commit10147af9e5b25739bada32c6eb4f204d5f2985a1 (patch)
tree65da0482a4447ec7e6f39118ec8fd2a8ddd9b6c4
parente552747cfdf364a5ade1c264ae849b18e324f02f (diff)
parentf2fde3f6675dff56e7f46c19c9f041cc7e259d43 (diff)
downloadmariadb-git-10147af9e5b25739bada32c6eb4f204d5f2985a1.tar.gz
Merge 10.6 into 10.8
-rwxr-xr-xdebian/autobake-deb.sh38
1 files changed, 28 insertions, 10 deletions
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh
index a7e8151b163..9ece6d4b69a 100755
--- a/debian/autobake-deb.sh
+++ b/debian/autobake-deb.sh
@@ -16,6 +16,7 @@ set -e
# Buildbot, running the test suite from installed .debs on a clean VM.
export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
+# shellcheck source=/dev/null
source ./VERSION
# General CI optimizations to keep build output smaller
@@ -65,7 +66,7 @@ replace_uring_with_aio()
disable_pmem()
{
sed '/libpmem-dev/d' -i debian/control
- sed '/-DWITH_PMEM=YES/d' -i debian/rules
+ sed '/-DWITH_PMEM=ON/d' -i debian/rules
}
disable_libfmt()
@@ -98,13 +99,13 @@ fi
# If not known, use 'unknown' in .deb version identifier
if [ -z "${LSBID}" ]
then
- LSBID="unknown"
+ LSBID="unknown"
fi
case "${LSBNAME}"
in
# Debian
- buster)
+ "buster")
disable_libfmt
replace_uring_with_aio
if [ ! "$architecture" = amd64 ]
@@ -112,7 +113,7 @@ in
disable_pmem
fi
;&
- bullseye|bookworm)
+ "bullseye"|"bookworm")
# mariadb-plugin-rocksdb in control is 4 arches covered by the distro rocksdb-tools
# so no removal is necessary.
if [[ ! "$architecture" =~ amd64|arm64|ppc64el ]]
@@ -124,20 +125,20 @@ in
replace_uring_with_aio
fi
;&
- sid)
+ "sid")
# The default packaging should always target Debian Sid, so in this case
# there is intentionally no customizations whatsoever.
;;
# Ubuntu
- bionic)
+ "bionic")
remove_rocksdb_tools
[ "$architecture" != amd64 ] && disable_pmem
;&
- focal)
+ "focal")
replace_uring_with_aio
disable_libfmt
;&
- impish|jammy|kinetic)
+ "impish"|"jammy"|"kinetic")
# mariadb-plugin-rocksdb s390x not supported by us (yet)
# ubuntu doesn't support mips64el yet, so keep this just
# in case something changes.
@@ -178,17 +179,34 @@ dch -b -D "${LSBNAME}" -v "${VERSION}" "Automatic build with ${LOGSTRING}." --co
echo "Creating package version ${VERSION} ... "
+BUILDPACKAGE_DPKGCMD=""
+
# 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
+ BUILDPACKAGE_DPKGCMD="eatmydata"
+fi
+
+BUILDPACKAGE_DPKGCMD+="dpkg-buildpackage"
+
+# Using dpkg-buildpackage args
+# -us Allow unsigned sources
+# -uc Allow unsigned changes
+# -I Tar ignore
+BUILDPACKAGE_DPKG_ARGS=(-us -uc -I)
+
+# There can be also extra flags that are appended to args
+if [ -n "$BUILDPACKAGE_FLAGS" ]
+then
+ read -ra BUILDPACKAGE_TMP_ARGS <<< "$BUILDPACKAGE_FLAGS"
+ BUILDPACKAGE_DPKG_ARGS=("${BUILDPACKAGE_DPKG_ARGS[@]} ${BUILDPACKAGE_TMP_ARGS[@]}")
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 $BUILDPACKAGE_PREPEND dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS
+fakeroot -- "${BUILDPACKAGE_DPKGCMD}" "${BUILDPACKAGE_DPKG_ARGS[@]}"
# If the step above fails due to missing dependencies, you can manually run
# sudo mk-build-deps debian/control -r -i