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