explaingit

jordansissel/fpm

11,470RubyAudience · ops devopsComplexity · 2/5Setup · easy

TLDR

A command-line tool that builds software packages for multiple platforms from a single description, so you can produce .deb.rpm, macOS, and FreeBSD packages without learning each platform's packaging rules.

Mindmap

mindmap
  root((fpm))
    Input Formats
      Directories
      Ruby gems
      Python packages
      Existing deb or rpm
    Output Formats
      deb Ubuntu
      rpm RedHat
      macOS installer
      FreeBSD package
    Use Cases
      Cross-distro packaging
      CI release builds
      Repackage existing files
    Audience
      DevOps engineers
      Linux sysadmins
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a .deb package for Ubuntu from a directory of files without learning Debian packaging rules.

USE CASE 2

Convert an existing .rpm package into a .deb so it can be installed on Ubuntu without rebuilding from source.

USE CASE 3

Package a Python or Ruby app as a native OS package for distribution across multiple Linux distros.

USE CASE 4

Automate package creation in a CI pipeline to produce .deb and .rpm files on every tagged release.

Tech stack

Ruby

Getting it running

Difficulty · easy Time to first run · 30min

Installed as a Ruby gem. Some output formats may require additional native tools (for example, rpmbuild for creating RPM packages).

In plain English

FPM is a command-line tool for building software packages in multiple formats without having to learn the packaging rules of each platform separately. If you want to distribute a program as a .deb file for Ubuntu, an .rpm for Red Hat, a FreeBSD package, or a Mac OS X installer, FPM handles the translation so you do not need to become an expert in each system's packaging format. The README explains the backstory plainly: packaging rules differ significantly between Linux distributions, and switching between Ubuntu and CentOS means dealing with completely different tools and conventions. FPM was created to remove that friction, letting you describe what you want to install and where, then produce a native package for whichever platform you need. FPM can take software from a variety of sources: Ruby gems, Python modules, Node packages, directories on your filesystem, existing .deb or .rpm files, tar archives, PEAR packages, or ArchLinux pacman packages. It can convert or repackage any of those into the target format you need. The README also notes you can tweak existing packages, such as removing files from them or stripping out installation scripts. The project's stated principles are notable. If a new user has a bad experience, the maintainers treat that as a bug in the tool, not a gap in the user's knowledge. The same goes for confusing documentation. That philosophy shapes how the project handles issues and contributions. FPM is written in Ruby and distributed as a gem. The README links to external documentation for installation instructions and usage details rather than repeating them inline, so the README itself is brief. The full documentation lives at fpm.readthedocs.io.

Copy-paste prompts

Prompt 1
Using fpm, build a .deb package from a directory of files that installs everything to /usr/local/myapp. Set the package name, version, and description. Show the exact command.
Prompt 2
I have an .rpm package and need a .deb version for Ubuntu. How do I convert it with fpm?
Prompt 3
I want to package a Python script and its pip dependencies as a native .deb file using fpm. Walk me through the steps from pip install to a finished installable package.
Prompt 4
How do I use fpm in a GitHub Actions workflow to build both a .deb and .rpm package on every tagged release and upload them as release assets?
Prompt 5
I need to repackage an existing .deb to remove a specific directory from it using fpm. Show me the command.
Open on GitHub → Explain another repo

← jordansissel on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.