Difference between revisions of "SBR600 RPM-Writing Lab"
Chris Tyler (talk | contribs) (→Preparation) |
Chris Tyler (talk | contribs) (→Steps) |
||
Line 35: | Line 35: | ||
#* each binary RPM | #* each binary RPM | ||
# Note any errors or warnings | # Note any errors or warnings | ||
− | # Attempt to address each of the errors or warnings. | + | # Attempt to address each of the errors or warnings. Adding <code>-i</code> to the ''rpmlint'' command line will provide informative messages about the cause of each error; the [[:fedora:Common_Rpmlint_issues|Common Rpmlint issues]] page may also be a useful resource. |
− | #* If you cannot address each of the errors and warnings, | + | #* If you cannot address each of the errors and warnings, refer to the [[:fedora:Main_Page|Fedora wiki]] or use IRC and/or email to ask a Fedora packager, classmate, or your professor for assistance. |
= Deliverables = | = Deliverables = | ||
Write a blog post about your experience building these packages. Include notes about what worked and didn't work, and include a link to the spec files, SRPMs, and RPMs. | Write a blog post about your experience building these packages. Include notes about what worked and didn't work, and include a link to the spec files, SRPMs, and RPMs. |
Revision as of 00:03, 17 January 2012
Purpose
To create an RPM package.
Resources
- Wiki pages on RPM
- Fedora Package Maintainers page
- Scriptlet Snippets - recipes for common scriptlets in spec files
- Fedora Linux chapter 5 (see Seneca Library website > eBooks > View All > Safari > Fedora Linux).
Preparation
- Install the required packages:
-
yum groupinstall "Fedora Packager"
-
yum install rpmlint yum-utils
-
- Create the ~/rpmbuild directories and the ~/.rpmmacros file by running this command:
rpmdev-setuptree
Steps
For each of the two packages you previously built from source:
- Put the package source code (tarball) in
~/rpmbuild/SOURCES
- Change to the SPECS directory:
cd ~/rpmbuild/SPECS
- Create an empty skeleton spec file:
rpmdev-newspec nameOfPackage
- Edit the specfile. Fill in the metadata and all of the required sections.
- Attempt to build your package:
rpmbuild -ba nameOfPackage.spec
- If there are errors, edit the specfile and try building again. Repeat until the build is successful.
- When the build is successful, the binary RPMs will be placed in
~/rpmbuild/RPMS
and the source RPM will be placed in~/rpmbuild/SRPMS/
You should also test your build:
- Run the rpmlint command once for each of these files, giving the filename as the positional argument:
- the spec file
- the SRPM
- each binary RPM
- Note any errors or warnings
- Attempt to address each of the errors or warnings. Adding
-i
to the rpmlint command line will provide informative messages about the cause of each error; the Common Rpmlint issues page may also be a useful resource.- If you cannot address each of the errors and warnings, refer to the Fedora wiki or use IRC and/or email to ask a Fedora packager, classmate, or your professor for assistance.
Deliverables
Write a blog post about your experience building these packages. Include notes about what worked and didn't work, and include a link to the spec files, SRPMs, and RPMs.