Contents
Introduction
In order to prepare a GNOME Board of Directors election, the rough workflow is like this:
- figure out a timeline
- create web pages
- send announcements
- set up voting
- prepare the results
We hope to be able to guide you through these steps.
HowTo
Firstly, clone the foundation-web git module as holds the web page which is served as http://vote.gnome.org. You can achieve that with:
git clone ssh://USERNAME@git.gnome.org/git/foundation-web
You will then need to copy an old election to a new one, i.e.:
cp -rf ./vote/2010 ./vote/2011
Within that directory, adapt the vote/index.wml, vote/Makefile.am, vote/2011/Makefile.am, and index.wml as well as other files. To make the website build properly, you need to update configure.in in the root directory to include the Makefile of the newly added directory. Please remember that you will have to update htaccess to make /electionrules.html point to the current election rules, i.e. ./elections/2011/rules.html.
Especially have a look at mkical.py and define the dates for the timeline there. If you want, you can align the dates on Sundays, so that people have time to submit votes. You do want to leave enough time at the end, either because there might be challenges or because problems appear. If the board is to be elected in July, it seems wise to plan to close challenges by mid-June, leaving a very good week for resolving problems.
Once you have populated mkical.py with your dates, you can run to obtain a textual representation of the election timeline:
python mkical.py --text
With that, you can write an email like this and send it to the board-list, asking for a quick review, just to make sure that everything is alright and everybody is satisfied:
To: board-list@gnome.org "Dear Board, for the upcoming elections we are proposing the following schedule: May 2011 Mon Tue Wed Thu Fri Sat Sun 1 2 3 4 5 6 7 8 (9) 10 11 12 13 14 15 Announcements and list of candidates opens (9th) 16 17 18 19 20 21 (22) List of candidates closed (22nd) 23 24 (25) 26 27 28 (29) List of candidates announced (25th) 30 31 Instructions to vote are sent (29th) June 2011 Mon Tue Wed Thu Fri Sat Sun 1 2 3 4 5 6 7 8 9 10 11 (12) Votes must be returned (12th) 13 (14) 15 16 17 18 19 Preliminary results are announced (14th) 20 (21) 22 23 24 25 26 Challenges to the results closed (21st) 27 28 29 30 Please review the schedule. If there are no issue with the schedule, we'll send the announcement by Monday, 9th, latest. Thanks in advance"
If the schedule is not challenged, you can created an ical file, if you wish, using mkical.py --ical > timeline.ics.
Once you have done the necessary changes to the files, you can upload your changes:
git commit -a git push
Announcing the upcoming elections
You may then send an announcement to the following mailing lists:
To: foundation-announce@gnome.org Cc: foundation-list@gnome.org In-Reply-To: foundation-list@gnome.org "Dear Foundation Members, As part of the Membership and Elections Committee, I am pleased to announce the upcoming elections for the Board of Directors in Spring 2011. The most important deadlines (UTC) in the timeline are the following: *GNOME Board Elections 2011* 2011-05-22: List of candidates closed 2011-05-29: Voting Begins 2011-06-12: Voting Ends 2011-06-21: Challenges End ELECTIONS ========= The seven members of our current Board of Directors are ruling GNOME for 12 month now. We, the GNOME Foundation Members, will have to either replace or reelect current members. CANDIDACY ========= If you want to run for one of the seven places in the Board of Directors, send an email to foundation-announce@gnome.org with your full name, e-mail, corporate affiliation (if any), and a description of your reasons for wanting to serve as a director. Candidacies must be announced prior to 2011-05-22, 23:59 UTC. All discussion related to the elections should be held on foundation-list. Members are invited to ask questions to one or all candidates on that list (see below). A list of candidates will be announced on 2011-05-25. You are invited to ask questions by sending them to foundation-list. After all, the candidates might become your representative. So do not hesitate to ask a question. But please try to avoid duplicates and bear in mind, that the candidates invest a lot of time answering questions, thus please be reasonable with the amount and scope of the questions. You might want to send your question to membership-committee@gnome.org instead, so that we can collect, sift and sort the questions before we send them out. But again: if you feel the need to ask your question directly, please do so. ELECTORATE ========== Every GNOME foundation member whose membership is valid in the range of the full voting period, including challenges (2011-05-29 - 2011-06-21) is eligible to vote. If you are not a member yet, please consider to apply ASAP. Late applications will most likely not be processed in time. We will inform the people that might need to renew via email. You might want to double check yourself though. Please verify that the email address, that is associated with your GNOME Foundation membership, is valid and that your able to read emails sent to this address. You can check whether you are a member or what email address is recorded on this website: <http://www.gnome.org/foundation/membership/>. If you have any issues, please write to membership-committee@gnome.org. VOTING ====== The Electorate will receive complete instructions on how to vote by 2011-05-29 via email. The 7 candidates voted for most as counted by a single transferable vote system (Scottish STV) will be elected, except that no more than two individuals affiliated with any one corporation may be elected. In the event of a tie for the final slot on the board, the Elections Committee will schedule run-off elections as soon as possible. CALENDAR ======== May 2011 Mon Tue Wed Thu Fri Sat Sun 1 2 3 4 5 6 7 8 (9) 10 11 12 13 14 15 Announcements and list of candidates opens (9th) 16 17 18 19 20 21 (22) List of candidates closed (22nd) 23 24 (25) 26 27 28 (29) List of candidates announced (25th) 30 31 Instructions to vote are sent (29th) June 2011 Mon Tue Wed Thu Fri Sat Sun 1 2 3 4 5 6 7 8 9 10 11 (12) Votes must be returned (12th) 13 (14) 15 16 17 18 19 Preliminary results are announced (14th) 20 (21) 22 23 24 25 26 Challenges to the results closed (21st) 27 28 29 30 Happy Voting"
Membership renewals
You need to find out the members that had a valid membership for the last elections, but not for the current one.
You should have access to the foundation's database. If not, ask the Membership Committee's Chairman to do that for you.
You could use a MySQL Query like that:
SET names 'utf8'; use foundation; SELECT CONCAT(firstname, ';', lastname, ';', email, ';', las$ FROM foundationmembers WHERE last_renewed_on >= DATE_SUB( CONCAT( YEAR( DATE_SUB(CURDATE(), INTERVAL 1 YEAR) ), '-07-01' ), INTERVAL 2 YEAR ) AND last_renewed_on <= DATE_SUB( CONCAT(YEAR(CURDATE()), '-07-01'), INTERVAL 2 YEAR ) ORDER BY last_renewed_on;
Or a script which is in the foundation-web module, known as "get_renewees.py".
Meanwhile, follow foundation-announce and check via Mango if the candidates are actually members. Edit the list of candidates in the git module, i.e. the candidates.wml page.
Withdrawals
In the case someone withdraws before the ballots have been sent out, the withdrawer should mail foundation-announce@gnome.org and the MembershipCommittee will take the needed actions, such as removing the name from the list or the database.
In the case the withdrawal happens after the ballots have been sent out, the election continues as planned and the withdrawer, if elected, may resign immediately. The Board may pick a replacement as per the bylaws.
Candidacies
Note: If there are fewer candidacies than seats, the election runs as planned. The elected Board can fill the missing seats, as per the bylaws.
Once the deadline to announce candidacies has passed, you can send an email to foundation-announce with a compiled list of candidates and some encouraging words to ask questions:
To: foundation-announce@gnome.org Reply-To: foundation-list@gnome.org Subject: GNOME Board of Directors Foundation Elections Spring 2012 - The candidates "Dear Foundation Members, I am glad to announce the following list of candidates for the Board of Directors. * Shaun McCance * Andrea Veri * Rodrigo Moya * Emmanuele Bassi * Pockey Lam * Stormy Peters * Bastien Nocera * Brian Cameron * Lionel Dricot * Germán Póo-Caamaño * Andre Klapper * Ryan Lortie * Diego Escalante Urrelo Please see <http://vote.gnome.org/2012/candidates.html> for details. We are having discussions on foundation-list already. That's fine. You are invited to ask questions by sending them to foundation-list. But please try to avoid duplicates and bear in mind, that the candidates invest a lot of time answering questions, thus please be reasonable with the amount and scope of the questions. You might want to send your question to membership-committee@gnome.org instead, so that we can collect, sift and sort the questions before we send them out shortly after the ballots were sent. But again: if you feel the need to ask your question directly, please do so. If you have any questions, do not hesitate to ask them at membership-committee@gnome.org or elections@gnome.org Cheers"
After that's made official you have to prepare an SQL statement for later insertion in to the database. But before we do that, ssh to window and make a backup of the database:
mysqldump --lock-tables=FALSE foundation > ~/elections/foundation-db-`date +'%Y-%m-%d-%R'`.sql
Better make ~/elections/ non readable to others. You can then submit the SQL statement:
SET NAMES 'utf8'; INSERT INTO elections (type, name, voting_start, voting_end, choices_nb, question) VALUES ("elections", "2011 Spring Board of Directors Election", "2011-05-29 00:00:00", "2011-06-12 23:59:59", "7", "Which candidates would you like to see in the GNOME Foundation Board?"); set @el_id = @@IDENTITY; INSERT INTO election_choices (election_id, choice) VALUES (@el_id, 'Shaun McCance'), (@el_id, 'Andrea Veri'), (@el_id, 'Rodrigo Moya'), (@el_id, 'Emmanuele Bassi'), (@el_id, 'Pockey Lam'), (@el_id, 'Stormy Peters'), (@el_id, 'Bastien Nocera'), (@el_id, 'Brian Cameron'), (@el_id, 'Lionel Dricot'), (@el_id, 'Germán Póo-Caamaño'), (@el_id, 'Andre Klapper'), (@el_id, 'Ryan Lortie'), (@el_id, 'Diego Escalante Urrelo');
For the next years, try to make the columns of the table election_tmp_tokens NOTNULL.
Ballots
Next, the ballots need to be created. The ballots are basically a random string that is used to authentify the elector. To do that, you can simply do smth like (ideally in the very same MySQL Shell that you used for the above mentioned query):
INSERT INTO election_tmp_tokens (election_id, member_id, tmp_token) SELECT @el_id, id, SUBSTRING(MD5(RAND()) FROM 1 FOR 24) AS tmp_token FROM electorate;
If @election_id is not set, you will end up having tokens defined for the election "0". That's not a problem. Either DELETE them or UPDATE with the appropriate election_id which you get with somehting like a SELECT * FROM elections.
After the tokens are generated, we want to send them off. You have to prepare the voting-instructions.txt, which should look like this:
fabianaps@gnome.org GNOME Foundation Board election - Voting instructions Dear <member>, The election of the GNOME Foundation Board is now open. Voting will run from May 25th until June 08th 2014, 23:59 UTC. To vote, please go to https://vote.gnome.org/vote.php?id=22 and follow the instructions there. A list of candidates and their reasons for running is available at https://vote.gnome.org/2014/candidates.html When instructed to do so, enter the following details: E-mail: Vote token: The election has 4 steps - first, you must identify yourself using the voting token above. Then select your preferred candidates in order of preference. A third step will show you your choice, and ask you to confirm or return to the previous step. Finally, after confirming your choice, a unique identifier will be given to you which will allow you to verify after the election that your vote was counted correctly. To ensure anonymity, no link will be kept between this token and your identifiers, so please keep this token safe. Once you have voted, you will not be able to vote again. Thank you for your vote! Regards, Fabiana Simões on behalf of the GNOME Membership and Elections Commitee
Once you've done that, you can send the ballots out, using the mail-instructions.py script. The script requires a list of firstnames, lstnames and tokens you can retrieve by querying the database with: (assuming election ID is 21)
SELECT CONCAT(firstname, ' ', lastname, ';', email, ';', tmp_token) FROM election_tmp_tokens, foundationmembers WHERE election_id = 21 AND member_id = id;
Once done, populate a maildata file with the sanitized result of the above query, then test the script by including your lastname, firstname and token. Once tested send the ballots with the following command:
python mail-instructions.py maildata mail-instructions.txt
The email specified on the very first line of the mail-instructions.txt file above is needed by the script to work properly as that will be the mail address used as the To: field on the generated mails.
Finally, announce that the tokens have been sent, as it follows:
To: foundation-announce Reply-To: foundation-list Subject: GNOME Board of Directors Elections 2011 - Voting Instructions sent "Dear Foundation Members, we have just sent the ballots to the registered email addresses of the electorate. If you have not received your voting instructions, have a look on the list of eligible voters on <http://www.gnome.org/foundation/membership/> and check the email account that is associated with you. Also check the SPAM folder. In case you are not on the list of eligible voters but think you should be, write us an email (see below). If you have any questions, do not hesitate to ask them at membership-committee@gnome.org or elections@gnome.org Happy Voting"
Missing Ballots
People will come and complain about the token that they haven't received. It either went missing or the email address was wrongly noted in the database. In any case, you need to find the ID of the member, i.e. using Mango (the URL of a member reveals its ID). With the ID do something like:
SELECT * FROM election_tmp_tokens WHERE election_id = 17 AND member_id = $ID;
Send that information along with the above mentioned voting-instructions.
Results
Once the elections are over, you can download the .blt file from the election website, as an example from past elections, feel free to follow this link. Also, you might want to put that ballot file into the git repository to have it archived.
To get the results, you need OpenSTV. Version 1.4 is GPL while 2.0 is not. You may get it from this link. If you can't find that version easily, you might as well try the Debian/Ubuntu repositories, as they ship openstv at the time of writing (2012). But you may need a patch like this:
--- ballots.py.orig 2009-06-07 21:45:56.391744128 +0200 +++ ballots.py 2009-06-07 21:33:01.532619218 +0200 @@ -440,7 +440,7 @@ self.index = 0 self.fName = fName f = open(self.fName, "r") - self.buffer = f.read() + self.buffer = f.read().decode("utf8") f.close()
Once you have the results, announce them, stating that there is a grace period for challenges.
To prepare the results for the web page, you need to export the results to HTML. The body of the HTML needs to get into the database somehow. The easiest will probably be to to prepare a simple file like this:
use foundation set names 'utf8'; REPLACE INTO election_results VALUES (17, 'Rest of the HTML');
And then just do:
mysql foundation < /tmp/results.sql
If there are no challenges, then you're done! Congratulations, you've just carried out an election!