Project: Modifying a Package

In this project, you'll actually modify an existing package. The modifications will be trivial (and not very useful), but this will take you through the steps required to make minor modifications. The examples are given for an OpenLinux system so that specific directories can be listed, but other RPM-based distributions are very similar.

  1. Install the sources for ed:

    # rpm -i /mnt/cdrom/Packages/RPMS/ed-0.2-5.src.rpm
  2. Extract the sources so you can work on them:

    # cd /usr/src/OpenLinux; rpm -bp SPECS/ed.spec
  3. Make a copy to work on (you don't want to work on the sources in the BUILD directory):

    # cd BUILD; cp -a ed-0.2 /usr/local/src
  4. Make main.c writable:

    # cd /usr/local/src/ed-0.2; chmod u+w main.c; vi main.c
  5. Add a line to ...

Get Special Edition Using Linux®, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.