When it comes to computing, the word fork has a number of meanings - and none of them involve a utensil for eating food. Today we are looking at the concept of project forking, what it means and how it’s done. If you’ve been using open source software for a while then you’ve probably heard references to a project having been forked, but unless you have an interest in software development then you might not know what we mean. In the interest of education you need to read on!
Simply put, forking involves taking the source code from an existing project and starting a new one using it as a base. To someone unfamiliar with the concept, this may sound a bit strange and possibly a bit like stealing. In the open source community though the idea of sharing your source code for others to build upon is encouraged and no permission need be sought from the original developer.
How Does Forking Work?
Generally, a developer will:
- Take the source code from an existing project,
- Put together a plan of what they want to achieve, and
- Then set about making changes to the existing source code.
There can be a number of reasons to begin a fork of a project. Sometimes it can be because of a disagreement with the original project’s owner either from working together or over the future direction of the project. It can be because an original project owner has lost interest and stopped development and a new developer wants to pick up where they left off. Otherwise, it could be to use one or more existing projects for the base for a new one.
The problem with forking a project is that, assuming the original project is still alive, there is a tendency to split the development team between the two projects as developers choose which project they prefer. Unless there’s a solid motive for the fork in the first place, then the chances are the fork will die out and any desired code may be merged back into the parent. Alternately, with a good fork it may cause the death of the original project. If the forked project is suitably different from the original then the chances are that both may succeed.
When Do Developers Fork?
Forking happens all the time though the last few years has seen a number of high profile forks. For example:
- MariaDB from MySQL over a distrust of Oracle’s leadership of the project.
- The fork of LibreOffice from OpenOffice, again over Oracle’s ownership of the OpenOffice project.
- The fork of Devuan from Debian over Debian’s inclusion of the systemd init daemon. As well as, the fork of LibreSSL from OpenSSL after the heartbleed vulnerability was found in order to refactor the code to make it more secure.
Popular Forking Projects
Most Linux distributions are forks of a few main distributions that started early in Linux’s history. Though, due to the way Linux is packaged and maintained, many of the forks take advantage of using the packages from the parent distribution that they forked from. These forks are often just to repackage the operating system’s default packages to suit a particular desire, such as with a number of Ubuntu’s forks such as Kubuntu, Lubuntu, Xubuntu and Ubuntu Gnome, whose core focus is to distribute Ubuntu with a different default desktop environment and associated packages.
A number of popular software packages are forks of earlier software that people probably don’t know about. The blogging sensation WordPress is a fork from an earlier project called b2/cafelog, Joomla is a fork from an earlier CMS called Mambo, and Plex is a fork from XBMC.
With the popularity of the open source software development model, more forks will appear every day and projects will grow or die based on the strength of these forks.