This page describes how to create a custom plist that inherits from another plist, but adds some new sources and patches.
# Create the patch cd BuildRoot/SourceCache/launchd cp launchd-258.1/ launchd-258.1.pd1/ # do the editing... diff -ru launchd-258.1/ launchd-258.1.pd1/ > ../../../Sources/launchd-258.1.p1.patch cd - # Apply the patch cd Sources/ tar xfvz launchd-258.1.tar.gz cd launchd-258.1/ patch -p1 -r . < ../launchd-258.1.p1.patch # can then add this patch to the plist as described below, so that it gets applied automatically by DarwinBuild Why use a custom plist?By default, DarwinBuild uses the sources that are specified in the .plist (property list) files that describe each build version. It is, however, possible to define a new build version that incorporates certain changes, such as entirely new/different source files or even patches.
This is useful for downstream projects like PureDarwin, since we can take most of the upstream's codebase and customize (or "subclass") it. By doing so, we inherit a working build system as well.
Editing plistsProperty list files can be edited using any text editor. On Mac OS X, they can also be comfortably edited with the Property List Editor that comes with Xcode Tools. Mac OS X also comes with plutil, a command line tool that can be used to verify that the syntax of a plist file is correct.
Sample custom plistBelow is an example that shows how to specify patchfiles or entirely new source tarballs.
In .build/, you would have to create a new file called 9C31pd1.plist in addition to the 9C31.plist that is already there, with the following content (this is just an example):
// !$*UTF8*$! { build = 9C31pd1; inherits = 9C31; projects = { xnu = { patchfiles = ( "xnu-1228.3.13_pd1.p1.patch", ); }; boot = { version = "132_dfe_r122"; source_sites = ( "http://tgwbd.org/darwin/downloads/", ); }; }; source_sites = ( "http://src.macosforge.org/Projects/", "http://src.puredarwin.org/", ); }To make DarwinBuild use the new plist, you have to darwinbuild -init 9C31pd1 Now DarwinBuild will use the modifications specified in the file above. Specifically:
File name conventionsDarwinBuild assumes certain conventions are met with regard to filenames.
|
The goal of this project is to make Darwin more usable by providing an installation ISO, documentation, and add-on software. You are welcome to join #puredarwin on irc.freenode.net if you would like to join PureDarwin development and to add to this site.