Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Getting Started with RPMs

February 22, 2013
Langdon White
Related topics:
Linux
Related products:
Red Hat Enterprise Linux

    Unfortunately, not every application is packaged for every distribution. What do you do when you can't find it packaged for Red Hat Enterprise Linux? If you are like most people, you give up or attempt to install it from source. What happens when installing from source goes badly? If you are like most people, you definitely give up. How do you keep up with application improvements or, perhaps more importantly, security fixes? If you are like most people, you periodically try and check on the application status (especially when your version stops working :) ), and then try and rebuild it. What is the solution to all of these issues? Proper packaging. Well, this post is meant to help you get started.

    For many folks, the barrier to entry for RPMs is understanding what exactly "RPM creation" really means. We all know the “point” of an RPM (or packaging in general) is to support dependency management for libraries and applications. However, what does that really mean? What are the pieces of an RPM? What do you need to create one? How do you get started with something small? Everything written about RPMs seems to be geared to doing everything “right” or as if you wanted to package your own application. Sometimes, when you just need to get something installed, you just need the quick and dirty version.  Hopefully, this post will get you started with an overview and pointers to next steps.

    In short, creating an RPM involves four steps:

    1. get the application source to build on your system
    2. take careful notes on what you did while building the application (in what is called a “spec file”)
    3. create the “RPM creation” directory structure and build the RPM
    4. try to build/install the app into a pretend, clean system (to test it)

    To get started, you should first build a VM that you can dedicate to RPM creation which should simplify your processes. Create a VM with a fresh install of Red Hat Enterprise Linux of whatever version you are targeting. Minor version “shouldn't” matter but it might save you some headaches down the road if you pick the right one. When you create the VM you may want to mount a dedicated virtual disk at /rpm-builds just so you can reuse some of your work if you need to upgrade/downgrade the OS.

    Assuming that the first package you want to build is an existing application that just hasn't been packaged or repackaged for Red Hat Enterprise Linux yet, you will likely want to spend some time looking for an existing attempt at packaging the application. If you can find a Source RPM or an existing spec file it will make your life much easier and be a better way to get started. You can search for things like “source rpm <app-name>,” “srpm <app-name>,” or “spec <app-name>” to try and find existing places to start. You can also look at existing spec file repositories for hints, for example the repoforge spec files are stored at github. Finally, you can sometimes find initial attempts at packaging in the “bug lists” for the various repos, for example repoforge issues and EPEL bugs (product “Fedora EPEL”), which may not give you the spec file but lead you to the source control repo that does have it.

    Now that you have a bit more of an overview of what is involved in the RPM creation process you can move on to the more definitive guides.

    • How to Build an RPM at the Red Hat Customer Portal
    • A three part series at IBM DeveloperWorks
    • The definitive Fedora How to Create an RPM Guide
    • A simple, arbitrary, step-by-step example, the GNU Hello RPM package

    In a future post, we will walk through the creation of a simple, but useful, application package.

    Last updated: January 9, 2023

    Recent Posts

    • Trusted software factory: Building trust in the agentic AI era

    • Build a zero trust AI pipeline with OpenShift and RHEL CVMs

    • Red Hat Hardened Images: Top 5 benefits for software developers

    • How EvalHub manages two-layer Kubernetes control planes

    • Tekton joins the CNCF as an incubating project

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.