RedHat-Athena Package Scheme -------------------------------- 1. The Package Scheme Directory. Throughout this document, top=/mit/linux/packages/current. 2. The Master Control File. The master control file is /mit/linux/packages/package-lists. This file contains all the information about the packages: Package descriptions, lists of files, lists of configuration files, post-installation commands, etc. It is used to generate all .spec files in $top/SPECS. 3. The Spec Files. The directory $top/SPECS contains the files used by rpm to build all athena packages (local disk and srvd versions.) These files are automatically generated. Do not edit them by hand. 4. The Packages. The packages that are installed as RedHat-Athena are kept on the local drive of $server.mit.edu in /redhat/$version/i386/RedHat/RPMS. Currently, server=small-gods and version=4.2. 5. makepackage. makepackage is in /mit/linux/bin and the source is in /mit/linux/devel/makepackage. Making New Packages (Simple) ---------------------------- Let's say you fix a bug in the program /usr/athena/bin/hello. This bug only affects the "hello" executable. It does not change the list of files in the "hello" package or any other package. 1. Install the new "hello" program in /srvd. People who have installed the srvd-athena-hello package will automatically get the fixed program. There is no need to create a new srvd-athena-hello package. 2. Run the program "makepackage hello". This program will increment the release number in $top/SPECS/athena-hello.spec. Then it will run "rpm -bb athena-hello.spec" which will put the new hello rpm in $top/RPMS/i386/athena-hello-version.i386.rpm. 3. Copy athena-hello-version.i386.rpm to the install server. 4. Ideally, the package should be somewhere that the update script will find it. Making New Packages (Complex) ----------------------------- Let's say you fix a bug in /usr/athena/bin/hello, and the new version reads the file /usr/athena/lib/hello.conf, which never existed before. Or, you want to move some file from the "misc" package to the "hello" package. Or, you want to change the description of the "hello" package, and maybe mark some configuration files. Or, you want to create an entire new package that never existed before. 1. I guess that you should install the modified programs in /srvd, although this may cause some people to lose. (For example, the people who will be running the new hello executable but don't have /usr/athena/lib/hello.conf.) 2. Edit the master control file (package-lists). 3. For each package you've changed, run "makepackage -s package". When given the -s option, this program will increment the release number in both the $top/SPECS/athena-package.spec file, and the srvd version of that file. Also it will write out the new data from the control file. Finally, it will build both the local disk version and the srvd version of the package. 4. Deal with the new packages as in the last section. Modifying the System Packs -------------------------- /srvd should be a symlink to /afs/sipb.mit.edu/system/i386_linux2/srvd. The source code for all Linux-Athena packages is in the sipb-athena locker. After you change a program, you can probably install it in /srvd with "make DESTDIR=/srvd install". If the program uses the do.sh shell script, it will probably automatically install in /srvd. If the Makefile does not support DESTDIR (that is, it will only install in /usr/athena/...), you can install to the local disk and then manually copy the files to /srvd. The ownership of files in /srvd is an issue.