source: projects/specs/trunk/c/cracklib/cracklib-vl.spec @ 12186

Revision 12186, 11.3 KB checked in by tomop, 5 years ago (diff)

cracklib-2.9.7-1

Line 
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
5Summary: A password-checking library.
6Summary(ja): パスワードチェック用ライブラリ
7Name: cracklib
8Version: 2.9.7
9Release: 1%{?_dist_release}
10Group: System Environment/Libraries
11URL: https://github.com/cracklib/cracklib
12License: LGPLv2+
13Vendor: Project Vine
14Distribution: Vine Linux
15
16Source0: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-%{version}.tar.bz2
17Source1: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-words-%{version}.gz
18
19# For man pages.
20Source2: http://ftp.us.debian.org/debian/pool/main/c/cracklib2/cracklib2_2.9.6-2.debian.tar.xz
21
22# No upstream source for this, just words missing from the current cracklib-words
23Source10: missing-words.gz
24
25Patch1: cracklib-2.9.1-inttypes.patch
26Patch2: cracklib-2.9.0-python-gzdicts.patch
27Patch4: cracklib-2.9.7-packlib-reentrant.patch
28Patch6: cracklib-2.9.6-simplistic.patch
29Patch9: cracklib-2.9.6-coverity.patch
30Patch10: cracklib-2.9.6-lookup.patch
31
32Buildroot: %{_tmppath}/%{name}-%{version}-root
33BuildRequires: words, autoconf, automake, gettext, libtool
34Conflicts: cracklib-dicts < 2.8
35Requires: gzip
36
37%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
38
39%description
40CrackLib tests passwords to determine whether they match certain
41security-oriented characteristics, with the purpose of stopping users
42from choosing passwords that are easy to guess. CrackLib performs
43several tests on passwords: it tries to generate words from a username
44and gecos entry and checks those words against the password; it checks
45for simplistic patterns in passwords; and it checks for the password
46in a dictionary.
47
48CrackLib is actually a library containing a particular C function
49which is used to check the password, as well as other C
50functions. CrackLib is not a replacement for a passwd program; it must
51be used in conjunction with an existing passwd program.
52
53Install the cracklib package if you need a program to check users'
54passwords to see if they are at least minimally secure. If you install
55CrackLib, you will also want to install the cracklib-dicts package.
56
57
58%package -n compat32-%{name}
59Summary: A password-checking library.
60Summary(ja): パスワードチェック用ライブラリ
61Group: System Environment/Libraries
62Requires: %{name} = %{version}-%{release}
63
64
65%description -n compat32-%{name}
66CrackLib tests passwords to determine whether they match certain
67security-oriented characteristics, with the purpose of stopping users
68from choosing passwords that are easy to guess. CrackLib performs
69several tests on passwords: it tries to generate words from a username
70and gecos entry and checks those words against the password; it checks
71for simplistic patterns in passwords; and it checks for the password
72in a dictionary.
73
74CrackLib is actually a library containing a particular C function
75which is used to check the password, as well as other C
76functions. CrackLib is not a replacement for a passwd program; it must
77be used in conjunction with an existing passwd program.
78
79Install the cracklib package if you need a program to check users'
80passwords to see if they are at least minimally secure. If you install
81CrackLib, you will also want to install the cracklib-dicts package.
82
83
84%package dicts
85Summary: The standard CrackLib dictionaries.
86Summary(ja): CrackLib 標準辞書
87Group: System Environment/Libraries
88Requires: words >= 2-13
89
90
91%description dicts
92The cracklib-dicts package includes the CrackLib dictionaries.
93CrackLib will need to use the dictionary appropriate to your system,
94which is normally put in /usr/share/dict/words. Cracklib-dicts also
95contains the utilities necessary for the creation of new dictionaries.
96
97If you are installing CrackLib, you should also install cracklib-dicts.
98
99
100%package -n compat32-%{name}-dicts
101Summary: The standard CrackLib dictionaries.
102Summary(ja): CrackLib 標準辞書
103Group: System Environment/Libraries
104Requires: compat32-%{name} = %{version}-%{release}
105Requires: %{name}-dicts    = %{version}-%{release}
106
107
108%description -n compat32-%{name}-dicts
109The cracklib-dicts package includes the CrackLib dictionaries.
110CrackLib will need to use the dictionary appropriate to your system,
111which is normally put in /usr/share/dict/words. Cracklib-dicts also
112contains the utilities necessary for the creation of new dictionaries.
113
114If you are installing CrackLib, you should also install cracklib-dicts.
115
116
117%prep
118%setup -q -a 2
119
120%patch1 -p1 -b .inttypes
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
127mkdir cracklib-dicts
128for dict in %{SOURCE10} %{SOURCE1}
129do
130        cp -fv ${dict} cracklib-dicts/
131done
132chmod +x util/cracklib-format
133
134%build
135# Use the dictionary from the build to test
136sed -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
142make -C po update-po
143make
144
145%install
146[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
147make 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
152rm -f $RPM_BUILD_ROOT/%{dictdir}/cracklib-small
153
154sed s,/usr/lib/cracklib_dict,%{dictpath},g lib/crack.h > $RPM_BUILD_ROOT/%{_includedir}/crack.h
155ln -s cracklib-format $RPM_BUILD_ROOT/%{_sbindir}/mkdict
156ln -s cracklib-packer $RPM_BUILD_ROOT/%{_sbindir}/packer
157touch $RPM_BUILD_ROOT/top
158
159toprelpath=..
160touch $RPM_BUILD_ROOT/top
161while ! test -f $RPM_BUILD_ROOT/%{_libdir}/$toprelpath/top ; do
162        toprelpath=../$toprelpath
163done
164rm -f $RPM_BUILD_ROOT/top
165if test %{dictpath} != %{_libdir}/cracklib_dict ; then
166ln -s $toprelpath%{dictpath}.hwm $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.hwm
167ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwd
168ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi
169fi
170rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/cracklibmodule.*a
171rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la
172
173mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man{3,8}
174install -p -m644 debian/*.3 $RPM_BUILD_ROOT/%{_mandir}/man3/
175install -p -m644 debian/*.8 $RPM_BUILD_ROOT/%{_mandir}/man8/
176if ! 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
178fi
179if ! 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
181fi
182
183%find_lang %{name}
184
185
186%check
187make test DESTDIR=$RPM_BUILD_ROOT
188
189
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
207%{!?_licensedir:%global license %%doc}
208%license COPYING.LIB
209%{_libdir}/libcrack.so*
210%dir %{_datadir}/cracklib
211%{_datadir}/cracklib/cracklib.magic
212%{_sbindir}/*cracklib*
213%{_mandir}/man*/*
214%{_includedir}/*
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
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
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
252* Wed Apr 13 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.8.18-1
253- new upstream release
254
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
Note: See TracBrowser for help on using the repository browser.