The builder script

Using the script

Before you start be sure your working enviroment is setup.

As the script resides in the rpm/packages subdirectory of your home, first you need to change your current directory to that of the script:

$ cd
$ cd rpm/packages

Now you can invoke ./builder (remember that the dot and slash at the beginning are crucial) to see the list of possible parameters:

$ ./builder

The general syntax is as follows:

$ ./builder [options] package[.spec]

The .spec file extension is optional, builder will append it for you if needed.

Most common options are:

builder automatically fetches all files (including the spec file itself) needed to build the given package (if file license permits, otherwise you will need to manually download and save remaining files to your ~/rpm/SOURCES directory). After all file requirements are satisfied, builder launches the rpmbuild binary that initializes the build process. rpmbuild starts by checking for unsatisfied package dependencies needed to perform a successful build. If it finds any, builder will exit giving you a full list of needed packages. You can use poldek to download and install these.

After the build process is complete, all binary RPM files are immediately available in your ~/rpm/RPMS directory and source RPM packages (if any) are saved to ~/rpm/SRPMS.

Warning: all PLD packages are prepared to be built from a regular user account (without special priviledges) and you should never use your root account to build packages for security reasons. Keep in mind that a malfunctioning script has full write access to all your filesystems and can accidentally damage things. This is especially important when working on your own spec files as a little mistake can cost you hours or days of work.

Examples of common use

To do a normal (binary) build of foo package:

$ ./builder -bb -bc -R foo

To perform a full build of a package that is currently being developed on the DEVEL branch:

$ ./builder -bc -r DEVEL foo

To update MD5 hashes after making changes to the above spec file:

$ ./builder -r DEVEL -U foo