diff options
author | Otto Kekäläinen <otto@mariadb.org> | 2016-10-06 19:30:20 +0300 |
---|---|---|
committer | Otto Kekäläinen <otto@mariadb.org> | 2016-10-07 15:32:59 +0300 |
commit | 1369696b8a194c8dbaf8d92a8b1f46309740d1f9 (patch) | |
tree | fd50f70123f248ec23cb7a71c70cfeba0e9f5f0f /debian | |
parent | 44dd9a534a477119e52ebaf8b6152b1d14c51b61 (diff) | |
download | mariadb-git-1369696b8a194c8dbaf8d92a8b1f46309740d1f9.tar.gz |
Deb: Re-factor conditional build dependency checking and injecting
Now we check if a dependency is available and not just if older versions
are available. Also use correct name of libcrack2 to actually detect it.
Use sed to inject dependency at the end of the dependency list.
Otherwise keep the control line clean and parseable by Debian tools.
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/autobake-deb.sh | 39 | ||||
-rw-r--r-- | debian/control | 11 |
2 files changed, 26 insertions, 24 deletions
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index b597ec036b3..60ba21fa279 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -37,20 +37,33 @@ LOGSTRING="MariaDB build" CODENAME="$(lsb_release -sc)" -# add libcrack2 (>= 2.9.0) as a build dependency -# but only where the distribution can possibly satisfy it and if not on Travis-CI -if $TRAVIS || apt-cache madison cracklib2|grep 'cracklib2 *| *2\.[0-8]\.' >/dev/null 2>&1 +# Add libcrack2 (>= 2.9.0) as a build dependency if available in the distribution +# This matches Debian Jessie, Stretch and Ubuntu Trusty, Wily, Xenial, Yakkety +# Update check when version 2.10 or newer is available. +# On Travis-CI never build cracklib, as it is forbidden on Travis-CI.org +if [[ ! $TRAVIS ]] && apt-cache madison libcrack2-dev | grep 'libcrack2-dev *| *2\.9' >/dev/null 2>&1 then - # Anything in MARIADB_OPTIONAL_DEBS is omitted from the resulting - # packages by snipped in rules file - MARIADB_OPTIONAL_DEBS="${MARIADB_OPTIONAL_DEBS} cracklib-password-check-10.2" - sed -i -e "/\\\${MAYBE_LIBCRACK}/d" debian/control - # Remove package entry from control file completely so that - # resulting Debian source package will actually be buildable - sed -i -e "/Package: mariadb-cracklib-password-check/,+6d" debian/control -else - MAYBE_LIBCRACK='libcrack2-dev (>= 2.9.0),' - sed -i -e "s/\\\${MAYBE_LIBCRACK}/${MAYBE_LIBCRACK}/g" debian/control + sed 's/Standards-Version/,libcrack2-dev (>= 2.9.0)\nStandards-Version/' debian/control + cat <<EOT >> debian/control + +Package: mariadb-cracklib-password-check-10.2 +Architecture: any +Depends: libcrack2 (>= 2.9.0), + mariadb-server-10.2, + \${misc:Depends}, + \${shlibs:Depends} +Description: CrackLib Password Validation Plugin for MariaDB + This password validation plugin uses cracklib to allow only + sufficiently secure (as defined by cracklib) user passwords in MariaDB. +EOT +fi + +# Add libpcre3-dev (>= 2:8.35-3.2~) as a build dependency if available in the distribution +# This matches Debian Jessie, Stretch and Ubuntu Wily, Xenial, Yakkety +# Update check when version 2:8.40 or newer is available. +if apt-cache madison libpcre3-dev | grep 'libpcre3-dev *| *2:8\.3[2-9]' >/dev/null 2>&1 +then + sed 's/Standards-Version/,libpcre3-dev (>= 2:8.35-3.2~)\nStandards-Version/' debian/control fi # Adjust changelog, add new version. diff --git a/debian/control b/debian/control index 73abd8dd2cb..0c34ae61b7e 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,6 @@ Build-Depends: bison, po-debconf, psmisc, unixodbc-dev, - ${MAYBE_LIBCRACK} zlib1g-dev (>= 1:1.1.3-5~) Standards-Version: 3.8.2 Homepage: http://mariadb.org/ @@ -434,16 +433,6 @@ Description: OQGraph storage engine for MariaDB (trees) and graphs (friend-of-a-friend, etc) cleanly through standard SQL. This package contains the OQGraph plugin for MariaDB. -Package: mariadb-cracklib-password-check-10.2 -Architecture: any -Depends: libcrack2 (>= 2.9.0), - mariadb-server-10.2, - ${misc:Depends}, - ${shlibs:Depends} -Description: CrackLib Password Validation Plugin for MariaDB - This password validation plugin uses cracklib to allow only - sufficiently secure (as defined by cracklib) user passwords in MariaDB. - Package: mariadb-gssapi-server-10.2 Architecture: any Depends: libgssapi-krb5-2, |