When installing sys-libs/cracklib with $ROOT != /, /usr/lib/cracklib_dict.* files are not created. The ebuild calls `create-cracklib-dict /usr/share/dict/*`. "create-cracklib-dict" is a simple shell script calling one script and one binary piped together. Users running `passwd` in a system installed by `$ROOT=/foo emerge system` gets a nice error message "passwd: Critical error - immediate abort". I tried to make a patch for this, but there's a problem -- econf uses --with-default-dict='$(libdir)/cracklib_dict', which is probalby broken (the ./configure parameter is literarly $(libdir)/cracklib_dict, "libdir" (or should it be get_libdir?) isn't called, so configure probably assigns a default value. We can't, however, always use get_libdir in pkg_postinst() when using $ROOT... Ideas?
Created attachment 110410 [details, diff] cracklib-ROOT.patch (In reply to comment #0) > We can't, however, always use get_libdir in pkg_postinst() when using $ROOT... According to Pepper & blubb, that's false. The attached patch works for me on x86, even installing with ROOT=/foo where /foo is empty.
except that fails for cross-compile setups which is the most frequent consumer of ROOT!=/
This thing can use a fix.
i'll talk to upstream about getting cracklib made endian/ROOT friendly
(In reply to comment #4) > i'll talk to upstream about getting cracklib made endian/ROOT friendly Hi SpanKY, I've just hit this one again when bootstrapping a virtual image. Was there any progress in this?
Created attachment 324966 [details, diff] generate dictionary in src_install With this patch the dictionary is generated in src_install instead of pkg_postinst. It is also fixed to work for ROOT!=/ by calling programs from host's cracklib.
Created attachment 324972 [details, diff] generate dictionary in src_install Oops, that didn't work for native builds (missing "sh" when executing script).
Created attachment 324974 [details, diff] make dictionary independent of byte order This patch should make the dictionary format independent of machine endianness - always little endian. NOTE: I haven't verified if this is really the case, as I don't have any big endian system.
Created attachment 669989 [details, diff] patch for ${ROOT}/usr/lib/cracklib_dict Hello, We came across the problem with cracklib version 2.9.7. Here is our patch to allow the correct installation in ${ROOT}. However, we do not perform cross-compilation, it would be important to check this part with the current version. Would it be possible to close this issue, or at least provide an error when cracklib is installed with ${ROOT}? thank you for your consideration