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