Skip to content

Commit 69db76c

Browse files
author
Ross Golder
committed
Re-create subversion repository from live working directory.
svn path=/trunk/; revision=1
0 parents  commit 69db76c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+6969
-0
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ross Golder <[email protected]>

ChangeLog

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
2006-10-10 Ross Golder <[email protected]>
2+
3+
* lib/authtoken.php: Added.
4+
* lib/mysql.php: Minor variable renaming.
5+
* lib/page.php: Remove unnecessary warning/error suppression.
6+
* lib/config.php: Also check for '/var/www/mango/config.xml'.
7+
* lib/foundationmember.php: No need for 'emaillink' stuff.
8+
* www/*.xsl, www/default.css: Cosmetic updates.
9+
* www/list_users.php: Unified/simplified filter keyword search.
10+
* www/update_user.php: Broke into tabs and added form to assist in
11+
sending of templated e-mails.
12+
* templates/authtoken_mail.xsl: Added.
13+
* templates/welcome_mail.xsl: Added.
14+
15+
2005-12-11 Ross Golder <[email protected]>
16+
17+
* www/page.xsl, www/*user*.php: Added access for members of the
18+
'accounts' group.
19+
20+
2005-09-29 Ross Golder <[email protected]>
21+
22+
* lib/user.php: Setting SSH key(s) and group(s) wasn't working
23+
when adding a new user.
24+
25+
2005-09-28 Ross Golder <[email protected]>
26+
27+
* lib/user.php: Added 'which_homedir' function.
28+
* lib/user.php: Added 'which_shell' function.
29+
30+
2005-08-30 Ross Golder <[email protected]>
31+
32+
* www/update_user.xsl, www/new_user.xsl: Re-arrange order of auth
33+
key upload/textarea. Added link to update from 'user added' message.
34+
* www/update_user.php, www/new_user.xsl: De-duplicate keys and ignore
35+
empty keys.
36+
* www/new_user.php, lib/users.php: Fixed uploading SSH keys when
37+
adding new users.
38+
* lib/users.php: Add/remove 'pubkeyAuthenticationUser' class as necessary.
39+
* lib/users.php: Add/remove homedirectory and shell as necessary (on
40+
joining/leaving ftpadmin group).
41+
* lib/users.php: Lowered high watermark for fetching next UID to 10000 to
42+
stop it creating users with insanely high UIDs.
43+
44+
2005-08-28 Ross Golder <[email protected]>
45+
46+
* www/list_users.php: Fix bad re-use of $node variable.
47+
* www/default.css: Add 'tr.inactive' class selector.
48+
* lib/foundationmember.php: Added 'first_added' field.
49+
* lib/datefield.php: New utility class.
50+
* lib/paged_results.php: Fixed bad re-use of $node variable.
51+
* lib/mysql.php: New date-escaping functions.
52+
* bin/convert_members.csv.py: The script I used to convert the
53+
CSV data Vincent supplied with the original membership.
54+
* sql/foundationmembers.sql: Added to complement Vuntz's data and
55+
scripts for foundation membership management.
56+
* sql/ftpmirrors.sql: Added for reference.
57+
* config.xml: No need for this under version control - there's a template
58+
version there anyway.
59+
* lib/config.php: Add 'session_path' config variable (for CGI use).
60+
* www/index.php, www/login.php: Use 'common.php' like the rest.
61+
62+
2005-08-24 Ross Golder <[email protected]>
63+
64+
* www/*.php: Add shebangs as page scripts are to be CGI-executable.
65+
66+
2005-08-17 Ross Golder <[email protected]>
67+
68+
* www/page.xsl, www/login.xsl: Added links to foundation membership
69+
scripts for sysadmin and 'vuntz' groupies :)
70+
71+
2005-08-17 Vincent Untz <[email protected]>
72+
73+
* lib/foundationmember.php, www/*foundationmember*.[php|xsl]: New
74+
stuff for managing the foundation members database.
75+
76+
2005-08-01 Ross Golder <[email protected]>
77+
78+
* www/new_user.*: Add ability to upload SSH key (copied from
79+
update page).
80+
* lib/user.php: Fixed a bug where lastname was added as description.
81+
* secure/login.*: Moved to 'www/'. We're gonna host it all on https.
82+
* secure/: Redundant, removed.
83+
* www/index.xsl, www/page.xsl: Replaced 'secureurl' links with 'baseurl'
84+
links.
85+
* www/login.xsl, lib/config.php, lib/page.php: Removed traces of
86+
'secureurl'.
87+
* www/page.xsl: Fix broken 'mirrors' link at top of each page.
88+
* www/list_ftpmirrors.*: Made filter apply to useful fields.
89+
* www/lists.xml: New file for storing static lists.
90+
* www/new_ftpmirror.xsl, www/update_ftpmirror.xsl: Made location
91+
field a listbox, usins lists.xml.
92+
93+
2005-07-29 Ross Golder <[email protected]>
94+
95+
* secure/common.xsl: Replaced testing URL with live one.
96+
* www/update_user.xsl: Truncate displayed SSH keys for comfort.
97+
98+
2005-07-28 Ross Golder <[email protected]>
99+
100+
* Created initial ChangeLog.
101+
* Added 'redirect' argument to login/page to save a click or two.
102+
103+

HACKING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Ideas for extending this include:
2+
* Making it into a 'self-service' application, where authenticated GNOME hackers can update their own details (SSH keys, e-mail addresses etc). Strong encryption/authentication/security measures would be a requirement here though, I think.
3+
* Anonymous voting. The membership committee has officially requested a system to do this, and Mango provides a good basis. Work has already started on a basic interface for tracking members. Notes on where to go from there can be found here: <http://live.gnome.org/AnonymousVoting>.

INSTALL

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Roughly:
2+
3+
1) Set up the virtualhost
4+
5+
Create a new entry in /etc/hosts:
6+
7+
127.0.0.123 mango.gnome.local
8+
9+
You can use whatever you want for the IP and hostname, as long as Apache will respond to it. Next, add a virtualhost file in your Apache sites dir (/etc/httpd/sites.d for RedHat, /etc/apache/sites-available for Debian/Ubuntu).
10+
11+
<VirtualHost 127.0.0.123:80>
12+
ServerName mango.gnome.local
13+
DocumentRoot /where/you/checked/out/mango/www
14+
</VirtualHost>
15+
16+
Restart Apache for changes to take effect.
17+
18+
2) Copy 'config-example.xml' to 'config.xml' and configure to taste.
19+
20+
3) Connect to http://mango.gnome.local/ (or whatever you set it up to be) and off you go.
21+

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ross Golder <[email protected]>

README

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Mango web front-end to the GNOME LDAP and MySQL databases
2+
-----
3+
4+
This package contains a simple, but extensible admin front-end for managing the gnome.org LDAP and MySQL databases. It's been carved out of some larger PHP projects I've been working on. It does quite a bit already, but it doesn't wash the dishes for you just yet.
5+
6+
Why 'mango'? As you may know, naming a piece of software is one of the hardest things in software development (for me anyway). I happened to be eating a mango while trying to think of a name. I figured I could explain it to people as 'My Administration Nahdtang for Gnome.Org', which is lame, and nobody will realise that Nahdtang is Thai for Window. Still, it doesn't really matter if it's name stands for anything or not, as long is it has a unique name so it won't get confused with other systems that do a similar thing. Anyway, 'mango' is kind of a cool word. Enough said.
7+
8+
--
9+
Ross Golder <[email protected]>

REQUIREMENTS

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Mango System Requirements
2+
-------------------------
3+
4+
The GNOME sysadmin team need a better way to manage the data in the organisation's LDAP database and some of the mySQL databases.
5+
6+
In particular, the accounts manager needs to be able to:
7+
8+
- Add new users to the LDAP server.
9+
- Locate existing users (by login, name or e-mail address)
10+
- Update user's SSH keys, or contact details.
11+
- Add/remove users to/from particular groups (e.g. gnomecvs, ftpadmin etc)
12+
- Send one of the standard e-mail templates, pre-populated, with a '[email protected]' reply-to address set ;-)
13+
14+
Additionally, the mirrors list manager needs to be able to:
15+
16+
- List all known active/inactive mirrors.
17+
- Add/update/remove mirrors in the mirrors database.
18+
- Regenerate a central 'mirrors.xml' file somewhere, and trigger an XSLT process to generate 'mirrors.html' (or something like that) to keep the live mirrors list page up-to-date.
19+
20+
This system needs to be able to authenticate the above types of user and allow them to perform their duties. In the future, there may be other classes of user (e.g. foundation membership administration).
21+
22+
For bonus points, there should be a set of publicly accessible forms to allow people to request a CVS account, request a change of SSH key or contact details etc, which will pre-check certain inputs and send a copy of the request by e-mail to both the requestor (for reference/to identify abuse) and to [email protected] (to process the request). In the future, these processes can be automated even further etc.

bin/convert_members_csv.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/python
2+
3+
def escape(value):
4+
newvalue = ''
5+
for ch in value[0:(len(value))]:
6+
if ch == '\'':
7+
newvalue = newvalue + '\\'
8+
newvalue = newvalue + ch
9+
10+
return newvalue
11+
12+
csvin = open('members.csv', 'r')
13+
sqlout = open('members.sql', 'w')
14+
15+
linenum = 0
16+
while(1):
17+
line = csvin.readline()
18+
if(len(line) < 1):
19+
break
20+
linenum = linenum + 1
21+
tokens = line.split(';')
22+
if(len(tokens) != 4):
23+
raise Error('Wrong number of tokens on line ' + linenum)
24+
firstname = escape(tokens[0])
25+
lastname = escape(tokens[1])
26+
email = tokens[2]
27+
first_added_yy = tokens[3][0:2]
28+
first_added_mm = tokens[3][3:5]
29+
first_added_dd = tokens[3][6:8]
30+
if(int(first_added_yy) > 90):
31+
first_added_yy = "19" + first_added_yy
32+
else:
33+
first_added_yy = "20" + first_added_yy
34+
first_added = first_added_yy + "-" + first_added_mm + "-" + first_added_dd
35+
print >> sqlout, "INSERT INTO foundationmembers (firstname, lastname, email, first_added) VALUES ('" + firstname + "', '" + lastname + "', '" + email + "', '" + first_added + "');"
36+
37+
csvin.close()
38+
sqlout.close()

bin/update-site.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/perl -w
2+
3+
while (<>) {
4+
if (/^UPDATE\s*([a-zA-Z0-9_+-.]*)\s*$/) {
5+
#chdir("/var/www/mango");
6+
chdir($ENV{'HOME'});
7+
system qq(svn update);
8+
} elsif (/^UPDATE/) {
9+
system qq(echo "Bad UPDATE line: $_");
10+
}
11+
}

config.xml-gnome

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<config>
3+
<mode>development</mode>
4+
<base_url>http://mango.gnome.org</base_url>
5+
<secure_url>https://mango.gnome.org</secure_url>
6+
<mirrors_db_url>mysql://gnome:[email protected]:3306/gnome</mirrors_db_url>
7+
<membership_db_url>mysql://gnome:[email protected]:3306/gnome</membership_db_url>
8+
<smtp_url>smtp://localhost/</smtp_url>
9+
<ldap_url>ldap://localhost/</ldap_url>
10+
<ldap_binddn>cn=Manager,dc=gnome,dc=org</ldap_binddn>
11+
<ldap_bindpw>nottelling</ldap_bindpw>
12+
<ldap_basedn>dc=gnome,dc=org</ldap_basedn>
13+
<ldap_users_basedn>ou=people,dc=gnome,dc=org</ldap_users_basedn>
14+
<ldap_groups_basedn>ou=groups,dc=gnome,dc=org</ldap_groups_basedn>
15+
<support_email>[email protected]</support_email>
16+
<session_path>/var/lib/mango/sessions</session_path>
17+
</config>

0 commit comments

Comments
 (0)