2017-05-05 14:35:26 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# cracklib
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2023-12-30 17:38:44 +01:00
|
|
|
CRACKLIB_VERSION = 2.9.11
|
|
|
|
CRACKLIB_SOURCE = cracklib-$(CRACKLIB_VERSION).tar.xz
|
2019-03-11 19:42:35 +01:00
|
|
|
CRACKLIB_SITE = https://github.com/cracklib/cracklib/releases/download/v$(CRACKLIB_VERSION)
|
2017-05-05 14:35:26 +02:00
|
|
|
CRACKLIB_LICENSE = LGPL-2.1
|
|
|
|
CRACKLIB_LICENSE_FILES = COPYING.LIB
|
package: switch to _CPE_ID_VALID
Now that we document _CPE_ID_VALID, and that it shall be used instead of
setting a default value to one of the other _CPE_ID_* variables, change
all of the existing packages to use it, to avoid any error when we later
extend check-package to validate the sanity ofthe _CPE_ID_* variables.
Mechanical change done within the reference container, running the new
check in check-package, to report the CPE_ID errors:
$ make check-package 2>/dev/null \
|awk '{
split($(1), a, ":"); fname = a[1]
split($(2), a, "'\''"); val = a[2]
new_var = $(8); gsub("_CPE_ID_.*", "_CPE_ID_VALID", new_var)
printf("%s %s %s %s\n", fname, $(8), val, new_var)
}' \
|while read fname var val new_var; do
sed -r -i -e "s/${var}[[:space:]]*=[[:space:]]*${val}/${new_var} = YES/" "${fname}"
done
$ git diff -I'CPE_ID_(VENDOR|VALID)'
[empty]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-10 22:24:58 +01:00
|
|
|
CRACKLIB_CPE_ID_VALID = YES
|
2017-05-05 14:35:26 +02:00
|
|
|
CRACKLIB_INSTALL_STAGING = YES
|
2019-05-09 22:43:40 +02:00
|
|
|
CRACKLIB_DEPENDENCIES = host-cracklib $(TARGET_NLS_DEPENDENCIES)
|
|
|
|
CRACKLIB_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
|
2017-05-05 14:35:26 +02:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
CRACKLIB_CONF_OPTS += --with-zlib
|
|
|
|
CRACKLIB_DEPENDENCIES += zlib
|
|
|
|
else
|
|
|
|
CRACKLIB_CONF_OPTS += --without-zlib
|
|
|
|
endif
|
|
|
|
|
2022-02-09 17:50:33 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
2017-05-05 14:35:26 +02:00
|
|
|
CRACKLIB_CONF_OPTS += --with-python
|
2022-02-09 17:50:33 +01:00
|
|
|
CRACKLIB_CONF_ENV += \
|
|
|
|
ac_cv_path_PYTHON=$(HOST_DIR)/bin/python3 \
|
|
|
|
am_cv_python_version=$(PYTHON3_VERSION_MAJOR)
|
|
|
|
CRACKLIB_DEPENDENCIES += python3
|
2017-05-05 14:35:26 +02:00
|
|
|
else
|
|
|
|
CRACKLIB_CONF_OPTS += --without-python
|
|
|
|
endif
|
|
|
|
|
|
|
|
HOST_CRACKLIB_CONF_OPTS += --without-python --without-zlib
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_CRACKLIB_FULL_DICT),y)
|
2023-12-30 17:38:44 +01:00
|
|
|
CRACKLIB_EXTRA_DOWNLOADS = cracklib-words-$(CRACKLIB_VERSION).xz
|
|
|
|
CRACKLIB_DICT_SOURCE = $(CRACKLIB_DL_DIR)/cracklib-words-$(CRACKLIB_VERSION).xz
|
2017-05-05 14:35:26 +02:00
|
|
|
else
|
|
|
|
CRACKLIB_DICT_SOURCE = $(@D)/dicts/cracklib-small
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_CRACKLIB_TOOLS),)
|
|
|
|
define CRACKLIB_REMOVE_TOOLS
|
|
|
|
rm -f $(TARGET_DIR)/usr/sbin/*cracklib*
|
|
|
|
endef
|
|
|
|
CRACKLIB_POST_INSTALL_TARGET_HOOKS += CRACKLIB_REMOVE_TOOLS
|
|
|
|
endif
|
|
|
|
|
|
|
|
define CRACKLIB_BUILD_DICT
|
|
|
|
$(HOST_MAKE_ENV) cracklib-format $(CRACKLIB_DICT_SOURCE) | \
|
|
|
|
$(HOST_MAKE_ENV) cracklib-packer $(TARGET_DIR)/usr/share/cracklib/pw_dict
|
|
|
|
rm $(TARGET_DIR)/usr/share/cracklib/cracklib-small
|
|
|
|
endef
|
|
|
|
CRACKLIB_POST_INSTALL_TARGET_HOOKS += CRACKLIB_BUILD_DICT
|
|
|
|
|
|
|
|
$(eval $(autotools-package))
|
|
|
|
$(eval $(host-autotools-package))
|