cracklib-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. # Reflects the values hard-coded in various Makefile.am's in the source tree.
  2. %define dictdir %{_datadir}/cracklib
  3. %define dictpath %{_datadir}/cracklib/pw_dict
  4. Summary: A password-checking library.
  5. Summary(ja): パスワードチェック用ライブラリ
  6. Name: cracklib
  7. Version: 2.8.12
  8. Release: 3%{?_dist_release}
  9. Group: System Environment/Libraries
  10. URL: http://sourceforge.net/projects/cracklib/
  11. License: GPLv2
  12. Source0: http://www.crypticide.org/users/alecm/security/cracklib-%{version}.tar.gz
  13. # Retrieved at 20070213003424Z.
  14. Source1: http://prdownloads.sourceforge.net/cracklib/cracklib-words.gz
  15. Source10: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Domains.gz
  16. Source11: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Dosref.gz
  17. Source12: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Ftpsites.gz
  18. Source13: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Jargon.gz
  19. Source14: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/common-passwords.txt.gz
  20. Source15: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/etc-hosts.gz
  21. Source16: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/movieTV/Movies.gz
  22. Source17: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/movieTV/Python.gz
  23. Source18: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/movieTV/Trek.gz
  24. Source19: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/LCarrol.gz
  25. Source20: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/Paradise.Lost.gz
  26. Source21: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/cartoon.gz
  27. Source22: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/myths-legends.gz
  28. Source23: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/sf.gz
  29. Source24: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/shakespeare.gz
  30. Source25: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/ASSurnames.gz
  31. Source26: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/Congress.gz
  32. Source27: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/Family-Names.gz
  33. Source28: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/Given-Names.gz
  34. Source29: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/famous.gz
  35. Source30: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/fast-names.gz
  36. Source31: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/female-names.gz
  37. Source32: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/male-names.gz
  38. Source33: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/names.french.gz
  39. Source34: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/names.hp.gz
  40. Source35: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/other-names.gz
  41. Source36: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/surnames.finnish.gz
  42. # No upstream source for this; it came in as a bugzilla attachment.
  43. Source37: pass_file.gz
  44. Patch0: cracklib-2.8.10-suffix.patch
  45. Patch1: cracklib-2.8.12-inttypes.patch
  46. Patch2: cracklib-2.8.10-docstring.patch
  47. Patch3: cracklib-2.8.12-gettext.patch
  48. Buildroot: %{_tmppath}/%{name}-%{version}-root
  49. BuildRequires: words, automake, libtool
  50. Conflicts: cracklib-dicts < 2.8
  51. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  52. %description
  53. CrackLib tests passwords to determine whether they match certain
  54. security-oriented characteristics, with the purpose of stopping users
  55. from choosing passwords that are easy to guess. CrackLib performs
  56. several tests on passwords: it tries to generate words from a username
  57. and gecos entry and checks those words against the password; it checks
  58. for simplistic patterns in passwords; and it checks for the password
  59. in a dictionary.
  60. CrackLib is actually a library containing a particular C function
  61. which is used to check the password, as well as other C
  62. functions. CrackLib is not a replacement for a passwd program; it must
  63. be used in conjunction with an existing passwd program.
  64. Install the cracklib package if you need a program to check users'
  65. passwords to see if they are at least minimally secure. If you install
  66. CrackLib, you will also want to install the cracklib-dicts package.
  67. %package -n compat32-%{name}
  68. Summary: A password-checking library.
  69. Summary(ja): パスワードチェック用ライブラリ
  70. Group: System Environment/Libraries
  71. Requires: %{name} = %{version}-%{release}
  72. %description -n compat32-%{name}
  73. CrackLib tests passwords to determine whether they match certain
  74. security-oriented characteristics, with the purpose of stopping users
  75. from choosing passwords that are easy to guess. CrackLib performs
  76. several tests on passwords: it tries to generate words from a username
  77. and gecos entry and checks those words against the password; it checks
  78. for simplistic patterns in passwords; and it checks for the password
  79. in a dictionary.
  80. CrackLib is actually a library containing a particular C function
  81. which is used to check the password, as well as other C
  82. functions. CrackLib is not a replacement for a passwd program; it must
  83. be used in conjunction with an existing passwd program.
  84. Install the cracklib package if you need a program to check users'
  85. passwords to see if they are at least minimally secure. If you install
  86. CrackLib, you will also want to install the cracklib-dicts package.
  87. %package dicts
  88. Summary: The standard CrackLib dictionaries.
  89. Summary(ja): CrackLib 標準辞書
  90. Group: System Environment/Libraries
  91. Requires: words >= 2-13
  92. %description dicts
  93. The cracklib-dicts package includes the CrackLib dictionaries.
  94. CrackLib will need to use the dictionary appropriate to your system,
  95. which is normally put in /usr/share/dict/words. Cracklib-dicts also
  96. contains the utilities necessary for the creation of new dictionaries.
  97. If you are installing CrackLib, you should also install cracklib-dicts.
  98. %package -n compat32-%{name}-dicts
  99. Summary: The standard CrackLib dictionaries.
  100. Summary(ja): CrackLib 標準辞書
  101. Group: System Environment/Libraries
  102. Requires: compat32-%{name} = %{version}-%{release}
  103. Requires: %{name}-dicts = %{version}-%{release}
  104. %description -n compat32-%{name}-dicts
  105. The cracklib-dicts package includes the CrackLib dictionaries.
  106. CrackLib will need to use the dictionary appropriate to your system,
  107. which is normally put in /usr/share/dict/words. Cracklib-dicts also
  108. contains the utilities necessary for the creation of new dictionaries.
  109. If you are installing CrackLib, you should also install cracklib-dicts.
  110. %prep
  111. %setup -q
  112. %patch0 -p1 -b .suffix
  113. cp lib/packer.h lib/packer.h.in
  114. %patch1 -p1 -b .inttypes
  115. %patch2 -p1 -b .docstring
  116. %patch3 -p1 -b .gettext
  117. autoreconf -f -i
  118. mkdir cracklib-dicts
  119. for dict in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} \
  120. %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} \
  121. %{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} \
  122. %{SOURCE25} %{SOURCE26} %{SOURCE27} %{SOURCE28} %{SOURCE29} \
  123. %{SOURCE30} %{SOURCE31} %{SOURCE32} %{SOURCE33} %{SOURCE34} \
  124. %{SOURCE35} %{SOURCE36} %{SOURCE37} %{SOURCE1}
  125. do
  126. cp -fv ${dict} cracklib-dicts/
  127. done
  128. chmod +x util/cracklib-format
  129. %build
  130. %configure --with-pic --without-python --with-default-dict=%{dictpath} --disable-static
  131. make
  132. %install
  133. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  134. make install DESTDIR=$RPM_BUILD_ROOT
  135. ./util/cracklib-format cracklib-dicts/* | \
  136. ./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath}
  137. ./util/cracklib-format $RPM_BUILD_ROOT/%{dictdir}/cracklib-small | \
  138. ./util/cracklib-packer $RPM_BUILD_ROOT/%{dictdir}/cracklib-small
  139. rm -f $RPM_BUILD_ROOT/%{dictdir}/cracklib-small
  140. sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > $RPM_BUILD_ROOT/%{_includedir}/crack.h
  141. ln -s cracklib-format $RPM_BUILD_ROOT/%{_sbindir}/mkdict
  142. ln -s cracklib-packer $RPM_BUILD_ROOT/%{_sbindir}/packer
  143. touch $RPM_BUILD_ROOT/top
  144. toprelpath=..
  145. touch $RPM_BUILD_ROOT/top
  146. while ! test -f $RPM_BUILD_ROOT/%{_libdir}/$toprelpath/top ; do
  147. toprelpath=../$toprelpath
  148. done
  149. rm -f $RPM_BUILD_ROOT/top
  150. if test %{dictpath} != %{_libdir}/cracklib_dict ; then
  151. ln -s $toprelpath%{dictpath}.hwm $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.hwm
  152. ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwd
  153. ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi
  154. fi
  155. rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/cracklibmodule.*a
  156. rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la
  157. %find_lang %{name}
  158. %clean
  159. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  160. %post -p /sbin/ldconfig
  161. %postun -p /sbin/ldconfig
  162. %post -n compat32-%{name} -p /sbin/ldconfig
  163. %postun -n compat32-%{name} -p /sbin/ldconfig
  164. %triggerpostun -p /sbin/ldconfig -- cracklib < 2.7-24
  165. %files -f %{name}.lang
  166. %defattr(-,root,root)
  167. %doc README README-WORDS NEWS README-LICENSE AUTHORS
  168. %{_includedir}/*
  169. %{_libdir}/libcrack.so*
  170. #{_libdir}/libcrack.a*
  171. %dir %{_datadir}/cracklib
  172. %{_datadir}/cracklib/cracklib.magic
  173. %{_sbindir}/*cracklib*
  174. %files dicts
  175. %defattr(-,root,root)
  176. %dir %{_datadir}/cracklib
  177. %{_datadir}/cracklib/pw_dict.*
  178. %{_datadir}/cracklib/cracklib-small.*
  179. %{_libdir}/cracklib_dict.*
  180. %{_sbindir}/mkdict
  181. %{_sbindir}/packer
  182. %if %{build_compat32}
  183. %files -n compat32-%{name}
  184. %defattr(-,root,root)
  185. %{_libdir}/libcrack.so*
  186. #{_libdir}/libcrack.a*
  187. %files -n compat32-%{name}-dicts
  188. %defattr(-,root,root)
  189. %{_libdir}/cracklib_dict.*
  190. %endif
  191. %changelog
  192. * Tue May 05 2009 NAKAMURA Kenta <kenta@vinelinux.org> 2.8.12-3
  193. - fixed errors rebuilding with libtool-2
  194. - added Patch3: cracklib-2.8.12-gettext.patch
  195. * Tue Mar 31 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.12-2
  196. - spec in utf-8
  197. * Tue May 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.12-1
  198. - update to 2.8.12, which was relicensed to GPLv2
  199. * Fri Mar 17 2006 NAKAMURA Kenta <kenta@c.csce.kyushu-u.ac.jp> 2.8.6-0vl2
  200. - updated files section for compat32-* packages
  201. * Tue Mar 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.6-0vl1
  202. - new upstream release
  203. - import some changes from FC
  204. * Fri Feb 10 2006 NAKAMURA Kenta <kenta@c.csce.kyushu-u.ac.jp> 2.7-27vl2
  205. - added compat32-* packages for x86_64 architecture support
  206. * Sat Apr 10 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 2.7-27vl1
  207. - cracklib.spec -> cracklib-vl.spec
  208. - substantially rebuild
  209. * Wed Feb 4 2004 Nalin Dahyabhai <nalin@redhat.com> 2.7-26
  210. - update URL (previous page moved) (#114894)
  211. * Fri Jan 30 2004 Nalin Dahyabhai <nalin@redhat.com> 2.7-25
  212. - fix ldconfig invocation in trigger for older versions which included the
  213. soname symlink (#114620)
  214. * Fri Dec 06 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.7-19vl1
  215. - based on 2.7-19 from Rawhide and built for Vine Linux
  216. - added Japanese summary
  217. * Wed Sep 25 2002 Nalin Dahyabhai <nalin@redhat.com> 2.7-19
  218. - fix for builds on multilib systems (set DICTPATH properly)
  219. * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
  220. - automated rebuild
  221. * Sun May 26 2002 Tim Powers <timp@redhat.com>
  222. - automated rebuild
  223. * Thu May 9 2002 Nalin Dahyabhai <nalin@redhat.com> 2.7-16
  224. - rebuild in new environment
  225. * Fri Feb 22 2002 Nalin Dahyabhai <nalin@redhat.com> 2.7-15
  226. - rebuild
  227. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  228. - automated rebuild
  229. * Tue Oct 2 2001 Nalin Dahyabhai <nalin@redhat.com> 2.7-13
  230. - use getpwuid_r instead of getpwuid
  231. * Fri Aug 3 2001 Nalin Dahyabhai <nalin@redhat.com> 2.7-12
  232. - remove cruft that ldconfig already knows how to manage
  233. - don't explicitly strip anything -- the brp setup decides that
  234. - tweak the header so that it can be used in C++ (#46685)
  235. - buildprereq the words package
  236. * Tue Jun 26 2001 Florian La Roche <Florian.LaRoche@redhat.de>
  237. - add link from library major version number
  238. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  239. - Bump release + rebuild.
  240. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  241. - automatic rebuild
  242. * Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
  243. - FHS fixes
  244. - fix undeclared function warnings from the new compiler
  245. - fix URL
  246. * Fri Apr 07 2000 Trond Eivind Glomsr <teg@redhat.com>
  247. - switched to use /usr/share/dict/words
  248. * Tue Apr 06 1999 Preston Brown <pbrown@redhat.com>
  249. - strip binaries
  250. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  251. - auto rebuild in the new build environment (release 4)
  252. * Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com>
  253. - build for glibc 2.1
  254. * Sat May 09 1998 Prospector System <bugs@redhat.com>
  255. - translations modified for de, fr, tr
  256. * Tue Mar 10 1998 Cristian Gafton <gafton@redhat.com>
  257. - updated to 2.7
  258. - build shared libraries
  259. * Mon Nov 03 1997 Donnie Barnes <djb@redhat.com>
  260. - added -fPIC
  261. * Mon Oct 13 1997 Donnie Barnes <djb@redhat.com>
  262. - basic spec file cleanups
  263. * Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
  264. - built against glibc