Lesson 9

Dates: 6/21/2017
Building Linux packages
Linux System Administration


RPM packaging



  • Install RPM package building utilities rpm-build.

  • Set up a directory hierarchy per the rpmbuild specifications:

    BUILD is used as scratch space to actually compile the software.
    RPMS contains the binary RPM that rpmbuild builds.
    SOURCES is for source code.
    SPECS contains the spec file per RPM you want to build.
    SRPMS contains the source RPM built during the process.
    At a minimum, you need source code in SOURCES and a spec file in SPECS.

  • Copy a tarball with the source into directory SOURCES. Rename the tar ball to satisfy the naming convention for rpm-build, specifically package-version.tar.gz

  • Setup a spec file in SPECS directory

  • Build RPM package:
    rpmbuild -v -bb --clean SPECS/appx.spec
    



  • Take me to the Course Website