]> code.ossystems Code Review - openembedded-core.git/commitdiff
cracklib: Generate compiled dict using default dictionary
authorColin Walters <walters@verbum.org>
Thu, 7 Mar 2013 23:45:22 +0000 (18:45 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Mar 2013 13:17:38 +0000 (13:17 +0000)
While cracklib compiles, the generated library's FascistCheck() API
will look for the default compiled dictionary, fail to find it, and
invoke exit(1), which then in turn breaks gnome-initial-setup that
uses cracklib via libpwquality.  (Quality here obviously referring to
the password, and not the libraries...)

What we do here is basically the same as what happens in the current
Fedora spec file, except the latter uses a far larger dictionary.

To make this work, we need to build cracklib-native because the
dictionary compiler is written in native code.

Signed-off-by: Colin Walters <walters@verbum.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-extended/cracklib/cracklib_2.8.22.bb

index 1ae1aca93a68a9336c5aa7ad9144ed7f257e82ca..7e398f4e5c722e02323dd75dcbd10f7d8f02ae35 100644 (file)
@@ -4,7 +4,8 @@ HOMEPAGE = "http://sourceforge.net/projects/cracklib"
 LICENSE = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
 
-DEPENDS = "zlib"
+DEPENDS = "cracklib-native zlib"
+DEPENDS_class-native = "zlib"
 PR ="r0"
 
 EXTRA_OECONF = "--without-python"
@@ -15,3 +16,9 @@ SRC_URI[md5sum] = "463177b5c29c7a598c991e12a4898e06"
 SRC_URI[sha256sum] = "feaff49bfb513ec10b2618c00d2f7f60776ba93fcc5fa22dd3479dd9cad9f770"
 
 inherit autotools gettext
+
+BBCLASSEXTEND = "native"
+
+do_install_append_class-target() {
+       create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small
+}