From Wikipedia, the miễn phí encyclopedia
Bạn đang xem: forking là gì
"Fork (software)" redirects here. For the operation whereby a process creates a copy of itself, see fork (system call).
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 and separate piece of software. The term often implies not merely a development branch, but also a split in the developer community; as such, it is a size of schism. Grounds for forking are varying user preferences and stagnated or discontinued development of the original software.
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.
The word "fork" has been used to lớn mean "to divide in branches, go separate ways" as early as the 14th century. In the software environment, the word evokes the fork system gọi, which causes a running process to lớn split itself into two (almost) identical copies that (typically) diverge to lớn perform different tasks.
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:
Creating a branch "forks off" a version of the program.
The term was in use on Usenet by 1983 for the process of creating a subgroup to lớn move topics of discussion to lớn.
"Fork" is not known to lớn 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" for this sort of fork in 1993, attributing it to lớn John Gilmore. However, "fork" was in use in the present sense by 1995 to lớn describe the XEmacs split, and was an understood usage in the GNU Project by 1996.
Forking of miễn phí 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:
The freedom to lớn distribute copies of your modified versions to lớn others (freedom 3). By doing this, you can give the whole community a chance to lớn benefit from your changes. Access to lớn the source code is a precondition for this.
Xem thêm: pervert nghĩa là gì
3. Derived Works: The license must allow modifications and derived works, and must allow them to lớn be distributed under the same terms as the license of the original software.
In miễn phí 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 trang 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 lớn compete, but wants to lớn 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:
Forking is considered a Bad Thing—not merely because it implies a lot of wasted effort in the future, but because forks tend to lớn be accompanied by a great giảm giá khuyến mãi 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.
David A. Wheeler notes four possible outcomes of a fork, with examples:
- The death of the fork. This is by far the most common case. It is easy to lớn declare a fork, but considerable effort to lớn continue independent development and tư vấn.
- A re-merging of the fork (e.g., egcs becoming "blessed" as the new version of GNU Compiler Collection.)
- The death of the original (e.g. the X.Org Server succeeding and XFree86 dying.)
- 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 lớn contribute to lớn a project, is to lớn first create a personal branch of the repository, independent of the main repository, and later seek to lớn have your changes integrated with it. Sites such as GitHub, Bitbucket and Launchpad provide miễn phí DVCS hosting expressly supporting independent branches, such that the technical, social and financial barriers to lớn forking a source code repository are massively reduced, and GitHub uses "fork" as its term for this method of contribution to lớn a project.
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 lớn 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 lớn 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 size 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 lớn 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 lớn 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 ví 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 lớn 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.
Xem thêm: referee là gì
- List of software forks
- Source port
- Downstream (software development)
- Group decision-making
- Modular programming
- Custom software
- Team effectiveness
- Duplicate code
- ROM Hacking
- ^ "Schism", with its connotations, is a common usage, e.g.
- "the Lemacs/FSFmacs schism" Archived 30 November 2009 at the Wayback Machine (Jamie Zawinski, 2000)
- "Behind the KOffice split" Archived 6 July 2013 at the Wayback Machine (Joe Brockmeier, Linux Weekly News, 2010-12-14)
- "Copyright assignment – once bitten, twice shy" Archived 30 March 2012 at the Wayback Machine (Richard Hillesley, H-Online, 2010-08-06)
- "Forking is a feature" Archived 29 February 2012 at the Wayback Machine (Anil Dash, 2010-09-10)
- "The Great Software Schism" Archived 6 January 2012 at the Wayback Machine (Glyn Moody, Linux Journal, 2006-09-28)
- "To Fork Or Not To Fork: Lessons From Ubuntu and Debian" Archived 26 February 2012 at the Wayback Machine (Benjamin Mako Hill, 2005).
- ^ Entry 'fork' in Online Etymology Dictionary Archived 25 May 2012 at the Wayback Machine
- ^ "The term fork is derived from the POSIX standard for operating systems: the system gọi used ví that a process generates a copy of itself is called fork()." Robles, Gregorio; González-Barahona, Jesús M. (2012). A Comprehensive Study of Software Forks: Dates, Reasons and Outcomes (PDF). OSS 2012 The Eighth International Conference on Open Source Systems. doi:10.1007/978-3-642-33442-9_1. Archived (PDF) from the original on 2 December 2013. Retrieved 20 October 2012.
- ^ Allman, Eric. "An Introduction to lớn the Source Code Control System." Archived 6 November năm trước at the Wayback Machine Project Ingres, University of California at Berkeley, 1980.
- ^ Can somebody fork off a "net.philosophy"? (John Gilmore, net.misc, 18 January 1983)
- ^ Shattering — good or bad? (Russell Nelson, gnu.misc.discuss, 1 October 1993)
- ^ Re: Hey Franz: 32K Windows SUCK!!!!! (Bill Dubuque, cu.cs.macl.info, 21 September 1995)
- ^ Lignux? (Marcus G. Daniels, gnu.misc.discuss, 7 June 1996)
- ^ a b c Why Open Source Software / Free Software (OSS/FS, FLOSS, or FOSS)? Look at the Numbers!: Forking Archived 5 April 2006 at the Wayback Machine (David A. Wheeler)
- ^ Stallman, Richard. "The Free Software Definition". Free Software Foundation. Archived from the original on 14 October 2013. Retrieved 15 October 2013.
- ^ "The Open Source Definition". The Open Source Initiative. 7 July 2006. Archived from the original on 15 October 2013. Retrieved 15 October 2013.
- ^ Raymond, Eric S. (15 August 2002). "Promiscuous Theory, Puritan Practice". catb.org. Archived from the original on 6 October 2006.
- ^ Forked Archived 8 November 2011 at the Wayback Machine (Jargon File), first added to lớn v4.2.2 Archived 14 January 2012 at the Wayback Machine, trăng tròn August 2000)
- ^ e.g. Willis, Nathan (15 January 2015). "An "open governance" fork of Node.js". LWN.net. Archived from the original on 21 April 2015. Retrieved 15 January 2015.
Forks are a natural part of the open development model—so much ví that GitHub famously plasters a "fork your own copy" button on almost every page.See also Nyman, Linus (2015). Understanding Code Forking in Open Source Software (PhD). Hanken School of Economics. p. 57. hdl:10138/153135.
Where practitioners have previously had rather narrow definitions of a fork, [...] the term now appears to lớn 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 lớn be in no insignificant part due to lớn the broad definition and use of the term fork by GitHub.
- ^ Forked a project, where tự my version numbers start? Archived 26 August 2011 at the Wayback Machine
- ^ EnterpriseDB Archived 13 November 2006 at the Wayback Machine
- ^ Fujitsu Supported PostgreSQL Archived trăng tròn August 2006 at the Wayback Machine
- ^ Netezza Archived 13 November 2006 at the Wayback Machine
- ^ Fear of forking Archived 17 December 2012 at the Wayback Machine – An essay about forking in miễn phí software projects, by Rick Moen
- Right to lớn Fork at Meatball Wiki
- A PhD examining forking: (Nyman, 2015) "Understanding Code Forking in Open Source Software – An examination of code forking, its effect on open source software, and how it is viewed and practiced by developers"