Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

root/contrib/mpab/ReadMe.txt

Revision 40196, 4.0 KB (checked in by febeling@…, 2 months ago)

ReadMe.txt: add a few notes and clarifications on the usage

  • Property svn:eol-style set to native
Line 
1MacPorts AutoBuild
2Version 0.5, 2008-05-31
3
4Introduction
5------------
6MacPorts AutoBuild (mpab) is a set of scripts which creates a chroot
7environment in which to run MacPorts and build the entire group of ports
8available to it.  Once complete (which could take a long time) or stopped,
9the build logs are moved out of the chroot to be available for review.
10
11
12Prerequisites
13-------------
14You need to have 10.5, Xcode 3.0, and Apple's X11 (other versions of Xcode
15and X11 may work, but these are the ones tested so far).
16
17For the MacPorts which will live in the chroot, you'll need (in the same
18directory as the mpab script) a tarball named macports_dist.tar.bz2.  To
19create this straight from the MacPorts svn server (assuming current
20working directory is the same as the mpab script):
21
22   svn export http://svn.macports.org/repository/macports/trunk mpexport
23   cd mpexport
24   tar cf - . | bzip2 -c > ../macports_dist.tar.bz2
25   cd ..
26   rm -rf mpexport
27
28This just exports it from svn (since the .svn stuff isn't needed for this)
29then creates the tarball; note everything in the tarball is based on the
30current working directory.
31
32If you already have MacPorts from svn, run this instead of the first command
33above, then do the rest:
34
35   svn export /path/to/macports/svn/trunk mpexport
36
37
38Installation
39------------
40Once the MPAB tarball is extracted (which you've probably done if you're
41reading this), make sure the above prerequisites are available, then you
42are ready to go
43
44
45Running
46-------
47To just build it all (every port):
48
49   sudo ./mpab
50
51(assuming you are in the directory with the mpab script).  This will do
52what needs doing to get a chroot, install MacPorts in said chroot, then
53start building ports.
54
55The first time you run, it will take some time as it is creating a chroot
56environment, which involves copying several gigabytes of files into
57said chroot...be patient.
58
59To build only a certain set of ports you need a file containing the
60list of the port names. The `port list' command adds more information
61than you want here, like version and category.  To create an list for
62mpab consumption, you can use something like this:
63
64  port echo maintainer:YOURNAME > own_ports
65
66and then
67
68  sudo ./mpab buildports own_ports
69
70You can run './mpab help' to see what commands can be used with
71mpab.
72
73Note that ports don't get rebuild when you run this twice, since they
74get stored as package once built sucessfully, and only rebuild when
75the version or revision gets changed. The port file definitions come
76from the macports_dist.tar.bz2 file you used for creating the disk images.
77
78
79Maintenance
80-----------
81mpab creates several disk images:
82
83   mproot.dmg - this is the basic chroot environment with various system
84                programs installed; it is read-only
85   mproot.dmg.shadow - this is where updates to the chroot go, which means
86                       to restart with a bare chroot, simply delete it and
87                       all traces of MacPorts are gone
88   mproot_distcache.sparseimage - this is a disk image only containing the
89                                  distfiles MacPorts downloads (which are
90                                  in /opt/local/var/macports/distfiles)
91
92When the OS version is updated, both mproot.dmg and mproot.dmg.shadow
93should be deleted so they can be rebuilt.  Any time you want to clean out
94the built MacPorts within the chroot but not rebuild the entire environment,
95you can delete just mproot.dmg.shadow, to start from scratch.  Note if you
96want to rebuild MacPorts program and libraries, mpab has a rebuildmp target
97to do just that.
98
99
100Todo
101----
102improve the amount of debugging available via MPABDEBUG
103
104add 10.4 support (mostly needs different paths in pathsToCreate and
105pathsToCopy in buildImages())
106
107add a method to allow variants either globally or to an individual port
108
109fix dependency checking to work more like MP; currently if a port fails, all
110those depending on it are skipped, but if it's lib:...:port then it might
111still be buildable (see some things which depend on gnutar, and this will
112allow to skip the XFree86/xorg special-casing)
Note: See TracBrowser for help on using the browser.