Build, package, sign, and distribute RPMs for RHEL 7-10, Fedora 38+, and derivatives (AlmaLinux, Rocky, Oracle Linux, CentOS).
bash -c "$(curl -q -LSsf "https://github.com/rpm-devel/tools/raw/main/install.sh")"This installs the scripts to /usr/local/bin (root) or ~/.local/bin (user) and sets up ~/.rpmmacros.
Creates Docker build containers for cross-arch RPM builds.
# Create all containers (EL 8/9/10 + Fedora, both amd64 and arm64)
create-container.sh all
# Create a specific version and arch
create-container.sh 10 amd64
create-container.sh fedora arm64
# Enter an existing container
create-container.sh --enter almalinux 10 amd64
# Remove containers
create-container.sh remove all
create-container.sh remove 9 amd64Options:
| Option | Description |
|---|---|
all |
Create containers for all enabled versions and arches |
arm |
Create all versions for arm64 only |
amd |
Create all versions for amd64 only |
7/8/9/10 |
Create a specific EL version |
fedora |
Create Fedora containers |
--enter |
Enter the container after creation |
--remove |
Remove a container |
--platform <arch> |
Override the default platform |
--image <name> |
Override the container image |
Configuration: ~/.config/rpm-devel/settings.conf
Builds all (or specific) spec files, installs dependencies, downloads sources, and signs packages.
# Build all specs in ~/rpmbuild/
rpmbuild.sh
# Build a single package
rpmbuild.sh nginx
# Build without signing
rpmbuild.sh --no-sign
# Update tools first
rpmbuild.sh updateWhat it does:
- Finds all
.specfiles in~/rpmbuild/ - Downloads sources with
spectool -g -R - Installs build dependencies with
dnf builddep(oryum-builddep) - Runs
rpmbuild -bafor each spec - Signs all built RPMs with your GPG key
- Prints a build summary (passed/failed)
Output directories:
- Built RPMs:
~/Documents/builds/rpmbuild/RHEL/el{VER}/{ARCH}/ - Build logs:
~/Documents/builds/logs/rpmbuild/
Organizes built RPMs into repo structure, runs createrepo, and syncs to SourceForge/FTP mirrors.
# Full run: organize, createrepo, sign, sync
make-repo
# Dry run (show what would be done)
make-repo --dry-run
# Set arch and version explicitly
make-repo --arch x86_64 --version 10
# Skip remote sync
make-repo --skip-ftp --skip-sourceforgeWhat it does:
- Separates debug/debuginfo RPMs from main RPMs
- Signs all packages with
rpm --addsign - Runs
createrepo_c(orcreaterepo) on each repo directory - Syncs to local FTP server (
ftp.casjaysdev.pro) - Syncs to SourceForge web hosting (mirror website)
- Syncs to SourceForge FRS (download mirrors)
Repo structure on SourceForge:
/RHEL/{VERSION}/{ARCH}/casjay/ - CasjaysDev packages
/RHEL/{VERSION}/{ARCH}/os/ - upstream base OS
/RHEL/{VERSION}/{ARCH}/langs/ - languages (PHP, Node.js)
/RHEL/{VERSION}/{ARCH}/databases/ - databases (MariaDB, PostgreSQL, MongoDB)
/RHEL/{VERSION}/{ARCH}/infra/ - infrastructure (Docker, Jenkins)
/RHEL/{VERSION}/{ARCH}/extras/ - community extras (EPEL, RPM Fusion)
/RHEL/{VERSION}/{ARCH}/kernel/ - ELRepo kernel
/RHEL/{VERSION}/{ARCH}/debug/ - debuginfo RPMs
/RHEL/{VERSION}/sources/ - source RPMs
Configuration: ~/.config/rpm-devel/make-repo-settings.conf
Bootstraps a fresh container for RPM building. Run inside a Docker container.
# Typically called automatically by create-container.sh
bootstrapInstalls build tools, sets up rpmbuild directories, and configures the environment.
Fixes incorrect weekday names in spec file changelogs.
# Fix bogus dates in a spec file
bogusDate mypackage.spec
# Fix multiple specs
bogusDate *.specRPM warns about "bogus date" when the weekday doesn't match the actual date (e.g., "Thu" for a day that was actually a Friday). This script automatically corrects them.
1. Install tools -> install.sh
2. Create build containers -> create-container.sh all
3. Enter a container -> create-container.sh --enter almalinux 10 amd64
4. Build packages -> rpmbuild.sh
5. Create repos & sync -> make-repo
All configuration lives in ~/.config/rpm-devel/:
| File | Purpose |
|---|---|
settings.conf |
Container settings (images, versions, paths) |
make-repo-settings.conf |
Repo build/sync settings (SourceForge user, FTP) |
lists/{7,8,9,10}.txt |
Package lists per EL version |
containers/ |
Container state tracking |
scripts/ |
Generated container run scripts |
| Variable | Default | Description |
|---|---|---|
SOURCEFORGE_USER |
(required) | Your SourceForge username |
FTP_USER |
root | FTP server username |
ENABLE_VERSION_7 |
no | Build for EL7 |
ENABLE_VERSION_8 |
yes | Build for EL8 |
ENABLE_VERSION_9 |
yes | Build for EL9 |
ENABLE_VERSION_10 |
yes | Build for EL10 |
ENABLE_FEDORA |
yes | Build for Fedora |
FEDORA_VERSION |
42 | Fedora version to build |
- Build host: x86_64 Linux with Docker
- Target arches: x86_64, aarch64 (via QEMU user-static)
- Target distros: RHEL/AlmaLinux/Rocky/Oracle 7-10, Fedora 38+, CentOS 7+
- Build system: COPR compatible
All repos follow this directory structure on SourceForge FRS, local FTP, and local mirror:
RHEL/{VER}/{ARCH}/
casjay/ Our custom-built packages (rpm-devel specs)
testing/ Packages being tested before promotion to casjay/
os/ Upstream base OS (AlmaLinux baseos, appstream, crb, extras)
langs/ Programming languages (PHP via Remi, Node.js, Yarn)
databases/ Database servers (MariaDB, PostgreSQL, MongoDB)
infra/ Infrastructure tools (Docker, Jenkins, Webmin, Pritunl, Incus)
extras/ Community repos (EPEL, RPM Fusion, Ghettoforge)
kernel/ Kernel packages (ELRepo kernel, drivers)
debug/ All debuginfo and debugsource RPMs
empty/ Placeholder for arches/versions with no packages
RHEL/{VER}/
sources/ All source RPMs (arch-independent)
| Category | Repo Sections | Mirror Dir |
|---|---|---|
| CasjaysDev | casjay-packages |
casjay/ |
| Testing | casjay-testing |
testing/ |
| Base OS | casjay-os-base, casjay-os-appstream, casjay-os-crb, casjay-os-extras, casjay-os-plus, casjay-os-* |
os/ |
| Languages | casjay-remi-*, casjay-nodejs, casjay-yarn |
langs/ |
| Databases | casjay-mariadb, casjay-postgresql, casjay-mongodb |
databases/ |
| Infrastructure | casjay-docker, casjay-jenkins, casjay-webmin, casjay-pritunl, casjay-copr-*, casjay-i2pd |
infra/ |
| Extras | casjay-epel, casjay-rpmfusion-*, casjay-gf |
extras/ |
| Kernel | casjay-elrepo, casjay-elrepo-kernel, casjay-elrepo-extras |
kernel/ |
| Debug | All *-debuginfo-*, *-debugsource-* |
debug/ |
| Sources | All *-srpm repos |
sources/ |
| Tool | Writes To | Reads From |
|---|---|---|
rpmbuild.sh |
~/Documents/builds/rpmbuild/ (build output) |
Spec files in ~/rpmbuild/ |
make-repo |
casjay/, debug/, sources/ + all createrepo |
Build output from rpmbuild.sh |
create-mirror |
os/, langs/, databases/, infra/, extras/, kernel/ |
Upstream repos |
See LAYOUT.md for the complete mapping reference.
- rpm-devel — GitHub org with all spec files
- casjay-release — Repo config package
- SourceForge mirrors — Package mirror site