|
|
This procedure assumes you are working with Caldera OpenLinux source RPMs. It is provided here for easy reference only. For a full description of the development system provided in LKP, see the DocView documentation server running on the LKP side at http://localhost:8457 (not installed by default), or see the OpenLinux documentation on the Web at the: Documentation Web Site.
Perform a All install (all rpm packages) to ensure that all necessary files are installed. If disk space is an issue, we recommend performing the Development installation from eDesktop instead.
To install the source of package ``foo'': Insert the 2nd CD (labeled ``Source Code'') and mount it from UNIX mode.
mount -r -F cdfs /dev/cdrom/cdrom1 /linux/mnt/cdromAll other commands should be executed from Linux mode.
rpm -qi fooand watch for the `Source RPM'' tag to verify which source RPM this binary originated from.
The source RPM packages contain the main source tarball, and sometimes other source or patches. There is also a a ``spec'' file (a meta/control file that contains information like Name, Version, and Author) and instructions (in form of automated scripts) about how to build the binaries from the source.
rpm -i /mnt/cdrom/col/sources/SRPMS/foo-1.0-1.src.rpm
cd /usr/src/OpenLinuxUnder that directory you find some subdirectories; for example: SOURCES (the source and patches of package foo show up here), and SPECS (foo.spec shows up here).
rpm -ba SPECS/foo.specWhen that has finished you will find the newly built RPMs under RPMS, the target directory for binary RPMs, and also a new source RPM under SRPMS, the target directory for source RPMs. After building a package with rpm it automatically packages up the binaries into one or more binary RPMs and the source, patches and spec file into a source RPM. This assures that we get a ``snapshot'' of the source, patches and spec file at the moment it successfully built the package.
For additional information see rpm(8linux).
You can go into the SOURCES or SPECS directory and modify the source, patches or spec file to your needs. Take a look at the SRPMs first before downloading latest source and performing tar, configure, make, and make install. You most likely will find those commands also in the spec files, but in addition, there are hints and information about patches that we fixed or added.
Find out which package the command bar belongs to by using
rpm -qf `which bar`This will give you the name of the binary RPM bar comes with. Now find out the source RPM that builds this binary RPM, install the source RPM, edit the ``Release'' tag in the spec file and augment it by one, then rebuild the binary RPM using and update the binary package you just built using rpm -U
Start with something non-critical in case something goes wrong on your first exercise.