You are on page 1of 2

SBR NOTES

Rpm – allows the user specify where on the system you like to start building
packages.

Rpmbuild creates packages

Rpm –installs, manages packages

In the .rpmmacros file you would see %topdir %smp_mflags

Debuginfo is cross reference between the binary and names in the source file

Spec file directory controls the rpm build process

-ba (build all)

Snippet(s) of directory paths

rpmbuild directory # ll rpms/x86_64

The typical build process

(a) Unpack (tar/zip file)

%prep (b) chdir

(c) configure

(d) make

(e) make install

This syntax starts the build process providing that all the source files are available
for the build. –bp (build to prep stage)
Steps to follow to initiate the building process
1. Create a source tree/rpmbuild directory
rpmdev-setupfree (the file created in your home is hidden .rpmmacros)
issue the command ll -la to view the file
2. Run the yumdownloader as a regular (this command just downloads the
Package) yumdownloader --source <packagename>
3. Run the rpm command
rpm -i <packagename>.rpm
4. Locate and verify what the BuildRequires for the .spec file (that is the
<packagename> .spec file found in the home directory of the user
Path: ~/rpmbuild/SPECS/nled.spec (as an example).
5. To start building run the following command as a regular user:
rpmbuild -ba *.spec

Homework
Listen to the audio file with Jesse Keading on the SBR600 wiki site
Also as you build a number of different packages, it would be good to time
how long each build takes. For the first build it will always take a longer
time to complete, but once the memory cache gets warmed up, a build
should take less time to complete.
Go into your rpmmacros and change the -j values, if you have quad core
then the –j values should be set between 5 and 9 two X times duo core + 1,
for duo cores not more than 5 (be careful!!!). Experiment and determine
what the sweet spot of your system /setup you’re using for these tasks.

You might also like