SUSE Certified Engineer - Building a GPG-Signed RPM Package from Source

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you’ll be working to take a simple script and build an RPM package out of it, including setting up the build environment, positioning source files properly, preparing a suitable `.spec` file for the package to be built from, and then building the RPM package itself. You’ll then verify the package was properly built, query it for information about the package, install the package and verify the files it contained are located properly on the system, and finally run the script file itself for a confirmation message.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Prepare the RPM Build Environment
  • Download the source files from GitHub.
  • Prepare the rpmbuild directory.
  • Install the rpm-build package.
  • Position the source files.
Create Spec File and Build a Package
  • Create a myscript.spec file.
  • Fill out the specifics for the package.
  • Verify the file is ready for the build.
  • Build and confirm the package’s existence.
Query, Install Package, and Verify Installation
  • Query package information details.
  • Query package file list information.
  • Install and verify package details.
  • Execute the installed script.
Sign an Existing RPM Package with GPG
  • Generate GPG keys.
  • Export keys and import to RPM.
  • Setup the .rpmmacros file.
  • Sign and verify your RPM package.

Additional Resources

In this lab, you're a mid-level systems operator who has been tasked with learning the set of steps that are required to compile most source code packages into a binary RPM package. You'll set up the environment and get the source tarball, create a .spec file from scratch, and then compile the package itself.

You'll then install the package on the system, test it's installed and queryable as a package, and then finally run the actual script that was installed as the payload of the package.

By the end, you'll have completed a full set of tasks that will work for most binary RPM package builds and will be useful for when you take the exam!

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?