Sunday, November 18. 2012
Debian Multiarch
Debian Multiarch is a new feature for the next version of this popular Linux distribution, in short, it lets a debian box to have binaries of more than one architecture (the most common situation is having amd64 and i386 in the same OS in order to run x64 and x32 applications). As you now I use amd64 testing in my laptop and desktop box and today I have decided to start installing some i386 packages.
Debian announced Multiarch enhancement for the next release (wheeze) in July. I was reluctant to use it at first time cos normally all packages are compiled for both architectures and I do not want them to be duplicated in my box. Nevertheless some months ago I realized that wine had been removed from native amd64 and it had been integrated using i386 and the multiarch feature (since then the amd64 wine package depends on several i386 packages). I suppose that wine has some 32bit tricks which make easier to integrate its i386 implementation. At that moment I just uninstalled it from my system. But some days ago I found that the new version of skype is only distributed in i386 using again the Wheezy multiarch infrastructure. Finally I surrendered and changed my mind under the weight of reality.
The steps to add i386 architecture, skype (4.1 package) and wine in my amd64 laptop were the following:
Add the new architecture i386 to the system.
# dpkg --add-architecture i386 # dpkg --print-architecture amd64 # dpkg --print-foreign-architectures i386
Now amd64 is the native architecture in my system but i386 is also defined as a foreign one. You can remove any foreign architecture using the remove-architecture option for dpkg.
Remove the current (amd64) skype package.
# apt-get remove skype Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: skype 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 35.5 MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 177126 files and directories currently installed.) Removing skype ... Processing triggers for gnome-menus ... Processing triggers for desktop-file-utils ...
Remove any 32 bit package inside the amd64 architecture. Before the multiarch feature, debian provided several amd64 packages with some important libraries compiled in 32 bits, now they are not needed cos real i386 packages are going to be installed. For that I decided to remove the base, libc6-i386 package, and by consequence all the rest will be auto-removed.
# apt-get remove libc6-i386 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: ia32-libs ia32-libs-dev ia32-libs-gtk lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32nss-mdns lib32stdc++6 lib32tinfo5 lib32v4l-0 lib32z1 libc6-i386 0 upgraded, 0 newly installed, 13 to remove and 0 not upgraded. After this operation, 167 MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 176985 files and directories currently installed.) Removing ia32-libs-gtk ... Removing ia32-libs-dev ... Removing ia32-libs ... Removing lib32asound2 ... Removing lib32bz2-1.0 ... Removing lib32stdc++6 ... Removing lib32gcc1 ... Removing lib32ncurses5 ... Removing lib32nss-mdns ... Removing lib32tinfo5 ... Removing lib32v4l-0 ... Removing lib32z1 ... Removing libc6-i386 ...
Check what packages the skype deb file requires.
# dpkg -I skype-debian_4.1.0.20-1_i386.deb new debian package, version 2.0. size 30688192 bytes: control archive=4629 bytes. 32 bytes, 1 lines conffiles 1079 bytes, 20 lines control 9835 bytes, 137 lines md5sums Package: skype Version: 4.1.0.20-1 Section: non-free/net Priority: extra Architecture: i386 Depends: libasound2 (>= 1.0.16), libc6 (>= 2.3.6-6~), libc6 (>= 2.7), libgcc1 (>= 1:4.1.1), libqt4-dbus (>= 4:4.5.3), libqt4-network (>= 4:4.8.0), libqt4-xml (>= 4:4.5.3), libqtcore4 (>= 4:4.7.0~beta1), libqtgui4 (>= 4:4.8.0), libqtwebkit4 (>= 2.1.0~2011week13), libstdc++6 (>= 4.6), libx11-6, libxext6, libxss1, libxv1, libssl1.0.0 Conflicts: skype-mid, skype-common, skype-bin Replaces: skype-mid, skype-common, skype-bin Installed-Size: 35952 Maintainer: Skype Technologies
Description: Wherever you are, wherever they are Skype keeps you together. Call, see, message and share with others. · It's free to download and join. · Call, instant message and send photos and documents to anyone else on Skype. · And with a webcam you can catch up face-to-face with a video call. · Call mobiles and landlines worldwide at low rates. · Easily text message anywhere in the world. · Get your friends together on a conference call. And that's just the start... Install them using apt-get (the multiarch feature adds to apt-get command the possibility of marking the architecture at install time, if no one is specified the default one is used).
# apt-get install libasound2:i386 libc6:i386 libgcc1:i386 libqt4-dbus:i386 libqt4-network:i386 libqt4-xml:i386 libqtcore4:i386 libqtgui4:i386 libqtwebkit4:i386 libstdc++6:i386 libx11-6:i386 libxss1:i386 libxv1:i386 libssl1.0.0:i386
It seems that the libqtwebkit4 dependency package has a conflicting bug when installing both packages (amd64 and i386) and the installation needs to be forced.
# apt-get install -f -o Dpkg::Options::="--force-overwrite" libqtwebkit4:i386
Install the skype debian multiarch package (now no dependency problem should be found).
# dpkg -i skype-debian_4.1.0.20-1_i386.deb Selecting previously unselected package skype. (Reading database ... 175638 files and directories currently installed.) Unpacking skype (from skype-debian_4.1.0.20-1_i386.deb) ... Setting up skype (4.1.0.20-1) ... Processing triggers for gnome-menus ... Processing triggers for desktop-file-utils ...
Finally I also added wine (as it is distributed by debian, installation adds all the i386 needed packages by its own).
# apt-get install wine
And that's all. I tend to be quite stubborn but, you know, sometimes going with the flow is much easier (nevertheless I will try to be very restrictive with i386 packages).
See you!
Thursday, November 1. 2012
The New Pepper Adobe Flash Plugin
Today a little entry continuing some of the common topics of the blog: flash, HTML5 and the web wars. In February Adobe announced that 11.2 was the last version for common NPAPI flash linux plugin and newer releases were only being provided using the new PPAPI. The Pepper Plugin API is a google project started in 2009 defined by themselves as a set of modifications to old NPAPI to make plugins more portable and more secure. The only browser that supports PPAPI right now is chrome and its open source version, chromium. So, after Adobe/Google partnership, the only way of using newer versions of the flash plugin in linux is browsing with chrome. Mozilla has commented several times that they will not implement the new Pepper API because now the future is HTML5, they do not want to make a double effort in something is intended to be replaced. But it is quite clear that this issue will not be harmless to firefox in the linux world.
On the other side there is the possibility of using one of the open source alternatives to the Adobe closed source flash plugin. I know two projects, gnash and lightspark, which are exactly that but, although I do not use any of them, I am very skeptical of the current status and usability of both projects. So I repeat that, in my humble opinion, if a linux user wants a good quality flash plugin in the long term he should use chrome, google is turning the screw on competitors.
Finally, to close this little introduction, you already know that there are attempts to translate a SWF file into a HTML5 compatible page (see for example this google project, swiffy, or this mozilla initiative, shumway) and, in general, flash can be replaced by new HTML5 features. But all of us are conscious that right now flash is still needed in common internet use.
Although I have no problems with current 11.2 r202 version, I am preparing my system to have the chromium debian package with the newer pepper version. I understand I am going where google wants me to go, but you never know, better be prepared. I have followed the instructions given in this archlinux forum:
Download chrome from its site. Stable version for debian x64 in my case.
Uncompress and extract the plugin library from the installation file (the manifest.json file contains the version and some other information of the plugin, in this stable version was 11.4.31.110):
$ ar vx google-chrome-stable_current_amd64.deb x - debian-binary x - control.tar.gz x - data.tar.lzma $ mkdir chrome $ cd chrome/ $ tar --lzma -xf ../data.tar.lzma $ find . | grep PepperFlash ./opt/google/chrome/PepperFlash ./opt/google/chrome/PepperFlash/libpepflashplayer.so ./opt/google/chrome/PepperFlash/manifest.json
Copy the plugin library to a proper system location in my debian box:
Now you can start the browser with the following options (the version should be also provided):
$ chromium --ppapi-flash-path=/usr/lib/chromium/plugins/libpepflashplayer.so --ppapi-flash-version=11.4.31.110
In order to make those options available in common startup they can be added to the /etc/chromium/default.
CHROMIUM_FLAGS="--password-store=detect --ppapi-flash-path=/usr/lib/chromium/plugins/libpepflashplayer.so --ppapi-flash-version=11.4.31.110"
After doing the previous points the new version is installed inside the browser. It can be checked using the plugins page (chrome://plugins) and both, the Adobe about page and version finder page.
$ sudo cp ./opt/google/chrome/PepperFlash/libpepflashplayer.so /usr/lib/chromium/plugins/
Today entry comments the current status of the Adobe flash plugin in Linux and gives detailed instructions to setup the new pepper library in chromium (I think that I will need to update it from time to time). Google pounded the table again, partnering with Adobe the more recent versions of the Adobe flash library only works inside their browser in a linux box. I know all about flash in linux is absolutely crazy, but this issue goes one step further.
Be farsighted!
Comments