This document explains how to use the rsync utility to pull the recent master copy of a SAC tool to your platform source (or your master source) for you to install or inspect.
rsync
:
SAC caches a copy of the recommended release at:
ftp://ftp.sac.fedex.com/pub/gnu/rsync-2.3.1.tar.gz.
Note version 2.3.2 has been released, but we have not upgraded due
to peak freeze.
Down-load the source to rsync
and install it someplace in
your search path. We install it in /usr/local/bin/rsync
on our hosts.
To test this application run:
rsync rsync://msrc.sac.fedex.com/
Which should output a table, like:
ftp SA+C ftp spool
msrc the SA+C master source tree
Admin the SA+C master source admin tools
Admin
and src
.
They can be placed in any directory you can write.
These are the steps to initialize these directories:
Admin
directory, I used /tftp/Admin
in my example below (only becaue /tftp had a lot of space).
export TOP=some-directory
cd $TOP
mkdir Admin Pkgs msrc
.rsrc
file to tell the rsrc
script
where to pull sources from. Later we will install other rsrc
control files to pull different products from different master source
hosts.
echo RSRC_ROOT=\"${PWD}/\" > .rsrc
echo RSRC_MSRC=\"rsync://msrc.sac.fedex.com\" >> .rsrc
The FQDN of the master source host might have to be changed to a
local server if you are not on the FedEx Corporate network.
rsrc
and makeme
programs
that we'll use to pull down the rest of the master source we
install the bin directory from the master source with rsync
,
and install it in our PATH.
rsync -ra rsync://msrc.sac.fedex.com/Admin/bin/ Admin/bin
PATH=$TOP/Admin/bin:$PATH
bin/rsrc
program:
rsrc -version
Should output something like:
rsrc: a revision token from RCS
Control file basename: .rsrc
Read control files: $TOP/.rsrc
Local directory $TOP/, with
shell preferences from /usr/local/lib/distrib/local.defs
This host w01.sac.fedex.com should be listed in
/usr/local/lib/distrib/distrib.cf:
/home/ksb/Admin/bin/rsrc[120]: distrib: not found
Remote master source pool is: rsync://msrc.sac.fedex.com
Copied with: rsync --exclude=.rsrc -r $URL/ .
This directory: $TOP/Admin
is made from the URL: rsync://msrc.sac.fedex.com
If that looks like what you want you can go on, else read the
comments in the bin/rsrc
script about building shell
variables to modify the run-time behavior of the program to get
sources from your favorite site.
rsrc
.
cd Admin
rsrc -get README Targets Macros Levers
View some of those files to be sure they look sane. If the rsrc
scrip fails run it with ksb -x
to see what looks wrong.
local.defs
file someplace
and set the path to it. You can use something like:
PATH=/usr/local/bin:/usr/local/etc:$PATH:/usr/ccs/bin
export PATH
umask 022
To get you going on a Sun. It must set a PATH
to find the C compiler and local tools. It should set a umask.
-version
output carefully.
cd $TOP/msrc
rsrc -get RBOOT
(Once again change the master source hostname if you must.)
mkcmd
installed you can use
the RBOOT script to install the minimal ksb tools. You must
have rsrc
and makeme
in you search path.
Run it with:
ksh -x ./RBOOT
Note that it trys to install the tools under
/usr/local
: if you don't have permission to install
there you'll have to build with:
ksh ./RBOOT DESTDIR=/tmp/myroot
Which builds a version of the basic stuff in /tmp/myroot
.
makeme
to
build it locally, or configure distrib
to know about
the local platforms and build as I do.
mkdir -p
down
to the product (for example sbp
).
mkdir -p local/etc
cd local/etc
rsrc
to get the product, and move into the product's
source.
rsrc -get sbp
cd sbp
makeme
or make
to build it
locally or across many hosts.
makeme install
or
make HOSTS=-mnostromo,sulaco,yaruro install
The only difference is when. We'll do it when we choose. That might be a bigger problem, because the keeper of the source might be in the middle of a change.
I still prefer the push model.
You should edit it by hand, or run m4
over it by hand.
vi /usr/local/lib/mkcmd/type/hosttype.m
Don't build rdist with makeme
.
Don't build this withe makeme
.rsrc
control file to force that product's source to
come from a different rsync server (or ftp for that matter).
Let's look at the shell code in Admin/bin/rsrc. It reads
the .rsrc
control file in your home directory, and
the first one it finds on the way up to slash. We put on at
the top of the Admin and msrc directories when we build the caches.
These control files are shell scrips. They set variables like: