Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] cracklib: generate the default dictionary on the target
@ 2013-04-25 13:28 Martin Donnelly
  2013-04-25 14:25 ` Mark Hatle
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Donnelly @ 2013-04-25 13:28 UTC (permalink / raw)
  To: openembedded-core

Currently cracklib-native is used to generate the dictionary
database from the wordlist during install. Unfortunately the
database files are endian-specific and this results in
errors when the host and target endianness differ.

This patch creates the default dictionary files on the target
during post-install. In order to do this the default wordlist has
also been compressed, this enables an unmodified cracklib-format
to correctly parse the input file with both busybox and GNU gzip.
(These behave differently if the input is uncompressed, GNU
gzip behaves like cat while busybox returns an error).

Finally the cracklib-native package has been removed since
it is no longer used.

Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
---
 meta/recipes-extended/cracklib/cracklib_2.8.22.bb |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-extended/cracklib/cracklib_2.8.22.bb b/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
index 7e398f4..9ebca33 100644
--- a/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
+++ b/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
@@ -4,8 +4,7 @@ HOMEPAGE = "http://sourceforge.net/projects/cracklib"
 LICENSE = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
 
-DEPENDS = "cracklib-native zlib"
-DEPENDS_class-native = "zlib"
+DEPENDS = "zlib"
 PR ="r0"
 
 EXTRA_OECONF = "--without-python"
@@ -17,8 +16,14 @@ SRC_URI[sha256sum] = "feaff49bfb513ec10b2618c00d2f7f60776ba93fcc5fa22dd3479dd9ca
 
 inherit autotools gettext
 
-BBCLASSEXTEND = "native"
-
 do_install_append_class-target() {
-	create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small
+	gzip ${D}${datadir}/cracklib/cracklib-small
+}
+
+pkg_postinst_${PN} () {
+if [ "x$D" = "x" ]; then
+	create-cracklib-dict -o ${datadir}/cracklib/pw_dict ${datadir}/cracklib/cracklib-small.gz >/dev/null
+else
+	exit 1
+fi
 }
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-25 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 13:28 [PATCH] cracklib: generate the default dictionary on the target Martin Donnelly
2013-04-25 14:25 ` Mark Hatle
2013-04-25 15:37   ` Martin Donnelly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox