Tuesday, March 9, 2010

Local Fedora ARM Repository

Since we are going to be working on the ARM architecture for Fedora and because the repository is located over seas we will be hosting the RPMs locally for faster speeds. This isn't hard to do but it does take some configurations to get it working.
  1. Install and Configure Apache.
  2. Download all RPMs from current over sea repository.
  3. Sign packages.
  4. Create repository meta-data.
As you can see there are a few steps that need to be taken but they are all fairly simple and easy to do.

Ok, so the first thing we need to do choice a host system. For our local repository we choose HongKong.proximity.on.ca as the host and simply had to make sure that Apache was configured for port 80 and that the firewall was allowing connections on port 80.

BOOM done! It was working on that host already but for a quick refresher, all you would do is install it using yum and open the port using your preferred firewall software.

Ok so I tried using rsync to download the repository however no matter how I tried I never got it to work. The repository didn't support the rsync protocol, so instead I used plain old wget to download all the files and directories required. Than I made a file hierarchy that will allow me to expand the repository if needed in the future.

Now we just sign all the packages by creating a public key with GPG and than you just sign it using this tutorial. Don't see a point in rewriting what has been written so well.
http://fedoranews.org/tchung/gpg/

Now the final step, to create the repo meta-data.
createrepo /absolute/path/to/repo/on/filesystem

And that's it. Create a cron job that will periodically check for new files and sign them and for updating the repo meta-data.

No comments:

Post a Comment