Repacking Opera rpm packages for use on older distros
Tuesday, January 17, 2012 10:53:02 AM
We use LZMA/XZ compression on our rpm packages to keep them as small as possible. However, this has the downside that Opera will not install on some older RPM-based distros as their RPM version does not support these newer compression methods. There is however a couple of fairly trivial work arounds.
The most obvious is, use one of the tar packages. We offer final versions of Opera as bzip2 compressed tar packages, with an included install script. These will install on pretty much any distro. The tar packages don't check dependencies but our requirements are minimal and hence Opera will run on most machines that have been configured for desktop use. Just remember to remove any rpm installed version of Opera before starting the installation (don't worry your profile will be retained).
Some people however prefer, or have specific requirements (such as enterprise wide installation) that mean they need, an actual rpm package. In this case you will need to repackage the Opera rpm using gzip (or bzip2) compression. Luckily thanks to the fantastic rpmrebuild tool, this is much easier than it sounds.
Note: The rest of the post has been edited based on feedback from Valery Reznic in the comments section below.
First, fire up a LiveCD/DVD of a distro that supports XZ/LZMA compressed rpm packages, like the latest Fedora. Then do the following:
- Install rpmrebuild as root:
yum install rpmrebuild
- Download a copy of the Opera package you want to repackage
- Rebuild the Opera package:
rpmrebuild -npD '_binary_payload w9.gzdio' opera-11.60-1185.i386.rpm(Note: This assumes the 32-bit Opera 11.60 final. Adjust the package name as needed.)
A new Opera rpm package will be created using the details from the original package. In terms of the RPM meta data and file contents it should be mostly identical to the original (the build host and date will obviously vary). In fact one of the authors told me that if you notice unexplainable differences, log a bug!
The _binary_payload setting however will change the compression type to gzip, so that you can now use this new repackage to install Opera on older versions of RHEL, CentOS, Scientific, etc.
P.S. Thanks to unSpawn on linuxquestions.org for making me aware of this great utility and obviously an even bigger thanks to the authors of rpmrebuild, Eric Gerbier and Valery Reznic, for creating and maintaining it!