rpms/cracklib/devel cracklib.spec,1.50,1.51

Nalin Dahyabhai nalin at fedoraproject.org
Tue Oct 28 21:43:31 UTC 2008


Author: nalin

Update of /cvs/pkgs/rpms/cracklib/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3707

Modified Files:
	cracklib.spec 
Log Message:
- more missing builddeps (gettext requires cvs)
- adjust spot-test for the python bindings to cope with new behavior



Index: cracklib.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cracklib/devel/cracklib.spec,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- cracklib.spec	28 Oct 2008 18:07:05 -0000	1.50
+++ cracklib.spec	28 Oct 2008 21:43:01 -0000	1.51
@@ -50,6 +50,8 @@
 License: GPLv2
 Buildroot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: python-devel, words, autoconf, automake, gettext, libtool
+# This one's for gettext's sake.
+BuildRequires: cvs
 Conflicts: cracklib-dicts < 2.8
 
 %description
@@ -128,6 +130,7 @@
 %install
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $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-packer $RPM_BUILD_ROOT/%{dictpath}
 ./util/cracklib-format $RPM_BUILD_ROOT/%{dictdir}/cracklib-small | \
@@ -149,7 +152,7 @@
 ln -s $toprelpath%{dictpath}.pwd $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwd
 ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi
 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
 
 %find_lang %{name}
@@ -169,12 +172,18 @@
 # Now actually do the test.  If we get a different result, or throw an
 # exception, the script will end with the error.
 import cracklib
-s = cracklib.FascistCheck("cracklib", "$RPM_BUILD_ROOT/%{dictpath}")
-expected = "it is based on a dictionary word"
-if s != expected:
-	print "Got unexpected result \"%s\"," % s,
-	print "instead of expected value of \"%s\"." % expected
-	sys.exit(1)
+try:
+	s = cracklib.FascistCheck("cracklib", "$RPM_BUILD_ROOT/%{dictpath}")
+except ValueError, message:
+	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
+		sys.exit(1)
+	print "Got expected result \"%s\"," % message
+	sys.exit(0)
+finally:
+	sys.exit(0)
 EOF
 
 %clean
@@ -210,11 +219,15 @@
 
 %files python
 %defattr(-,root,root)
-%{_libdir}/python*/site-packages/cracklibmodule.so
+%{_libdir}/python*/site-packages/_cracklibmodule.so
+%{_libdir}/../lib/python*/site-packages/*.py*
 
 %changelog
 * Tue Oct 28 2008 Nalin Dahyabhai <nalin at 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 at redhat.com> - 2.8.12-3
 - fix errors rebuilding with libtool that's newer than the one upstream




More information about the fedora-extras-commits mailing list