cracklib-vl.spec 11 KB

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