* [PATCH] cracklib: Generate compiled dict using default dictionary
@ 2013-03-08 13:10 Colin Walters
2013-03-09 6:34 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Colin Walters @ 2013-03-08 13:10 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
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>
---
meta/recipes-extended/cracklib/cracklib_2.8.22.bb | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
[-- Attachment #2: 0001-cracklib-Generate-compiled-dict-using-default-dictio.patch --]
[-- Type: text/x-patch, Size: 1973 bytes --]
From 6d47136d108d4063e3faa9c91de33710a5a66855 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Thu, 7 Mar 2013 18:45:22 -0500
Subject: [PATCH] cracklib: Generate compiled dict using default dictionary
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>
---
meta/recipes-extended/cracklib/cracklib_2.8.22.bb | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/cracklib/cracklib_2.8.22.bb b/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
index 1ae1aca..63d4c24 100644
--- a/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
+++ b/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
@@ -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,12 @@ SRC_URI[md5sum] = "463177b5c29c7a598c991e12a4898e06"
SRC_URI[sha256sum] = "feaff49bfb513ec10b2618c00d2f7f60776ba93fcc5fa22dd3479dd9cad9f770"
inherit autotools gettext
+
+BBCLASSEXTEND = "native"
+
+do_install_append() {
+ create-cracklib-dict -o ${D}${datadir}/cracklib/pw_dict ${D}${datadir}/cracklib/cracklib-small
+}
+
+do_install_append_virtclass-native() {
+}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] cracklib: Generate compiled dict using default dictionary
2013-03-08 13:10 [PATCH] cracklib: Generate compiled dict using default dictionary Colin Walters
@ 2013-03-09 6:34 ` Richard Purdie
2013-03-10 15:05 ` Colin Walters
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2013-03-09 6:34 UTC (permalink / raw)
To: Colin Walters; +Cc: openembedded-core
On Fri, 2013-03-08 at 08:10 -0500, Colin Walters wrote:
> 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>
> ---
> meta/recipes-extended/cracklib/cracklib_2.8.22.bb | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
The patch doesn't quite do what you think it does. The _appends() stack,
not override and hence the native append is empty. You probably want to
do a:
do_install_append_class-target () {
....
}
(class not virtclass, virtclass is deprecated)
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] cracklib: Generate compiled dict using default dictionary
2013-03-09 6:34 ` Richard Purdie
@ 2013-03-10 15:05 ` Colin Walters
0 siblings, 0 replies; 3+ messages in thread
From: Colin Walters @ 2013-03-10 15:05 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
On Sat, 2013-03-09 at 06:34 +0000, Richard Purdie wrote:
> The patch doesn't quite do what you think it does. The _appends() stack,
> not override and hence the native append is empty. You probably want to
> do a:
>
> do_install_append_class-target () {
> ....
> }
Ah, thanks. Something like this then?
[-- Attachment #2: 0001-cracklib-Generate-compiled-dict-using-default-dictio.patch --]
[-- Type: text/x-patch, Size: 1932 bytes --]
From eff8b0f119ca94dea362d7df04824789ae8b61cb Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Thu, 7 Mar 2013 18:45:22 -0500
Subject: [PATCH] cracklib: Generate compiled dict using default dictionary
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>
---
meta/recipes-extended/cracklib/cracklib_2.8.22.bb | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/cracklib/cracklib_2.8.22.bb b/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
index 1ae1aca..7e398f4 100644
--- a/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
+++ b/meta/recipes-extended/cracklib/cracklib_2.8.22.bb
@@ -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
+}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-10 15:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-08 13:10 [PATCH] cracklib: Generate compiled dict using default dictionary Colin Walters
2013-03-09 6:34 ` Richard Purdie
2013-03-10 15:05 ` Colin Walters
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox