Ruarí's thoughts

If you are repackaging Opera for your distro, be careful not to over do the dependencies

, , , , , , ,

I was recently looking around at Linux repositories that offer Opera and found one that listed kdelibs, qt, gtk+2, etc. as Opera dependencies. In fact Opera requires none of these to function!

The problem it would seem is that the person doing the packaging is using various automated tools and scripts to work out Opera's dependencies. Part of this I would imagine is using ldd (or a similar tool) on the contents of '/usr/lib/opera/'. However, this will also pick up the dependencies for files such as liboperagtk.so and liboperakde4.so. Those two files are included to adjust Opera's default styling and make us us look native if the various KDE and/or Gtk libraries are present. Or to put it another way, they are entirely optional. Opera will run just fine without KDE or Gtk libraries, instead using its own toolkit.

Note: The Opera 12.00 snapshots actually include three files of this kind now, liboperagtk2.so, liboperagtk3.so and liboperakde4.so. The extra Gtk file being used to do Gtk3 styling. So presumably a packager who uses such a system might end up thinking we depend on kdelibs, Gtk2 and Gtk3 in the future. yikes

So how should a packager work out the dependencies for Opera? Use ldd (or a similar tool) only on '/usr/lib/opera/opera', you needn't even consider the operapluginwrapper or operaplugincleaner, as they require nothing over and above the main executable.

There is one other additional thing you may wish to consider and that is GStreamer, which Opera uses for HTML5 Video. Our official Opera deb and rpm packages depend on files from the GStreamer Multimedia Framework, the Base Plugins package and the main Good libraries. Since we consider HTML5 Video to be a key feature of graphical browsing (much like images) we have selected a hard dependency on the files we need and hence would generally suggest you do the same. If however you find this conflicts in some way with the packaging policy of your distro, you could alternatively consider it an optional dependency as long as you can easily inform the user that without this package Opera will not be feature complete.

P.S. And yes, I have sent the packager in question an email with these tips. wink

How to use multiple Opera profiles with just one installation, using the -pd (personal directory) switchOpera 12.00 themes on Linux and FreeBSD

Comments

Krzysztof Hankiewiczlordmorgul Friday, October 7, 2011 11:26:33 AM

Is this why some elements (eg. the expand tab stack button, which is awfully huge and ugly, or the status bar) of the newest build look different than before?

Ruarí Ødegaardruario Friday, October 7, 2011 11:33:14 AM

We made no changes to our Gtk or KDE styling engines in the last snapshot. If you see changes or problems then they are likely do to the tweaks we did to the skin code (see the changelog) and nothing to do with anything I mention in this post. wink

Nicolas Mendozanicomen Friday, October 7, 2011 11:53:37 AM

Shouldn't the dependencies be generated at build time?

Ruarí Ødegaardruario Friday, October 7, 2011 12:47:11 PM

The dependencies on our own packages are generated at build time. My post is for those who repackage Opera for whatever reason, e.g. because we don't provide native packages for their distro (Arch, Chakra, Gentoo, Pardus, Puppy, Sabayon, Salix, Slackware, SliTaz, etc).

They aren't building Opera, so they can't generate at build time. wink

Ruarí Ødegaardruario Friday, October 7, 2011 12:52:38 PM

Alternatively, you can check the dependencies on official packages to give you ideas about what is needed. I outline this process in one of my previous blog posts but I'll repeat it here for convenience.

To view Opera deb package dependencies:
ar p opera_11.51.1087_i386.deb control.tar.gz | tar -xzOf- ./control | grep "^Depends:"

To view Opera rpm package dependencies:
rpm -qRp opera-11.51-1087.i386.rpm

You will need rpm installed to do the second one. I don't know of any way to inspect rpm dependencies that doesn't rely on rpm being installed.

Nicolas Mendozanicomen Friday, October 7, 2011 12:53:08 PM

Aha wink

Cutting Spoonhellspork Friday, October 7, 2011 11:27:40 PM

Opera may be smaller than Firefox on Windows, but it's MUCH smaller on Linux. I saved over 100MB stripping Firefox and Thunderbird out of my Leeenux install.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies