mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
MDEV-7305 Difficulties building cracklib_password_check
put cracklib_password_check into a separate package. build it conditionally on Debian/Ubuntu
This commit is contained in:
12
debian/autobake-deb.sh
vendored
12
debian/autobake-deb.sh
vendored
@@ -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;
|
||||
|
||||
9
debian/dist/Debian/control
vendored
9
debian/dist/Debian/control
vendored
@@ -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.
|
||||
|
||||
9
debian/dist/Ubuntu/control
vendored
9
debian/dist/Ubuntu/control
vendored
@@ -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.
|
||||
|
||||
1
debian/mariadb-cracklib-password-check-10.1.files
vendored
Normal file
1
debian/mariadb-cracklib-password-check-10.1.files
vendored
Normal file
@@ -0,0 +1 @@
|
||||
usr/lib/mysql/plugin/cracklib_password_check.so
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user