Fork (software development): Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile web edit
Bender the Bot (talk | contribs)
m Etymology: HTTP to HTTPS for SourceForge
 
(6 intermediate revisions by 3 users not shown)
Line 1:
{{shortShort description|New program, and line ofIndependent software development, derived from an existing onesoftware}}
{{redirect|Fork (software)|the operation whereby a process creates a copy of itself|fork (system call)}}
{{Use dmy dates|date=December 2022}}
[[File:Linux Distribution Timeline.svg|thumb|upright|A timeline chart showing the evolution of [[Linux distribution]]s, with each split in the diagram being called "a fork"]]
In [[software engineeringdevelopment]], a '''project fork''' happensis whena developers[[codebase]] takethat ais copycreated by duplicating an existing codebase and, generally, is subsequently modified independently of the original. [[sourceSoftware]] code[[software build|built]] from onea [[Computerfork initially has identical behavior as software|software packagebuilt from the original code, but as the [[source code]] andis startincreasingly independentmodified, developmentthe onresulting it,software creatingtends ato distincthave andincreasingly separatedifferent piecebehavior ofcompared softwareto the original.{{Example needed|date=June 2024}} TheA termfork oftenis impliesa notform merely aof [[branching (revision control)|development branchbranching]], but alsogenerally ainvolves splitstoring the forked files separately from the original; not in the developer[[software community;repository|repository]]. asReasons suchfor forking a codebase include user preference, itstagnated isor adiscontinued formdevelopment of the original software or a [[schism]] in the developer community.<ref>"Schism", with its connotations, is a common usage, ''e.g.''
* [http://www.jwz.org/doc/lemacs.html "the Lemacs/FSFmacs schism"] {{Webarchive|url=https://web.archive.org/web/20091130093142/http://www.jwz.org/doc/lemacs.html|date=30 November 2009}} ([[Jamie Zawinski]], 2000)
* [https://lwn.net/Articles/419822/ "Behind the KOffice split"] {{webarchive|url=https://web.archive.org/web/20130706094238/http://lwn.net/Articles/419822/|date=6 July 2013}} (Joe Brockmeier, ''Linux Weekly News'', 2010-12-14)
Line 9:
* [http://dashes.com/anil/2010/09/forking-is-a-feature.html "Forking is a feature"] {{webarchive|url=https://web.archive.org/web/20120229032536/http://dashes.com/anil/2010/09/forking-is-a-feature.html|date=29 February 2012}} ([[Anil Dash]], 2010-09-10)
* [http://www.linuxjournal.com/node/1000101 "The Great Software Schism"] {{webarchive|url=https://web.archive.org/web/20120106065841/http://www.linuxjournal.com/node/1000101|date=6 January 2012}} ([[Glyn Moody]], ''Linux Journal'', 2006-09-28)
* [http://mako.cc/writing/to_fork_or_not_to_fork.html "To Fork Or Not To Fork: Lessons From Ubuntu and Debian"] {{webarchive|url=https://web.archive.org/web/20120226160810/http://mako.cc/writing/to_fork_or_not_to_fork.html|date=26 February 2012}} ([[Benjamin Mako Hill]], 2005).</ref> GroundsForking forproprietary forkingsoftware are(such varyingas user[[Unix]]) preferencesis andprohibited stagnatedby or[[copyright]] discontinuedlaw developmentwithout ofexplicit thepermission, originalbut [[free and open-source software]], by definition, may be forked without permission.
 
[[Free and open-source software]] is that which, by definition, may be forked from the original development team without prior permission, and without violating [[copyright]] law. However, licensed forks of proprietary software (''e.g.'' [[Unix]]) also happen.
 
== Etymology ==
The word "''fork"'' has been used to mean "to divide in branches, go separate ways" as early as the 14th century.<ref>[http://www.etymonline.com/index.php?term=fork Entry 'fork' in Online Etymology Dictionary] {{webarchive|url=https://web.archive.org/web/20120525165727/http://www.etymonline.com/index.php?term=fork |date=25 May 2012 }}</ref> In the software environment, the word evokes the [[Fork (system call)|fork]] system call, which causes a running process to split itself into two (almost) identical copies that (typically) diverge to perform different tasks.<ref>"The term fork is derived from the POSIX standard for operating systems: the system call used so that a process generates a copy of itself is called fork()." {{cite conference|url=http://flosshub.org/sites/flosshub.org/files/paper_0.pdf|title=A Comprehensive Study of Software Forks: Dates, Reasons and Outcomes|first1=Gregorio|last1=Robles|first2=Jesús M.|last2=González-Barahona|conference=OSS 2012 The Eighth International Conference on Open Source Systems|year=2012|access-date=20 October 2012|url-status=live|archive-url=https://web.archive.org/web/20131202221721/http://flosshub.org/sites/flosshub.org/files/paper_0.pdf|archive-date=2 December 2013|doi=10.1007/978-3-642-33442-9_1|doi-access=free}}</ref>
 
In the context of software development, "''fork"'' was used in the sense of creating a revision control "[[branching (revision control)|'''branch]]"''' by [[Eric Allman]] as early as 1980, in the context of [[Source Code Control System]]:<ref>Allman, Eric. [httphttps://sccs.sourceforge.net/man/sccs.me.html "An Introduction to the Source Code Control System."] {{webarchive|url=https://web.archive.org/web/20141106144859/http://sccs.sourceforge.net/man/sccs.me.html |date=6 November 2014 }} Project Ingres, University of California at Berkeley, 1980.</ref>
 
{{quotation|Creating a branch "forks off" a version of the program.}}
Line 22 ⟶ 20:
The term was in use on [[Usenet]] by 1983 for the process of creating a subgroup to move topics of discussion to.<ref>[https://groups.google.com/group/net.misc/browse_thread/thread/b0e9f8531558b7e9/1cc726d9e9e05ebd?q=fork#1cc726d9e9e05ebd Can somebody fork off a "net.philosophy"?] ([[John Gilmore (activist)|John Gilmore]], net.misc, 18 January 1983)</ref>
 
"Fork"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 Distribution|Berkeley Software Distributions]] (BSDs) (1993–1994);, [[Russ Nelson]] used the term "''shattering"'' forin this sort of forksense in 1993, (attributing it to [[John Gilmore (activist)|John Gilmore]]).<ref>[https://groups.google.com/group/gnu.misc.discuss/browse_thread/thread/1bba70b8f8676c43/309504a5a51dd0f0 Shattering&nbsp;— good or bad?] (Russell Nelson, gnu.misc.discuss, 1 October 1993)</ref> HoweverIn 1995, "''fork"'' was in use in the present sense by 1995used to describe the XEmacs split,<ref>[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)</ref> and was an understood usage in the [[GNU]] Project by 1996.<ref>[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)</ref>
 
The word is used similarly for the [[Fork (system call)|fork() system call]] which causes a running [[Process (computing)|process]] to split in two {{endash}} typically, to allow them to perform different tasks in parallel.<ref>"The term fork is derived from the POSIX standard for operating systems: the system call used so that a process generates a copy of itself is called fork()." {{cite conference|url=http://flosshub.org/sites/flosshub.org/files/paper_0.pdf|title=A Comprehensive Study of Software Forks: Dates, Reasons and Outcomes|first1=Gregorio|last1=Robles|first2=Jesús M.|last2=González-Barahona|conference=OSS 2012 The Eighth International Conference on Open Source Systems|year=2012|access-date=20 October 2012|url-status=live|archive-url=https://web.archive.org/web/20131202221721/http://flosshub.org/sites/flosshub.org/files/paper_0.pdf|archive-date=2 December 2013|doi=10.1007/978-3-642-33442-9_1|doi-access=free}}</ref>
 
==Forking of free and open-source software==
Line 54:
[[Distributed revision control]] (DVCS) tools have popularised a less emotive use of the term "fork", blurring the distinction with "branch".<ref>''e.g.'' {{cite web|url=https://lwn.net/Articles/628527/|title=An "open governance" fork of Node.js|first=Nathan|last=Willis|work=LWN.net|date=15 January 2015|access-date=15 January 2015|quote=Forks are a natural part of the open development model—so much so that GitHub famously plasters a "fork your own copy" button on almost every page.|url-status=live|archive-url=https://web.archive.org/web/20150421055059/http://lwn.net/Articles/628527/|archive-date=21 April 2015}} See also {{cite thesis|type=PhD|page=57|first=Linus|last=Nyman|title=Understanding Code Forking in Open Source Software|publisher=Hanken School of Economics|year=2015|quote=Where practitioners have previously had rather narrow definitions of a fork, [...] the term now appears to be used much more broadly. Actions that would traditionally have been called a branch, a new distribution, code fragmentation, a pseudo-fork, etc. may all now be called forks by some developers. This appears to be in no insignificant part due to the broad definition and use of the term fork by GitHub.|hdl=10138/153135}}</ref> 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 (website)|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]]<ref>[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|url=https://web.archive.org/web/20110826152252/http://programmers.stackexchange.com/questions/31551/forked-a-project-where-do-my-version-numbers-start |date=26 August 2011 }}</ref> 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 (software)|Cedega]] and [[CrossOver]] (proprietary forks of [[Wine (software)|Wine]], though CrossOver tracks Wine and contributes considerably), EnterpriseDB (a fork of [[PostgreSQL]], adding Oracle compatibility features<ref>[http://www.enterprisedb.com EnterpriseDB] {{webarchive|url=https://web.archive.org/web/20061113052033/http://www.enterprisedb.com/ |date=13 November 2006 }}</ref>), Supported PostgreSQL with their proprietary ESM storage system,<ref>[http://www.fastware.com.au/docs/FujitsuSupportedPostreSQLWhitePaperV1_02.pdf Fujitsu Supported PostgreSQL] {{webarchive|url=https://web.archive.org/web/20060820144738/http://fastware.com.au/docs/FujitsuSupportedPostreSQLWhitePaperV1_02.pdf |date=20 August 2006 }}</ref> and Netezza's<ref>[http://www.netezza.com/media/2004/Weblog.htm Netezza] {{webarchive|url=https://web.archive.org/web/20061113210650/http://www.netezza.com/media/2004/Weblog.htm |date=13 November 2006 }}</ref> 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.
Line 64:
 
==See also==
* [[List{{Annotated oflink|Custom software forks]]}}
* [[{{Annotated link|Downstream (software development)]]}}
* [[Source port]]
** [[{{Annotated link|Duplicate code]]}}
* [[Downstream (software development)]]
* {{Annotated link|Group decision-making}}
* [[Group decision-making]]<!--[[Default (computer science)#Application software preferences]] [[Wizard (software)]]-->
* {{Annotated link|List of software forks}}
* [[Modular programming]]
** [[{{Annotated link|Modding]]}}
* [[{{Annotated link|Modular programming]]}}
* [[Custom software]]
* [[{{Annotated link|Personalization]]}}
* [[{{Annotated link|ROM hacking|ROM Hacking]]}}
* [[Team effectiveness]]
* [[{{Annotated link|Source port]]}}
** [[Duplicate code]]
* [[{{Annotated link|Team effectiveness]]}}
* [[ROM hacking|ROM Hacking]]
 
==References==