[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: back-config, includes

Howard Chu writes:
>Hallvard B Furuseth wrote:
>>Pierangelo Masarati writes:
>>>Howard Chu wrote:
>>>>You're welcome to suggest something else. There's no reason that the
>>>>character used in the filesystem needs to be the same as the one in
>>>>the DIT, but it would be a bad idea to make the DIT representation vary.
>>> One quick approach is to allow custom replacement of chars from DIT to
>>> FS and forth.  One could freely remap "=", "{",  "}". and any other
>>> offending char (something like autoconf rewriting all FS-specific chars
>>> to "_", but reversible).
>>Sounds nice.  And actually I would suggest "" and "-" as default
>>instead of "{" and "}".
> For just the filesystem, or both filesystem and DIT?  I would prefer
> that FS and DIT are at least similar if not identical; dropping a
> character in the FS and not in the DIT would be confusing.


> Also I chose to use two balanced characters to make it unambiguous
> when the ordering component is present, and allow the component to be
> absent in many cases.

All balanced characters may well be special somewhere, so in that case
the current ones seem a good enough default.

With non-balanced characters I would suggest _23_core.ldif or something,
so admins won't need to know how to quote filenames in command lines.

> (...)
>> Would it be enough to simply have the maintainer name the schema files
>>   10-core.ldif
>>   15-cosine.ldif
>> etc and let back-config sort the files in a directory and read them in
>> the sort order?  Probably with a sort algorithm which sorts 5-x.ldif as
>> less than 10-x.ldif.  Or one could declare that the numbers are to
>> be considered the decimals after a "0.":-)
> 0.5 is still greater than 0.10 so that doesn't help...

Exactly, so 5 comes after 10.  Problem solved:-) If you have entry {1}
and {2} and want to insert one between, create entry {15}.  No need to
rename, until the max supported number of digits (if any) is used up.

If the numbers are kept in an integer variable, represent 153 as
153000000 internally, strip trailing zeroes in string representation,
reject trailing zeroes in input values.

> For single-valued attributes used as an RDN, adding the extension
> "X-ORDERED 'SIBLINGS'" to the attribute definition means to maintain
> the numeric index based on sibling entries with the same RDN
> attribute.

I suppose an RDN can contain at most one attribute with the X-ORDERED

> So if we have this entry
> dn: olcDatabase={1}bdb,cn=config


Pretty neat.

One point: I suggest to use an attribute with a textual database
name chosen by the admin for the RDN rather than the attribute
which specifies the backend.  Then put the database's backend in
the 'olcBackend' attribute or something.

That would make it easier to see what a set of modifications are
doing, and if one can say 'dn: olcDatabase=mail,cn=config' instead
of 'dn: olcDatabase={2}bdb,cn=config' there would be less risk of
accidentally modifying the wrong database if an earlier operation
renumbered the databases.