Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 167248 - sys-libs/cracklib: support ${ROOT}/usr/lib/cracklib_dict*
Summary: sys-libs/cracklib: support ${ROOT}/usr/lib/cracklib_dict*
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2007-02-16 18:52 UTC by Jan Kundrát (RETIRED)
Modified: 2020-11-04 10:54 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
cracklib-ROOT.patch (cracklib-ROOT.patch,778 bytes, patch)
2007-02-16 19:35 UTC, Jan Kundrát (RETIRED)
Details | Diff
generate dictionary in src_install (cracklib.patch,2.02 KB, patch)
2012-09-25 15:33 UTC, Ambroz Bizjak
Details | Diff
generate dictionary in src_install (cracklib.patch,2.02 KB, patch)
2012-09-25 16:01 UTC, Ambroz Bizjak
Details | Diff
make dictionary independent of byte order (cracklib-2.8.19-portable-dictionary.patch,4.44 KB, patch)
2012-09-25 16:08 UTC, Ambroz Bizjak
Details | Diff
patch for ${ROOT}/usr/lib/cracklib_dict (patch,600 bytes, patch)
2020-11-04 10:40 UTC, Jonathan Zaehringer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kundrát (RETIRED) gentoo-dev 2007-02-16 18:52:43 UTC
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?
Comment 1 Jan Kundrát (RETIRED) gentoo-dev 2007-02-16 19:35:49 UTC
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.
Comment 2 SpanKY gentoo-dev 2007-02-17 00:31:20 UTC
except that fails for cross-compile setups which is the most frequent consumer of ROOT!=/
Comment 3 Stefan de Konink 2007-10-25 20:56:14 UTC
This thing can use a fix.
Comment 4 SpanKY gentoo-dev 2008-02-24 10:49:04 UTC
i'll talk to upstream about getting cracklib made endian/ROOT friendly
Comment 5 Jan Kundrát (RETIRED) gentoo-dev 2011-02-24 12:43:15 UTC
(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?
Comment 6 Ambroz Bizjak 2012-09-25 15:33:41 UTC
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.
Comment 7 Ambroz Bizjak 2012-09-25 16:01:20 UTC
Created attachment 324972 [details, diff]
generate dictionary in src_install

Oops, that didn't work for native builds (missing "sh" when executing script).
Comment 8 Ambroz Bizjak 2012-09-25 16:08:43 UTC
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.
Comment 9 Jonathan Zaehringer 2020-11-04 10:40:08 UTC
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