cracklib-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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.22
  8. Release: 1%{?_dist_release}
  9. Group: System Environment/Libraries
  10. URL: http://sourceforge.net/projects/cracklib/
  11. License: LGPLv2+
  12. Source0: http://prdownloads.sourceforge.net/cracklib/cracklib-%{version}.tar.gz
  13. # Retrieved at 20091201191719Z.
  14. Source1: http://iweb.dl.sourceforge.net/project/cracklib/cracklib-words/2008-05-07/cracklib-words-20080507.gz
  15. # For man pages.
  16. Source2: http://ftp.us.debian.org/debian/pool/main/c/cracklib2/cracklib2_2.8.18-1.debian.tar.gz
  17. Source10: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Domains.gz
  18. Source11: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Dosref.gz
  19. Source12: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Ftpsites.gz
  20. Source13: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/Jargon.gz
  21. Source14: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/common-passwords.txt.gz
  22. Source15: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/computer/etc-hosts.gz
  23. Source16: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/movieTV/Movies.gz
  24. Source17: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/movieTV/Python.gz
  25. Source18: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/movieTV/Trek.gz
  26. Source19: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/LCarrol.gz
  27. Source20: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/Paradise.Lost.gz
  28. Source21: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/cartoon.gz
  29. Source22: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/myths-legends.gz
  30. Source23: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/sf.gz
  31. Source24: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/literature/shakespeare.gz
  32. Source25: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/ASSurnames.gz
  33. Source26: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/Congress.gz
  34. Source27: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/Family-Names.gz
  35. Source28: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/Given-Names.gz
  36. Source29: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/famous.gz
  37. Source30: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/fast-names.gz
  38. Source31: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/female-names.gz
  39. Source32: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/male-names.gz
  40. Source33: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/names.french.gz
  41. Source34: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/names.hp.gz
  42. Source35: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/other-names.gz
  43. Source36: ftp://ftp.cerias.purdue.edu/pub/dict/wordlists/names/surnames.finnish.gz
  44. # No upstream source for this; it came in as a bugzilla attachment.
  45. Source37: pass_file.gz
  46. Patch1: cracklib-2.8.15-inttypes.patch
  47. Buildroot: %{_tmppath}/%{name}-%{version}-root
  48. BuildRequires: words, autoconf, automake, gettext, libtool
  49. Conflicts: cracklib-dicts < 2.8
  50. Requires: gzip
  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 -a 2
  112. cp lib/packer.h lib/packer.h.in
  113. %patch1 -p1 -b .inttypes
  114. autoreconf -f -i
  115. mkdir cracklib-dicts
  116. for dict in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} \
  117. %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} \
  118. %{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} \
  119. %{SOURCE25} %{SOURCE26} %{SOURCE27} %{SOURCE28} %{SOURCE29} \
  120. %{SOURCE30} %{SOURCE31} %{SOURCE32} %{SOURCE33} %{SOURCE34} \
  121. %{SOURCE35} %{SOURCE36} %{SOURCE37} %{SOURCE1}
  122. do
  123. cp -fv ${dict} cracklib-dicts/
  124. done
  125. chmod +x util/cracklib-format
  126. %build
  127. %configure --with-pic --without-python --with-default-dict=%{dictpath} --disable-static
  128. make
  129. %install
  130. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  131. make install DESTDIR=$RPM_BUILD_ROOT
  132. ./util/cracklib-format cracklib-dicts/* | \
  133. ./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath}
  134. ./util/cracklib-format $RPM_BUILD_ROOT/%{dictdir}/cracklib-small | \
  135. ./util/cracklib-packer $RPM_BUILD_ROOT/%{dictdir}/cracklib-small
  136. rm -f $RPM_BUILD_ROOT/%{dictdir}/cracklib-small
  137. sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > $RPM_BUILD_ROOT/%{_includedir}/crack.h
  138. ln -s cracklib-format $RPM_BUILD_ROOT/%{_sbindir}/mkdict
  139. ln -s cracklib-packer $RPM_BUILD_ROOT/%{_sbindir}/packer
  140. touch $RPM_BUILD_ROOT/top
  141. toprelpath=..
  142. touch $RPM_BUILD_ROOT/top
  143. while ! test -f $RPM_BUILD_ROOT/%{_libdir}/$toprelpath/top ; do
  144. toprelpath=../$toprelpath
  145. done
  146. rm -f $RPM_BUILD_ROOT/top
  147. if test %{dictpath} != %{_libdir}/cracklib_dict ; then
  148. ln -s $toprelpath%{dictpath}.hwm $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.hwm
  149. ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwd
  150. ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi
  151. fi
  152. rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/cracklibmodule.*a
  153. rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la
  154. %find_lang %{name}
  155. %clean
  156. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  157. %post -p /sbin/ldconfig
  158. %postun -p /sbin/ldconfig
  159. %post -n compat32-%{name} -p /sbin/ldconfig
  160. %postun -n compat32-%{name} -p /sbin/ldconfig
  161. %triggerpostun -p /sbin/ldconfig -- cracklib < 2.7-24
  162. %files -f %{name}.lang
  163. %defattr(-,root,root)
  164. %doc README README-WORDS NEWS README-LICENSE AUTHORS
  165. %{_includedir}/*
  166. %{_libdir}/libcrack.so*
  167. #{_libdir}/libcrack.a*
  168. %dir %{_datadir}/cracklib
  169. %{_datadir}/cracklib/cracklib.magic
  170. %{_sbindir}/*cracklib*
  171. %files dicts
  172. %defattr(-,root,root)
  173. %dir %{_datadir}/cracklib
  174. %{_datadir}/cracklib/pw_dict.*
  175. %{_datadir}/cracklib/cracklib-small.*
  176. %{_libdir}/cracklib_dict.*
  177. %{_sbindir}/mkdict
  178. %{_sbindir}/packer
  179. %if %{build_compat32}
  180. %files -n compat32-%{name}
  181. %defattr(-,root,root)
  182. %{_libdir}/libcrack.so*
  183. #{_libdir}/libcrack.a*
  184. %files -n compat32-%{name}-dicts
  185. %defattr(-,root,root)
  186. %{_libdir}/cracklib_dict.*
  187. %endif
  188. %changelog
  189. * Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.8.22-1
  190. - update to 2.8.22
  191. - remove Patch2 (cracklib-2.8.12-gettext.patch)
  192. * Wed Apr 13 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.18-1
  193. - new upstream release
  194. * Tue May 05 2009 NAKAMURA Kenta <kenta@vinelinux.org> 2.8.12-3
  195. - fixed errors rebuilding with libtool-2
  196. - added Patch3: cracklib-2.8.12-gettext.patch
  197. * Tue Mar 31 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.12-2
  198. - spec in utf-8
  199. * Tue May 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.12-1
  200. - update to 2.8.12, which was relicensed to GPLv2
  201. * Fri Mar 17 2006 NAKAMURA Kenta <kenta@c.csce.kyushu-u.ac.jp> 2.8.6-0vl2
  202. - updated files section for compat32-* packages
  203. * Tue Mar 14 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.6-0vl1
  204. - new upstream release
  205. - import some changes from FC
  206. * Fri Feb 10 2006 NAKAMURA Kenta <kenta@c.csce.kyushu-u.ac.jp> 2.7-27vl2
  207. - added compat32-* packages for x86_64 architecture support
  208. * Sat Apr 10 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 2.7-27vl1
  209. - cracklib.spec -> cracklib-vl.spec
  210. - substantially rebuild
  211. * Wed Feb 4 2004 Nalin Dahyabhai <nalin@redhat.com> 2.7-26
  212. - update URL (previous page moved) (#114894)
  213. * Fri Jan 30 2004 Nalin Dahyabhai <nalin@redhat.com> 2.7-25
  214. - fix ldconfig invocation in trigger for older versions which included the
  215. soname symlink (#114620)
  216. * Fri Dec 06 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.7-19vl1
  217. - based on 2.7-19 from Rawhide and built for Vine Linux
  218. - added Japanese summary
  219. * Wed Sep 25 2002 Nalin Dahyabhai <nalin@redhat.com> 2.7-19
  220. - fix for builds on multilib systems (set DICTPATH properly)
  221. * Fri Jun 21 2002 Tim Powers <timp@redhat.com>
  222. - automated rebuild
  223. * Sun May 26 2002 Tim Powers <timp@redhat.com>
  224. - automated rebuild
  225. * Thu May 9 2002 Nalin Dahyabhai <nalin@redhat.com> 2.7-16
  226. - rebuild in new environment
  227. * Fri Feb 22 2002 Nalin Dahyabhai <nalin@redhat.com> 2.7-15
  228. - rebuild
  229. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  230. - automated rebuild
  231. * Tue Oct 2 2001 Nalin Dahyabhai <nalin@redhat.com> 2.7-13
  232. - use getpwuid_r instead of getpwuid
  233. * Fri Aug 3 2001 Nalin Dahyabhai <nalin@redhat.com> 2.7-12
  234. - remove cruft that ldconfig already knows how to manage
  235. - don't explicitly strip anything -- the brp setup decides that
  236. - tweak the header so that it can be used in C++ (#46685)
  237. - buildprereq the words package
  238. * Tue Jun 26 2001 Florian La Roche <Florian.LaRoche@redhat.de>
  239. - add link from library major version number
  240. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  241. - Bump release + rebuild.
  242. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  243. - automatic rebuild
  244. * Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
  245. - FHS fixes
  246. - fix undeclared function warnings from the new compiler
  247. - fix URL
  248. * Fri Apr 07 2000 Trond Eivind Glomsr <teg@redhat.com>
  249. - switched to use /usr/share/dict/words
  250. * Tue Apr 06 1999 Preston Brown <pbrown@redhat.com>
  251. - strip binaries
  252. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  253. - auto rebuild in the new build environment (release 4)
  254. * Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com>
  255. - build for glibc 2.1
  256. * Sat May 09 1998 Prospector System <bugs@redhat.com>
  257. - translations modified for de, fr, tr
  258. * Tue Mar 10 1998 Cristian Gafton <gafton@redhat.com>
  259. - updated to 2.7
  260. - build shared libraries
  261. * Mon Nov 03 1997 Donnie Barnes <djb@redhat.com>
  262. - added -fPIC
  263. * Mon Oct 13 1997 Donnie Barnes <djb@redhat.com>
  264. - basic spec file cleanups
  265. * Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
  266. - built against glibc