The Lives of Others: Open-Source Development Practices Elsewhere

32
The Lives of Others Open-Source Development Practices Elsewhere Peter Eisentraut Senior Software Engineer Lab Development F-Secure Corporation PGCon 2009

description

A survey of current and emerging development practices in open-source projects, and ideas that the PostgreSQL project could pick up.

Transcript of The Lives of Others: Open-Source Development Practices Elsewhere

Page 1: The Lives of Others: Open-Source Development Practices Elsewhere

The Lives of OthersOpen-Source Development Practices Elsewhere

Peter Eisentraut

Senior Software EngineerLab Development

F-Secure Corporation

PGCon 2009

Page 2: The Lives of Others: Open-Source Development Practices Elsewhere

Ground Rules

I I don’t knoweverything.

I If you are involvedin other projects,chime in.

I Discussionwelcome

Page 3: The Lives of Others: Open-Source Development Practices Elsewhere

Whom To Learn From?

I Look at the biggestopen-source projects

I Metric: installationfootprint, installationcount

I Where to find thosenumbers?

I the Universal DebianDatabase

I doesn’t count OSdistributions such asDebian, Fedora,FreeBSD,OpenSolaris

I Java alsounderrepresented

Page 4: The Lives of Others: Open-Source Development Practices Elsewhere

Sidetrack: The Universal Debian Database

Example: query for packages with largest install footprint andpopularity

SELECT rank() OVER (ORDER BY score DESC),

source,

sum(installed_size::numeric * insts) AS score

FROM packages JOIN popcon_src USING (source)

WHERE distribution = 'debian'

AND release = 'lenny'

AND component = 'main'

AND architecture IN ('all', 'i386')

GROUP BY source

ORDER BY score DESC

LIMIT 100;

Page 5: The Lives of Others: Open-Source Development Practices Elsewhere

The Biggest Projects

OpenOffice.org, Linux, GCC, GCJ, Qt, Mesa, KDE, Glibc,Firefox, MySQL, Boost, Perl, Samba, LDP, Vim, Gtk+, FFmpeg,OPAL, Evolution, OpenJDK, Gtk−−, wxWidgets, PyQt, Gimp, TeX Live,X.org, SCOWL, OpenSSL, Thunderbird, Xalan, Berkeley DB, ncurses,Foomatic, SELinux, Gutenprint, PHP, GNU binutils, Python, KOffice, Wine, Ruby, ICU,

LAPACK, Webkit, PostgreSQL, glib, libsigc++, Inkscape, PWLib, GNOME, Apache, HPLIP, Xerces,

Libxml, GNU Gettext, CUPS, SANE, Net-SNMP, Ghostscript, Mono, Eclipse, Pidgin

Page 6: The Lives of Others: Open-Source Development Practices Elsewhere

PostgreSQL — A Role Model?

Things to keep in mind:1. Process details are hard to gather for outsiders.2. Other projects are not without problems.3. Many of them have worse problems than we do.4. Others look at the PostgreSQL project for advice and

inspiration.5. It’s amazing that anything gets done. :-)

Page 7: The Lives of Others: Open-Source Development Practices Elsewhere

Version Control

I In the lead: Git, SubversionI Also-rans: CVS, Mercurial, BazaarI Commercial systems phased outI Automatic conversion services in use

Page 8: The Lives of Others: Open-Source Development Practices Elsewhere

Build Tools

I Autotools continue to rule!I CMake might be challenger

I well-known usage: KDE, MySQL (for Windows only)I uptake still slow (88 of 12000 packages in Debian)

I That’s it, for C programs.

Page 9: The Lives of Others: Open-Source Development Practices Elsewhere

Documentation Tools

I DocBook emerged as the standard.I XML vs. SGML

I Texinfo (only at GNU)I man pagesI HTMLI some specialized solutions:

I Python: reStructuredTextI Perl: PerldocI Qt: qdoc

Page 10: The Lives of Others: Open-Source Development Practices Elsewhere

Discussion Forums

I Mailing lists are clearly the standard.I But don’t argue about Reply-To!I Usenet is dead. :-)I Web-forums serve support requests and newbies better.I . . . and then there are bug-tracking systems.

Page 11: The Lives of Others: Open-Source Development Practices Elsewhere

Bug Tracking

I Bugzilla is king (often heavily themed and customized).I contenders: Roundup, Jira, *forgeI marginal: RT

Page 12: The Lives of Others: Open-Source Development Practices Elsewhere

Coding Styles

I Coding style appears to be an issue specific to C/C++.I Besides the GNU style, various random styles can be

found.I CVS $Keywords$ are pretty much gone.I Patch styles (-c vs. -u) are an unsettled issue.

Page 13: The Lives of Others: Open-Source Development Practices Elsewhere

Wikis

I About 1/3 of projects have active wikis.I MediaWiki is most popular.

Page 14: The Lives of Others: Open-Source Development Practices Elsewhere

The Foundries

I Project-specific *forge services are rare.I More popular: Common repo and Bugzilla for everyone.I This has implications for management of sub-/sister

projects.

Page 15: The Lives of Others: Open-Source Development Practices Elsewhere

Write Your Own Tools

Some tools are side-products of other projects:I ccacheI tmallocI distccI BugzillaI PatchTrackerI Contributions to build tools (autoconf, cmake, etc.) are

welcome.

Page 16: The Lives of Others: Open-Source Development Practices Elsewhere

Release Scheduling

Trend is toward time-based releases:I OpenBSD (6 months)I GNOME (6 months)I Ubuntu (6 months)I Debian (18 months)I OpenOffice.org (6 months)I PostgreSQL (12 months)I Linux kernel (3 months)I (MySQL)I . . .

Note: The upgrade issue is fairly unique to PostgreSQL.

Page 17: The Lives of Others: Open-Source Development Practices Elsewhere

Minor Releases

I Stable + development branch is standard.I Some maintain more than one stable, e.g., Samba.I PostgreSQL’s 5+ back branches have got to be a record.I MySQL might come close.I Minor releases can also have a fixed schedule.

(OpenOffice.org: 3 months)

Page 18: The Lives of Others: Open-Source Development Practices Elsewhere

The Rewrite Trap

Major reengineering efforts usually have schedule and/orquality problems. Recall:

I Samba 4I Perl 6I KDE 4

Page 19: The Lives of Others: Open-Source Development Practices Elsewhere

Pre-Releases

I Beta, RC are standard.I Even/odd model (Linux, Perl) is obsolescent.I Alpha/milestone releases are rare.

Page 20: The Lives of Others: Open-Source Development Practices Elsewhere

Release Manager

I Some projects appoint rotating release managers.I In other projects, these roles fall into place by tradition.

Page 21: The Lives of Others: Open-Source Development Practices Elsewhere

Downstream Packaging

Various approaches:I Tight integration, e.g.: PostgreSQL, KDE, SambaI Laissez-faire, e.g.: Linux, GCC, MySQLI Conflict-prone, e.g.: OpenOffice.org, Mozilla

Page 22: The Lives of Others: Open-Source Development Practices Elsewhere

Security Handling

I Most sizeable projects havespecial securitycontacs/teams.

I CVE numbers arestandard.

I Note: Non-databaseprojects have askewed/different view of“security”.

Page 23: The Lives of Others: Open-Source Development Practices Elsewhere

Committers

I Surprisingly, many projects seem to do with very fewcommitters.

I Some projects have very large amounts of committers.I I think this is strongly related to the software architecture

and project layout. Compare:I KDE has everything in one repo; hundreds of committers.I PostgreSQL has PgFoundry etc.I Linux kernel uses a very different model.

I Managing external committers tends to be a problem forcompany-run projects.

Page 24: The Lives of Others: Open-Source Development Practices Elsewhere

Project Steering

I Company-run projects have a clear direction (usually).I In principle, the developers create their own destiny

everywhere else.I Some projects have elected boards etc., but these don’t

have technical influence.I Most projects are steered by the “old farts”.

Page 25: The Lives of Others: Open-Source Development Practices Elsewhere

Forking

I Forking continues to happen.I Contemporary cases: Go-OO.org, eglibc, OurDelta,

IceweaselI Reasons:

I Faster/different feature advancementI Licensing or trademark conflictsI Company vs. community barrierI Personal problems

I Many commercial forks of open-source DBMS:EnterpriseDB, Greenplum, Truviso, Kickfire, Infobright

Page 26: The Lives of Others: Open-Source Development Practices Elsewhere

Licensing

I Distributors are incredibly picky.I So are legal departments.I Well-known licenses are important.I Consistent and uniform licensing helps.I Weird licensing can kill projects.I Many projects have had their share of problems: KDE (Qt),

Linux (SCO, firmware), XFree86, Mambo, Apache vs.OpenBSD, PostgreSQL (GPL), OpenSSL vs. Debian

Page 27: The Lives of Others: Open-Source Development Practices Elsewhere

Copyright Notices

I Amateur legal opinion: Copyright notices are more or lessmeaningless. But they could help if you plan to go to court.

I Most company-sponsored code has standard copyrightheaders.

I FSF and Apache use copyright assignments and carefulchangelog tracking.

I Most other projects are pretty random.I Initial author: Perl, SambaI Various authors: KDE, VimI “Fake” organizations: OpenSSL, (PHP), PostgreSQL,

wxWidgetsI nothing: Python

I Many (smaller) projects apply the GPL wrongly.

Page 28: The Lives of Others: Open-Source Development Practices Elsewhere

Legal and Funds Management

Four models:I Run and owned by a single company: OpenOffice.org,

MySQL, Qt, Berkeley DB, CUPS, (PHP)I Run and controlled by a non-profit association: GCC, KDE,

Mozilla, GNOME, Apache, (Fedora)I Loosely organized but someone in the background: Linux,

PostgreSQL, Debian, OpenBSDI Unorganized: Vim

Page 29: The Lives of Others: Open-Source Development Practices Elsewhere

Standards Organizations

OSS participation is possible, e. g.:I OpenOffice.orgI Linux/glibcI KDE/GNOME/X.org/FreedesktopI MySQL, PostgreSQL, . . . ?

Page 30: The Lives of Others: Open-Source Development Practices Elsewhere

The Average Sizeable Open-Source Project2010/2011

I Written in C (or Java)I GPLI Source in GitI Bugs in BugzillaI Built with Autoconf (or Maven)I Released every 6 months

Page 31: The Lives of Others: Open-Source Development Practices Elsewhere

Open Issues for PostgreSQL

I Version controlsystem

I Web forumI Bug tracking

systemI CMake?I DocBook XMLI Release cycle

lengthI Upgradability

Page 32: The Lives of Others: Open-Source Development Practices Elsewhere

Rights and Attributions

This presentation “The Lives of Others: Open-Source Development Practices Elsewhere” was authored by PeterEisentraut and is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unportedlicense.

I The image on page 2 is “Comiskey Park (US Celluar Field)” by Flickr user Zol87, available under theCreative Commons Attribution-Noncommercial 2.0 Generic license.

I The image on page 3 is “Apples and oranges” by Flickr user Jeff Tabaco, available under the CreativeCommons Attribution-Noncommercial-Share Alike 2.0 Generic license.

I The image on page 14 is “Valimon asema Helsinki” from Wikipedia and is in the public domain.I The image on page 21 is “Watersfalls, Mesa Arts Center” by Flickr user cobalt123, available under the

Creative Commons Attribution-Noncommercial-Share Alike 2.0 Generic license.I The image on page 22 is “Suomenlinna” by Flickr user Anosmia, available under the Creative Commons

Attribution 2.0 Generic license.I The image on page 31 is “Committee meeting” by Flickr user Matt and Kim Rudge, available under the

Creative Commons Attribution-Noncommercial 2.0 Generic license.