This repository demonstrates how to build a simple RPM (with the help of Docker)
docker build -t integralist/simplerpm .
docker run -v $(pwd):/root/rpmbuild integralist/simplerpm SPECS/*.spec
If you want to debug the running container:
docker run -v $(pwd):/root/rpmbuild -it --entrypoint=/bin/bash integralist/simplerpm
If you want to save changes inside container:
docker commit <running_container_id> integralist/simplerpm:<tag>
The RPM filename convention is:
<package_name>-<version_number>-<release_number>.spec
Once built, your mounted work directory should look something like:
.
├── BUILD
├── BUILDROOT
│ └── integralist-0.0.1-1.x86_64
│ ├── generated-appfile
│ └── testapp
├── Dockerfile
├── Makefile
├── README.md
├── RPMS
│ └── x86_64
│ └── integralist-0.0.1-1.x86_64.rpm
├── SOURCES
│ └── testapp
├── SPECS
│ └── integralist-0.0.1-1.spec
└── SRPMS
If you want to have a poke around inside the container while it's running:
rpm -q <package>
: check if package is installedwhereis <command>
: check binary locationman rpmbuild
: documentation for building an RPM