Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a6018e08
Commit
a6018e08
authored
Sep 20, 2004
by
Robert Ricci
Browse files
Everything You Never Wanted To Know About Building Packages
But Didn't Care Enough to Ask
parent
add3c530
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/package-building.txt
0 → 100644
View file @
a6018e08
######################################################################
##### Everything You Never Wanted To Know About Building Packages
##### But Didn't Care Enough to Ask
##### Robert Ricci <ricci@cs.utah.edu>
######################################################################
#####
##### What?
#####
Building binary packges for the emulab-ops and emulab-boss ports.
#####
##### Why?
#####
Well, when you're building and ops or boss node (particularly a boss node),
it really sucks to have to wait for a year to compile all 73 million ports
that boss depends on. This is particularly bad when you're trying to set up
a test installation of Emulab. This document will show you how to build
packages so that you only have to wait this out once.
#####
##### Who?
#####
Well, you, apparently. Don't know how you got stuck with this job. Sorry.
#####
##### Where?
#####
At Utah, we stash the binary packages in the /share/freebsd/packages directory.
For example, the ports built from the 4.10-Release ports tree are in:
/share/freebsd/packages/FreeBSD-4.10-Release/
... and the ones I made on a 4.10 box, with a snapshot of the ports tree from
Sep. 17 2004 are in:
/share/freebsd/packages/FreeBSD-4.10-20040917/
#####
##### How?
#####
Note, this process is going to install a whole bunch of software, so you
probably want to do it on a testbed node, not on boss or on your desktop or
something like that.
First, you're gonna need a copy of the ports tree. There are lots of ways you
can get this - at Utah, you can find a copy in /share/freebsd/<version>/ports .
Or you can grab a copy from:
ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/ports.tar.gz
Optionally, you'll probably want to update the ports tree to the latest
version - you don't want to be stuck in the past, right? Put the following
magic in /etc/make.conf:
SUP_UPDATE=yes
PORTSSUPFILE=/usr/share/examples/cvsup/ports-supfile
SUPHOST=cvsup3.freebsd.org # xyz.lcs.mit.edu
Now, run 'pkg_add -r cvsup-without-gui', which should install the binary
package of cvsup from the FreeBSD FTP server. If you a masochist, you can
compile it yourself from /usr/ports/net/cvsup-without-gui, but be warned, this
will compile all of the Modula-3 lanauge, which takes an eternity, and is
fairly usless since cvsup appears to be the only program in all of history ever
written in Modula-3.
Okay, now cd to /usr/ports and run 'make update'. Welcome to the bleeding edge!
Next, you'll need a copy of the emulab ports. Just copy (recursively), the
contents of install/ports in the Emulab source tree into /usr/ports/misc .
Now, you have to install all of these ports. Just run a 'make install' in the
/usr/port/misc/emulab-boss and /usr/ports/misc/emulab-ops directories. Now, we
play the waiting game. This will take a while.
Now, to build the packages. Pretty easy, actually. Just run:
mkdir /usr/ports/packages
Then:
cd /usr/ports/misc/emulab-boss && make deinstall package-recursive
cd /usr/ports/misc/emulab-ops && make deinstall package-recursive
At this point, though, you may run into some problems with broken ports. For
example, the Apache port at the time of writing has a broken packing list,
which causes the package to fail. I had to run:
mv /usr/local/etc/rc.d/apache.sh /usr/local/etc/rc.d/apache.sh.sample
... before it would work.
Also, we depend on cvsup on boss. Remember how I told you above that you want
to avoid building Modula-3? Well, guess what, you have to build it anyway. This
is because the cvsup port depends on it. Bummer. So, you'll also have to do a:
cd /usr/ports/lang/ezm3 && make install
If you run into any other problems, consult, in this order:
(1) 'man 7 ports'
(2) http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/
(3) testbed-ops@emulab.net
Now, just copy the contents of /usr/ports/packages/All/ into the directory you
picked above!
Oh, and to install the packages on some other node, you won't need a ports tree
on it. You just need /share mounted, and run:
env PKG_PATH=/share/freebsd/packages/<some-dir>/ pkg_add emulab-boss-1.5
env PKG_PATH=/share/freebsd/packages/<some-dir>/ pkg_add emulab-ops-1.4
(note, check emulab-boss/Makefile and emulab-ops/Makefile to get the version
numbers if they've changed from 1.4 and 1.5, and I've forgotten to update this
document)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment