Sunday 14 August 2011

The zypper Package Manager


Zypper is the package manager used by MeeGo. And now had some time to work with the zypper package manager I can say this is a nice tool. It has good functionality, a consistent interface and is easy to use and well documented. In comparison to apt-get I'd say it is superior. That is a big admission for a long time Debian user! What won me over was when I tried unsuccessfully to upgrade from MeeGo 1.2.0 to 1.2.8, by adding the repositories. Xorg was broken. I tried to fix. But gave up so decided to revert back. I thought this would take a re-installation. But, no! I just removed the offending 1.2.8 repositories and refreshed. Zypper correctly indicated the downgrade. After some network issues, resiliently managed by zypper, I was back and running. Marvellous! So, while I only be using MeeGo on my netbook, I am now comfortable enough in its use and management to use it as an alternative to Ubuntu. The other advantage I see is professionally it is good to understand how alternate systems are supported by RPM or Deb packages.

Working with Packages

MeeGo is RPM based system using the zypper package manager. I've not used an RPM based system in a very long time. So I will have to learn once again how to,

Help

zypper help orzypper help [command]

Listupdates

zypper lu

Update

zypper up

Search for a package

zypper se [package name]

Install a package

zypper in [package name]

Remove a package

zypper rm [package name]

List packages

zypper pa

Show package info

zypper if [package name]

Working with Repositories

This is the one thing that I was concerned with most. In Debian based systems, package sources are easily maintained. Happily, Zypper is just as easy. Maybe even easier as the command interface is consistent with normal package management. MeeGo can be augmented by OpenSuse package repositories. See the examples below for the repositories use to install Skype.

List repositories 

zypper lr

Add a repository

zypper ar [url to repository] [name of repository]

Remove a repository

zypper rr [name of repository]

Enable a repository

zypper mr -e [name of repository]

Disable a repository

zypper mr -d [name of repository]

Refresh repositories

zypper ref –force Source: http://www.freetechie.com/blog/using-opensuse-zypper-for-package-management-adding-removing-repository-management

Example – add keepassx

This is not in the default MeeGo repositories. So lets install from an alternate repository.
zypper ar http://download.opensuse.org/distribution/11.4/repo/oss/ 11.4-OpenSuse-oss

Search for package:

$ zypper se keepassx Loading repository data... Reading installed packages... S | Name | Summary | Type--+----------+---------------------------------+-------- i | keepassx | Cross Platform Password Manager | package

Install package:

$ zypper if keepassx

Get package information:

$ zypper if keepassxLoading repository data...Reading installed packages...Information for package keepassx:
Repository: @System
Name: keepassx
Version: 0.4.3-1.2
Arch: i586
Vendor: obs://build.opensuse.org/openSUSE:11.4:Contrib
Installed: Yes
Status: up-to-date
Installed Size: 2.7 MiB
Summary: Cross Platform Password Manager
Description:
KeePassX is a free/open-source password manager or safe which helps you to manage your passwords in a secure way. You can put all your passwords in one database, which is locked with one master key or a key-disk. So you only have to remember one single master password or insert the key-disk to unlock the whole database. The databases are encrypted using the best and most secure encryption algorithms currently known (AES and Twofish).zypper in KeePassX

Example - add Skype

Include the following repositories,
zypper ar http://download.opensuse.org/distribution/11.4/repo/non-oss/ 11.4-OpenSuse-non-osszypper ar http://download.opensuse.org/distribution/11.4/repo/oss/ 11.4-OpenSuse-oss

Sunday 7 August 2011

MeeGo

Out with the Slow
I've been running Ubuntu Netbook Remix on my HP Mini 110, from 10.04 then onto Unity with 10.10, 11.04. I really like Unity. It is clean and simple and pretty for a small netbook. However, upgrading from 10.10 to 11.04 saw a distinct performance hit. Start-up was so slow. Once started it was acceptably responsive. You really needed to be patient with the slow start-up, and worse, the even slower login. Those using MS-Windows may not have noticed anything, but seasoned Linux users would. What to do? I shut-down unnecessary services. Still no noticeable improvement. This is using SSD! How can it be so slow? Once logged in the network was available. But that was the only benefit. Time to try something new.
A new chapter
Good device support There are Linux choices for netbooks. You could even run a standard desktop and configure for the small form factor. That is small screen and small keyboard. After some thought, these are my requirements:
  • Minimal setup
  • Optimal use of small screen 
  • Easy upgrade path 
Easy, right? Well, sort of. There were three distributions that looked interesting,
Once I read that MeeGo was hosted by the Linux Foundation I decided to give that a go. You see I'm a member so it's best to support the people you, well, support!
The Meego v1.2 for Netbooks was a heavy weight download at 900MB. But it looked like it had everything I needed out the box. I was also mesmerised by the promise of really fast boot-up and resume times.
The installation was simple and uncomplicated, but I fully expected to have download and install several 100MB more of updates. Not so! But there were problems. The installation notes were spot on in there known issues and workarounds. There other problem: no wireless. A quick google search found an excellent write-up written by Glen Gray here. The steps are,
  1. Activate the MeeGo toolbar and select the applications icon
  2. Choose the Accessories section and select Terminal (or type terminal in the search box)
  3. Install the various tools you will need
    sudo zypper install rpmdevtools
  4. Install the compilers and other toolssudo zypper install pattern:meego-development-tools
  5. Install the kernel-netbook-devel package
    sudo zypper install kernel-devel
  6. Now we’re ready to build and install the new broadcom drivers, my moblin srpm works
    wget http://slaine.org/meego/releases/1.2/ia32/source/wl-kmod-5.100.82.38-1.src.rpm

    (This build will download the broadcom driver archive directly from their site)
    rpmbuild --rebuild --target=i586 wl-kmod-5.100.82.38-1.src.rpm
  7. Install the resulting rpm
    sudo rpm -ivh ~/rpmbuild/RPMS/i586/wl-kmod-5.100.82.38-1.i586.rpm
  8. Loading the modulesudo modprobe -a wl
  9. You should be able to now connect to a network
On restart I was able to connect.
Packages
MeeGo is RPM based system using the zypper package manager. I've not used an RPM based system in a very long time. So I will have to learn once again how to,
Update a system
zypper up
Search for a package
zypper se [package name]
Install a package
zypper in [package name]
And all those other things you do with packages.
Am I Happy?
It will take a little getting used to a new desktop, but so far, yes I am happy with the outcome. It is fast, it was easy to setup and easy to customise. I love the full screen windows. I love the speed. I love the consistent configuration. I will get re-familiar with working with RPM packages. After all, it is good to know how to do things using the two principle Linux package managers. It might even be fun to do a side by side comparison for common package tasks ...