Roll your own package, RPM repo, part 2
(Part I, building the package, is over here.)
Part II. Create the repository
Part II. Create the repository
- Prepare the environment in the server where the repository will be stored. Note: All commands from hereon, unless otherwise stated, are by
root.
mkdir -p /srv/RPMS/{i386,i586,x86_64,noarch} - Add the package created from Part I.
cp ~username/builds/RPMS/noarch/this-package-1.0-0.1.noarch /srv/RPMS/noarch/
- Generate the repository metadata.
createrepo -v /srv/RPMS
- Sign the metadata and add the repository key.
cd /srv/RPMS/repodata gpg -ba repomd.xml gpg -a --export key-id > repomd.xml.key
- Add as an installation source. (In this case, I'm using SuSE
zypper.) Add the key to the trusted keyring.
zypper service-add -t YUM file:///srv/RPMS alias
- Test by installing the package.
zypper in this-package
Comments
Post a Comment