cracklib-vl.spec 12 KB

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