summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-02-16 23:18:32 +0100
committerSergei Golubchik <serg@mariadb.org>2015-02-17 23:49:56 +0100
commit11536f99f14a2fedb822abb6be3a6ad79ad3abc9 (patch)
treeca21193ce7e0220f47d6efb475cb581f610e3253
parent87eb82d4d52dd9ed1c954b0068898a4ec7a02df2 (diff)
downloadmariadb-git-11536f99f14a2fedb822abb6be3a6ad79ad3abc9.tar.gz
MDEV-7305 Difficulties building cracklib_password_check
put cracklib_password_check into a separate package. build it conditionally on Debian/Ubuntu
-rwxr-xr-xdebian/autobake-deb.sh12
-rw-r--r--debian/dist/Debian/control9
-rw-r--r--debian/dist/Ubuntu/control9
-rw-r--r--debian/mariadb-cracklib-password-check-10.1.files1
-rw-r--r--plugin/cracklib_password_check/CMakeLists.txt7
5 files changed, 33 insertions, 5 deletions
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh
index 5189b5d3856..d5cbb4ed51e 100755
--- a/debian/autobake-deb.sh
+++ b/debian/autobake-deb.sh
@@ -15,7 +15,7 @@ set -e
# Buildbot, running the test suite from installed .debs on a clean VM.
export DEB_BUILD_OPTIONS="nocheck"
-#export MARIADB_OPTIONAL_DEBS="tokudb-engine"
+export MARIADB_OPTIONAL_DEBS=""
# Find major.minor version.
#
@@ -38,6 +38,15 @@ case "${CODENAME}" in
*) LIBREADLINE_DEV=libreadline-gplv2-dev ;;
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
# new links.
@@ -56,6 +65,7 @@ DISTROFILES="$(ls ./debian/dist/${DISTRO})"
for distrofile in ${DISTROFILES}; do
rm -f "./debian/${distrofile}"
sed -e "s/\\\${LIBREADLINE_DEV}/${LIBREADLINE_DEV}/g" \
+ -e "s/\\\${MAYBE_LIBCRACK}/${MAYBE_LIBCRACK}/g" \
< "./debian/dist/${DISTRO}/${distrofile}" > "./debian/${distrofile}"
chmod --reference="./debian/dist/${DISTRO}/${distrofile}" "./debian/${distrofile}"
done;
diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control
index a35a8fc011c..3ef1ee6fde7 100644
--- a/debian/dist/Debian/control
+++ b/debian/dist/Debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
XSBC-Original-Maintainer: Maria 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
Homepage: http://mariadb.org/
Vcs-Browser: https://github.com/MariaDB/server/tree/10.1/
@@ -268,3 +268,10 @@ Description: Oqgraph storage engine for MariaDB
The OQGRAPH engine is a computation engine plugin for handling hierarchies
(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.
diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control
index 71f700b409f..2f86d671cae 100644
--- a/debian/dist/Ubuntu/control
+++ b/debian/dist/Ubuntu/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
XSBC-Original-Maintainer: Maria 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
Homepage: http://mariadb.org/
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/10.1/files
@@ -262,3 +262,10 @@ Description: Oqgraph storage engine for MariaDB
The OQGRAPH engine is a computation engine plugin for handling hierarchies
(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.
diff --git a/debian/mariadb-cracklib-password-check-10.1.files b/debian/mariadb-cracklib-password-check-10.1.files
new file mode 100644
index 00000000000..3fe06639703
--- /dev/null
+++ b/debian/mariadb-cracklib-password-check-10.1.files
@@ -0,0 +1 @@
+usr/lib/mysql/plugin/cracklib_password_check.so
diff --git a/plugin/cracklib_password_check/CMakeLists.txt b/plugin/cracklib_password_check/CMakeLists.txt
index a57ad240d64..81db865eae0 100644
--- a/plugin/cracklib_password_check/CMakeLists.txt
+++ b/plugin/cracklib_password_check/CMakeLists.txt
@@ -1,10 +1,13 @@
INCLUDE (CheckIncludeFiles)
INCLUDE (CheckLibraryExists)
-CHECK_INCLUDE_FILES (crack.h HAVE_CRACK_H)
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)
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()