Git for Haiku (#1)
I would like to announce the availability of the git revision control system. The git website describes it as:
Git is an open source version control system designed to handle very large projects with speed and efficiency, but just as well suited for small personal repositories; it is especially popular in the open source community, serving as a development platform for projects like the Linux Kernel, WINE or X.org.Git falls in the category of distributed source code management tools, similar to e.g. Mercurial or Bazaar. Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. Still, Git stays extremely fast and space efficient.
This document describes how to install the git binary, and how to get the source.
Installing the binary distribution
The most recent binary distribution is hosted by Haikuware, thanks! Have a look at the overview page to see the requirements, especially check if you installed Haiku revision matches the required revision.
After you fetched the binary, you can install it by entering the following commands in the Terminal:
cd /boot/ tar xvfj path-to-download
Git should then be installed.
About the Git Port
I attempted a port of Git to Haiku for several reasons, one of them being that I wanted to do some work on Cairo which uses git for revision control. The actual porting was not too bad. Git heavily relies on the POSIX standard, and a lot of it is implemented on Haiku. The only issues were finding out where Haiku fails. At the same time I was investigating the port, James Woodcock was also working on git. He filed some bug reports on Haiku issues that needed to be fixed. So it is a team effort.
There are two types of changes needed to build git. The first type consists of the hacks that are needed to work around flaws and limitations in Haiku's interfaces. There are currently four commits of this type. The other type are additions that should eventually be contributed back to the git repository. The most prevalent one is an update to the build system for systems dat only support symbolic links and not hard links.
Currently, there is a repository that you can check out with git. It is located at git://ksctrre.speed.planet.nl/git/git.haiku
. It has two branches. The master
branch contains a currently a recent clone of the git repository. It will contain the patches that should be contributed back to the git project. It currently will not build on Haiku without some manual tweaking. The second one is the hack
branch, which should work on Haiku. It will be kept up to date to whatever improvements are made to Haiku. Eventually this branch should be deprecated.
Getting and Building the Source
After installing the binaries, you can get and update the source from the repository. To build the source, you need Haiku's development tools, including perl. You can add them when you are building Haiku. Look at the section on the development tools in the second alpha newsletter.
# to get the 'hack' branch git clone git://ksctrre.speed.planet.nl/git/git.haiku hack # and to keep it up to date git pull
To build the source you should perform the following steps:
# create the configure script autoconf # run configure ./configure --prefix=/boot/home/config
The configure script autodetects almost everything, but to the config.mak.autogen
file you should add:
NO_TCLTK=YesPlease PERL_PATH=/boot/home/config/bin/perl
Then you can build the source using the regular commands.
If you would like to submit patches to the Haiku port, please send me an email.
nielx's blog
- RFC Coding Guidelines: Formatting Class Member Declarations
- Haiku Developer Tools Update (October 2023)
- HTTP Network Services Preview in R1 Beta 4
- Rust on Haiku: the Case of the Disappearing Deceased Threads
- The State of Rust on Haiku - July 2018
- Haiku has No Future
- Alpha 1: A Week Later
- A Jocund Eulogy
- Git for Haiku (#1)
- Haiku Alpha 1 Status Update (#2)