2012-01-23 12:20:16 +01:00
|
|
|
#!/bin/bash
|
2016-11-08 21:15:33 +01:00
|
|
|
#
|
|
|
|
# Build MariaDB .deb packages for test and release at mariadb.org
|
|
|
|
#
|
2020-07-11 11:19:00 +02:00
|
|
|
# Purpose of this script:
|
|
|
|
# Always keep the actual packaging as up-to-date as possible following the latest
|
|
|
|
# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh
|
|
|
|
# tests for backwards compatibility and strip away parts on older builders or
|
2021-05-06 21:08:38 +02:00
|
|
|
# specific build environments.
|
2012-01-23 12:20:16 +01:00
|
|
|
|
|
|
|
# Exit immediately on any error
|
|
|
|
set -e
|
|
|
|
|
2016-08-18 10:47:20 +02:00
|
|
|
# On Buildbot, don't run the mysql-test-run test suite as part of build.
|
2012-01-23 12:20:16 +01:00
|
|
|
# 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.
|
2017-11-17 05:17:26 +01:00
|
|
|
export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
|
2012-01-23 12:20:16 +01:00
|
|
|
|
2022-03-24 08:57:07 +01:00
|
|
|
source ./VERSION
|
|
|
|
|
2020-04-07 19:20:11 +02:00
|
|
|
# General CI optimizations to keep build output smaller
|
2022-03-16 07:51:49 +01:00
|
|
|
if [[ $GITLAB_CI ]]
|
2016-10-26 01:12:18 +02:00
|
|
|
then
|
2022-03-16 07:51:49 +01:00
|
|
|
# On Gitlab the output log must stay under 4MB so make the
|
2020-04-07 19:20:11 +02:00
|
|
|
# build less verbose
|
2021-09-06 05:22:45 +02:00
|
|
|
sed '/Add support for verbose builds/,/^$/d' -i debian/rules
|
2021-08-20 02:36:38 +02:00
|
|
|
elif [ -d storage/columnstore/columnstore/debian ]
|
|
|
|
then
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
# ColumnStore is explicitly disabled in the native Debian build. Enable it
|
2021-09-06 05:22:45 +02:00
|
|
|
# now when build is triggered by autobake-deb.sh (MariaDB.org) and when the
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
# build is not running on Gitlab-CI.
|
2021-09-06 05:22:45 +02:00
|
|
|
sed '/-DPLUGIN_COLUMNSTORE=NO/d' -i debian/rules
|
|
|
|
# Take the files and part of control from MCS directory
|
2022-03-25 07:25:11 +01:00
|
|
|
if [ ! -f debian/mariadb-plugin-columnstore.install ]
|
|
|
|
then
|
|
|
|
cp -v storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.* debian/
|
|
|
|
echo >> debian/control
|
2022-04-11 10:32:26 +02:00
|
|
|
sed "s/-10.6//" <storage/columnstore/columnstore/debian/control >> debian/control
|
2022-03-25 07:25:11 +01:00
|
|
|
fi
|
2020-04-07 19:20:11 +02:00
|
|
|
fi
|
2016-11-08 21:15:33 +01:00
|
|
|
|
|
|
|
# Look up distro-version specific stuff
|
2016-11-26 13:22:10 +01:00
|
|
|
#
|
2016-10-21 12:52:36 +02:00
|
|
|
# Always keep the actual packaging as up-to-date as possible following the latest
|
2017-11-15 05:37:32 +01:00
|
|
|
# Debian policy and targeting Debian Sid. Then case-by-case run in autobake-deb.sh
|
2016-10-21 12:52:36 +02:00
|
|
|
# tests for backwards compatibility and strip away parts on older builders.
|
2016-10-26 01:12:18 +02:00
|
|
|
|
2022-03-16 07:51:49 +01:00
|
|
|
remove_rocksdb_tools()
|
|
|
|
{
|
2020-02-24 22:32:13 +01:00
|
|
|
sed '/rocksdb-tools/d' -i debian/control
|
|
|
|
sed '/sst_dump/d' -i debian/not-installed
|
2022-03-16 07:51:49 +01:00
|
|
|
if ! grep -q sst_dump debian/mariadb-plugin-rocksdb.install
|
|
|
|
then
|
|
|
|
echo "usr/bin/sst_dump" >> debian/mariadb-plugin-rocksdb.install
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2022-03-18 02:20:09 +01:00
|
|
|
replace_uring_with_aio()
|
|
|
|
{
|
2021-03-15 10:33:15 +01:00
|
|
|
sed 's/liburing-dev/libaio-dev/g' -i debian/control
|
2022-03-18 02:20:09 +01:00
|
|
|
sed -e '/-DIGNORE_AIO_CHECK=YES/d' \
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
-e '/-DWITH_URING=YES/d' -i debian/rules
|
2022-03-18 02:20:09 +01:00
|
|
|
}
|
2021-03-15 10:33:15 +01:00
|
|
|
|
2022-03-18 02:20:09 +01:00
|
|
|
disable_pmem()
|
|
|
|
{
|
2021-03-10 08:51:42 +01:00
|
|
|
sed '/libpmem-dev/d' -i debian/control
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
sed '/-DWITH_PMEM=YES/d' -i debian/rules
|
2022-03-18 02:20:09 +01:00
|
|
|
}
|
|
|
|
|
2022-03-22 08:04:37 +01:00
|
|
|
disable_libfmt()
|
|
|
|
{
|
|
|
|
# 0.7+ required
|
|
|
|
sed '/libfmt-dev/d' -i debian/control
|
|
|
|
}
|
|
|
|
|
2022-03-18 01:42:20 +01:00
|
|
|
architecture=$(dpkg-architecture -q DEB_BUILD_ARCH)
|
2022-03-18 01:33:07 +01:00
|
|
|
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
# Parse release name and number from Linux standard base release
|
|
|
|
# Example:
|
|
|
|
# $ lsb_release -a
|
|
|
|
# No LSB modules are available.
|
|
|
|
# Distributor ID: Debian
|
|
|
|
# Description: Debian GNU/Linux bookworm/sid
|
|
|
|
# Release: n/a
|
|
|
|
# Codename: n/a
|
2022-05-23 09:39:31 +02:00
|
|
|
LSBID="$(lsb_release -si | tr '[:upper:]' '[:lower:]')"
|
|
|
|
LSBVERSION="$(lsb_release -sr | sed -e "s#\.##g")"
|
|
|
|
LSBNAME="$(lsb_release -sc)"
|
|
|
|
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
# If 'n/a', assume 'sid'
|
|
|
|
if [ "${LSBVERSION}" == "n/a" ] || [ "${LSBNAME}" == "n/a" ]
|
|
|
|
then
|
|
|
|
LSBVERSION="sid"
|
|
|
|
LSBNAME="sid"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# If not known, use 'unknown' in .deb version identifier
|
2022-05-23 09:39:31 +02:00
|
|
|
if [ -z "${LSBID}" ]
|
|
|
|
then
|
|
|
|
LSBID="unknown"
|
|
|
|
fi
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
|
|
|
|
case "${LSBNAME}"
|
|
|
|
in
|
|
|
|
# Debian
|
2022-03-18 01:42:20 +01:00
|
|
|
stretch)
|
|
|
|
# MDEV-16525 libzstd-dev-1.1.3 minimum version
|
|
|
|
sed -e '/libzstd-dev/d' \
|
|
|
|
-e 's/libcurl4/libcurl3/g' -i debian/control
|
|
|
|
remove_rocksdb_tools
|
2022-03-18 02:20:09 +01:00
|
|
|
disable_pmem
|
2022-03-18 01:42:20 +01:00
|
|
|
;&
|
|
|
|
buster)
|
2022-03-22 08:04:37 +01:00
|
|
|
disable_libfmt
|
2022-03-18 02:20:09 +01:00
|
|
|
replace_uring_with_aio
|
|
|
|
if [ ! "$architecture" = amd64 ]
|
|
|
|
then
|
|
|
|
disable_pmem
|
|
|
|
fi
|
2022-03-18 01:42:20 +01:00
|
|
|
;&
|
|
|
|
bullseye|bookworm)
|
|
|
|
# mariadb-plugin-rocksdb in control is 4 arches covered by the distro rocksdb-tools
|
|
|
|
# so no removal is necessary.
|
2022-03-18 02:20:09 +01:00
|
|
|
if [[ ! "$architecture" =~ amd64|arm64|ppc64el ]]
|
|
|
|
then
|
|
|
|
disable_pmem
|
|
|
|
fi
|
|
|
|
if [[ ! "$architecture" =~ amd64|arm64|armel|armhf|i386|mips64el|mipsel|ppc64el|s390x ]]
|
|
|
|
then
|
|
|
|
replace_uring_with_aio
|
|
|
|
fi
|
2022-03-18 01:42:20 +01:00
|
|
|
;&
|
|
|
|
sid)
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
# The default packaging should always target Debian Sid, so in this case
|
|
|
|
# there is intentionally no customizations whatsoever.
|
2022-03-18 01:42:20 +01:00
|
|
|
;;
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
# Ubuntu
|
2022-03-18 01:42:20 +01:00
|
|
|
bionic)
|
|
|
|
remove_rocksdb_tools
|
2022-03-18 02:20:09 +01:00
|
|
|
[ "$architecture" != amd64 ] && disable_pmem
|
2022-03-18 01:42:20 +01:00
|
|
|
;&
|
|
|
|
focal)
|
2022-03-18 02:20:09 +01:00
|
|
|
replace_uring_with_aio
|
2022-03-22 08:04:37 +01:00
|
|
|
disable_libfmt
|
2022-03-18 01:42:20 +01:00
|
|
|
;&
|
2022-09-07 11:58:55 +02:00
|
|
|
impish|jammy|kinetic)
|
2022-03-18 01:42:20 +01:00
|
|
|
# mariadb-plugin-rocksdb s390x not supported by us (yet)
|
|
|
|
# ubuntu doesn't support mips64el yet, so keep this just
|
|
|
|
# in case something changes.
|
|
|
|
if [[ ! "$architecture" =~ amd64|arm64|ppc64el|s390x ]]
|
|
|
|
then
|
|
|
|
remove_rocksdb_tools
|
|
|
|
fi
|
2022-03-18 02:20:09 +01:00
|
|
|
if [[ ! "$architecture" =~ amd64|arm64|ppc64el ]]
|
|
|
|
then
|
|
|
|
disable_pmem
|
|
|
|
fi
|
|
|
|
if [[ ! "$architecture" =~ amd64|arm64|armhf|ppc64el|s390x ]]
|
|
|
|
then
|
|
|
|
replace_uring_with_aio
|
|
|
|
fi
|
2022-03-18 01:42:20 +01:00
|
|
|
;;
|
|
|
|
*)
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
echo "Error: Unknown release '$LSBNAME'" >&2
|
2022-03-18 01:42:20 +01:00
|
|
|
exit 1
|
2022-03-07 23:35:03 +01:00
|
|
|
esac
|
2021-03-10 08:51:42 +01:00
|
|
|
|
2022-03-25 07:25:11 +01:00
|
|
|
if [ -n "${AUTOBAKE_PREP_CONTROL_RULES_ONLY:-}" ]
|
|
|
|
then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-11-08 21:15:33 +01:00
|
|
|
# Adjust changelog, add new version
|
2012-01-23 12:20:16 +01:00
|
|
|
echo "Incrementing changelog and starting build scripts"
|
|
|
|
|
2016-11-08 21:15:33 +01:00
|
|
|
# Find major.minor version
|
|
|
|
UPSTREAM="${MYSQL_VERSION_MAJOR}.${MYSQL_VERSION_MINOR}.${MYSQL_VERSION_PATCH}${MYSQL_VERSION_EXTRA}"
|
|
|
|
PATCHLEVEL="+maria"
|
|
|
|
LOGSTRING="MariaDB build"
|
2018-05-22 11:47:09 +02:00
|
|
|
EPOCH="1:"
|
2022-05-23 09:39:31 +02:00
|
|
|
VERSION="${EPOCH}${UPSTREAM}${PATCHLEVEL}~${LSBID:0:3}${LSBVERSION}"
|
2016-11-08 21:15:33 +01:00
|
|
|
|
Misc Debian/Salsa-CI fixes (#2299)
* Deb: Handle codename 'n/a' from Debian Sid properly and autobake-deb cleanup
This fixes autobake-deb.sh builds on Sid which was visible as 4 failing
build steps on Salsa-CI.
- In Sid the LSBNAME might evaluate to 'n/a', so accept it as 'Sid' to
fix builds that failed with error:
Error - unknown release codename n/a
- Refactor list to have Ubuntu versions first, then Debian, and as last
the special case of Debian Sid
- Fix minor syntax issues detected by Shellcheck
Also remove useless DEB_HOST_ARCH_CPU check from debian/rules:
* It was never in effect as the 'sed' in autobake-deb.sh cleared it anyway
* The variable name was wrong and always empty
* If variable would have been correct, logic was still reversed
- Define 3h timeout as the default 1h timeout on Gitlab.com (and others)
is usually not enough for initial (uncached) MariaDB builds.
- Replace Buster to Bookworm/Sid upgrade testing with upgrade inside Buster
testing as direct upgrades from Stretch to Bullseye and Buster to Bookworm
are no longer possible due to:
Bug#993755: libcrypt.so.1: cannot open shared object file when
upgrading from Stretch to Sid (https://bugs.debian.org/993755)
- Stop ignoring MariaDB.org 10.6 to this version upgrade testing failures
to reveal bug MDEV-28640. Originally this step was failing as the uring
dependencies in upstream builders lagged behind and there was nothing
that needed work, only time time to resolve. Now there is an actual bug
in packaging that should be visible as a CI failure.
- Stop testing for 'service mysql status' on systems that upgraded from
MySQL 8.0 to MariaDB.org vended 10.6. Due to some unidentified debian/control
changes in 10.6 on upstream the upgrade is no longer compatible in
a way that would maintain the init.d script with name 'mysql'.
- Fix typos where mergers had changed occurrences of 10.5 to 10.6 while
they intentionally need to be exactly 10.5, otherwise the meaning
changes.
- Align autopkgtest code with downstream official Debian packaging one.
This is change is safe on a stable branch because is only affects builds
and testing, not any actual usage of MariaDB 10.6.
- Standardize on using capitalized 'YES' in CMake build options
(instead of 'yes' or mixed case)
- Add some comments to better document debian/rules
- Fix typo in Lintian overrides
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634
MariaDB ticket: https://jira.mariadb.org/browse/MDEV-25633
When built with LTO on Ubuntu, MariaDB does not catch an exception when
the uring initialization fails due to a low RLIMIT_MEMLOCK value.
This commit amends the commit 0609b345554f9a148e165c497aadbe368e0900aa
to be identical to the one done downstream in Debian:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/8d20ca979cf422d3a507283b86c2547d78559179
This way both the inline comments and 'git blame' for this section will
show properly why this is needed, and the fix is one that is fully tested
on Debian and Ubuntu.
Also having this section fully identical in upstream MariaDB and downstream
Debian will make the packaging maintenance easier as 'diff` runs on this
file will not flag this as a difference anymore.
In MDEV-28640 the init script failed to stop/start the MariaDB server
due to missing mysqladmin on the system. This was however very hard to
spot from the console output.
Add an explicit check for the binary the script depends on, and fail
verbosely if the dependency is missing.
2022-11-11 08:51:34 +01:00
|
|
|
dch -b -D "${LSBNAME}" -v "${VERSION}" "Automatic build with ${LOGSTRING}." --controlmaint
|
2012-01-23 12:20:16 +01:00
|
|
|
|
2020-11-27 15:05:17 +01:00
|
|
|
echo "Creating package version ${VERSION} ... "
|
2012-01-23 12:20:16 +01:00
|
|
|
|
2020-04-10 18:31:18 +02:00
|
|
|
# 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
|
|
|
|
|
2016-11-08 21:15:33 +01:00
|
|
|
# Build the package
|
2015-07-22 12:45:43 +02:00
|
|
|
# Pass -I so that .git and other unnecessary temporary and source control files
|
2016-11-08 21:15:33 +01:00
|
|
|
# will be ignored by dpkg-source when creating the tar.gz source package.
|
2020-04-10 18:31:18 +02:00
|
|
|
fakeroot $BUILDPACKAGE_PREPEND dpkg-buildpackage -us -uc -I $BUILDPACKAGE_FLAGS
|
2018-01-12 14:06:14 +01:00
|
|
|
|
|
|
|
# If the step above fails due to missing dependencies, you can manually run
|
|
|
|
# sudo mk-build-deps debian/control -r -i
|
2012-01-23 12:20:16 +01:00
|
|
|
|
2022-03-16 07:51:49 +01:00
|
|
|
# Don't log package contents on Gitlab-CI to save time and log size
|
|
|
|
if [[ ! $GITLAB_CI ]]
|
2016-11-08 21:18:19 +01:00
|
|
|
then
|
|
|
|
echo "List package contents ..."
|
|
|
|
cd ..
|
2020-04-07 19:20:11 +02:00
|
|
|
for package in *.deb
|
2016-11-08 21:18:19 +01:00
|
|
|
do
|
2020-04-07 19:20:11 +02:00
|
|
|
echo "$package" | cut -d '_' -f 1
|
|
|
|
dpkg-deb -c "$package" | awk '{print $1 " " $2 " " $6 " " $7 " " $8}' | sort -k 3
|
2016-11-08 21:18:19 +01:00
|
|
|
echo "------------------------------------------------"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2012-01-23 12:20:16 +01:00
|
|
|
echo "Build complete"
|