# Note: if you change CRACKLIB_DICT_PATH you have to change it in the # pam cracklib module as well %define CRACKLIB_DICT_PATH %{_datadir}/dict %define CRACKLIB_DICT_PATHNAME %{CRACKLIB_DICT_PATH}/cracklib_dict Name: cracklib Version: 2.9.0 Release: 1mamba Summary: A password-checking library Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco Source0: http://downloads.sourceforge.net/sourceforge/cracklib/cracklib-%{version}.tar.gz Patch0: cracklib-2.7-redhat.patch.bz2 URL: http://sourceforge.net/projects/cracklib License: Artistic BuildRoot: %{_tmppath}/%{name}-%{version}-build %if "%{_build}" == "%{_host}" BuildRequires: python >= 2.4.4 %endif %description CrackLib tests passwords to determine whether they match certain security-oriented characteristics. You can use CrackLib to stop users from choosing passwords which would be easy to guess. CrackLib performs certain tests: * It tries to generate words from a username and gecos entry and checks those words against the password; * It checks for simplistic patterns in passwords; * It checks for the password in a dictionary. CrackLib is actually a library containing a particular C function which is used to check the password, as well as other C functions. CrackLib is not a replacement for a passwd program; it must be used in conjunction with an existing passwd program. Install the cracklib package if you need a program to check users' passwords to see if they are at least minimally secure. If you install CrackLib, you'll also want to install the cracklib-dicts package. %package -n libcrack Summary: A password-checking library Group: System/Libraries Obsoletes: cracklib Provides: cracklib == %{version} Requires: libcrack-dicts == %{version}-%{release} %description -n libcrack CrackLib tests passwords to determine whether they match certain security-oriented characteristics. You can use CrackLib to stop users from choosing passwords which would be easy to guess. CrackLib performs certain tests: * It tries to generate words from a username and gecos entry and checks those words against the password; * It checks for simplistic patterns in passwords; * It checks for the password in a dictionary. CrackLib is actually a library containing a particular C function which is used to check the password, as well as other C functions. CrackLib is not a replacement for a passwd program; it must be used in conjunction with an existing passwd program. Install the cracklib package if you need a program to check users' passwords to see if they are at least minimally secure. If you install CrackLib, you'll also want to install the cracklib-dicts package. %package -n libcrack-devel Summary: cracklib link library & header file Group: Development/Libraries Requires: libcrack = %{version}-%{release} Obsoletes: cracklib-devel Provides: cracklib-devel == %{version} %description -n libcrack-devel The cracklib devel package include the needed library link and header files for development. %package -n libcrack-dicts Summary: The standard CrackLib dictionaries Group: System/Libraries Obsoletes: cracklib-dicts Provides: cracklib-dicts == %{version} %description -n libcrack-dicts The cracklib-dicts package includes the CrackLib dictionaries. CrackLib will need to use the dictionary appropriate to your system, which is normally put in /usr/share/dict/words. Cracklib-dicts also contains the utilities necessary for the creation of new dictionaries. If you are installing CrackLib, you should also install cracklib-dicts. %package -n python-cracklib Summary: Python cracklib library module Group: System/Libraries Requires: libcrack = %{version} %description -n python-cracklib Python cracklib library module. %prep %setup -q chmod +x util/cracklib-format %build %configure %make DEFAULT_CRACKLIB_DICT=%{CRACKLIB_DICT_PATHNAME} %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} #install -d %{buildroot}%{_includedir} #install -d %{buildroot}%{_libdir} #install -d %{buildroot}%{_sbindir} #install -m 644 %{SOURCE1} %{buildroot}%{_libdir}/pw_dict %makeinstall DEFAULT_CRACKLIB_DICT=%{CRACKLIB_DICT_PATHNAME} # install dict mkdir -p %{buildroot}%{CRACKLIB_DICT_PATH} make -C util clean %if "%{_build}" != "%{_host}" make -C util DEFAULT_CRACKLIB_DICT=%{buildroot}%{CRACKLIB_DICT_PATHNAME} CC=%{_build}-gcc LDADD="-lcrack" export PATH=%{_sbindir}:%{_bindir}:./util:$PATH ./util/create-cracklib-dict -o %{buildroot}%{CRACKLIB_DICT_PATHNAME} ./dicts/* %else make dict DEFAULT_CRACKLIB_DICT=%{buildroot}%{CRACKLIB_DICT_PATHNAME} %endif # rm -f %{buildroot}%{_libdir}/pw_dict %find_lang %{name} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %files -n libcrack -f %{name}.lang %defattr(-,root,root) %{_sbindir}/cracklib-* %{_datadir}/cracklib/cracklib.magic %{_datadir}/cracklib/cracklib-small %{_libdir}/libcrack.so.* %files -n libcrack-devel %defattr(-,root,root) %{_sbindir}/create-cracklib-dict %{_libdir}/libcrack.so %{_includedir}/crack.h %{_includedir}/packer.h %{_libdir}/libcrack.a %{_libdir}/libcrack.la %if "%{_build}" == "%{_host}" %files -n python-cracklib %defattr(-,root,root) %{python_sitearch}/cracklib.* %{python_sitearch}/_cracklib.a %{python_sitearch}/_cracklib.la %{python_sitearch}/_cracklib.so %{python_sitearch}/test_cracklib.py* %endif %files -n libcrack-dicts %defattr(-,root,root) %{CRACKLIB_DICT_PATHNAME}.hwm %{CRACKLIB_DICT_PATHNAME}.pwd %{CRACKLIB_DICT_PATHNAME}.pwi %changelog * Sat Jun 08 2013 Automatic Build System 2.9.0-1mamba - automatic version update by autodist * Mon Dec 17 2012 Automatic Build System 2.8.22-1mamba - automatic version update by autodist * Tue Nov 09 2010 Automatic Build System 2.8.18-1mamba - automatic update by autodist * Sat Aug 21 2010 Silvan Calarco 2.8.16-2mamba - libcrack-dicts: do not require libcrack * Tue Jun 22 2010 Automatic Build System 2.8.16-1mamba - automatic update by autodist * Tue Jan 27 2009 Silvan Calarco 2.8.13-1mamba - automatic update by autodist * Sun Jun 24 2007 Silvan Calarco 2.8.10-1mamba - update to 2.8.10 * Sat Oct 28 2006 Silvan Calarco 2.7-5qilnx - rename as libcrack (obsolete cracklib-*) - fix libcrack.so: make it a symlink to libcrack.so.2.7 file * Mon Dec 13 2004 Silvan Calarco 2.7-4qilnx - include libcrack.so.* in main package, not just libcrack.so.2.7 * Tue Jul 27 2004 Davide Madrisan 2.7-3qilnx - trivial fixes in the specfile needed by the QiLinux distromatic parser * Fri May 28 2004 Davide Madrisan 2.7-2qilnx - added missing ldconfig calls * Wed May 07 2003 Alessandro Ramazzina 2.7-1qilnx - creation of cracklib package