Projects
Wiki     New Ticket     View Tickets     Timeline     Browse Source     Search
Release Branches

In order to make it clear what is expected to work on a given OS release, we have split the source into release branches. If you are using darwinbuild on Tiger (Mac OS X 10.4.x, Darwin 8), use /releases/Darwin8. If you are on Leopard (Mac OS X 10.5.x, Darwin 9) use /releases/Darwin9. Trunk is currently intended for Snow Leopard (Mac OS X 10.6.x, Darwin 10).

We'll backport any critical changes and features that do not rely on the newer release to the release branches. This should hopefully fix the problem of hunting for the last revision that worked on Tiger, for example.

 

Subversion Support

Projects can now have a branch key in their plist which will cause darwinbuild to use subversion to checkout/update the source instead of downloading a tarball. You can see an example of this at the SmartCard Services project. Darwinbuild will assume "-nosource" when a project is subversion-based. The working copy is in the same place as usual, at BuildRoot/SourceCache/project/project-version/. This should allow developers to take advantage of the chroot and automatic root fetching of darwinbuild, while being able to make changes between builds and commit directly from the SourceCache. 

New -init Options

We have added some new logic to the -init processing that will look for http or scp URLs/paths and download the plist automatically. If you have been storing your own plist on a server and making users manually download the plist, you can now provide a URL and let darwinbuild download it for you:

darwinbuild -init http://example.com/files/9J61plus.plist

or using scp ...

darwinbuild -init user@example.com:/files/9J61plus.plist
New -nosource Option

We have added in an option that many have been asking for. You can now pass -nosource to darwinbuild in order to skip the source staging. This means darwinbuild will not delete the BuildRoot/SourceCache/ files and replace them with the tarball. This option also disables file patching, since presumably the patches were already applied when the tarball was extracted. So, now you can modify the SourceCache as needed without darwinbuild deleting your changes. 

 

New Storage Options

The latest revision of trunk has support for sparsebundles and NFS Loopback in order to avoid the problems with xcodebuild inside of chroots. If you do not change the way you use darwinbuild, you will start seeing the sparsebundle storage. Nothing else is needed and Xcode-based projects will build on whatever filesystem you have. 

You can optionally use NFS to mount the buildroot which also works around the xcodebuild/chroot problems. This method is Leopard-only and will cause lines to be added to /etc/exports. Since there is no concept of "uninitializing" a build environment, the lines added to /etc/exports are never automatically removed. You may need to cleanup /etc/exports from time to time. You setup the NFS storage by passing "-nfs" after your -init command:

# darwinbuild -init 9G55 -nfs

If you want the old legacy directory mode for whatever reason, you can initialize your build environment with -nodmg:

# darwinbuild -init 9G55 -nodmg

 

Xcode 3.1 Support

The latest source in trunk now supports Xcode 3.1! Projects which still fail to build should be reported in a Ticket.

Darwin 9

If you are trying to build projects for Darwin 9, there are a few tips you should know about to help:

  • Install darwinbuild from the trunk of our subversion repo. We have added some basic support for Xcode 3.0 and Leopard to it that has not made it into an "official" release.
  • Store your build environments on a UFS partition (disk images work for this). There is a problem with xcodebuild when running in a chroot on certain filesystems, like HFS+. Other filesystems might also work.  You know you've hit this problem if your build errors out immediately with "cannot find xcode project". 
  • Building or loading the CF project will populate your environment with CF-Lite. This will cause problems for xcodebuild. During the installXcode phase, DarwinBuild will grab a copy of your Host's CF, and thats the CF you should use to run xcodebuild (since it also comes from your Host). 

Why use DarwinBuild?

There is more to open source than source code. While it's useful to read sources, the real benefit comes from working with them to fix bugs, make enhancements, and install new versions on your system. Darwin, the open source core of Apple's Mac OS X operating system, contains hundreds of open source projects. In addition to the projects developed by Apple, many projects come from a wide variety of other open source initiatives, including GNU/Linux, FreeBSD, NetBSD, OpenBSD, XFree86, and independent projects hosted at SourceForge, Mac OS Forge, and elsewhere.

Because of the diversity of its component projects, and the unique requirements of the commercial Mac OS X system, Darwin's build system is quite different than the other open source initiatives listed above. If you are interested in building and modifying Darwin projects, the documentation on this website, and the DarwinBuild tools, will prove to be an invaluable resource.

news feed