- more missing builddeps (gettext requires cvs)
- adjust spot-test for the python bindings to cope with new behavior
This commit is contained in:
		
							parent
							
								
									a95d0a0f24
								
							
						
					
					
						commit
						044e85f19f
					
				| @ -50,6 +50,8 @@ URL: http://sourceforge.net/projects/cracklib/ | |||||||
| License: GPLv2 | License: GPLv2 | ||||||
| Buildroot: %{_tmppath}/%{name}-%{version}-root | Buildroot: %{_tmppath}/%{name}-%{version}-root | ||||||
| BuildRequires: python-devel, words, autoconf, automake, gettext, libtool | BuildRequires: python-devel, words, autoconf, automake, gettext, libtool | ||||||
|  | # This one's for gettext's sake. | ||||||
|  | BuildRequires: cvs | ||||||
| Conflicts: cracklib-dicts < 2.8 | Conflicts: cracklib-dicts < 2.8 | ||||||
| 
 | 
 | ||||||
| %description | %description | ||||||
| @ -128,6 +130,7 @@ make | |||||||
| %install | %install | ||||||
| [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT | ||||||
| make install DESTDIR=$RPM_BUILD_ROOT | make install DESTDIR=$RPM_BUILD_ROOT | ||||||
|  | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -c -p" -C python | ||||||
| ./util/cracklib-format cracklib-dicts/* | \ | ./util/cracklib-format cracklib-dicts/* | \ | ||||||
| ./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath} | ./util/cracklib-packer $RPM_BUILD_ROOT/%{dictpath} | ||||||
| ./util/cracklib-format $RPM_BUILD_ROOT/%{dictdir}/cracklib-small | \ | ./util/cracklib-format $RPM_BUILD_ROOT/%{dictdir}/cracklib-small | \ | ||||||
| @ -149,7 +152,7 @@ ln -s $toprelpath%{dictpath}.hwm $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.hwm | |||||||
| ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwd | ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwd | ||||||
| ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi | ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi | ||||||
| fi | fi | ||||||
| rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/cracklibmodule.*a | rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/_cracklibmodule.*a | ||||||
| rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la | rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la | ||||||
| 
 | 
 | ||||||
| %find_lang %{name} | %find_lang %{name} | ||||||
| @ -169,12 +172,18 @@ for element in syspath2: | |||||||
| # Now actually do the test.  If we get a different result, or throw an | # Now actually do the test.  If we get a different result, or throw an | ||||||
| # exception, the script will end with the error. | # exception, the script will end with the error. | ||||||
| import cracklib | import cracklib | ||||||
| s = cracklib.FascistCheck("cracklib", "$RPM_BUILD_ROOT/%{dictpath}") | try: | ||||||
| expected = "it is based on a dictionary word" | 	s = cracklib.FascistCheck("cracklib", "$RPM_BUILD_ROOT/%{dictpath}") | ||||||
| if s != expected: | except ValueError, message: | ||||||
| 	print "Got unexpected result \"%s\"," % s, | 	expected = "it is based on a dictionary word" | ||||||
|  | 	if message != expected: | ||||||
|  | 		print "Got unexpected result \"%s\"," % messgae, | ||||||
| 		print "instead of expected value of \"%s\"." % expected | 		print "instead of expected value of \"%s\"." % expected | ||||||
| 		sys.exit(1) | 		sys.exit(1) | ||||||
|  | 	print "Got expected result \"%s\"," % message | ||||||
|  | 	sys.exit(0) | ||||||
|  | finally: | ||||||
|  | 	sys.exit(0) | ||||||
| EOF | EOF | ||||||
| 
 | 
 | ||||||
| %clean | %clean | ||||||
| @ -210,11 +219,15 @@ EOF | |||||||
| 
 | 
 | ||||||
| %files python | %files python | ||||||
| %defattr(-,root,root) | %defattr(-,root,root) | ||||||
| %{_libdir}/python*/site-packages/cracklibmodule.so | %{_libdir}/python*/site-packages/_cracklibmodule.so | ||||||
|  | %{_libdir}/../lib/python*/site-packages/*.py* | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
| * Tue Oct 28 2008 Nalin Dahyabhai <nalin@redhat.com> - 2.8.13-1 | * Tue Oct 28 2008 Nalin Dahyabhai <nalin@redhat.com> - 2.8.13-1 | ||||||
| - update to 2.8.13, which mainly overhauls the python bindings | - update to 2.8.13, which overhauls the python bindings and revises | ||||||
|  |   FascistCheck()'s behavior: | ||||||
|  |   2.8.12 success: returns None, fail: returns error text, other: exceptions | ||||||
|  |   2.8.13 success: returns candidate, fail: throws ValueError, other: exceptions | ||||||
| 
 | 
 | ||||||
| * Tue Oct 28 2008 Nalin Dahyabhai <nalin@redhat.com> - 2.8.12-3 | * Tue Oct 28 2008 Nalin Dahyabhai <nalin@redhat.com> - 2.8.12-3 | ||||||
| - fix errors rebuilding with libtool that's newer than the one upstream | - fix errors rebuilding with libtool that's newer than the one upstream | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user