Roll your own package, RPM repo, part 2

(Part I, building the package, is over here.)

Part II. Create the repository

  1. 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}
  2. Add the package created from Part I.
    cp ~username/builds/RPMS/noarch/this-package-1.0-0.1.noarch /srv/RPMS/noarch/
  3. Generate the repository metadata.
    createrepo -v /srv/RPMS
  4. Sign the metadata and add the repository key.
    cd /srv/RPMS/repodata
    gpg -ba repomd.xml
    gpg -a --export key-id > repomd.xml.key
    
  5. 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
  6. Test by installing the package.
    zypper in this-package

Comments

Popular posts from this blog

Pull files off Android phone