[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#863647: use LDAP to generate www.debian.org/intro/organization page (or at least, part of it)



Package: www.debian.org
Severity: wishlist

We have some info stored in the Debian LDAP, about people belonging to
groups, that could be used to generate (and keep updated
automatically) the /intro/organization page.

Adapting a script written by Paul Wise (thanks!), and running it from
a debian.org machine (e.g. people.debian.org), I can obtain the list
of, for example, Publicity Team delegates (see attached script
ldap_dump.py)..

We would need to know the gid or supplementaryGid of each of the teams
that we want to generate.

Then we would need to compare the list of groups/people that we can
obtain from LDAP, with the current list that we have in
/intro/organization. To take into account: some teams have no
corresponding LDAP group, e.g. Technical Committee.

Then, adapt the current organization.data file to insert the
corresponding scripting parts for the data that we obtain via LDAP
(not sure if we can insert Python scripts in the wml files, but
probably we can write similar code in Perl).

Leaving this here for now, I may return to advance this later in the
year, if nobody beats me to it.

Cheers
-- 
Laura Arjona Reina
https://wiki.debian.org/LauraArjona
#!/usr/bin/python

# Author: Paul Wise <pabs@debian.org>
# Author: Laura Arjona Reina <larjona@debian.org>
# License: MIT/Expat

import os
import sys
import ldap

aliases = []

l = ldap.initialize('ldaps://db.debian.org')
r = l.search_s('dc=debian,dc=org',ldap.SCOPE_SUBTREE,'(supplementaryGid=publicity)',['gecos'])
aliases.append('Publicity Team')
for dn,e in r:
    aliases.append(' Member: %s' % e['gecos'][0])
del l, r

with open(os.path.expanduser('./debian-teams'), 'w') as f:
    f.write('\n'.join(aliases))

Reply to: