kumquat-buildroot/package/libpwquality/libpwquality.mk
Danomi Manchego f09130cb49 package/libpwquality: fix PAM module path
The libpwquality package provides the pam_pwquality PAM module - the
replacement for pam_cracklib that was dropped from linux-pam back in
version 1.5.0.  However, it currently installs it to the wrong place,
so passwd and friends fail to find it.  This commit sets the security
directory path to /lib/security to match the corresponding setting in
linux-pam.mk.

Note that libpwquality has *always* installed pam_pwquality in the wrong
place, since version 1.3.0 was added to buildroot in 2017 in commit
462040443c.  However, back then, linux-pam
version 1.3.0 still provided pam_cracklib for advanced password checking.
Linux-pam deprecated pam_cracklib in 1.4.0 but still built it for us when
linux-pam.mk set --enable-cracklib.  Linux-PAM deleted pam_cracklib
altogether in 1.5.0, so it was not until our update to linux-pam-1.5.1
in commit 276f1e0a89 that pam_cracklib
became unavailable.  After that point, pam_pwquality was the only
alternative for PAM-based password checking.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 541eb8bf7db553708ff2286995ce94b38fc8d537)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-09-01 10:48:29 +02:00

47 lines
1.5 KiB
Makefile

################################################################################
#
# libpwquality
#
################################################################################
LIBPWQUALITY_VERSION = 1.4.5
LIBPWQUALITY_SOURCE = libpwquality-$(LIBPWQUALITY_VERSION).tar.bz2
LIBPWQUALITY_SITE = https://github.com/libpwquality/libpwquality/releases/download/libpwquality-$(LIBPWQUALITY_VERSION)
LIBPWQUALITY_LICENSE = BSD-3-Clause or GPL-2.0+
LIBPWQUALITY_INSTALL_STAGING = YES
LIBPWQUALITY_DEPENDENCIES = cracklib
LIBPWQUALITY_LICENSE_FILES = COPYING
# We're patching python/Makefile.am
LIBPWQUALITY_AUTORECONF = YES
ifeq ($(BR2_PACKAGE_PYTHON3),y)
LIBPWQUALITY_CONF_OPTS += --enable-python-bindings
LIBPWQUALITY_DEPENDENCIES += python3 host-python-setuptools
LIBPWQUALITY_MAKE_ENV += $(PKG_PYTHON_SETUPTOOLS_ENV)
else
LIBPWQUALITY_CONF_OPTS += --disable-python-bindings
endif
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
LIBPWQUALITY_CONF_OPTS += --enable-pam --with-securedir=/lib/security
LIBPWQUALITY_DEPENDENCIES += linux-pam
else
LIBPWQUALITY_CONF_OPTS += --disable-pam
endif
# Static link with cracklib requires -lz if zlib is enabled
ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_ZLIB),yy)
LIBPWQUALITY_CONF_ENV += LIBS="-lz"
endif
ifeq ($(BR2_PACKAGE_LIBPWQUALITY_TOOLS),)
define LIBPWQUALITY_REMOVE_TOOLS
rm -f $(TARGET_DIR)/usr/bin/pwmake
rm -f $(TARGET_DIR)/usr/bin/pwscore
endef
LIBPWQUALITY_POST_INSTALL_TARGET_HOOKS += LIBPWQUALITY_REMOVE_TOOLS
endif
$(eval $(autotools-package))