#fml: Relearning how to install perl

I am working on a little project that requires a bit of perl and some database modules. I’m running Leopard, which ships with Perl 5.8.8. That kinda sucks.

So, I tried to work with a binary installer. Which was, for a number of reasons, a failure.

Given my recent experience with virtualenv and Python, I started looking into what’s the state of the art in this area for Perl.

The suggestion from the Perl home page is “perlbrew”. I took it for a spin.

tar zxvf App-perlbrew-0.28.tar.gz

selena@lulu:Downloads #553 14:12 :( cd App-perlbrew-0.28
selena@lulu:App-perlbrew-0.28 #554 14:12 :) perl Makefile.PL

Checking if your kit is complete...
Looks good
Warning: prerequisite Devel::PatchPerl 0.26 not found.
Warning: prerequisite File::Path::Tiny 0 not found.
Warning: prerequisite IO::All 0 not found.
Warning: prerequisite Path::Class 0 not found.
Warning: prerequisite Test::Output 0 not found.
Warning: prerequisite Test::Spec 0 not found.
Writing Makefile for App::perlbrew

Hmmm… So I tried to use cpanm to get it going:

selena@lulu:App-perlbrew-0.28 #557 14:13 :( sudo cpanm App::perlbrew
Building and testing App-perlbrew-0.28 for App::perlbrew ... FAIL
! Installing App::perlbrew failed. See /Users/selena/.cpanm/build.log for details.


So I asked a friend. Who pointed me at his build script. And, at least for this project, that’s what I’m going to use.

Is perlbrew what most folks use for this type of thing? Is there some other virtualenv equivalent out there?

Customizing the RPMs from pgrpms.org

To pick up where Devrim left off in customizing RPMs, here are some more tips for getting your very own RPMs built:

  • Create a VM with your favorite operating system (I’m using versions of CentOS). I need both 32-bit OS and 64-bit OS. This is much easier to manage with separate, local VMs.
  • Install spectool (available here), and SVN
  • The other dependancies were: gcc glibc-devel bison flex python-devel tcl-devel readline-devel zlib-devel openssl-devel krb5-devel e2fsprocs-devel libxml2-devel libxslt-devel pam-devel
  • Edit the postgresql-$VERSION.spec file to your liking: If you’re adding patches, you need to add them in TWO places – first in the Patch#: group, and then again below where the %patch# series starts. Finally, if you’re adding an entirely new package (say in 8.2, pg_standby in contrib), you’ll need to also add the binary (or library, or whatever) to the appropriate %files clause later in the spec file. It’s also a good idea to modify ‘Release’. Here’s a sample diff of my spec file:

--- postgresql-8.2.spec (revision 188)
+++ postgresql-8.2.spec (working copy)
@@ -74,7 +74,7 @@
Summary: PostgreSQL client programs and libraries
Name: postgresql
Version: 8.2.17
-Release: 1PGDG%{?dist}
+Release: 1test%{?dist}
License: BSD
Group: Applications/Databases
Url: http://www.postgresql.org/
@@ -95,7 +95,9 @@
Patch4: postgresql-test.patch
Patch6: postgresql-perl-rpath.patch
Patch8: postgresql-prefer-ncurses.patch
+Patch7: postgresql-pgstat-dir.patch
Patch9: postgresql-use-zoneinfo.patch
+Patch10: pg_standby.patch

Buildrequires: perl glibc-devel bison flex
Requires: /sbin/ldconfig initscripts
@@ -282,7 +284,9 @@
%patch4 -p1
%patch6 -p1
%patch8 -p1
+%patch7 -p1
%patch9 -p1
+%patch10 -p1

pushd doc
tar -zcf postgres.tar.gz *.html stylesheet.css
@@ -604,6 +608,7 @@

How have you customized RPMs using this repo? Share your .spec files!

PDXPUG Day 2010: 9.0 and all sorts of good stuff

I’m nearly ready for PDXPUG Day 2010.

We’ve got some fun talks lined up from leaders in the Postgres community in town for OSCON. It’s free to attend. We’ll at the Oregon Convention Center, room D131.

Stop by sometime during the day if you’re in town!

Here’s our schedule:

10am: What’s new in 9.0 – Selena Deckelmann
11am: ORMs and Their Discontents – Christophe Pettus
1:30pm: Mining Your Logs For Fun and Profit – Josh Berkus
2:30pm: PORTAL – Dan Colish
3:30pm: An Introduction to Managing and Troubleshooting PostgreSQL on Windows – Tim Bruce
4:30pm: PostgreSQL in Brazilian Army and Air Force – Luis Dosso

6pm-10pm: Party at the Gotham Tavern!

User Group Idea: Patch Review Party

On Tuesday, I invited a group of people from PDXPUG over to my house for chili, beer and patch review. PostgreSQL has what we’re calling a ‘commitfest‘ every two months where we buckle down and try to review and commit (or reject) the patches submitted over the last few weeks. Webb and Gabrielle had the original idea to get everyone together for a review party, and they did a fantastic job recruiting people to join in.

Gabrielle gave the details and lessons learned on our PUG site already, so I won’t repeat that.

One thing that occurred to me as we were doing this work was how affirming and *fun* it is to work on patch review with people in person. Several people commented on how they enjoyed doing this work in the company of others, and how the tedious issues around compiling, applying patches and going through all the questions were made so much more enjoyable with a group of good-natured hackers sitting around answering questions.

The atmosphere wasn’t pressured – I gave a little background about commitfest, how it’s been run in the past and what the development group is trying to change about it (mainly, bring in more people, and make patch review faster for people who submit patches, and smoother for the committers). Then we just got down to work in pairs or groups of three.

Working in pairs is a really good idea for this type of event. I certainly learned a few things from John, and over email and in-person again, we were able to wrap our review up a couple days later after the regular user group meeting. Having another person to bounce questions off of was invaluable for the patch that we reviewed, and it was just fun brainstorming variable names, piecing together a test case and then finding a solution to a problem we found.

Another thing that happened was that I had lots of time to chat with people I hadn’t talked with before about projects they’re working on (a really exciting materialized view implementation, and a massive cleanup of our *.bki infrastructure — two very ambitious projects!). Both people are now signed up to give talks at our local user group about their work.

I’ve talked a little bit about the social benefits of commitfest on various mailing lists, and I think the opportunity for user groups to get together and review patches as a team is a great one. I’ll be gathering up some of my other observations about PostgreSQL community and posting those over the next few weeks.

I’ve got a talk about user groups to prepare for (JPUG’s 10th anniversary in November!), so now is the perfect time for me to be gathering my experiences and thoughts from the last three years.

My thoughts about community management

David Eaves wrote about open source contributions recently, and how community managers fit into the picture.

He remixed a graph from Angie Byron, and I wasn’t completely happy with the results. A fairly long twitter thread ensued, between myself, Jeffrey McManus, Emma Jane Hogbin and Peter Krenesky. In the end, David piped up and asked if I’d comment on his blog. So I did. πŸ™‚


I commented via a long twitter thread that I “disagree with putting comm mgmt between user/dev. like @webchick’s ideas better.” πŸ™‚

To flesh that out a bit — my gut reaction to the ultimate diagram you created is that it puts community managers *between* users and developers.. This is a convenient way to demonstrate a process, but ultimately, I have to disagree with the premise behind it.

I work to break down barriers between “users” and “developers”. My ideal world is one where the two overlap to a very large extent. I dislike models of open source community development which seem to promote the idea that there needs to be an intermediary.

I agree that most communities require an interface — it is rarely self-evident how one goes about joining a community if you were on the outside. Many times it is an organic process — your friends invite you, or you run into someone at a conference or bar, or you have to use or work on a piece of software for work. For those who, for whatever reason, are not already on the inside, having a single point of contact (a “community manager”, or in the amusing case of the open source developer group I primarily work with – a “liaison”) can be an invaluable tool.

However, I do not see that role as one that ultimately should belong to just one person. If I do my job right, eventually, people won’t even come to me any more. They will go directly to the individuals inside the community they most want to connect with — because I have managed to open up our community interfaces to the point that they are self-documenting, or easily found with a few clicks on our website.

Possibly, this vision is a bit unrealistic in the near term. But I’ll paraphrase my friend Audrey — it’s way more fun to craft your reality, than it is to passively experience it.

PgCon 2009: Lighning Talks! Call for participation

Ottawa is almost as pretty as Portland this time of year.

Ottawa is almost as pretty as Portland this time of year.

Can you believe it? PgCon 2009 is nearly here!

We need lightning talks for our Lightning Talks session at PgCon in Ottawa, Ontario next week!

I have a few talks lined up (there’s really only time for about 10 of them!), but we need MORE! Lightning talks are FIVE MINUTE presentations. If you’ve never given a talk before, this is a great way to get your feet wet. If you have a last minute awesome thing to share, now is your time to do it!

Anything PostgreSQL related – code, stories, announcements — just send your topics to me! Comment below or email me: selena -at- postgresql -dot- org.

I’ll post talks as they are confirmed here: http://wiki.postgresql.org/wiki/PgCon_2009_Lightning_talks

Hope to see you at PgCon!

Manufacturing Participation

I want to talk about a couple things today during my unfortunately named “architecting participation” session at BarCampPortland. My goals for participation are to get people to an event or be part of an open source group and then to get them to keep coming back.

The three things I’m going to touch on are: inviting in and making people feel welcome, making people feel useful, and making things fun.

With the ultimate goal being world domination of free and open source software.

We’ll see how it goes πŸ™‚

What’s changed? Portland as an example of increasing women’s participation.

Code from @christiekoehler's presentation. #cns

At Code-n-Splode last night, we first heard Christie Koehler give a great talk on CodeIgniter, the one PHP web framework endorsed by Rasmus Lerdorf, original author of PHP. She went over the pros/cons, details of how you go about installing and then using CodeIgniter, and then showed a very detailed example from her recent work. I hope she posts the slides soon – they were great. (If you want to see our tweets – per Gabrielle’s suggestion, we’re tagging with #cns now.)

After the talk (nearly 9pm!) we all went over to the Green Dragon for our #afterhours chat. Audrey led off by explaining the recent controversy she’d written about, and the Ruby/Rails community response to her posts.

Some of the things she shared I was shocked by – specifically some very personal attacks in comments that she’d decided to save (in Skitch), but remove from her posts. Her standard was: “is this something that would cause my mom to stop reading.” And, if the comment met that standard, she archived and removed it.

I learned about threads in the local ruby community about the topic of women’s participation, and some very positive comments on Hacker News and Digg, and _why’s posts that seem to be expanding perceptions and opening people’s minds to ways that may ultimately be more inclusive of women and minorities.

All told, we had 15 people at the meeting, 13 of which were women. Our first Code-n-Splode meetings started with about five people. Our largest meeting (thanks to the clever, rocket-building Sarah Sharp) had somewhere around 30 people.

Among the many things that the Code-n-Splode crew discussed last night was “what made portland different”. And I thought I’d let you in on our secret.

We ask women to participate.

When we have code sprints for Calagator, Open Source Bridge or we have the Agile development meetups dedicated to coding – there are always women there. From what I understand, having women show up regularly to code sprints is unusual in other cities.

When I am responsible for these meetups, I contact the people that I want to attend directly – and I ask them to come. This is a mix of women and men (I no longer have to explicitly think about inviting women, because so many are already in the community). But when I was first asking people, I *did* have to contact women who were just dipping a toe into the community — to convince them that yes, joining us would be fun, educational and sometimes good for their careers.

When I first started attending user groups regularly about nine years ago, I often was the only woman. Now, it is extremely rare for me to be the only one. Particularly in groups that span multiple technologies (Web Innovators, Open Source Bridge, Extreme/Agile developers, Functional programming, and BarCampPortland come to mind) or are largely social opportunities for geeks to mix (Lunch 2.0, Beer and Blog). More geeky women (and women that I don’t already know) seem to attend these types of events.

I don’t think there is a single magic formula for transforming your city’s geek scene. But I think it is worth asking questions of the Portland tech community leaders, finding out how our groups work and trying out our techniques in your home town.

The future of free and open source support models

I attended the MySQL Conference all last week, and am feeling very excited about the future of open source databases. I had many interesting discussions and met a ton of Drizzle hackers I was lucky enough to spend Friday with, digging through code.

I was talking with Paul VallΓ©e of the Pythian Group Thursday about Postgres and the future of enterprise support. And he showed me this great graph from indeed.com. It’s acceleration here, not the raw numbers – but still, a neat graph πŸ™‚

We discussed the issues that enterprise customers with certain types of regulatory obligations encounter — such as contractual obligations for PCI-compliant credit card storage or outsourced management of sensitive data. The standard response developers might give for this is “read the spec, and make sure you implement it properly”. But the truth is, for larger companies, that may not be enough.

So, assuming for a moment that the Postgres community would even want to address this problem as a group — could it be possible for the Postgres community to provide the legal and financial assurances that an incredibly huge corporation (ahem – Sun/Oracle) can?

The short answer for Postgres right now is “no”.

Originally, I had thought just in term of liability, but Paul clarified:

The liability is just one component of what gives the guarantee meaning because there is a consequence to failed delivery. An SLA can also do this. As can a simple lucrative contract that can be lost, or canceled early if delivery does no take place. The key here is to ensure that the technology adopter can legitimately be confident that they are provably being responsible by adopting the platform. “I trusted” doesn’t cut it for many.

My view was that this type of agreement helps to determine who exactly is to blame (and who can be sued) in the event of a software failure. But, Paul said, “It’s more about assurance (with evidence) that obligations realistically will be met.”

I sometimes think that this system of liability and assurances is just ultimately broken. But it is a reality. So, would it be possible for us to come up with a new legal framework for community-driven software?

Paul brought up the idea of a cooperative, and that maybe such a legal entity could provide protection for individuals involved in supporting Postgres, and also shoulder some or all of the liability that a corporation using Postgres would want. I’m not sure that core developers of Postgres would join such a thing, or whether they would be allowed to given existing agreements they have with their own companies. But it is an interesting idea.

Creating a blueprint for this type of organization – hackers cooperatives – could be a way for truly community software to be developed across companies and among individuals in a sustainable, and “trustable” way. Maybe?

Continuing this train of thought – maybe these are non-governmental organizations, whose main purpose is to create and maintain infrastructure software for the good of the world.

Funding for mid-sized free and open source projects seems to be a consistent problem. Perhaps NGOs are a fair model for us.

I am curious about what effort may have already been made in this direction. My next step will be to contact Bradley Kuhn and see if there’s something out there that might address this.

Twitter and PostgreSQL!

Twitter: What are you doing?
Uploaded with plasq‘s Skitch!

On pgsql-general, Doug Hunley mentioned he’d created a twitter account for pgsql-announce! Way cool.

I’d written during last PgCon about Postgres and Twitter, and I figured it was time for a new list of Postgres-related people who I follow! Especially since a few people commented that Twitter was a waste of time last year πŸ˜‰

If you’re on twitter (or identi.ca), and I missed you — please comment below!

Here we go (in no particular order):

  • Selena Deckelmann (me!)
  • Gabrielle Roth, member of PDXPUG, main force behind Code-N-Splode
  • Mark Wong, performance expert, leading the Portland PostgreSQL Performance Pad and associated projects to bring regular performance testing back to PostgreSQL
  • Francisco Figueiredo Jr., developer maintainer of Npgsql, speaker, member of PostgreSQL.Br
  • Magnus Hagander President of Pg.EU – the European Union non-profit organization dedicated to PostgreSQL and supporting user groups in the region
  • Josh Berkus, pgsql-advocacy leader, Member of the PostgreSQL core team
  • Jean-Paul Argudo, leader/member of PostgreSQL.Fr and Treasurer of Pg.EU
  • Hubert Lubaczewski , author of a great technical blog about PostgreSQL http://www.depesz.com/
  • Nikolay Samokhvalov, leader of the Moscow PostgreSQL Users Group, and consultant in Russia
  • Kristin Tufte, Postgres user, member of PDXPUG and assistant professor at Portland State University
  • Satoshi Nagayasu, member of the Japanese PostgreSQL Users Group, and spearheading meetups in Tokoyo
  • Brenda Wallace, moble gadget fetishist, Drupalista and Wellington, NZ PostgreSQL User Group wrangler
  • Isis Borges, Postgres enthusiast, works in the fashion industry in Puerto Alegre, Brazil
  • Dan Langille, DBA and organizer behind PgCon
  • Michael Brewer, DBA and board member of the United States PostgreSQL Association
  • Joshua Drake, business owner, board member of the United States PostgreSQL Association
  • FΓ‘bio Telles Rodriguez, active member of the PostgreSQL.Br (Brazil) and PgDay Brazil organizer. If you speak Portuguese, you can check out Planet Postgres Br here – http://planeta.postgresql.org.br/
  • Fernando Ike, member of PostgreSQL.Br
  • Ed Borasky, PhD, analytics nerd, PDXPUG member
  • Robert Treat, author of PHP and PostgreSQL book, speaker, on the board of the United States PostgreSQL Association
  • David Wheeler, contributed citext most recently to PostgreSQL, consultant, maintainer of Bricolage, formerly of I Want Sandy
  • Greg Sabino Mullane, author of Bucardo and check_postgres.pl, maintainer of DBD::Pg, recently contributed patches to psql, on the board of the United States PostgreSQL Association, my boss πŸ™‚
  • Christophe, volunteer at OSCON for PostgreSQL booth, DBA
  • Aaron Thul, DBA, developer, speaker on PostgreSQL on Drugs πŸ™‚
  • David Fetter, DBA, maintainer of the PostgreSQL Weekly News
  • Elein Mustain, DBA, speaker, maintainer of http://varlena.com
  • Chris May, DBA, member of PDXPUG
  • Jason Kirtland, developer, maintainer of SQLAlchemy, Pythonista
  • Josh Tolley, developer, DBA, statistics nerd, author of PL/LOLCODE and pgsnmpd
  • Erik Jones, Portland resident, Pythonista, made a cool python-based partitioning tool (pgpartitioner)
  • Nicholas Kreidberg, Nevada resident, PostgreSQL user
  • Gavin Roy, DBA, Business dude, Myyearbook.com, speaker, on the board of of United States PostgreSQL Association
  • Chris Browne, Slony maintainer
  • Douglas Hunley, creator of pgsql_announce on twitter πŸ™‚
  • Larry Rosenman, PostgreSQL supporter, help with DNS for PostgreSQL.org, contributor (some of the syslog* stuff in version 7.0)