I've made available a kit to build rpms from the CVS source tree at:
http://wwweasel.geeksrus.net/~alane/cvs-kit-20010725.tar.bz2
It provides automated scripts to update the tree and build rpms. YMMV. It
works for me in a daily cron job. This is a 600K download.
Here's the README:
---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<---
README.cvs-kit by Alan Eldridge <alane@xxxxxxxxxxxx>
====================================================
This kit is the result of my quest to automate building new
kernels from SGI's XFS-enhanced linux CVS tree.
All spec files and patches were correct as of 20010725.
The directory structure:
SGI
|-- cvs.yyyymmdd.hhmm
|-- RPMS
|-- SPECS
| `-- orig
|-- bin
|-- cvs -> cvs.yyyymmdd.hhmm
|-- patches
| |-- acl
| |-- attr
| |-- dmapi
| |-- linux
| |-- xfsdump
| `-- xfsprogs
`-- src
******* A Quick Tour
====================
* SGI/cvs
directory where CVS tree lives
* SGI/RPMS/{yyyymmdd.nn}/log
* SGI/RPMS/{yyyymmdd.nn}/list
* SGI/RPMS/{yyyymmdd.nn}/RPMS
* SGI/RPMS/{yyyymmdd.nn}/SRPMS
directories where logs, file lists, RPMs, and SRPMs
are stored after being built
* SGI/SPECS
the spec files used to build the packages
* SGI/SPECS/orig
original spec files (for reference)
* SGI/bin
scripts used to do automated build; this directory
can be added to your PATH, or you can copy its contents
to a directory already on your PATH
* SGI/patches/*
source and patch files for each package; these are
copied to $rpmdir/SOURCES prior to a build
* SGI/src/{yyyymmdd.hhmm}
directory where source tarballs from the CVS tree live
******* The SGI/patches/linux directory
=======================================
Most of these files are included in the source RPM used to make
linux-2.4.5-SGI_XFS_1.0.1_PR1 (and PR2). Here's a quick rundown:
Files from SGI_XFS_1.0.1_PR1:
=============================
devfsd-v1.3.11.tar.gz
devfs daemon source code
installkernel
kernel installation script
kernel-2.4.5-i386-BOOT.config
kernel-2.4.5-i386.config
kernel-2.4.5-i386-smp.config
kernel-2.4.5-i586.config
kernel-2.4.5-i586-smp.config
kernel-2.4.5-i686.config
kernel-2.4.5-i686-enterprise.config
kernel-2.4.5-i686-smp.config
RH kernel config files modified for XFS
linux-2.4.0-nonintconfig.patch
patch to do non-interactive config (RedHat)
kernel-2.4-BuildASM.sh
linux-merge-config.awk
linux-merge-modules.awk
linux-rhconfig.h
module-info
README.kernel-sources
miscellaneous files from RedHat's SRPM
New files:
==========
config-2.4.6pre5.defaults
config-2.4.6pre7.defaults
config-2.4.6pre9.defaults
config-2.4.7pre3.defaults
[ any newer config-*.defaults files ]
additions to config files to provide default (disabled)
values for new drivers added in post 2.4.5 releases
******* The scripts in SGI/bin
==============================
Each of these scripts takes the path to the SGI directory (the
root of this kit) as its first argument.
xx-update-sources
=================
usage: xx-update-sources project-dir [options]
Options:
-h,--help show this message
-f,--force get a new source tree
-F,--FORCE get a new source tree
do NOT ask for confirmation
-c,--cvs use CVS, not CVSup
Notes:
1. CVS will be used if there is no file project-dir/project-dir.cvsup
2. To use CVS, the project-dir/config.sh must have a "CVSROOT=..." entry.
3. The "force" options will save any existing tree using the name "cvs.old".
4. The current tree will be named cvs.yyyymmdd.hh.mm, and a link "cvs"
will be made to point to it.
Addiitional notes:
This script runs the "cvs" or "cvsup" program and gets
the latest kernel changes from Russell's cvsup mirror.
See the SGI XFS website for info on using CVSup or using
anonymous CVS
xx-tar-sources
==============
usage: xx-tar-sources project-dir [-x|-X] [-dYYYYMMDD.HHMM]
Options:
-x previous tarballs for same day will be erased
-z all previous tarballs (all days) will be erased
-dYYYYMMDD.HHMM
fake the update time to be YYYYMMDD.HHMM; for example,
if it's 00:03 and you'd like to make tarballs for the
previous day's date
Addiitional notes:
The tarballs will end up in SGI/src/yyyymmdd.hhmm,
where yyyymmdd.hhmm is the date and time that xx-tar-sources
was run.
A link, SGI/src/yyyymmdd will be created to point to
the actual directory.
Another link, current, will point to the link above.
xx-build-rpms
=============
usage: xx-build-rpms project-dir [options] package ...
Options:
-h,--help show this message
-k,--keep keep existing RPMS
-s,--save-root
save $RPM_BUILD_ROOT for debugging
-oOption pass Option to rpm
-rString set RPM release to String
default = 0
-bp|-ba|-bb|-bs|-bc|-bi
pass this build option to rpm
default = -ba
-dCCYYMMDD build from this date
default = 20010725
Addiitional notes:
This script builds rpms from the newest tarball
available, or the newest tarball on the date given
as an option.
If a date is given as an option, it may be shortened
as long as the menaing is clear; e.g., -708 means July 8.
The option -bp may be given to just run the rpm "prep"
stage for each package. This is to make sure that all
patches still apply correctly.
The generated rpms will be placed as follows:
SGI/RPMS/yyyymmdd.r/list => file lists
SGI/RPMS/yyyymmdd.r/RPMS => binary RPMs
SGI/RPMS/yyyymmdd.r/SRPMS => source RPMs
The ".r" suffix is a the release number for the generated
RPMs, which can be given with the -r option to xx-build-rpms.
The "file lists" are just the lists of files that
were in the "install" directory when the RPM was made
(e.g., linux-inst.files), and the list of files in
the actual RPMS (e.g., linux-rpms.files).
A file named "*,missing" (e.g., linux.missing) is
created that lists any files that were orphaned
(not placed in an RPM). If these "*.missing" files
are not empty, it probably indicates a problem.
xx-auto-update
==============
Usage: xx-auto-update project-dir [options] action [option ...] ...
Options:
-h,--help show this message and exit
-V,--version print program version and exit
-v,--verbose verbose output
-n,--test do not execute, just show what would be done
Action Options:
-E,--exec run an outside program
-C,--cvs update from cvs/cvsup
-U,--update same as -C, --cvs
-T,--tar make source tarballs
-x delete previous sources for today
-X delete previous sources for all days
-B,--build perform RPM build
-rString set rpm release to String
-b[abcips] use RPM build option -bx, where x in [abcips]
-P,--purge purge *ALL* files from rpm build dir
(e.g., /usr/src/redhat or $HOME/rpm)
Actions are executed in the order specified. Execution stops if any
step fails. So, for example:
-C -T -x -B -bp -B -ba
will update the sources, create tarballs, run a "prep" build to make
sure no patches are broken, and then run a real build if the prep succeeded.
set-spec-version
================
This program reads the spec files in the CVS tree and sets the
version for the SGI RPMs accordingly. It does NOT set the version
for the kernel RPMs.
alane.misc.func.sh
==================
A bunch of shell functions needed by the scripts.
******* The "config.sh" file
============================
This file contains variable definitions that control the operation
of the xx-* scripts. If you think you need to change this, you should
probably read the scripts first.
---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<---
--
Alan Eldridge
from std_disclaimer import *
|