Jump to content

Fork (software development)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Greyfoo (talk | contribs) at 14:13, 27 May 2012 (→‎Etymology: link to the source text added). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In software engineering, a project fork happens when developers take a copy of source code from one software package and start independent development on it, creating a distinct piece of software. The term often implies not merely a development branch, but a split in the developer community, a form of schism.[1]

Free and open source software is that which, by definition, may be forked from the original development team without prior permission without violating any copyright law. However, licensed forks of proprietary software (e.g. Unix) also happen.

A timeline chart of how Linux distributions forked.

Etymology

The term "fork" was first used in the sense of "branch" by Eric Allman in 1980, to describe forming branches in SCCS:

Creating a branch "forks off" a version of the program.[2]

The term was in use on Usenet by 1983 for the process of creating a subgroup to move topics of discussion to.[3]

"Fork" is not known to have been used in the sense of a community schism during the origins of Lucid Emacs (now XEmacs) (1991) or the BSDs (1993–1994); Russ Nelson used the term "shattering" for this sort of fork in 1993, attributing it to John Gilmore.[4] However, "fork" was in use in the present sense by 1995 to describe the XEmacs split,[5] and was an understood usage in the GNU Project by 1996.[6]

Forking free and open source software

Free and open source software may be legally forked without the approval of those currently managing a software project or distributing the software, per the definitions of "free software and "open source"":[7]

  • "Freedom 3: The freedom to improve the program, and release your improvements to the public, so that the whole community benefits"
  • "3. Derived Works: Redistribution of modifications must be allowed, to allow legal sharing and to permit new features or repairs".

In free software, forks often result from a schism over different goals or personality clashes. In a fork, both parties assume nearly identical code bases, but typically only the larger group, or whoever controls the Web site, will retain the full original name and the associated user community. Thus, there is a reputation penalty associated with forking.[7] The relationship between the different teams can be cordial or very bitter.

Eric S. Raymond, in his essay Homesteading the Noosphere,[8] stated that "The most important characteristic of a fork is that it spawns competing projects that cannot later exchange code, splitting the potential developer community". He notes in the Jargon File:

Forking is considered a Bad Thing — not merely because it implies a lot of wasted effort in the future, but because forks tend to be accompanied by a great deal of strife and acrimony between the successor groups over issues of legitimacy, succession, and design direction. There is serious social pressure against forking. As a result, major forks (such as the Gnu-Emacs/XEmacs split, the fissioning of the 386BSD group into three daughter projects, and the short-lived GCC/EGCS split) are rare enough that they are remembered individually in hacker folklore.[9]

David A. Wheeler notes[7] four possible outcomes of a fork, with examples:

  1. The death of the fork. This is by far the most common case. It is easy to declare a fork, but considerable effort to continue independent development and support.
  2. A re-merging of the fork (e.g., egcs becoming "blessed" as the new version of gcc).
  3. The death of the original (e.g. the X.Org Server succeeding and XFree86 dying).
  4. Successful branching, typically with differentiation (e.g., OpenBSD and NetBSD).

More recently[as of?], distributed revision control (DVCS) tools have popularised a less emotive use of the term "fork", blurring the distinction with "branch". With a DVCS such as Mercurial or Git, the normal way to contribute to a project is to first branch the repository, and later seek to have your changes integrated with the main repository. Sites such as Github, Bitbucket and Launchpad provide free DVCS hosting expressly supporting independent branches, such that the technical, social and financial barriers to forking a source code repository are massively reduced.

Forks often restart version numbering from 0.1 or 1.0 even if the original software was at version 3.0, 4.0, or 5.0. An exception is when the forked software is designed to be a drop-in replacement of the original project, in which case, for example, forked version 5.2 is compatible with version 5.2 of the original software (as it happens in the case of MariaDB and MySQL as of 2011).[10]

Forking proprietary software

In proprietary software, the copyright is usually held by the employing entity, not by the individual software developers. Proprietary code is thus more commonly forked when the owner needs to develop two or more versions, such as a windowed version and a command line version, or versions for differing operating systems, such as a word processor for IBM PC compatible machines and Macintosh computers. Generally, such internal forks will concentrate on having the same look, feel, data format, and behavior between platforms so that a user familiar with one can also be productive or share documents generated on the other. This is almost always an economic decision to generate a greater market share and thus pay back the associated extra development costs created by the fork.

A notable proprietary fork not of this kind is the many varieties of proprietary Unix — almost all derived from AT&T Unix and all called "Unix", but increasingly mutually incompatible.[11] See UNIX wars.

The BSD licenses permit forks to become proprietary software, and some say[who?] that commercial incentives thus make proprietisation almost inevitable. Examples include Mac OS X (based on the proprietary Nextstep and the open source FreeBSD), Cedega and CrossOver (proprietary forks of Wine, though CrossOver tracks Wine and contributes considerably), EnterpriseDB (a fork of PostgreSQL, adding Oracle compatibility features), Fujitsu Supported PostgreSQL with their proprietary ESM storage system, and Netezza's proprietary highly scalable derivative of PostgreSQL. Some of these vendors contribute back changes to the community project, while some keep their changes as their own competitive advantages.

See also

References

  1. ^ "Schism", with its connotations, is a common usage, e.g. "the Lemacs/FSFmacs schism" (Jamie Zawinski, 2000), "Behind the KOffice split" (Joe Brockmeier, Linux Weekly News, 2010-12-14), "Copyright assignment - once bitten, twice shy" (Richard Hillesley, H-Online, 2010-08-06), "Forking is a feature" (Anil Dash, 2010-09-10), "The Great Software Schism" (Glyn Moody, Linux Journal, 2006-09-28), "To Fork Or Not To Fork: Lessons From Ubuntu and Debian" (Benjamin Mako Hill, 2005).
  2. ^ Allman, Eric. "An Introduction to the Source Code Control System." Project Ingres, University of California at Berkeley, 1980.
  3. ^ Can somebody fork off a "net.philosophy"? (John Gilmore, net.misc, 18 January 1983)
  4. ^ Shattering — good or bad? (Russell Nelson, gnu.misc.discuss, 01 October 1993)
  5. ^ Re: Hey Franz: 32K Windows SUCK!!!!! (Bill Dubuque, cu.cs.macl.info, 21 Sep 1995)
  6. ^ Lignux? (Marcus G. Daniels, gnu.misc.discuss, 07 June 1996)
  7. ^ a b c Why Open Source Software / Free Software (OSS/FS, FLOSS, or FOSS)? Look at the Numbers!: Forking (David A. Wheeler)
  8. ^ Eric S. Raymond (Last-Modified: Thu, 15 Aug 2002). "Promiscuous Theory, Puritan Practice". {{cite web}}: Check date values in: |date= (help)
  9. ^ Forked (Jargon File), first added to v4.2.2, 20 Aug 2000)
  10. ^ http://programmers.stackexchange.com/questions/31551/forked-a-project-where-do-my-version-numbers-start
  11. ^ Fear of forking - An essay about forking in free software projects, by Rick Moen

External links