Difference between revisions of "SBR600 RPM-Writing Lab"

From CDOT Wiki
Jump to: navigation, search
(Preparation)
(Redirected page to DPI908/SBR600 RPM-Writing Lab)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:SBR600 Labs]]
+
#REDIRECT [[DPI908/SBR600_RPM-Writing_Lab]]
= Purpose =
 
 
 
To create an RPM package.
 
 
 
= Resources =
 
* [[:category:RPM|Wiki pages on RPM]]
 
* [[:fedora:PackageMaintainers|Fedora Package Maintainers page]]
 
* [[:fedora:Packaging:ScriptletSnippets|Scriptlet Snippets]] - recipes for common scriptlets in spec files
 
** [[:fedora:PackageMaintainers/CreatingPackageHowTo|Packaging How-To]]
 
* ''Fedora Linux'' chapter 5 (see Seneca Library website > eBooks > View All > Safari > Fedora Linux).
 
 
 
= Preparation =
 
 
 
# Install the required packages:
 
#* <code>yum groupinstall "Fedora Packager"</code>
 
#* <code>yum install rpmlint yum-utils</code>
 
# Create the ~/rpmbuild directories and the ~/.rpmmacros file by running this command: <code>rpmdev-setuptree</code>
 
 
 
= Steps =
 
 
 
For each of the two packages you [[SBR600 Build-from-Source Lab|previously built from source]]:
 
# Put the package source code (tarball) in <code>~/rpmbuild/SOURCES</code>
 
# Change to the SPECS directory: <code>cd ~/rpmbuild/SPECS</code>
 
# Create an empty skeleton spec file: <code>rpmdev-newspec ''nameOfPackage''</code>
 
# Edit the specfile. Fill in the metadata and all of the required sections.
 
# Attempt to build your package: <code>rpmbuild -ba ''nameOfPackage''.spec</code>
 
# 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 <code>~/rpmbuild/RPMS</code> and the source RPM will be placed in <code>~/rpmbuild/SRPMS/</code>
 
 
 
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. The [[:fedora:Common_Rpmlint_issues]] page may be a useful resource.
 
#* If you cannot address each of the errors and warnings, bring information about the ones that you could not solve to the next class.
 
 
 
= 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.
 

Latest revision as of 18:24, 4 September 2012