Power Upgrades with apt4rpm
Keeping your system current with the latest and greatest can be a full-time job. Package management tools have simplified many installation tasks, but what package management system you use always has been distribution-dependent.
If you're running Red Hat, SuSE or Mandrake, you have been running the sturdy and well known Red Hat package manager (RPM). Certainly easier to deal with than compiling from source, it too can be fairly complicated to use.
If you've ever had experience with a Debian-based system, you know that keeping a system updated is little more than a command away. The Advanced Packaging Tool (APT) simplifies things immensely. Simply type apt-get update to see what's new and apt-get install package to get it. Is a new version of your distribution out? Type apt-get dist-upgrade, and you're on your way. What many folks don't know is it is indeed possible to have the best of both worlds. Thanks to the magic of free software and a terrific team of Brazilian developers, you can use APT with your RPM-based distribution.
APT for RPM (apt4rpm) began when Conectiva S.A. in Brazil decided to create a new distribution. The idea was to use RPMs, yet have the simplicity and dependency checking that APT offers. So apt-rpm was born, the method Conectiva uses to update its distribution.
The chief advantage APT has over RPM is this: how many times have you downloaded what seemed to be a perfectly good RPM and discovered during the install that you didn't have all the dependencies? This is not an issue with APT. Before the download even begins, APT checks a package's dependencies, compares that list to what's on your system and downloads any additional packages that you need.
What makes this system work is the idea of the package repository. This is a single place where all your software needs can be met. Single RPM packages can exist nearly anywhere on the Net, so when you download one package from one place, there's no guarantee that all of that package's dependencies are stored in the same place. This is when you wind up with a failed dependency error when you try to install your RPM.
The other advantage APT offers is intelligent installs of multiple packages. When you talk about updating something like a desktop environment or Perl, there can be dozens of RPM packages to download—but which package do you run first? APT takes care of this, offering seamless downloads and installs.
The key here is making sure to use the right repository for your distribution. The APT tool itself is distribution-independent and works the same regardless of which distribution you're running, but the packages themselves can install and/or run differently depending on which one you use. Although the differences between distributions are narrowing, it's always best to use applications properly tuned for your system.
I use APT on at least a weekly basis to get current stuff for my SuSE 8.0 system, but I've always been an update fiend. This article outlines the update steps for SuSE; check the Resources section for the proper references for your distribution.
Installation is pretty simple. Odds are you already have the necessary dependencies in place. Your first step to apt nirvana is a visit to Germany, in this case linux01.gwdg.de/apt4rpm. The APT for SuSE site has almost everything you need to get going. Look it over carefully, even if SuSE isn't your distribution. Scroll down to the Software Installation section and go to the download page for the current version of apt4rpm (0.5.4 at this writing; 0.5.5 may be out by the time you read this). Install the RPM. To confirm the install, run:
rpm -qa | grep -E "^apt-0"
from the command line. The result should display in apt-0.5.4 etc. You're almost ready.
Several GUIs work with APT, but SynAPTic is another Conectiva project that works with RPMs and is easy to use. SuSE users can download it from the same location as the APT client. Even better, once you have APT working, use it to install SynAPTic as a test of the system. Before doing this, you need to set up your repositories.
Before you can start updating, you need to identify the location(s) of your repositories, so APT knows where to get its packages. These repositories are comprehensive sources for current packages for your distribution. The primary SuSE APT repository is a mirror (updated several times daily) of the same SuSE FTP server that YaST on-line update uses. But a volunteer can set up a repository site with only some packages. You even can set up your own repository with the server-side apt-rpm tool.
APT checks sources.list (stored in /etc/apt) for current repositories. The APT for SuSE site offers a default sources.list file that points to the APT mirrors. Other major repositories can be found at the project page, apt4rpm.sourceforge.net, and individuals regularly announce new repositories on the mailing lists.
sources.list includes the URL (both FTP and HTTP sites are valid) of the repository and the directories included in the repository. You can choose which directories to include in your updates. Some types of packages can put your system at risk, though. For example, SuSE mirrors give APT users access to some experimental and pre-release packages directly from SuSE developers through the SuSE-People and Mantel-Kernel directories. This is okay if you are used to living on the bleeding edge and know what to do when something breaks, but if stability is your goal, you may want to leave out this one. SuSE users can add this repository to sources.list to ensure that APT and SynAPTic are always current (only include the second line if you want the source RPMs):
rpm http://linux01.gwdg.de/apt4rpm apt-0.5.4 tested rpm-src http://linux01.gwdg.de/apt4rpm apt-0.5.4 tested
Play with sources.list to see what items work best for you. Feel free to add new repositories as you hear of them. You can edit sources.list from the SynAPTic GUI if you like.
One caution to the Debian-savvy: don't try to add the Debian unstable (or stable, for that matter) servers to your sources.list. You cannot use apt4rpm to retrieve .deb packages for your RPM-based system.
- Ubuntu MATE, Not Just a Whim
- Canonical Ltd.'s Ubuntu Core
- Build Your Own Raspberry Pi Camera
- Non-Linux FOSS: Screenshotting for Fun and Profit!
- Nasdaq Selects Drupal 8
- Secure Desktops with Qubes: Compartmentalization
- The Peculiar Case of Email in the Cloud
- A New Mental Model for Computers and Networks
- Netlist, Inc.'s HybriDIMM Storage Class Memory
- Polishing the wegrep Wrapper Script