Hello community,
here is the log from the commit of package yast2-ldap
checked in at Thu Aug 7 01:39:48 CEST 2008.
--------
--- yast2-ldap/yast2-ldap.changes 2008-07-21 15:40:52.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-ldap/yast2-ldap.changes 2008-08-06 11:53:32.258738000 +0200
@@ -1,0 +2,6 @@
+Wed Aug 6 11:36:43 CEST 2008 - jsuchome@suse.cz
+
+- adapted LdapServerAccess to new API of yast2-ldap-server (rhafer)
+- 2.17.2
+
+-------------------------------------------------------------------
Old:
----
yast2-ldap-2.17.1.tar.bz2
New:
----
yast2-ldap-2.17.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ldap.spec ++++++
--- /var/tmp/diff_new_pack.z22760/_old 2008-08-07 01:39:43.000000000 +0200
+++ /var/tmp/diff_new_pack.z22760/_new 2008-08-07 01:39:43.000000000 +0200
@@ -1,10 +1,17 @@
#
-# spec file for package yast2-ldap (Version 2.17.1)
+# spec file for package yast2-ldap (Version 2.17.2)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@@ -12,12 +19,12 @@
Name: yast2-ldap
-Version: 2.17.1
+Version: 2.17.2
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-ldap-2.17.1.tar.bz2
+Source0: yast2-ldap-2.17.2.tar.bz2
Prefix: /usr
BuildRequires: doxygen gcc-c++ libldapcpp-devel libxcrypt-devel yast2 yast2-core-devel yast2-devtools
Summary: YaST2 - LDAP Agent
@@ -35,7 +42,7 @@
Jiri Suchomel
%prep
-%setup -n yast2-ldap-2.17.1
+%setup -n yast2-ldap-2.17.2
%build
%{prefix}/bin/y2tool y2autoconf
@@ -67,6 +74,9 @@
%{_libdir}/YaST2/plugin/libpy2ag_ldap.la
%doc %{prefix}/share/doc/packages/yast2-ldap
%changelog
+* Wed Aug 06 2008 jsuchome@suse.cz
+- adapted LdapServerAccess to new API of yast2-ldap-server (rhafer)
+- 2.17.2
* Fri Jul 18 2008 jsuchome@suse.cz
- do not lowercase LDAP object names (fate#303596)
- 2.17.1
++++++ yast2-ldap-2.17.1.tar.bz2 -> yast2-ldap-2.17.2.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-2.17.1/src/LdapAgent.cc new/yast2-ldap-2.17.2/src/LdapAgent.cc
--- old/yast2-ldap-2.17.1/src/LdapAgent.cc 2008-07-21 13:00:37.000000000 +0200
+++ new/yast2-ldap-2.17.2/src/LdapAgent.cc 2008-07-21 15:39:17.000000000 +0200
@@ -4,7 +4,7 @@
*
* Authors: Jiri Suchomel
*
- * $Id: LdapAgent.cc 45056 2008-02-27 09:02:04Z jsuchome $
+ * $Id: LdapAgent.cc 49286 2008-07-21 13:41:12Z jsuchome $
*/
#include "LdapAgent.h"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-2.17.1/src/LdapAgent.h new/yast2-ldap-2.17.2/src/LdapAgent.h
--- old/yast2-ldap-2.17.1/src/LdapAgent.h 2008-07-17 16:24:43.000000000 +0200
+++ new/yast2-ldap-2.17.2/src/LdapAgent.h 2008-07-21 15:39:17.000000000 +0200
@@ -4,7 +4,7 @@
*
* Authors: Jiri Suchomel
*
- * $Id: LdapAgent.h 48495 2008-06-24 09:16:09Z jsuchome $
+ * $Id: LdapAgent.h 49286 2008-07-21 13:41:12Z jsuchome $
*/
#ifndef _LdapAgent_h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-2.17.1/src/LdapServerAccess.pm new/yast2-ldap-2.17.2/src/LdapServerAccess.pm
--- old/yast2-ldap-2.17.1/src/LdapServerAccess.pm 2005-09-08 10:35:00.000000000 +0200
+++ new/yast2-ldap-2.17.2/src/LdapServerAccess.pm 2008-08-06 11:36:16.000000000 +0200
@@ -4,7 +4,7 @@
# Package: Low-level LDAP configuration (agent, etc.)
# Summary: Access to some routines of yast2-ldap-server module
#
-# $Id: LdapServerAccess.pm 18444 2004-08-09 13:44:23Z jsuchome $
+# $Id: LdapServerAccess.pm 49751 2008-08-06 09:38:29Z jsuchome $
#
# Module provides access to LDAP server schemas. The work with schemas
# is done using functions from yast2-ldap-server module. This module
@@ -70,8 +70,14 @@
}
require YaPI::LdapServer;
+ if ( ! YaPI::LdapServer->Init() )
+ {
+ y2error ("Initialzing LDAP Server YaPI failed");
+ return undef;
+ }
+
my $schema_added = 0;
- my $schemas_ref = YaPI::LdapServer->ReadSchemaIncludeList ();
+ my $schemas_ref = YaPI::LdapServer->ReadSchemaList ();
if (! defined ($schemas_ref) || ref ($schemas_ref) ne "ARRAY")
{
y2error ("Retrieving current LDAP schemas failed");
@@ -79,27 +85,23 @@
}
my @schemas = @{$schemas_ref};
foreach my $schema (@new_schemas) {
- my @current_schema = grep /$schema/, @schemas;
+ $schema =~ /^.*\/(.*)\.(schema|ldif)$/;
+ my $schema_base = $1;
+ y2milestone("Schemabase: $schema_base");
+ my @current_schema = grep /$schema_base/, @schemas;
if (0 == scalar (@current_schema))
{
y2milestone ("Including schema $schema");
- push @schemas, $schema;
- $schema_added = 1;
+ if (! YaPI::LdapServer->AddSchema( $schema) ) {
+ return undef;
+ }
}
else
{
y2milestone ("Schema $schema is already included");
}
}
- if ($schema_added) {
- if (! YaPI::LdapServer->WriteSchemaIncludeList (\@schemas)) {
- return undef;
- }
- if ($restart) {
- YaPI::LdapServer->SwitchService (1);
- }
- }
- return Boolean ($schema_added);
+ return Boolean(1);
}
# Add new index to ldap server database
@@ -131,7 +133,7 @@
}
my $attr = $new_index->{"attr"};
- my $param = $new_index->{"param"};
+ my @param = split(/,/, $new_index->{"param"});
if (! $self->InstallLdapServer ()) {
y2error ("Cannot install $package_name, not checking LDAP schemas");
@@ -139,32 +141,67 @@
}
require YaPI::LdapServer;
+ if ( ! YaPI::LdapServer->Init() )
+ {
+ y2error ("Initialzing LDAP Server YaPI failed");
+ return undef;
+ }
my $indices = YaPI::LdapServer->ReadIndex ($suffix);
- if (defined $indices && ref ($indices) eq "ARRAY") {
-
- foreach my $index (@$indices) {
- my $attrs = $index->{"attr"} || "";
- my $params = $index->{"param"} || "";
+ my $index_mod = { "name" => $attr };
+ if (defined $indices && ref ($indices) eq "HASH") {
- my @current_attrs = grep /^$attr$/, split (/,/, $attrs);
- my @current_params = grep /^$param$/, split (/,/, $param);
-
- if (scalar (@current_attrs) >0 && scalar (@current_params) > 0) {
+ if ( defined $indices->{$attr} )
+ {
+
+ if ( ( grep /^eq$/, @param ) || ( $indices->{$attr}->{'eq'} ) )
+ {
+ $index_mod->{'eq'} = 1;
+ }
+ if ( ( grep /^sub$/, @param ) || ( $indices->{$attr}->{'sub'} ) )
+ {
+ $index_mod->{'pres'} = 1;
+ }
+ if ( ( grep /^pres$/, @param ) || ( $indices->{$attr}->{'pres'} ) )
+ {
+ $index_mod->{'pres'} = 1;
+ }
+ if ( ( $index_mod->{'pres'} == $indices->{$attr}->{'pres'} ) &&
+ ( $index_mod->{'sub'} == $indices->{$attr}->{'sub'} ) &&
+ ( $index_mod->{'eq'} == $indices->{$attr}->{'eq'} ) )
+ {
y2milestone ("index for $attr already present");
- $present = 1;
- }
- }
+ $present = 1;
+ }
+ }
+ else
+ {
+ if ( grep /^eq$/, @param )
+ {
+ $index_mod->{'eq'} = 1;
+ }
+ if ( grep /^sub$/, @param )
+ {
+ $index_mod->{'pres'} = 1;
+ }
+ if ( grep /^pres$/, @param )
+ {
+ $index_mod->{'pres'} = 1;
+ }
+ $present = 0;
+ }
+
if (! $present) {
y2milestone ("$attr index missing, adding");
- if (!YaPI::LdapServer->AddIndex ($suffix, $new_index)) {
+ if (!YaPI::LdapServer->EditIndex ($suffix, $index_mod)) {
return undef;
}
if ($restart) {
- YaPI::LdapServer->SwitchService(1);
+ # No restart needed anymore
+ # YaPI::LdapServer->SwitchService(1);
}
}
- return Boolean (!$present);
+ return Boolean(1);
}
return undef;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ldap-2.17.1/VERSION new/yast2-ldap-2.17.2/VERSION
--- old/yast2-ldap-2.17.1/VERSION 2008-07-18 12:03:18.000000000 +0200
+++ new/yast2-ldap-2.17.2/VERSION 2008-08-06 11:37:08.000000000 +0200
@@ -1 +1 @@
-2.17.1
+2.17.2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org