create-an-rpm-repository
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| create-an-rpm-repository [2026-02-23 07:40:20] – created hyperreal | create-an-rpm-repository [2026-03-14 20:20:50] (current) – removed hyperreal | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======= Create an RPM repository ====== | ||
| - | ===== Install dependencies ===== | ||
| - | |||
| - | <code bash> | ||
| - | sudo dnf install -y gnupg createrepo dnf-utils rpm-sign wget | ||
| - | </ | ||
| - | |||
| - | ===== Setup GnuPG ===== | ||
| - | |||
| - | <code bash> | ||
| - | echo "%echo Generating a PGP key | ||
| - | Key-Type: RSA | ||
| - | Key-Length: 4096 | ||
| - | Name-Real: Jeffrey Serio | ||
| - | Name-Email: hyperreal@moonshadow.dev | ||
| - | Expire-Date: | ||
| - | %no-ask-passphrase | ||
| - | %no-protection | ||
| - | %commit" | ||
| - | </ | ||
| - | |||
| - | Now generate the key with the following command: | ||
| - | |||
| - | <code bash> | ||
| - | gpg --no-tty --batch --gen-key ~/ | ||
| - | </ | ||
| - | |||
| - | Export the public key. | ||
| - | |||
| - | <code bash> | ||
| - | gpg --armor --export " | ||
| - | </ | ||
| - | |||
| - | Export the private key to back it up somewhere safe. | ||
| - | |||
| - | <code bash> | ||
| - | gpg --armor --export-secret-keys " | ||
| - | </ | ||
| - | |||
| - | After backup up the private key, shred it from the working directory. | ||
| - | |||
| - | <code bash> | ||
| - | shred -xu ~/ | ||
| - | </ | ||
| - | |||
| - | ===== Setup RPM signing ===== | ||
| - | |||
| - | Replace '' | ||
| - | |||
| - | <code bash> | ||
| - | echo " | ||
| - | %_gpg_name E1933532750E9EEF" | ||
| - | </ | ||
| - | |||
| - | Create a directory to serve the repository. | ||
| - | |||
| - | <code bash> | ||
| - | mkdir -p ~/ | ||
| - | </ | ||
| - | |||
| - | Move RPM packages into the repo directory. Then sign them with the following command: | ||
| - | |||
| - | <code bash> | ||
| - | rpm --addsign ~/ | ||
| - | </ | ||
| - | |||
| - | ===== Create repo index ===== | ||
| - | |||
| - | Once all the packages are signed, create the repository with the following command: | ||
| - | |||
| - | <code bash> | ||
| - | createrepo ~/ | ||
| - | </ | ||
| - | |||
| - | The above command will create a directory in the repo named '' | ||
| - | |||
| - | < | ||
| - | Note that the '' | ||
| - | </ | ||
| - | |||
| - | Now sign the repo metadata with the following command: | ||
| - | |||
| - | <code bash> | ||
| - | gpg --detach-sign --armor ~/ | ||
| - | </ | ||
| - | |||
| - | ===== Create a .repo file ===== | ||
| - | |||
| - | '' | ||
| - | <code ini> | ||
| - | [hyperreal-kernel-bazzite] | ||
| - | name=hyperreal kernel bazzite $releasever | ||
| - | baseurl=https:// | ||
| - | enabled=1 | ||
| - | gpgcheck=1 | ||
| - | gpgkey=https:// | ||
| - | </ | ||
create-an-rpm-repository.1771832420.txt.gz · Last modified: by hyperreal
