Phong

This document was generated with ['-c', 'hackerspace-configs/noisebridge.cfg', '-c', 'noisebridge-private.cfg', '-D', 'install-wiki'] on 2014-08-22 04:11:01.557000. You can read the
most up-to-date version at GitHub. For the
previous incarnation of this robot, check out Secretaribot

I find hackerspace theory to be incredibly interesting. No two spaces are exactly alike, yet they share a common theme of making, doing, and hacking. As such, I try to write Phong to encompass almost every space's functionality out there. Phong was originally written and is still used today by SYNHAK, the Akron Hackerspace. SYNHAK's founding mission is to "provide an environment for people to educate, create, and share amongst themselves and others within the domains of technology, art and science." Our governmental structure is modeled after a combination of Maker's Alliance from Cleveland, OH, Noisebridge from San Francisco, CA, and HeatSync Labs of Phoenix, NM, which has led us to have strong feelings of transparency among members, inclusiveness of the wider community outside of the space, and a love of the do-ocracy. We also have a hard time filling all the officer positions all of the time, so we needed some help.

Phong is intended to help facilitate the following at your hackerspace:

Increased awareness and transparency about news and events at the space to members

Empower members to take part in the do-ocracy

Community building

It is my belief that these three things are what make a hackerspace Excellent.

To configure certain options for a command, you create a section with the command name and stick your options in there. For example, to configure the email address that the meetings command sends minutes to:

If a command cannot find an option in its section, it will try to look at the "defaults" section. Failing that, it'll throw an exception unless it has a builtin default, which is documented below. For example, to change the from address that Phong uses for all commands, but to have a different one for meeting minutes:

Phong uses Cheetah to process templates for various output situations, such as:

Producing an email of meeting minutes

Replying to email commands

Updating a wiki page

These templates are stored on your MediaWiki installation, under a configurable prefix that defaults to "User:Phong/Templates/". For example, a template that Phong calls "Events/NewEventMail" would be located at "User:Phong/Templates/Events/NewEventMail". Mind that final slash, as it is a simple string concatenation.

In addition, it is possible to add some documentation to a template that does not get parsed by phong. This is done by wrapping the template with <phongTemplate> and </phongTemplate>. If those tags are not present, the entire page is considered to be the template.

Replace YYYY, MM, DD with the numeric values of the year, month, and day of the respective meetings. This should only need to be done once. Unfortunately, there is no bootstrapping for this builtin to Phong. The rationale being that you are unlikely to have a full working setup of Phong and MediaWiki before you have at least a couple of meetings to discuss starting your hackerspace. Sorry.

Meetings happen once a week on the same day. That is exactly 7 days apart. None of that every other wednesday/first saturday of the month/days that have prime numbers rubbish. Please see http://hackerspaces.org/wiki/The_Plenum_Pattern for details why this will never change.

You will have to create Meetings/Template on your own. This page forms the basis for your meeting minutes, and it is copied to create the next week's meeting page. While the template contents are entirely up to you, you should have at least something similar to the following:

Your wiki should have a template called Infobox_meeting. Its content is up to you, but check out SYNHAK's for an example:

https://synhak.org/wiki/Template:Infobox_meeting

Please note: The template for this page is not User:Phong/Templates/ (or whatever you have configured). The rationale for this is that the meeting agenda should be a core component of your hackerspace's governance. If your space is ran by the membership and not a president or benevolent dictator, the membership should feel welcome to change the agenda as they see fit.

This meeting template should be a special template, as compared to more mundane ones such as the one for mailing out meeting minutes, or for announcing upcoming events.

Sometimes, you want to run a particular command as a different user, such as for processing e-mails, listing mailman subscriptions, or whatnot. Instead of configuring sudo, Phong provides a simpler and less flexible method of running commands as other users. In this command, Phong loads /etc/phong.cfg and ignores any other options passed before 'sudo' in the command line.

To configure, create a sudo section in /etc/phong.cfg that maps aliases to commands, along with a subsection for each alias:

The only required option in an alias' configuration is run-as-user. By default, allowed-users and allowed-groups is blank and nobody is permitted to run the command. run-as-user specifies the login name or UID to run the command as. Allowed-users and allowed-groups are comma-separated lists of login/group names or UIDs that are permitted to run a given alias. If run-as-group is not specified, it defaults to the primary group for the login specified in run-as-user.

For convienence, a helpful setuid wrapper is provided as phong-su. It defaults to running /usr/bin/phong.py, and may only be changed at compile time. setup.py does not automatically set the setuid bit on phong-su, for security purposes.