Adding a Binary File to a Custom Classic Distribution

LinuxLink Classic Builder allows you to create and customize RPM based Linux distributions. You can add an arbitrary collection of RPMs to any distribution project that you have created. However, sometimes there is a need to include just one additional binary file.

The easiest way to do this is to mark the file, or a small set of files, as documentation. This will tell the build process to include these files verbatim.

There are four steps to this process:

  1. Copy the file into an appropriate location and add it to the Subversion repository. (For more information about working with Subversion, refer to Accessing Your Private Repository.) TimeSys recommends copying the file into the same directory as the project’s dist_data.py file. If you will be including a large number of files, you might want to create a subdirectory.

    Assuming you are adding the file myfile.tgz, use this command to add it to your repository:

    $ svn add myfile.tgz

    Note

    The examples in this document use the command line; if you are using a graphical program to check files in and out of LinuxLink, the methods for doing this will differ from the examples.

  2. Modify the dist_data.py file to tell the system that you want to include an additional file. Uncomment the section titled doc-extra and change the example entry of users_guide-cd to something more descriptive, such as binary-myfile-cd, as shown in the following example. Note that this entry name must end with “-cd” or the builder will reject it.
    'doc-extra': {
        'list': [
          'binary-myfile-cd',
       ],
    },
  3. Modify the mkdist.ini file by appending an appropriate line to the end of the file under the prebuilt section. Continuing with our example, this might look like the following:
    binary-myfile-cd = cd,%(DISTDIR)s/myfile.tgz ,.

    The period at the end of the line tells the build system to put the file at the root of the CD image. You may change this to point to any location on the CD. For example, if you wanted to put this file in the docs subdirectory of the CD, use:

    binary-myfile-cd = cd,%(DISTDIR)s/myfile.tgz ,docs
  4. Finally, commit your changes and start a new build:
    $ svn commit