Commit 11536f99 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-7305 Difficulties building cracklib_password_check

put cracklib_password_check into a separate package.
build it conditionally on Debian/Ubuntu
parent 87eb82d4
...@@ -15,7 +15,7 @@ set -e ...@@ -15,7 +15,7 @@ set -e
# Buildbot, running the test suite from installed .debs on a clean VM. # Buildbot, running the test suite from installed .debs on a clean VM.
export DEB_BUILD_OPTIONS="nocheck" export DEB_BUILD_OPTIONS="nocheck"
#export MARIADB_OPTIONAL_DEBS="tokudb-engine" export MARIADB_OPTIONAL_DEBS=""
# Find major.minor version. # Find major.minor version.
# #
...@@ -38,6 +38,15 @@ case "${CODENAME}" in ...@@ -38,6 +38,15 @@ case "${CODENAME}" in
*) LIBREADLINE_DEV=libreadline-gplv2-dev ;; *) LIBREADLINE_DEV=libreadline-gplv2-dev ;;
esac esac
# add libcrack2 (>= 2.9.0) as a build dependency
# but only where the distribution can possibly satisfy it
if apt-cache madison cracklib2|grep 'cracklib2 *| *2\.[0-8]\.' >/dev/null 2>&1
then
MAYBE_LIBCRACK=''
MARIADB_OPTIONAL_DEBS="${MARIADB_OPTIONAL_DEBS} cracklib-password-check-10.1"
else
MAYBE_LIBCRACK='libcrack2-dev (>= 2.9.0),'
fi
# Clean up build file symlinks that are distro-specific. First remove all, then set # Clean up build file symlinks that are distro-specific. First remove all, then set
# new links. # new links.
...@@ -56,6 +65,7 @@ DISTROFILES="$(ls ./debian/dist/${DISTRO})" ...@@ -56,6 +65,7 @@ DISTROFILES="$(ls ./debian/dist/${DISTRO})"
for distrofile in ${DISTROFILES}; do for distrofile in ${DISTROFILES}; do
rm -f "./debian/${distrofile}" rm -f "./debian/${distrofile}"
sed -e "s/\\\${LIBREADLINE_DEV}/${LIBREADLINE_DEV}/g" \ sed -e "s/\\\${LIBREADLINE_DEV}/${LIBREADLINE_DEV}/g" \
-e "s/\\\${MAYBE_LIBCRACK}/${MAYBE_LIBCRACK}/g" \
< "./debian/dist/${DISTRO}/${distrofile}" > "./debian/${distrofile}" < "./debian/dist/${DISTRO}/${distrofile}" > "./debian/${distrofile}"
chmod --reference="./debian/dist/${DISTRO}/${distrofile}" "./debian/${distrofile}" chmod --reference="./debian/dist/${DISTRO}/${distrofile}" "./debian/${distrofile}"
done; done;
......
...@@ -4,7 +4,7 @@ Priority: optional ...@@ -4,7 +4,7 @@ Priority: optional
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net> Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net> XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net> Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, cmake (>= 2.7), libaio-dev, libjemalloc-dev (>= 3.0.0) Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, cmake (>= 2.7), libaio-dev, ${MAYBE_LIBCRACK} libjemalloc-dev (>= 3.0.0)
Standards-Version: 3.8.3 Standards-Version: 3.8.3
Homepage: http://mariadb.org/ Homepage: http://mariadb.org/
Vcs-Browser: https://github.com/MariaDB/server/tree/10.1/ Vcs-Browser: https://github.com/MariaDB/server/tree/10.1/
...@@ -268,3 +268,10 @@ Description: Oqgraph storage engine for MariaDB ...@@ -268,3 +268,10 @@ Description: Oqgraph storage engine for MariaDB
The OQGRAPH engine is a computation engine plugin for handling hierarchies The OQGRAPH engine is a computation engine plugin for handling hierarchies
(trees) and graphs (friend-of-a-friend, etc) cleanly through standard SQL. (trees) and graphs (friend-of-a-friend, etc) cleanly through standard SQL.
Package: mariadb-cracklib-password-check-10.1
Section: database
Architecture: any
Depends: mariadb-server-10.1, libcrack2 (>= 2.9.0)
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.
...@@ -4,7 +4,7 @@ Priority: optional ...@@ -4,7 +4,7 @@ Priority: optional
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net> Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net> XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net> Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, cmake (>= 2.7), libaio-dev, libjemalloc-dev (>= 3.0.0) Build-Depends: libtool (>= 1.4.2-7), procps | hurd, debhelper, file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV}, libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, ghostscript | gs-gpl, dpatch, gawk, bison, lsb-release, hardening-wrapper, cmake (>= 2.7), libaio-dev, ${MAYBE_LIBCRACK} libjemalloc-dev (>= 3.0.0)
Standards-Version: 3.8.2 Standards-Version: 3.8.2
Homepage: http://mariadb.org/ Homepage: http://mariadb.org/
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/10.1/files Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/10.1/files
...@@ -262,3 +262,10 @@ Description: Oqgraph storage engine for MariaDB ...@@ -262,3 +262,10 @@ Description: Oqgraph storage engine for MariaDB
The OQGRAPH engine is a computation engine plugin for handling hierarchies The OQGRAPH engine is a computation engine plugin for handling hierarchies
(trees) and graphs (friend-of-a-friend, etc) cleanly through standard SQL. (trees) and graphs (friend-of-a-friend, etc) cleanly through standard SQL.
Package: mariadb-cracklib-password-check-10.1
Section: database
Architecture: any
Depends: mariadb-server-10.1, libcrack2 (>= 2.9.0)
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.
usr/lib/mysql/plugin/cracklib_password_check.so
INCLUDE (CheckIncludeFiles) INCLUDE (CheckIncludeFiles)
INCLUDE (CheckLibraryExists) INCLUDE (CheckLibraryExists)
CHECK_INCLUDE_FILES (crack.h HAVE_CRACK_H)
CHECK_LIBRARY_EXISTS(crack FascistCheckUser "" HAVE_LIBCRACK) CHECK_LIBRARY_EXISTS(crack FascistCheckUser "" HAVE_LIBCRACK)
SET(CMAKE_REQUIRED_DEFINITIONS -Dsize_t=int) # debian hack, debian bug.
CHECK_INCLUDE_FILES (crack.h HAVE_CRACK_H)
IF (HAVE_ALLOCA_H AND HAVE_CRACK_H AND HAVE_LIBCRACK AND HAVE_MEMCPY) IF (HAVE_ALLOCA_H AND HAVE_CRACK_H AND HAVE_LIBCRACK AND HAVE_MEMCPY)
MYSQL_ADD_PLUGIN(cracklib_password_check cracklib_password_check.c MYSQL_ADD_PLUGIN(cracklib_password_check cracklib_password_check.c
LINK_LIBRARIES crack MODULE_ONLY) LINK_LIBRARIES crack MODULE_ONLY
COMPONENT cracklib-password-check)
ENDIF() ENDIF()
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