rpms/GConf2/devel GConf2-2.10.0-evolution-mail-account-backend.patch, NONE, 1.1 GConf2.spec, 1.21, 1.22

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Apr 18 13:52:59 UTC 2005


Update of /cvs/dist/rpms/GConf2/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv3468

Modified Files:
	GConf2.spec 
Added Files:
	GConf2-2.10.0-evolution-mail-account-backend.patch 
Log Message:
* Mon Apr 18 2005 Mark McLoughlin <markmc at redhat.com> - 2.10.0-2
- Add evolution mail accounts backend


GConf2-2.10.0-evolution-mail-account-backend.patch:
 Makefile.am       |   15 
 Makefile.in       |   95 ++++--
 README.evoldap    |  185 +++++++++++
 evoldap-backend.c |  853 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 evoldap.conf      |   53 +++
 evoldap.schema    |   27 +
 6 files changed, 1210 insertions(+), 18 deletions(-)

--- NEW FILE GConf2-2.10.0-evolution-mail-account-backend.patch ---
--- GConf-2.10.0/backends/README.evoldap.evolution-mail-account-backend	2005-04-18 13:32:16.000000000 +0100
+++ GConf-2.10.0/backends/README.evoldap	2005-04-18 13:37:38.000000000 +0100
@@ -0,0 +1,185 @@
+Evolution Mail Account LDAP Backend For GConf
+=============================================
+
+  This is a special-purpose backend for GConf which enables default
+mail accounts for Evolution to be configured using each user's LDAP
+entry. By setting each user's mail address and incoming/outgoing mail
+server addresses in the user's LDAP entry, Evolution will be
+automatically configured with the user's mail account.
+
+Getting it Going
+================
+
+  Once installed, you first need to point the backend at the
+appropriate LDAP server. Edit /etc/gconf/2/evoldap.conf:
+
+---
+<evoldap>
+  <server>
+    <host>ldap.blaa.com</host>
+    <port></port>
+    <base_dn>ou=people,dc=blaa,dc=com</base_dn>
+  </server>
+---
+
+  <host> should be pointed at your LDAP server, <port> should usually
+be left blank (it defaults to 389, the standard port for LDAP) and
+<base_dn> should point to the location in LDAP where your user entries
+are stored.
+
+  You then need to store the mail account information in your user's
+LDAP entries. Using the default template (see below for details on the
+template) you need to install the LDAP schemas from in your LDAP
+server gconf-evolution-mail-account.schema.
+
+  How you install the custom schema depends entirely on the LDAP
+server you're using, but with the openldap server, you can just edit
+/etc/openldap/slapd.conf and add
+
+    include /etc/openldap/schema/gconf-evolution-mail-account.schema
+
+  somewhere near the top of the file. You then install the .schema
+file in /etc/openldap/schema and restarted slapd.
+
+  Once the schema is installed, you need to modify the LDAP entries to
+add the "evolutionMailAccount" objectClass and set the cn, mail,
+evolutionMailSourceURI and evolutionMailTransportURI attributes. You
+can use any method you like to modify the LDAP entries e.g. a
+graphical LDAP editor like "gq" or a slapd.replog script with
+ldapmodify:
+
+---
+ldapmodify -x -W -D cn=Manager,dc=blaa,dc=com -h ldap.blaa.com <<EOF
+dn: uid=markmc,ou=people,dc=blaa,dc=com
+add: objectClass
+objectClass: evolutionMailAccount
+
+dn: uid=markmc,ou=people,dc=blaa,dc=com
+cn: Mark McLoughlin
+mail: markmc at blaa.com
+evolutionMailSourceURI: imap://markmc@mail.blaa.com/;use_ssl=always
+evolutionMailTransportURI: smtp://mail.blaa.com
+EOF
+---
+
+  You should then be able to verify that the backend is generating the
+correct value for the /apps/evolution/mail/accounts GConf key:
+
+---
+[markmc at blaa ~]$ gconftool-2 --direct --config-source=evoldap:readonly:/etc/gconf/2/evoldap.conf -g /apps/evolution/mail/accounts
+Resolved address "evoldap:readonly:/gnome/head/INSTALL/etc/gconf/2/evoldap.conf" to a read-only configuration source at position 0
+None of the resolved addresses are writable; saving configuration settings will not be possible
+[<?xml version="1.0"?>
+<account name="markmc at blaa.com" uid="1113478550.9037.0 at blaa"
+enabled="true">
+      <identity>
+        <name>Mark McLoughlin</name>
+        <addr-spec>markmc at blaa.com</addr-spec>
+        <reply-to/>
+        <organization/>
+        <signature uid=""/>
+      </identity>
+      <source save-passwd="false" keep-on-server="false" auto-check="false" auto-check-timeout="10">
+        <url>imap://markmc@mail.blaa.com/;use_ssl=always</url>
+      </source>
+      <transport save-passwd="false">
+        <url>smtp://mail.blaa.com</url>
+      </transport>
+      <drafts-folder/>
+      <sent-folder/>
+      <auto-cc always="false">
+        <recipients/>
+      </auto-cc>
+      <auto-bcc always="false">
+        <recipients/>
+      </auto-bcc>
+      <pgp encrypt-to-self="false" always-trust="false" always-sign="false" no-imip-sign="false">
+        <key-id></key-id>
+      </pgp>
+      <smime sign-default="false" encrypt-default="false" encrypt-to-self="false">
+        <sign-key-id/>
+        <encrypt-key-id/>
+      </smime>
+    </account>
+]
+---
+
+  Finally, in order to make GConf pull from this configuration source,
+you need to add it to the GConf path file in /etc/gconf/2/path by
+adding the configuration source address -
+"evoldap:readonly:/etc/gconf/2/evoldap.conf" - after the user's
+configuration source - e.g.
+
+---
+# Give users a default storage location, ~/.gconf
+xml:readwrite:$(HOME)/.gconf
+
+# Pull default Evolution account from LDAP
+evoldap:readonly:/etc/gconf/2/evoldap.conf
+---
+
+Getting More Complex
+====================
+
+  Although this default method of setting things up should work for
+most people, the configuration file does give you a fair number of
+options if e.g. you didn't want to (or couldn't) add the custom
+evolutionMailAccount schema to your LDAP server or if you wanted to
+have multiple default accounts per user.
+
+  The default template looks like:
+
+---
+  <template filter="(& (uid=$(USER))(objectClass=inetOrgPerson)(objectClass=evolutionMailAccount))">
+    <account name="$(LDAP_ATTR_mail)" uid="$(ACCOUNT_UID)" enabled="true">
+      <identity>
+        <name>$(LDAP_ATTR_cn)</name>
+        <addr-spec>$(LDAP_ATTR_mail)</addr-spec>
+        <reply-to></reply-to>
+        <organization></organization>
+        <signature uid=""/>
+      </identity>
+---
+
+  The first configurable part is the "filter_str" attribute. This can
+be any valid LDAP filter which the backend uses to query the LDAP
+server using the base DN specified earlier. You can test the filter
+from the command line with:
+
+---
+ldapsearch -x -h ldap.blaa.com -b ou=people,dc=blaa,dc=com "(& (uid=markmc)(objectClass=inetOrgPerson)(objectClass=evolutionMailAccount))"
+---
+
+  (Note that you need to unescape the ampersand and use a valid
+   username when testing the filter)
+
+  The next configurable part is the variables sprinkled around in the
+snippet above. There are three types of variables:
+
+  - $(USER) is the username of the user running evolution
+  - $(ACCOUNT_UID) is an account UID generated by the backend in the
+    same format as Evolution uses
+  - $(LDAP_ATTR_*) is the name of an LDAP attribute
+
+  Each of these variables can be used anywhere in the filter - well,
+you can't use the $(LDAP_ATTR_*) variables in the filter - or template
+<account>.
+
+  The value of the /apps/evolution/mail/accounts key is generated by
+applying this template to each of the LDAP entries returned by
+searching using the filter string in the specified base DN. The value
+of the $(LDAP_ATTR_*) variable is determined by looking up the
+attribute value on then entry to which the template is being applied.
+
+  Effectively, this means you can don't need to use the custom schema,
+you can store the account data anywhere in the directory and you can
+have multiple accounts per user.
+
+Caveats
+=======
+
+  - In the short term, the configuration file format, schema etc. are
+    all still subject to change
+
+  - This hasn't yet seen much testing. If you try this out, feedback
+    is much appreciated whether it be good or bad.
--- GConf-2.10.0/backends/Makefile.am.evolution-mail-account-backend	2004-09-14 20:58:09.000000000 +0100
+++ GConf-2.10.0/backends/Makefile.am	2005-04-18 13:34:30.000000000 +0100
@@ -4,7 +4,7 @@
 
 backenddir = $(pkglibdir)/$(MAJOR_VERSION)
 
-backend_LTLIBRARIES = libgconfbackend-xml.la libgconfbackend-oldxml.la
+backend_LTLIBRARIES = libgconfbackend-xml.la libgconfbackend-oldxml.la libgconfbackend-evoldap.la
 
 libgconfbackend_oldxml_la_SOURCES = \
 	xml-cache.h		\
@@ -37,3 +37,16 @@
 bin_PROGRAMS = gconf-merge-tree
 gconf_merge_tree_SOURCES = gconf-merge-tree.c
 gconf_merge_tree_LDADD = $(DEPENDENT_LIBS) $(top_builddir)/gconf/libgconf-$(MAJOR_VERSION).la
+
+
+
+
+libgconfbackend_evoldap_la_SOURCES = evoldap-backend.c
+libgconfbackend_evoldap_la_LDFLAGS = -avoid-version -module -no-undefined
+libgconfbackend_evoldap_la_LIBADD  = $(DEPENDENT_LIBS) $(top_builddir)/gconf/libgconf-$(MAJOR_VERSION).la -lldap
+
+backendconfdir   = $(sysconfdir)/gconf/2
+backendconf_DATA = evoldap.conf
+
+schemadir   = $(pkgdatadir)/schema
+schema_DATA = evoldap.schema
--- GConf-2.10.0/backends/evoldap.conf.evolution-mail-account-backend	2005-04-18 13:32:16.000000000 +0100
+++ GConf-2.10.0/backends/evoldap.conf	2005-04-18 13:32:16.000000000 +0100
@@ -0,0 +1,53 @@
+<evoldap>
+  <server>
+    <host></host> <!-- e.g. ldap.blaa.com -->
+    <port></port> <!-- defaults to 389 -->
+    <base_dn></base_dn> <!-- e.g. ou=people,dc=blaa,dc=com -->
+  </server>
+
+  <!--
+     The /apps/evolution/mail/accounts list will be constructed
+     by applying each LDAP entry which matches the filter to
+     the <account> template.
+
+     Valid variables:
+       1) $(USER) - the username
+       2) $(ACCOUNT_UID) - mystical magical per-account UID string
+       3) $(LDAP_ATTR_foo) - the value of the "foo" attribute on the
+                             LDAP entry which matches the filter
+    -->
+
+  <template filter="(&(uid=$(USER))(objectClass=inetOrgPerson)(objectClass=evolutionMailAccount))">
+    <account name="$(LDAP_ATTR_mail)" uid="$(ACCOUNT_UID)" enabled="true">
+      <identity>
+        <name>$(LDAP_ATTR_cn)</name>
+        <addr-spec>$(LDAP_ATTR_mail)</addr-spec>
+        <reply-to></reply-to>
+        <organization></organization>
+        <signature uid=""/>
+      </identity>
+      <source save-passwd="false" keep-on-server="false" auto-check="false" auto-check-timeout="10">
+        <url>$(LDAP_ATTR_evolutionMailSourceURI)</url>
+      </source>
+      <transport save-passwd="false">
+        <url>$(LDAP_ATTR_evolutionMailTransportURI)</url>
+      </transport>
+      <drafts-folder></drafts-folder>
+      <sent-folder></sent-folder>
+      <auto-cc always="false">
+        <recipients></recipients>
+      </auto-cc>
+      <auto-bcc always="false">
+        <recipients></recipients>
+      </auto-bcc>
+      <pgp encrypt-to-self="false" always-trust="false" always-sign="false" no-imip-sign="false">
+        <key-id></key-id>
+      </pgp>
+      <smime sign-default="false" encrypt-default="false" encrypt-to-self="false">
+        <sign-key-id></sign-key-id>
+        <encrypt-key-id></encrypt-key-id>
+      </smime>
+    </account>
+  </template>
+
+</evoldap>
--- GConf-2.10.0/backends/evoldap-backend.c.evolution-mail-account-backend	2005-04-18 13:32:16.000000000 +0100
+++ GConf-2.10.0/backends/evoldap-backend.c	2005-04-18 13:32:16.000000000 +0100
@@ -0,0 +1,853 @@
+/*
+ * Copyright (C) 2005 Red Hat Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include <errno.h>
+#include <libintl.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <time.h>
+#include <ldap.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <glib.h>
+
+#include <gconf/gconf.h>
+#include <gconf/gconf-backend.h>
+#include <gconf/gconf-internals.h>
+
+#define _(String) dgettext (GETTEXT_PACKAGE, String)
+
+typedef struct
+{
+  GConfSource source;
+
+  char *conf_file;
+
+  char *ldap_host;
+  int   ldap_port;
+  char *base_dn;
+  char *filter_str;
+
+  xmlDocPtr  xml_doc;
+  xmlNodePtr template_account;
+
+  LDAP *connection;
+
+  GConfValue *accounts_value;
+
+  guint conf_file_parsed : 1;
+} EvoSource;
+
+static void           x_shutdown      (GError           **err);
+static GConfSource   *resolve_address (const char        *address,
+                                       GError           **err);
+static void           lock            (GConfSource       *source,
+                                       GError           **err);
+static void           unlock          (GConfSource       *source,
+                                       GError           **err);
+static gboolean       readable        (GConfSource       *source,
+                                       const char        *key,
+                                       GError           **err);
+static gboolean       writable        (GConfSource       *source,
+                                       const char        *key,
+                                       GError           **err);
+static GConfValue    *query_value     (GConfSource       *source,
+                                       const char        *key,
+                                       const char       **locales,
+                                       char             **schema_name,
+                                       GError           **err);
+static GConfMetaInfo *query_metainfo  (GConfSource       *source,
+                                       const char        *key,
+                                       GError           **err);
+static void           set_value       (GConfSource       *source,
+                                       const char        *key,
+                                       const GConfValue  *value,
+                                       GError           **err);
+static GSList        *all_entries     (GConfSource       *source,
+                                       const char        *dir,
+                                       const char       **locales,
+                                       GError           **err);
+static GSList        *all_subdirs     (GConfSource       *source,
+                                       const char        *dir,
+                                       GError           **err);
+static void           unset_value     (GConfSource       *source,
+                                       const char        *key,
+                                       const char        *locale,
+                                       GError           **err);
+static gboolean       dir_exists      (GConfSource       *source,
+                                       const char        *dir,
+                                       GError           **err);
+static void           remove_dir      (GConfSource       *source,
+                                       const char        *dir,
+                                       GError           **err);
+static void           set_schema      (GConfSource       *source,
+                                       const char        *key,
+                                       const char        *schema_key,
+                                       GError           **err);
+static gboolean       sync_all        (GConfSource       *source,
+                                       GError           **err);
+static void           destroy_source  (GConfSource       *source);
+static void           clear_cache     (GConfSource       *source);
+static void           blow_away_locks (const char        *address);
+
+static GConfBackendVTable evoldap_vtable = {
+  sizeof (GConfBackendVTable),
+  x_shutdown,
+  resolve_address,
+  lock,
+  unlock,
+  readable,
+  writable,
+  query_value,
+  query_metainfo,
+  set_value,
+  all_entries,
+  all_subdirs,
+  unset_value,
+  dir_exists,
+  remove_dir,
+  set_schema,
+  sync_all,
+  destroy_source,
+  clear_cache,
+  blow_away_locks,
+  NULL, /* set_notify_func */
+  NULL, /* add_listener    */
+  NULL  /* remove_listener */
+};
+
+static void
+x_shutdown (GError **err)
+{
+}
+
+static GConfSource *
+resolve_address (const char  *address,
+		 GError     **err)
+{
+  EvoSource *esource;
+  char      *conf_file;
+
+  if ((conf_file = gconf_address_resource (address)) == NULL)
+    {
+      g_set_error (err, GCONF_ERROR,
+		   GCONF_ERROR_BAD_ADDRESS,
+		   _("Failed to get configurion file path from '%s'"),
+		   address);
+      return NULL;
+    }
+
+  esource = g_new0 (EvoSource, 1);
+
+  esource->conf_file    = conf_file;
+  esource->source.flags = GCONF_SOURCE_ALL_READABLE | GCONF_SOURCE_NEVER_WRITEABLE;
+
+  gconf_log (GCL_DEBUG,
+	     _("Created Evolution/LDAP source using configuration file '%s'"),
+	     esource->conf_file);
+
+  return (GConfSource *) esource;
+}
+
+static void
+lock (GConfSource  *source,
+      GError      **err)
+{
+}
+
+static void
+unlock (GConfSource  *source,
+        GError      **err)
+{
+}
+
+
+static gboolean
+readable (GConfSource  *source,
+	  const char   *key,
+	  GError      **err)
+{
+  return TRUE;
+}
+
+static gboolean
+writable (GConfSource  *source,
+	  const char   *key,
+	  GError      **err)
+{
+  return FALSE;
+}
+
+/*
+ * Taken from evolution/e-util/e-uid.c
+ */
+static char *
+get_account_uid (void)
+{
+  static char *hostname;
+  static int   serial;
+
+  if (!hostname)
+    {
+      static char buffer [512];
+
+      if ((gethostname (buffer, sizeof (buffer) - 1) == 0) &&
+	  (buffer [0] != 0))
+	hostname = buffer;
+      else
+	hostname = "localhost";
+    }
+
+  return g_strdup_printf ("%lu.%lu.%d@%s",
+			  (unsigned long) time (NULL),
+			  (unsigned long) getpid (),
+			  serial++,
+			  hostname);
+}
+
+static char *
+get_variable (const char  *varname,
+	      LDAP        *connection,
+	      LDAPMessage *entry)
+{
+  BerElement *berptr;
+  const char *attr;
+  char       *retval;
+
+  if (strcmp (varname, "USER") == 0)
+    return g_strdup (g_get_user_name ());
+
+  if (strcmp (varname, "ACCOUNT_UID") == 0)
+    return get_account_uid ();
+
+  if (connection == NULL || entry == NULL)
+    return g_strdup ("");
+
+  if (strncmp (varname, "LDAP_ATTR_", 10) != 0)
+    return g_strdup ("");
+
+  varname += 10;
+
+  retval = NULL;
+
+  berptr = NULL;
+  attr = ldap_first_attribute (connection, entry, &berptr);
+  while (attr != NULL && retval == NULL)
+    {
+      char **values;
+
+      if (strcmp (attr, varname) == 0)
+	{
+	  values = ldap_get_values (connection, entry, attr);
+	  if (values != NULL)
+	    retval = g_strdup (values[0]);
+	  ldap_value_free (values);
+	}
+
+      attr = ldap_next_attribute (connection, entry, berptr);
+    }
+
+  ber_free (berptr, 0);
+
+  return retval ? retval : g_strdup ("");
+}
+
+/*
+ * Copied from gconf/gconf-internals.c
+ */
+static char *
+subst_variables (const char  *src,
+		 LDAP        *connection,
+		 LDAPMessage *entry)
+{
+  const char *iter;
+  char       *retval;
+  guint       retval_len;
+  guint       pos;
+  
+  g_return_val_if_fail (src != NULL, NULL);
+
+  retval_len = strlen (src) + 1;
+  pos = 0;
+  
+  retval = g_malloc0 (retval_len + 3); /* add 3 just to avoid off-by-one
+					  segvs - yeah I know it bugs
+					  you, but C sucks */
+  
+  iter = src;
+  while (*iter)
+    {
+      gboolean performed_subst = FALSE;
+      
+      if (pos >= retval_len)
+        {
+          retval_len *= 2;
+          retval = g_realloc (retval, retval_len+3); /* add 3 for luck */
+        }
+      
+      if (*iter == '$' && *(iter + 1) == '(')
+        {
+          const char *varstart = iter + 2;
+          const char *varend   = strchr (varstart, ')');
+
+          if (varend != NULL)
+            {
+              char       *varname;
+              const char *varval;
+              guint       varval_len;
+
+              performed_subst = TRUE;
+
+              varname = g_strndup (varstart, varend - varstart);
+              
+              varval = get_variable (varname, connection, entry);
+              g_free (varname);
+
+              varval_len = strlen (varval);
+
+              if ((retval_len - pos) < varval_len)
+                {
+                  retval_len = pos + varval_len;
+                  retval = g_realloc (retval, retval_len+3);
+                }
+              
+              strcpy (&retval[pos], varval);
+              pos += varval_len;
+
+              iter = varend + 1;
+            }
+        }
+
+      if (!performed_subst)
+        {
+          retval[pos] = *iter;
+          ++pos;
+          ++iter;
+        }
+    }
+
+  retval[pos] = '\0';
+
+  return retval;
+}
+
+static void
+parse_server_info (xmlNodePtr   node,
+		   char       **host,
+		   char       **base_dn,
+		   int         *port)
+{
+  const char *node_name = (const char *) node->name;
+
+  g_assert (strcmp (node_name, "server") == 0);
+
+  node = node->children;
+  while (node != NULL)
+    {
+      node_name = (const char *) node->name;
+
+      if (strcmp (node_name, "host") == 0)
+	{
+	  xmlChar *host_value;
+
+	  host_value = xmlNodeGetContent (node);
+
+	  if (*host != NULL)
+	    g_free (*host);
+	  *host = g_strdup ((char *) host_value);
+
+	  xmlFree (host_value);
+	}
+      else if (strcmp (node_name, "port") == 0)
+	{
+	  xmlChar *port_value;
+
+	  if ((port_value = xmlNodeGetContent (node)) != NULL)
+	    {
+	      char *end;
+	      long  l;
+
+	      end = NULL;
+	      l = strtol ((char *) port_value, &end, 10);
+	      if (end != NULL && end != (char *)port_value && *end == '\0')
+		*port = (int) l;
+
+	      xmlFree (port_value);
+	    }
+	}
+      else if (strcmp (node_name, "base_dn") == 0)
+	{
+	  xmlChar *base_dn_value;
+
+	  base_dn_value = xmlNodeGetContent (node);
+
+	  if (*base_dn != NULL)
+	    g_free (*base_dn);
+	  *base_dn = g_strdup ((char *) base_dn_value);
+
+	  if (base_dn_value != NULL)
+	    xmlFree (base_dn_value);
+	}
+
+      node = node->next;
+    }
+}
+
+static gboolean
+parse_conf_file (EvoSource  *esource,
+		 GError    **err)
+{
+  xmlDocPtr   doc;
+  xmlNodePtr  node;
+  xmlNodePtr  template;
+  xmlChar    *filter_str;
+  char       *contents;
+  gsize       length;
+
+  if (esource->conf_file_parsed)
+    return TRUE;
+
+  length = 0;
+  contents = NULL;
+  if (!g_file_get_contents (esource->conf_file, &contents, &length, err))
+    return FALSE;
+
+  doc = xmlParseMemory (contents, length);
+  g_free (contents);
+  if (doc == NULL)
+    {
+      g_set_error (err, GCONF_ERROR,
+		   GCONF_ERROR_PARSE_ERROR,
+		   _("Unable to parse xml file '%s'"),
+		   esource->conf_file);
+      return FALSE;
+    }
+
+  if (doc->children == NULL)
+    {
+      g_set_error (err, GCONF_ERROR,
+		   GCONF_ERROR_PARSE_ERROR,
+		   _("Config file '%s' is empty"),
+		   esource->conf_file);
+      xmlFreeDoc (doc);
+      return FALSE;
+    }
+  
+  node = doc->children;
+  if (strcmp ((char *) node->name, "evoldap") != 0)
+    {
+      g_set_error (err, GCONF_ERROR,
+		   GCONF_ERROR_PARSE_ERROR,
+		   _("Root node of '%s' must be <evoldap>, not <%s>"),
+		   esource->conf_file,
+		   node->name);
+      xmlFreeDoc (doc);
+      return FALSE;
+    }
+
+  esource->xml_doc = doc;
+  esource->conf_file_parsed = TRUE;
+
+  g_assert (esource->ldap_host == NULL);
+  g_assert (esource->base_dn == NULL);
+
+  esource->ldap_port = 389; /* standard LDAP port number */
+
+  template = NULL;
+  node = node->children;
+  while (node != NULL)
+    {
+      const char *node_name = (const char *) node->name;
+
+      if (strcmp (node_name, "server") == 0)
+	{
+	  parse_server_info (node,
+			     &esource->ldap_host,
+			     &esource->base_dn,
+			     &esource->ldap_port);
+	}
+      else if (strcmp (node_name, "template") == 0)
+	{
+	  template = node;
+	}
+
+      node = node->next;
+    }
+
+  if (template == NULL)
+    {
+      gconf_log (GCL_ERR, _("No <template> specified in '%s'"), esource->conf_file);
+      return TRUE;
+    }
+
+  if ((filter_str = xmlGetProp (template, (xmlChar *) "filter")) == NULL)
+    {
+      gconf_log (GCL_ERR,
+		 _("No \"filter\" attribute specified on <template> in '%s'"),
+		 esource->conf_file);
+      return TRUE;
+    }
+
+  esource->filter_str = subst_variables ((char *) filter_str, NULL, NULL);
+  xmlFree (filter_str);
+
+  node = template->children;
+  while (node != NULL)
+    {
+      const char *node_name = (const char *) node->name;
+
+      if (strcmp (node_name, "account") == 0)
+	esource->template_account = node;
+
+      node = node->next;
+    }
+
+  if (esource->template_account == NULL)
+    gconf_log (GCL_ERR,
+	       _("No template <account> specified in '%s'"),
+	       esource->conf_file);
+
+  return TRUE;
+}
+
+static LDAP *
+get_ldap_connection (EvoSource  *esource,
+		     GError    **err)
+{
+  LDAP *connection;
+
+  g_assert (esource->conf_file_parsed);
+
+  if (esource->ldap_host == NULL || esource->base_dn == NULL)
+    {
+      g_set_error (err, GCONF_ERROR,
+		   GCONF_ERROR_FAILED,
+		   _("No LDAP server or base DN specified in '%s'"),
+		   esource->conf_file);
+      return NULL;
+    }
+
+  gconf_log (GCL_DEBUG,
+	     _("Contacting LDAP server: host '%s', port '%d', base DN '%s'"),
+	     esource->ldap_host, esource->ldap_port, esource->base_dn);
+
+  if ((connection = ldap_init (esource->ldap_host, esource->ldap_port)) == NULL)
+    {
+      gconf_log (GCL_ERR,
+		 _("Failed to contact LDAP server: %s"),
+		 g_strerror (errno));
+      return NULL;
+    }
+
+  esource->connection = connection;
+
+  return esource->connection;
+}
+
+static char *
+subst_variables_into_template_account (EvoSource   *esource,
+				       LDAP        *connection,
+				       LDAPMessage *entry)
+{
+  xmlDocPtr  new_doc;
+  xmlChar   *template;
+  char      *retval;
+
+  new_doc = xmlNewDoc (NULL);
+  xmlDocSetRootElement (new_doc,
+			xmlCopyNode (esource->template_account, 1));
+
+  xmlDocDumpMemory (new_doc, &template, NULL);
+  xmlFreeDoc (new_doc);
+
+  retval =  subst_variables ((char *) template, connection, entry);
+  xmlFree (template);
+
+  return retval;
+}
+
+static GConfValue *
+lookup_value_from_ldap (EvoSource  *esource,
+			GError    **err)
+{
+  LDAP        *connection;
+  LDAPMessage *entries;
+  LDAPMessage *entry;
+  GConfValue  *retval;
+  GSList      *account_values;
+  int          ret;
+
+  if (!parse_conf_file (esource, err))
+    return FALSE;
+
+  if (esource->filter_str == NULL || esource->template_account == NULL)
+    return NULL;
+
+  if ((connection = get_ldap_connection (esource, err)) == NULL)
+    return NULL;
+
+  gconf_log (GCL_DEBUG,
+	     _("Searching for entries using filter: %s"),
+	     esource->filter_str);
+
+  entries = NULL;
+  ret = ldap_search_s (connection,
+		       esource->base_dn,
+		       LDAP_SCOPE_ONELEVEL,
+		       esource->filter_str,
+		       NULL, 0,
+		       &entries);
+  if (ret != LDAP_SUCCESS)
+    {
+      gconf_log (GCL_ERR,
+		 _("Error querying LDAP server: %s"),
+		 ldap_err2string (ret));
+      return NULL;
+    }
+
+  g_assert (entries != NULL);
+
+  gconf_log (GCL_DEBUG,
+	     _("Got %d entries using filter: %s"),
+	     ldap_count_entries (connection, entries),
+	     esource->filter_str);
+
+  account_values = NULL;
+
+  entry = ldap_first_entry (connection, entries);
+  while (entry != NULL)
+    {
+      GConfValue *value;
+      char       *account_str;
+
+      account_str = subst_variables_into_template_account (esource, connection, entry);
+
+      value = gconf_value_new (GCONF_VALUE_STRING);
+      gconf_value_set_string_nocopy (value, account_str);
+
+      account_values = g_slist_append (account_values, value);
+
+      entry = ldap_next_entry (connection, entry);
+    }
+
+  retval = NULL;
+  if (account_values != NULL)
+    {
+      retval = gconf_value_new (GCONF_VALUE_LIST);
+      gconf_value_set_list_type (retval, GCONF_VALUE_STRING);
+      gconf_value_set_list_nocopy (retval, account_values);
+    }
+
+  ldap_msgfree (entries);
+
+  return retval;
+}
+
+static GConfValue *
+query_value (GConfSource  *source,
+	     const char   *key,
+	     const char  **locales,
+	     char        **schema_name,
+	     GError      **err)
+{
+  EvoSource *esource = (EvoSource *) source;
+
+  if (strcmp (key, "/apps/evolution/mail/accounts") != 0)
+    return NULL;
+
+  if (schema_name != NULL)
+    *schema_name = NULL;
+
+  if (esource->accounts_value == NULL)
+    esource->accounts_value = lookup_value_from_ldap (esource, err);
+
+  return esource->accounts_value ? gconf_value_copy (esource->accounts_value): NULL;
+}
+
+static GConfMetaInfo *
+query_metainfo  (GConfSource  *source,
+		 const char   *key,
+		 GError      **err)
+{
+  return NULL;
+}
+
+static void
+set_value (GConfSource       *source,
+	   const char        *key,
+	   const GConfValue  *value,
+	   GError           **err)
+{
+}
+
+static GSList *
+all_entries (GConfSource  *source,
+	     const char   *dir,
+	     const char  **locales,
+	     GError      **err)
+{
+  GConfValue *value;
+
+  if (strcmp (dir, "/apps/evolution/mail") != 0)
+    {
+      return NULL;
+    }
+
+  value = query_value (source, "/apps/evolution/mail/accounts", NULL, NULL, NULL);
+
+  return g_slist_append (NULL,
+			 gconf_entry_new_nocopy ("/apps/evolution/mail/accounts", value));
+}
+
+static GSList *
+all_subdirs (GConfSource  *source,
+	     const char   *dir,
+	     GError      **err)
+{
+  if (dir[0] != '/')
+    {
+      return NULL;
+    }
+
+  dir++;
+  if (dir[0] == '\0')
+    {
+      return g_slist_append (NULL, g_strdup ("apps"));
+    }
+
+  if (strncmp (dir, "apps", 4) != 0)
+    {
+      return NULL;
+    }
+
+  dir += 4;
+  if (dir[0] == '\0')
+    {
+      return g_slist_append (NULL, g_strdup ("evolution"));
+    }
+
+  if (strncmp (dir, "/evolution", 10) != 0)
+    {
+      return NULL;
+    }
+
+  dir += 10;
+  if (dir[0] == '\0')
+    {
+      return g_slist_append (NULL, g_strdup ("mail"));
+    }
+
+  return NULL;
+}
+
+static void
+unset_value (GConfSource  *source,
+	     const char   *key,
+	     const char   *locale,
+	     GError      **err)
+{
+}
+
+static gboolean
+dir_exists (GConfSource  *source,
+	    const char   *dir,
+	    GError      **err)
+{
+  if (strcmp (dir, "/apps/evolution/mail/local") == 0)
+    return TRUE;
+
+  return FALSE;
+}
+
+static void
+remove_dir (GConfSource  *source,
+	    const char   *dir,
+	    GError      **err)
+{
+}
+
+static void
+set_schema (GConfSource  *source,
+	    const char   *key,
+	    const char   *schema_key,
+	    GError      **err)
+{
+}
+
+static gboolean
+sync_all (GConfSource *source,
+	  GError      **err)
+{
+  return TRUE;
+}
+
+static void
+destroy_source (GConfSource *source)
+{
+  EvoSource *esource = (EvoSource *) source;
+
+  esource->connection = NULL;
+
+  if (esource->accounts_value != NULL)
+    gconf_value_free (esource->accounts_value);
+  esource->accounts_value = NULL;
+
+  if (esource->xml_doc != NULL)
+    xmlFreeDoc (esource->xml_doc);
+  esource->xml_doc = NULL;
+  esource->template_account = NULL;
+
+  if (esource->filter_str != NULL)
+    g_free (esource->filter_str);
+  esource->filter_str = NULL;
+
+  if (esource->ldap_host != NULL)
+    g_free (esource->ldap_host);
+  esource->ldap_host = NULL;
+
+  if (esource->base_dn != NULL)
+    g_free (esource->base_dn);
+  esource->base_dn = NULL;
+
+  if (esource->conf_file != NULL)
+    g_free (esource->conf_file);
+  esource->conf_file = NULL;
+
+  g_free (esource);
+}
+
+static void
+clear_cache (GConfSource *source)
+{
+}
+
+static void
+blow_away_locks (const char *address)
+{
+}
+
+GConfBackendVTable *gconf_backend_get_vtable (void);
+
+G_MODULE_EXPORT GConfBackendVTable *
+gconf_backend_get_vtable (void)
+{
+  return &evoldap_vtable;
+}
--- GConf-2.10.0/backends/evoldap.schema.evolution-mail-account-backend	2005-04-18 13:32:16.000000000 +0100
+++ GConf-2.10.0/backends/evoldap.schema	2005-04-18 13:32:16.000000000 +0100
@@ -0,0 +1,27 @@
+# 
+# Red Hat OID value: 1.3.6.1.4.1.2312
+#
+# OID Base for Evolution is 1.3.6.1.4.1.2312.4.3.2
+# Attribute types are under 1.3.6.1.4.1.2312.4.3.2.1 
+# Object classes are under  1.3.6.1.4.1.2312.4.3.2.2 
+
+attributetype ( 1.3.6.1.4.1.2312.4.3.2.1.1 NAME 'evolutionMailSourceURI'
+	DESC 'Evolution mail account source URI'
+	EQUALITY caseIgnoreMatch
+	SUBSTR caseIgnoreSubstringsMatch
+	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
+	SINGLE-VALUE
+	)
+
+attributetype ( 1.3.6.1.4.1.2312.4.3.2.1.2 NAME 'evolutionMailTransportURI'
+	DESC 'Evolution mail account transport URI'
+	EQUALITY caseIgnoreMatch
+	SUBSTR caseIgnoreSubstringsMatch
+	SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
+	SINGLE-VALUE
+	)
+
+objectclass ( 1.3.6.1.4.1.2312.4.3.2.2.1 NAME 'evolutionMailAccount' SUP top AUXILIARY
+	DESC 'Evolution mail account'
+	MAY ( evolutionMailSourceURI $ evolutionMailTransportURI )
+	)
--- GConf-2.10.0/backends/Makefile.in.evolution-mail-account-backend	2005-03-07 11:25:25.000000000 +0000
+++ GConf-2.10.0/backends/Makefile.in	2005-04-18 13:34:48.000000000 +0100
@@ -195,7 +195,7 @@
 
 backenddir = $(pkglibdir)/$(MAJOR_VERSION)
 
-backend_LTLIBRARIES = libgconfbackend-xml.la libgconfbackend-oldxml.la
+backend_LTLIBRARIES = libgconfbackend-xml.la libgconfbackend-oldxml.la libgconfbackend-evoldap.la
 
 libgconfbackend_oldxml_la_SOURCES = \
 	xml-cache.h		\
@@ -231,6 +231,16 @@
 bin_PROGRAMS = gconf-merge-tree
 gconf_merge_tree_SOURCES = gconf-merge-tree.c
 gconf_merge_tree_LDADD = $(DEPENDENT_LIBS) $(top_builddir)/gconf/libgconf-$(MAJOR_VERSION).la
+
+libgconfbackend_evoldap_la_SOURCES = evoldap-backend.c
+libgconfbackend_evoldap_la_LDFLAGS = -avoid-version -module -no-undefined
+libgconfbackend_evoldap_la_LIBADD = $(DEPENDENT_LIBS) $(top_builddir)/gconf/libgconf-$(MAJOR_VERSION).la -lldap
+
+backendconfdir = $(sysconfdir)/gconf/2
+backendconf_DATA = evoldap.conf
+
+schemadir = $(pkgdatadir)/schema
+schema_DATA = evoldap.schema
 subdir = backends
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -238,6 +248,11 @@
 CONFIG_CLEAN_FILES =
 LTLIBRARIES = $(backend_LTLIBRARIES)
 
+libgconfbackend_evoldap_la_DEPENDENCIES = \
+	$(top_builddir)/gconf/libgconf-$(MAJOR_VERSION).la
+am_libgconfbackend_evoldap_la_OBJECTS = evoldap-backend.lo
+libgconfbackend_evoldap_la_OBJECTS = \
+	$(am_libgconfbackend_evoldap_la_OBJECTS)
 libgconfbackend_oldxml_la_DEPENDENCIES = \
 	$(top_builddir)/gconf/libgconf-$(MAJOR_VERSION).la
 am_libgconfbackend_oldxml_la_OBJECTS = xml-cache.lo xml-dir.lo \
@@ -267,7 +282,8 @@
 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
- at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/gconf-merge-tree.Po \
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/evoldap-backend.Plo \
+ at AMDEP_TRUE@	./$(DEPDIR)/gconf-merge-tree.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/markup-backend.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/markup-tree.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/xml-backend.Plo \
@@ -280,11 +296,14 @@
 CCLD = $(CC)
 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(libgconfbackend_oldxml_la_SOURCES) \
+DIST_SOURCES = $(libgconfbackend_evoldap_la_SOURCES) \
+	$(libgconfbackend_oldxml_la_SOURCES) \
 	$(libgconfbackend_xml_la_SOURCES) $(gconf_merge_tree_SOURCES) \
 	$(xml_test_SOURCES)
+DATA = $(backendconf_DATA) $(schema_DATA)
+
 DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
-SOURCES = $(libgconfbackend_oldxml_la_SOURCES) $(libgconfbackend_xml_la_SOURCES) $(gconf_merge_tree_SOURCES) $(xml_test_SOURCES)
+SOURCES = $(libgconfbackend_evoldap_la_SOURCES) $(libgconfbackend_oldxml_la_SOURCES) $(libgconfbackend_xml_la_SOURCES) $(gconf_merge_tree_SOURCES) $(xml_test_SOURCES)
 
 all: all-am
 
@@ -323,6 +342,8 @@
 	  echo "rm -f \"$${dir}/so_locations\""; \
 	  rm -f "$${dir}/so_locations"; \
 	done
+libgconfbackend-evoldap.la: $(libgconfbackend_evoldap_la_OBJECTS) $(libgconfbackend_evoldap_la_DEPENDENCIES) 
+	$(LINK) -rpath $(backenddir) $(libgconfbackend_evoldap_la_LDFLAGS) $(libgconfbackend_evoldap_la_OBJECTS) $(libgconfbackend_evoldap_la_LIBADD) $(LIBS)
 libgconfbackend-oldxml.la: $(libgconfbackend_oldxml_la_OBJECTS) $(libgconfbackend_oldxml_la_DEPENDENCIES) 
 	$(LINK) -rpath $(backenddir) $(libgconfbackend_oldxml_la_LDFLAGS) $(libgconfbackend_oldxml_la_OBJECTS) $(libgconfbackend_oldxml_la_LIBADD) $(LIBS)
 libgconfbackend-xml.la: $(libgconfbackend_xml_la_OBJECTS) $(libgconfbackend_xml_la_DEPENDENCIES) 
@@ -376,6 +397,7 @@
 distclean-compile:
 	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/evoldap-backend.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gconf-merge-tree.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/markup-backend.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/markup-tree.Plo at am__quote@
@@ -427,6 +449,42 @@
 distclean-libtool:
 	-rm -f libtool
 uninstall-info-am:
+backendconfDATA_INSTALL = $(INSTALL_DATA)
+install-backendconfDATA: $(backendconf_DATA)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(backendconfdir)
+	@list='$(backendconf_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(backendconfDATA_INSTALL) $$d$$p $(DESTDIR)$(backendconfdir)/$$f"; \
+	  $(backendconfDATA_INSTALL) $$d$$p $(DESTDIR)$(backendconfdir)/$$f; \
+	done
+
+uninstall-backendconfDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(backendconf_DATA)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(backendconfdir)/$$f"; \
+	  rm -f $(DESTDIR)$(backendconfdir)/$$f; \
+	done
+schemaDATA_INSTALL = $(INSTALL_DATA)
+install-schemaDATA: $(schema_DATA)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(schemadir)
+	@list='$(schema_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(schemaDATA_INSTALL) $$d$$p $(DESTDIR)$(schemadir)/$$f"; \
+	  $(schemaDATA_INSTALL) $$d$$p $(DESTDIR)$(schemadir)/$$f; \
+	done
+
+uninstall-schemaDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(schema_DATA)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(schemadir)/$$f"; \
+	  rm -f $(DESTDIR)$(schemadir)/$$f; \
+	done
 
 ETAGS = etags
 ETAGSFLAGS =
@@ -515,10 +573,10 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA)
 
 installdirs:
-	$(mkinstalldirs) $(DESTDIR)$(backenddir) $(DESTDIR)$(bindir)
+	$(mkinstalldirs) $(DESTDIR)$(backenddir) $(DESTDIR)$(bindir) $(DESTDIR)$(backendconfdir) $(DESTDIR)$(schemadir)
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -562,7 +620,8 @@
 
 info-am:
 
-install-data-am: install-backendLTLIBRARIES
+install-data-am: install-backendLTLIBRARIES install-backendconfDATA \
+	install-schemaDATA
 
 install-exec-am: install-binPROGRAMS
 
@@ -590,22 +649,24 @@
 
 ps-am:
 
-uninstall-am: uninstall-backendLTLIBRARIES uninstall-binPROGRAMS \
-	uninstall-info-am
+uninstall-am: uninstall-backendLTLIBRARIES uninstall-backendconfDATA \
+	uninstall-binPROGRAMS uninstall-info-am uninstall-schemaDATA
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean \
 	clean-backendLTLIBRARIES clean-binPROGRAMS clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am info info-am install \
-	install-am install-backendLTLIBRARIES install-binPROGRAMS \
-	install-data install-data-am install-exec install-exec-am \
-	install-info install-info-am install-man install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-backendLTLIBRARIES \
-	uninstall-binPROGRAMS uninstall-info-am
+	install-am install-backendLTLIBRARIES install-backendconfDATA \
+	install-binPROGRAMS install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-schemaDATA install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-backendLTLIBRARIES \
+	uninstall-backendconfDATA uninstall-binPROGRAMS \
+	uninstall-info-am uninstall-schemaDATA
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.


Index: GConf2.spec
===================================================================
RCS file: /cvs/dist/rpms/GConf2/devel/GConf2.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- GConf2.spec	17 Mar 2005 22:11:15 -0000	1.21
+++ GConf2.spec	18 Apr 2005 13:52:57 -0000	1.22
@@ -5,7 +5,7 @@
 Summary: A process-transparent configuration system
 Name: GConf2
 Version: 2.10.0
-Release: 1
+Release: 2
 License: LGPL
 Group: System Environment/Base
 Source: ftp://ftp.gnome.org/pub/GNOME/unstable/sources/GConf/GConf-%{version}.tar.bz2
@@ -21,6 +21,9 @@
 BuildRequires: gtk-doc >= 0.9
 BuildRequires: pkgconfig >= 0.14
 BuildRequires: gettext
+BuildRequires: openldap-devel
+
+Patch0: GConf2-2.10.0-evolution-mail-account-backend.patch
 
 %description
 GConf is a process-transparent configuration database API used to 
@@ -42,6 +45,8 @@
 %prep
 %setup -q -n GConf-%{version}
 
+%patch0 -p1 -b .evolution-mail-account-backend
+
 %build
 %configure
 make
@@ -55,6 +60,7 @@
 
 rm -f $RPM_BUILD_ROOT/%{_libdir}/GConf/2/libgconfbackend-xml.a
 rm -f $RPM_BUILD_ROOT/%{_libdir}/GConf/2/libgconfbackend-oldxml.a
+rm -f $RPM_BUILD_ROOT/%{_libdir}/GConf/2/libgconfbackend-evoldap.a
 rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
 rm -f $RPM_BUILD_ROOT/%{_libdir}/GConf/2/*.la
 
@@ -69,8 +75,9 @@
 
 %files -f %{name}.lang
 %defattr(-, root, root)
-%doc COPYING ChangeLog NEWS README
-%config %{_sysconfdir}/gconf/2/path
+%doc COPYING ChangeLog NEWS README backends/README.evoldap
+%config(noreplace) %{_sysconfdir}/gconf/2/path
+%config(noreplace) %{_sysconfdir}/gconf/2/evoldap.conf
 %dir %{_sysconfdir}/gconf/2
 %dir %{_sysconfdir}/gconf/gconf.xml.defaults
 %dir %{_sysconfdir}/gconf/gconf.xml.mandatory
@@ -79,6 +86,7 @@
 %{_libdir}/*.so.*
 %{_libdir}/GConf/2/*.so
 %{_datadir}/sgml
+%{_datadir}/GConf
 %{_mandir}/man1/*
 %dir %{_libdir}/GConf
 %dir %{_libdir}/GConf/2
@@ -93,6 +101,9 @@
 %{_libdir}/pkgconfig/*
 
 %changelog
+* Mon Apr 18 2005 Mark McLoughlin <markmc at redhat.com> - 2.10.0-2
+- Add evolution mail accounts backend
+
 * Thu Mar 17 2005 Ray Strode <rstrode at redhat.com> 2.10.0-1
 - Update to 2.10.0
 




More information about the fedora-cvs-commits mailing list