tl;dr: The ASF has published a Code of Conduct

We pride ourselves at The Apache Software Foundation on our principles of "community over code" and "don't be a jerk". But, alas, we've been slow to codify some of these things in public. Part of this, I'm sure, is that it’s easy to think we all just know how we're supposed to treat people, and so you shouldn't have to say, right?

But, of course, you do have to say. In part because some people don't know. And in part because it’s important that we communicate our values to the people in our community, and to people who might be considering joining our community. There has been a recent push in tech circles to include a Code of Conduct at events, conferences, etc. (Ashe Dryden maintains an introductory resource for learning more about how Codes of Conduct can help.) Increasingly, open source projects are adopting a Code of Conduct too, and we think this is a good idea that could help improve open source as a whole.
At ApacheCon, I was approached by Joan Touzet, an active member of the Apache CouchDB community, who had noted that we referenced a Code of Conduct on the main ASF website, but that no such document actually existed anywhere on our site. CouchDB has devoted a lot of time over the last few months crafting their Code of Conduct. It addresses everything from what's acceptable on the mailing lists, to how to report it if someone isn’t upholding community standards. This seemed like a great starting point, and so the ASF has adopted this as our initial Code of Conduct, with minor edits that remove the CouchDB-specific language. (It is my understanding that the CouchDB community now intends to use the Foundation level Code of Conduct, and will work with us to bring additional improvements to it.) 
No doubt, we'll get criticism for being so slow to do this, and we accept that. But it's never too late to take steps in the right direction, and we feel that this is an important one. Not just for the ASF, but for all open source projects and organisations.
You are encouraged to join the conversation on the Community Development mailing list. Whether you have changes you'd like to see in that document, or whether you'd like to discuss any other aspect of the Apache community. Any sort of community discussion topic is welcome. For example, Noah Slater, also from the CouchDB community, brought up the subject of punitive measures for infractions, which is an important but difficult issue. We'd love to hear your perspective on this, and help us continue to move in the right direction.

--Rich Bowen, Executive Vice President