Skip to content
Surf Wiki
Save to docs
technology/software-engineering

From Surf Wiki (app.surf) — the open knowledge base

Fork (software development)

Independent software derived from existing software


Independent software derived from existing software

In software development, a fork is a codebase that is created by duplicating an existing codebase and, generally, is subsequently modified independently of the original. Software built from a fork initially has identical behavior as software built from the original code, but as the source code is increasingly modified, the resulting software tends to have increasingly different behavior compared to the original. A fork is a form of branching, but generally involves storing the forked files separately from the original – not in the repository. Reasons for forking a codebase include user preference, stagnated or discontinued development of the original software or a schism in the developer community."Schism", with its connotations, is a common usage, e.g.

Etymology

The word fork has been used to mean "to divide in branches, go separate ways" as early as the 14th century.

In the context of software development, fork was used in the sense of creating a revision control branch by Eric Allman as early as 1980, in the context of Source Code Control System:

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

Although 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 Berkeley Software Distributions (BSDs) (1993–1994), Russ Nelson used the term shattering in this sense in 1993 (attributing it to John Gilmore). In 1995, fork was used to describe the XEmacs split, and was an understood usage in the GNU Project by 1996.

The word is used similarly for the fork() system call which causes a running process to split in two typically, to allow them to perform different tasks in parallel.

Forking of free and open-source software

Free and open-source software may be legally forked without prior approval of those currently developing, managing, or distributing the software per both The Free Software Definition and The Open Source Definition: |access-date = 2013-10-15 |url-status = live |archive-url = https://web.archive.org/web/20131014132149/http://www.gnu.org/philosophy/free-sw.html |archive-date = 14 October 2013

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. The relationship between the different teams can be cordial or very bitter. On the other hand, a friendly fork or a soft fork is a fork that does not intend to compete, but wants to eventually merge with the original.

Eric S. Raymond, in his essay Homesteading the Noosphere, 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:

David A. Wheeler notes 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 GNU Compiler Collection.)
  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.)

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 create a personal branch of the repository, independent of the main repository, and later seek to have your changes integrated with it. 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, and GitHub uses "fork" as its term for this method of contribution to a project.

Forks often restart version numbering from numbers typically used for initial versions of programs like 0.0.1, 0.1, or 1.0 even if the original software was at another version such as 3.0, 4.0, or 5.0. An exception is sometimes made when the forked software is designed to be a drop-in replacement for the original project, e.g. MariaDB for MySQL or LibreOffice for OpenOffice.org.

The BSD licenses permit forks to become proprietary software, and copyleft proponents say that commercial incentives thus make proprietisation almost inevitable. (Copyleft licenses can, however, be circumvented via dual-licensing with a proprietary grant in the form of a Contributor License Agreement.) Examples include macOS (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), 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.

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 under license and all called "Unix", but increasingly mutually incompatible. See Unix wars.

References

References

  1. link. (25 May 2012)
  2. Allman, Eric. [https://sccs.sourceforge.net/man/sccs.me.html "An Introduction to the Source Code Control System."] {{webarchive. link. (6 November 2014 Project Ingres, University of California at Berkeley, 1980.)
  3. John Gilmore]], net.misc, 18 January 1983)
  4. [https://groups.google.com/group/gnu.misc.discuss/browse_thread/thread/1bba70b8f8676c43/309504a5a51dd0f0 Shattering — good or bad?] (Russell Nelson, gnu.misc.discuss, 1 October 1993)
  5. [https://groups.google.com/group/cu.cs.macl.info/browse_thread/thread/ed9e5ff9cb21c359/4ce930d2fd1271eb?q=%22fork+of%22+xemacs#4ce930d2fd1271eb Re: Hey Franz: 32K Windows SUCK!!!!!] (Bill Dubuque, cu.cs.macl.info, 21 September 1995)
  6. [https://groups.google.com/group/gnu.misc.discuss/browse_thread/thread/5d7529d865d4d9ca/69ebc4771f32bc45?q=fork+xemacs&utoken=jCqifzMAAABlYGNE0Z8-NzB8d_a6gkmMuNtzuV4zLfLK8bEgnt4z8g27cB9GA0FI9e6hHUM__C_J8dUPGZeQNP0WkVA49NN0 Lignux?] (Marcus G. Daniels, gnu.misc.discuss, 7 June 1996)
  7. (2012). "A Comprehensive Study of Software Forks: Dates, Reasons and Outcomes".
  8. (7 July 2006). "The Open Source Definition". The Open Source Initiative.
  9. Raymond, Eric S.. (15 August 2002). "Promiscuous Theory, Puritan Practice".
  10. [http://catb.org/jargon/html/F/forked.html Forked] {{webarchive. link. (8 November 2011 ([[Jargon File]]), first added to [http://magic-cookie.co.uk/jargon/jarg422/ v4.2.2] {{webarchive). link. (14 January 2012 , 20 August 2000))
  11. [http://www.dwheeler.com/oss_fs_why.html#forking Why Open Source Software / Free Software (OSS/FS, FLOSS, or FOSS)? Look at the Numbers!: Forking] {{webarchive. link. (5 April 2006 (David A. Wheeler))
  12. Willis, Nathan. (15 January 2015). "An "open governance" fork of Node.js". Hanken School of Economics.
  13. [http://programmers.stackexchange.com/questions/31551/forked-a-project-where-do-my-version-numbers-start Forked a project, where do my version numbers start?] {{webarchive. link. (26 August 2011)
  14. [http://www.enterprisedb.com EnterpriseDB] {{webarchive. link. (13 November 2006)
  15. [http://www.fastware.com.au/docs/FujitsuSupportedPostreSQLWhitePaperV1_02.pdf Fujitsu Supported PostgreSQL] {{webarchive. link. (20 August 2006)
  16. [http://www.netezza.com/media/2004/Weblog.htm Netezza] {{webarchive. link. (13 November 2006)
  17. [http://linuxmafia.com/faq/Licensing_and_Law/forking.html Fear of forking] {{webarchive. link. (17 December 2012 – An essay about forking in [[free software]] projects, by Rick Moen)
Info: Wikipedia Source

This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.

Want to explore this topic further?

Ask Mako anything about Fork (software development) — get instant answers, deeper analysis, and related topics.

Research with Mako

Free with your Surf account

Content sourced from Wikipedia, available under CC BY-SA 4.0.

This content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.

Report