In this lab we were given the task of creating our own YUM repository. There are three main important parts to this task:
- Create a GPG key
- Sign the package
- Put the files in a web accessible location
Creating a GPG key is actually quite simple you just enter one command:
gpg --gen key
Simply follow the steps associated with the above command and your key will be created successfully. The reason why this key is being generated is because we need a key in order for us to be able to sign packages.
After the key has been successfully created then you want to edit the ~/.rpmmacros file and insert your key I.D that was created. This ensures that when we sign a package it will use our key. Below is a screenshot of my ~/.rpmmacros file.
rpm --addsign packagefile
Signing the package allows a user to verify the source of a package. It also doesn’t ensure the integrity of the package, it just verifies the package’s source.
After the package has been signed,I executed and ran the createrepo program:
This program creates an xml-rpm-metadata repository.
After creating the repository, I uploaded it to my matrix account and put it in the public_html directory. Below is a link to my repository: