Update to libuser-0.57.2
* Thu Mar 31 2011 Miloslav Trmač <mitr@redhat.com> - 0.57.2-1 - Update to libuser-0.57.2 Resolves: #671494 - Reenable (make check)
This commit is contained in:
parent
c6e1310a88
commit
518937c746
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ libuser-0.56.16.tar.xz
|
|||||||
/libuser-0.56.18.tar.xz
|
/libuser-0.56.18.tar.xz
|
||||||
/libuser-0.57.tar.xz
|
/libuser-0.57.tar.xz
|
||||||
/libuser-0.57.1.tar.xz
|
/libuser-0.57.1.tar.xz
|
||||||
|
/libuser-0.57.2.tar.xz
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
2011-01-20 Miloslav Trmač <mitr@redhat.com>
|
|
||||||
|
|
||||||
* modules/ldap.c (get_ent_adds): Don't use empty gecos as a commonName
|
|
||||||
value.
|
|
||||||
* tests/ldap_test.py (Tests.testUserAdd7): New test.
|
|
||||||
|
|
||||||
diff -r d5daa92a0e78 -r 44c92c5eef75 modules/ldap.c
|
|
||||||
--- a/modules/ldap.c Thu Jan 20 13:05:59 2011 +0000
|
|
||||||
+++ b/modules/ldap.c Thu Jan 20 14:21:20 2011 +0100
|
|
||||||
@@ -1026,6 +1026,7 @@
|
|
||||||
&& lu_ent_get(ent, LU_COMMONNAME) == NULL) {
|
|
||||||
char *cn;
|
|
||||||
|
|
||||||
+ cn = NULL;
|
|
||||||
vals = lu_ent_get(ent, LU_GECOS);
|
|
||||||
if (vals != NULL) {
|
|
||||||
char *p;
|
|
||||||
@@ -1035,7 +1036,11 @@
|
|
||||||
p = strchr(cn, ',');
|
|
||||||
if (p != NULL)
|
|
||||||
*p = 0;
|
|
||||||
- } else {
|
|
||||||
+ /* Note that gecos may be empty, but
|
|
||||||
+ commonName (as a DirectoryString) is not
|
|
||||||
+ allowed to be empty. */
|
|
||||||
+ }
|
|
||||||
+ if (cn == NULL || *cn == 0) {
|
|
||||||
vals = lu_ent_get(ent, LU_USERNAME);
|
|
||||||
/* Guaranteed by lu_ldap_set() */
|
|
||||||
g_assert (vals != NULL);
|
|
||||||
diff -r d5daa92a0e78 -r 44c92c5eef75 tests/ldap_test.py
|
|
||||||
--- a/tests/ldap_test.py Thu Jan 20 13:05:59 2011 +0000
|
|
||||||
+++ b/tests/ldap_test.py Thu Jan 20 14:21:20 2011 +0100
|
|
||||||
@@ -169,6 +169,39 @@
|
|
||||||
e = self.a.initUser('user6_6')
|
|
||||||
self.assertRaises(RuntimeError, self.a.addUser, e, False, False)
|
|
||||||
|
|
||||||
+ def testUserAdd7(self):
|
|
||||||
+ # Adding commonName if it is not defined:
|
|
||||||
+ # - Explicitly set
|
|
||||||
+ e = self.a.initUser('user6_7')
|
|
||||||
+ e[libuser.COMMONNAME] = 'Common Name'
|
|
||||||
+ self.a.addUser(e, False, False)
|
|
||||||
+ del e
|
|
||||||
+ e = self.a.lookupUserByName('user6_7')
|
|
||||||
+ self.assertEqual(e[libuser.COMMONNAME], ['Common Name'])
|
|
||||||
+ # - Defaulted from GECOS
|
|
||||||
+ e = self.a.initUser('user6_8')
|
|
||||||
+ e[libuser.GECOS] = 'Full Name,Office,1234,4321'
|
|
||||||
+ self.a.addUser(e, False, False)
|
|
||||||
+ del e
|
|
||||||
+ e = self.a.lookupUserByName('user6_8')
|
|
||||||
+ self.assertEqual(e[libuser.COMMONNAME], ['Full Name'])
|
|
||||||
+ # Defaulted from user name
|
|
||||||
+ e = self.a.initUser('user6_9')
|
|
||||||
+ self.assertEqual(e[libuser.GECOS], ['user6_9'])
|
|
||||||
+ e.clear(libuser.GECOS)
|
|
||||||
+ self.assertRaises(KeyError, lambda x: x[libuser.GECOS], e)
|
|
||||||
+ self.a.addUser(e, False, False)
|
|
||||||
+ del e
|
|
||||||
+ e = self.a.lookupUserByName('user6_9')
|
|
||||||
+ self.assertEqual(e[libuser.COMMONNAME], ['user6_9'])
|
|
||||||
+ # Defaulted from user name if GECOS is empty
|
|
||||||
+ e = self.a.initUser('user6_10')
|
|
||||||
+ e[libuser.GECOS] = ''
|
|
||||||
+ self.a.addUser(e, False, False)
|
|
||||||
+ del e
|
|
||||||
+ e = self.a.lookupUserByName('user6_10')
|
|
||||||
+ self.assertEqual(e[libuser.COMMONNAME], ['user6_10'])
|
|
||||||
+
|
|
||||||
def testUserMod1(self):
|
|
||||||
# A minimal case
|
|
||||||
e = self.a.initUser('user7_1')
|
|
16
libuser.spec
16
libuser.spec
@ -1,14 +1,12 @@
|
|||||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||||
|
|
||||||
Name: libuser
|
Name: libuser
|
||||||
Version: 0.57.1
|
Version: 0.57.2
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://fedorahosted.org/libuser/
|
URL: https://fedorahosted.org/libuser/
|
||||||
Source: https://fedorahosted.org/releases/l/i/libuser/libuser-%{version}.tar.xz
|
Source: https://fedorahosted.org/releases/l/i/libuser/libuser-%{version}.tar.xz
|
||||||
# Upstream commit 44c92c5eef75eadb71f14f2c8834dfc7ca5b0adb
|
|
||||||
Patch0: libuser-0.57.1-commonName.patch
|
|
||||||
BuildRequires: glib2-devel, linuxdoc-tools, pam-devel, popt-devel, python2-devel
|
BuildRequires: glib2-devel, linuxdoc-tools, pam-devel, popt-devel, python2-devel
|
||||||
BuildRequires: cyrus-sasl-devel, libselinux-devel, openldap-devel
|
BuildRequires: cyrus-sasl-devel, libselinux-devel, openldap-devel
|
||||||
# To make sure the configure script can find it
|
# To make sure the configure script can find it
|
||||||
@ -47,7 +45,6 @@ administering user and group accounts.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .commonName
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-selinux --with-ldap --with-html-dir=%{_datadir}/gtk-doc/html
|
%configure --with-selinux --with-ldap --with-html-dir=%{_datadir}/gtk-doc/html
|
||||||
@ -63,9 +60,7 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
|
|
||||||
# This uses fixed port numbers, and thus breaks when building 32-bit and 64-bit
|
make check
|
||||||
# packages in parallel on the same machine
|
|
||||||
# make check
|
|
||||||
|
|
||||||
# Verify that all python modules load, just in case.
|
# Verify that all python modules load, just in case.
|
||||||
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir}:${LD_LIBRARY_PATH}
|
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir}:${LD_LIBRARY_PATH}
|
||||||
@ -107,6 +102,11 @@ python -c "import libuser"
|
|||||||
%{_datadir}/gtk-doc/html/*
|
%{_datadir}/gtk-doc/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 31 2011 Miloslav Trmač <mitr@redhat.com> - 0.57.2-1
|
||||||
|
- Update to libuser-0.57.2
|
||||||
|
Resolves: #671494
|
||||||
|
- Reenable (make check)
|
||||||
|
|
||||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.57.1-5
|
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.57.1-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user