build-r.pl generates a script that rebuilds the repository based on information specified in a ``profile.'' The profile is a text file with multiple sections:
| Key | Use |
|---|---|
| SPEC_DIRECTORIES | This is mandatory. It is a list of directories which contain the specfiles pending rebuilding. |
| RPM_DIRECTORIES | This is a list of directories which contain RPMs produced by the specfiles found in SPEC_DIRECTORIES. The directories listed do not need RPMs for each specfile. RPMs, if present, are used to add to the dependency information in the specfile. |
| BUILD_FIRST | This is a list of specfiles (without the .spec extension). The specfiles listed in BUILD_FIRST will be built in the order listed in the profile before any other specfiles are built. |
| BUILD_ONLY | This is a list of specfiles that specifies the only specfiles that should be built. If it is not present, every specfile in SPEC_DIRECTORIES will be built. |
| DO_NOT_BUILD | This is a list of specfiles that may exist in SPEC_DIRECTORIES that should not be rebuilt. |
| DO_NOT_INSTALL | This is a list of specfiles that should be built but not installed during the rebuilding process. |
| ADDITIONAL_DEPENDENCY_INFORMATION | This is a list of whitespace-delimited pairs of specfiles. It indicates dependency information that should be added to that which is gathered by build-r.pl. Unless circular dependencies arise, the first specfile specified in a pair will be built before the second. |
| RUN_AFTER_INSTALL(foobar) | This contains a shell script that should be run after specfile foobar is installed. Each specfile can have its own RUN_AFTER_INSTALL field. |
Unless otherwise indicated, each field is optional. Each list is delimited by newlines. Each field begins with the key of the field, followed by the character '=' and a newline. Each field ends with a blank line. Any line beginning with the character '#' is ignored. See sol6,7.profile for an example of a profile.
These instructions explain how to rebuild the RPM repository, which is necessary if you are moving to a new architecture or new Solaris version. If you need to restore a build machine, but don't want to rebuild the entire RPM repository, skip step 1, and after step 7, install everything in the stable and testing repositories except for duplicate packages.
When choosing what packages to install, install everything. Later you can remove the problem packages: gnome, perl (SUNWpl5[pmu]; leave these on the machine if you are trying to build against Sun's perl), bash (SUNWbash), tcsh (SUNWtcsh), zsh (SUNWzsh), and less (SUNWless). If you want to build xboing and Csound, install the SUNWaudmo package. If you are setting up a 64-bit build machine, ensure that the 64-bit libraries are available (most of the packages have names equal to the 32-bit library packages, but with an 'x' at the end).
Install the latest versions of gcc 2, GNU make, gzip, bzip2, slide, patch, and fileutils from the RPM repository. If you are using the repository from the summer of 2000, install gzip-1.2.4a (not gzip-1.3.0). Link the GNU build tools to /usr/local/bin: link /usr/local/gnu/bin/make to /usr/local/bin/make and /usr/local/bin/gmake, link /usr/local/gnu/bin/patch to /usr/local/bin/patch, and link /usr/local/gnu/bin/gzip to /usr/local/bin/gzip (and /bin/gzip on a Solaris 8 machine). Do not edit the PATH in the build script to put /usr/local/gnu/bin first instead; most packages cannot build with GNU binutils, but require GNU patch and GNU make.
Add to /etc/passwd:
qmailq:x:30301:199::/: qmailr:x:30302:199::/: qmails:x:30303:199::/: qmaild:x:30297:199::/: qmaill:x:30298:199::/: alias:x:30296:199::/: qmailp:x:30300:199::/:Add to /etc/shadow:
qmailq:NP:6445:::::: qmailr:NP:6445:::::: qmails:NP:6445:::::: qmaild:NP:6445:::::: qmaill:NP:6445:::::: alias:NP:6445:::::: qmailp:NP:6445::::::Add to /etc/group:
qmail:*:2035:qmailq,qmailr,qmails nofiles:*:2036:alias,qmaild,qmaill,qmailp
Don't worry if the list of packages that failed to build is long. It is impossible to maintain the consistency of the RPM repository as packages are added or changed individually. New file locations often break old specfiles in surprising ways. If a lot of packages failed, fix the broken specfiles, remove the packages you built, and run the build script again. Otherwise, build the broken packages by hand.
| Key | Use |
|---|---|
| HOST | This is the hostname of the remote build machine. |
| USER | This is the username of the remote build user. This user's authorized_keys2 (or authorized_keys) file must contain your public key. |
| RPM | This is RPM's %_topdir (e.g. /usr/local/src/rpm-packages). |
| BUILDFLAGS | This is a string which will be inserted before the commands you pass to remote_rpm if you are building a spec file. It can include spaces, and is optional. |
| EXT | This is the file suffix for RPMs produced by the build machine. It includes the preceding period. |
For example, see buildmachinetab.
%_signature gpg %_gpg_path absolute path to home directory/.gnupg %_gpg_name full name of key with which you will sign packages %_gpgbin /usr/local/bin/gpg
Note that these additions (save %_gpg_name) are necessary for signature verification as well.
SPEC_DIRECTORIES=
/sos/oss-dist/solaris/rpm-packages/SPECS
RPM_DIRECTORIES=
/sos/oss-dist/solaris/rpm-packages/RPMS/sparc-sun-solaris2.7
/sos/oss-dist/solaris/rpm-packages/RPMS/sparcv9-sun-solaris2.8
/sos/oss-dist/solaris/rpm-packages/RPMS/sparc-sun-solaris2.6
BUILD_FIRST=
zlib
gzip
tar
bzip2
gnu-m4
autoconf
readline
patch
db
flex
bison
texinfo
gnu-make
gdbm
perl
groff
gnu-fileutils
DO_NOT_BUILD=
ghc
happy
cfengine-1.5.4-2
cfengine-1.6.0.b3-2
perl-header
machine-header
qt
RadiusPerl
msg
DO_NOT_INSTALL=
bonobo
rpm3
acrobat
imsl1
imsl2
lisrel8
lisrel83
matlab
sas6
sas7
sas81
splus
spss5
spss6
X_setup
# Strictly speaking this is unnecessary, since build-r.pl will get the
# dependency information anyway. However, I'm not sure that all the spec
# files have the correct build requires, and if they are built in the wrong
# order they will not fail but will instead lack features.
ADDITIONAL_DEPENDENCY_INFORMATION=
audiofile esound
esound glib
glib gtk+
freetype imlib
ImageMagick imlib
gtk+ imlib
imlib gtk-engines
gtk-engines ORBit
ORBit gnome-libs
gnome-libs libgtop
libgtop libxml
libxml libghttp
libghttp libglade
libglade gdk-pixbuf
gdk-pixbuf control-center
control-center gnome-core
gnome-core gnome-applets
gnome-applets mc
DBI Data-ShowTable
Data-ShowTable perlMysql
perlMysql MIME-Base64
MIME-Base64 URI
URI libnet
libnet HTML-Parser
HTML-Parser Digest-MD5
Digest-MD5 libwww
libwww egd
RUN_AFTER_INSTALL(perl)=
for i in /usr/local/perl5/bin*; do
j=`basename $i`
slide ln -s $i /usr/local/bin/$j
done
RUN_AFTER_INSTALL(teTeX)=
PATH="$PATH:/usr/local/teTeX/bin/$LONGARCH"
export PATH
RUN_AFTER_INSTALL(emacs)=
PATH="$PATH:/usr/local/emacs20/bin"
export PATH
RUN_AFTER_INSTALL(rpm4)=
slide /usr/bin/chown -R sbi:studsys /usr/local/src/rpm-packages
#!/bin/sh USERNAME="sbi" HOME_DIR="/export/home/sbi" BIN_DIR="/usr/local/bin" PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAteBBJF8Ycc7NFVwnFK3YEO0cWqOXTqN3GPXIy8Hyy/qUGvym4xK5jnfI57yFI3qcjbq0Rjc4TDw5CQsIf8RBdz5Px/SEYUumimemwrHVzZIfYGsafIZnR+UmZrxTX0K9x4XKV6mUR7f51z6tDwUJftDzl0TUsfSfq3kC+1IRiMs= sbi@radiohead.Rutgers.EDU" echo "Copying $USERNAME's public key..." mkdir -p $HOME_DIR/.ssh echo $PUBLIC_KEY >> $HOME_DIR/.ssh/authorized_keys2 echo "Generating rbrpm script..." cat <<EOF >$HOME_DIR/rbrpm #!/bin/sh PATH="/usr/local/bin:/usr/ccs/bin:/usr/bin:/opt/SUNWspro/bin:/usr/ucb:/usr/openwin/bin:/usr/sbin" rpmbuild \$* EOF slide mv $HOME_DIR/rbrpm $BIN_DIR/rbrpm slide chmod 0755 $BIN_DIR/rbrpm echo "Done."
# List of build machines and important data sparc64-sun-solaris2.8/sun-perl,gnome:HOST=rosewalker,USER=sbi,RPM=/usr/local/src/rpm-packages,EXT=.solaris2.8-sparc64.sun-perl\,gnome.rpm sparc64-sun-solaris2.8:HOST=mistere,USER=sbi,RPM=/usr/local/src/rpm-packages,EXT=.solaris2.8-sparc64.rpm sparc64-sun-solaris2.7:HOST=johndee,USER=sbi,RPM=/usr/local/src/rpm-packages,EXT=.solaris2.7-sparc64.rpm sparc-sun-solaris2.6:HOST=miracleman,USER=sbi,RPM=/usr/local/src/rpm-packages,BUILDFLAGS=--target sparc-sun-solaris2.6,EXT=.solaris2.6-sparc.rpm sparc-sun-solaris2.7:HOST=pumpkinhead,USER=sbi,RPM=/usr/local/src/rpm-packages,EXT=.solaris2.7-sparc.rpm sparc-sun-solaris2.8:HOST=omahacatdancer,USER=sbi,RPM=/usr/local/src/rpm-packages,EXT=.solaris2.8-sparc.rpm