From 35cb5b446cbbffa6729e5d55d81c224ed56d06d9 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 25 Mar 2022 17:25:11 +1100 Subject: [PATCH] MDEV-28153: Debian autobake to generate control Without doing the full build. Autobake now includes a dependency on lsb-release. As the BB CI images (https://github.com/MariaDB/mariadb.org-tools/blob/master/buildbot.mariadb.org/ci_build_images/debian.Dockerfile) have explicit dependencies, there's no point maintaining them in two places. We don't want do the full autobake-deb.sh there, just enough to have the control file containing the correct dependencies. Helps: https://github.com/MariaDB/mariadb.org-tools/pull/130 --- debian/autobake-deb.sh | 14 +++++++++++--- debian/salsa-ci.yml | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index 08c83a8634961..50d839439e599 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -30,9 +30,12 @@ then # build is not running on Travis or Gitlab-CI sed '/-DPLUGIN_COLUMNSTORE=NO/d' -i debian/rules # Take the files and part of control from MCS directory - cp -v storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.* debian/ - echo >> debian/control - cat storage/columnstore/columnstore/debian/control >> debian/control + if [ ! -f debian/mariadb-plugin-columnstore.install ] + then + cp -v storage/columnstore/columnstore/debian/mariadb-plugin-columnstore.* debian/ + echo >> debian/control + cat storage/columnstore/columnstore/debian/control >> debian/control + fi fi # Look up distro-version specific stuff @@ -91,6 +94,11 @@ case "${CODENAME}" in exit 1 esac +if [ -n "${AUTOBAKE_PREP_CONTROL_RULES_ONLY:-}" ] +then + exit 0 +fi + # Adjust changelog, add new version echo "Incrementing changelog and starting build scripts" diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index 24f59aae22171..6fc90193e0600 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -34,7 +34,7 @@ build: - mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR} # Run Salsa-CI .build-script equivalent, with extra devscripts so autobake-deb.sh can run 'dch' - export CCACHE_DIR=${CCACHE_TMP_DIR} - - apt-get update && eatmydata apt-get install --no-install-recommends -y ccache fakeroot build-essential devscripts + - apt-get update && eatmydata apt-get install --no-install-recommends -y ccache fakeroot build-essential devscripts lsb-release - cd ${WORKING_DIR}/${SOURCE_DIR} - eatmydata apt-get build-dep --no-install-recommends -y . - update-ccache-symlinks; ccache -z # Zero out ccache counters