Bug 67564 - Add cracklib support to APG
Bug#: 67564 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: seemant@gentoo.org Reported By: beolach@gmail.com
Component: Ebuilds
URL:  http://www.adel.nursat.kz/apg/index.shtml
Summary: Add cracklib support to APG
Keywords:  
Status Whiteboard: 
Opened: 2004-10-14 09:57 0000
Description:   Opened: 2004-10-14 09:57 0000
APG version 2.3.0b has optional compile time support for cracklib, but the
current apg-2.3.0b.ebuild does not use it.  From apg's man page "-k    check 
every  generated password using cracklib. To use this ability you must enable
cracklib support during programm building."  So I created this ebuild to add a
USE flag for cracklib support in APG.  This is my first time doing anything w/
ebuilds, but this seemed like a fairly simple thing, and this ebuild works for
me.  If the USE flag is specified at emerge, it applies a patch to APG's
Makefile to enable the cracklib support.

Reproducible: Always
Steps to Reproduce:
apg -k
Actual Results:  
apg: unknown option -k

Expected Results:  
Generated passwords checked against cracklib to ensure strong passwords.

The one biggest thing I was unsure of was in my patched Makefile to enable
cracklib support one of the envirement variables required is CRACKLIB_DICTPATH,
which should be whatever DICTPATH was when cracklib was installed.  In
cracklib-2.7-r10 this was "/usr/lib/cracklib_dict".  I wasn't sure if there was
any way to check for any other possible DICTPATH at compile time (or even if it
would be necessary to), so I just hardcoded it to "/usr/lib/cracklib_dict".

------- Comment #1 From Conway S. Smith 2004-10-14 09:59:35 0000 -------
Created an attachment (id=41811) [details]
APG ebuild w/ cracklib USE flag

------- Comment #2 From Conway S. Smith 2004-10-14 10:00:44 0000 -------
Created an attachment (id=41812) [details]
APG Makefile patch to enable cracklib support.

Goes in /usr/portage/app-admin/apg/files/

------- Comment #3 From Conway S. Smith 2004-10-14 10:02:57 0000 -------
Oh, and I guess something like this should go into
/usr/portage/profiles/use.local.desc
app-admin/apg:cracklib - Support for cracklib strong password checking

------- Comment #4 From Seemant Kulleen (RETIRED) 2004-10-15 11:14:45 0000 -------
Rob, I need help with this -- TaD's not with gentoo any more due to his real
life obligations.

------- Comment #5 From Seemant Kulleen (RETIRED) 2004-12-30 13:37:32 0000 -------
thanks Conway, in portage.