Linux.com

Feature: Linux

Conary: An innovative second-generation package manager

By Bruce Byfield on March 05, 2007 (8:00:00 AM)

Share    Print    Comments   

rPath's Conary is a second-generation package manager. Considering that Erik Troan, rPath's CTO and co-founder, was one of the original authors of the RPM package format, some might be tempted to view Conary as an effort to do things right the second time around -- nor is that view far from wrong. In its design, Conary is a streamlined version of dpkg or RPM with Yum in which all the utilities of those package managers are combined in a single command and combined with version control to meet the demands of a modern distribution.

Conary relies upon a repository that is also a source control system, complete with branches and diff-like files called changesets that identify differences between the available versions of a package. Where the leading package systems identify packages only by version number, each name in a Conary repository is a unique identifier that includes such information as a package's location in the repository, the upstream version number, the source revision, the number of the binary build, and the specific hardware architecture for which it is intended.

The advantage of these unique identifiers is that users can see the relations between files at a glance, and builds for different architectures and configurations can reside in the same repository and draw on the same files when appropriate -- for documentation, for example. In addition, a later version of the program need not automatically overwrite older versions, but can coincide with them, removing a common problem with dependencies in poorly designed packages.

Preparation of packages follows the same rigid structure, but with a cooking metaphor: .recipe files are spec files that specify how sources are compiled into packages, while the command cook recipe tests whether a package will build, and cvc cook packagename installs the package to a repository.

Managing software with Conary

On the local system, Conary benefits from the same orderly structure as its repositories. Basic configuration for Conary can come from three different places: /etc, the current user's home directory, or the present working directory. By setting up configuration files differently in these places, advanced users can set up a sandbox in which to test different versions of a package, or to experiment with different repositories.

Similarly, commands for all actions involved with packages follow the same format: conary action options packagename . Most actions have both a full name and an abbreviation, creating the equivalent of GNU options and standard Unix options in a shell.

This structure gives Conary considerable versatility. For instance, the basic command to find information about available software, conary query -- or conary q, if you prefer -- can report on all packages, a single package, the files that comprise a package, or a package's dependencies divided into the categories of "provides" and "requires," depending on which options are selected. Similarly, users can query repositories with conary repquery to learn about all packages and their available revisions, the packages available for all architectures, or those available in repository branches that the local system is currently drawing on. The conary update command is especially versatile, with options to install, upgrade, or downgrade specific versions of a package, a group of packages in the repository, or all packages currently installed on the system.

Moreover, since all actions are carefully named, no experienced users are going to puzzle for very long over what such actions as conary updateall or conary rollback might do, although they might take an experiment or two to learn that all incarnations of the basic command generally need to be piped through less because of the detailed output they produce. Very little training is needed to start to use Conary, although some of the advanced features and consequences might take a while to absorb.

One especially useful action is conary pin packagename , which makes a local package unremovable until the reverse action, conary unpin packagename , is applied. Pins are especially useful for ensuring that two separate versions of a program coexist on the same system.

A particularly good use of pins is in the installation of new kernels, which is carried out using (you guessed it) conary update kernel. By default, kernels are pinned, but the online documentation suggests checking that they really are before updating, just to make sure. Once you are sure that you no longer need an earlier kernel to boot the local system, you have to unpin it before you remove it from the system.

Conary is primarily a command-line tool, but the project has also developed conary-gui, a graphical interface. Like most interfaces for package systems, conary-gui is useful for basic software installation and removal, but appears less versatile than the command-line tool -- although the division of the window into Installed and Available versions is a welcome simplifying touch.

Conary's prospects

Conary's organization and functionality make it efficient and easy to use. However, one drawback to the system is the amount of new jargon that it introduces. I have deliberately avoided using most of it in this article, but the jargon definitely makes Conary seem more intimidating than it is.

Does Conary really need concepts like "troves," which is described in the glossary on the project's site as simply "a collection of files or other troves" -- especially since a trove that contains other troves is essentially a package? What about a "component," which is a type of trove that contains files for a single purpose that share a common name, such as the libraries, documentation, and binary files for a package? Or "flavor," which is used mainly to refer to hardware architectures (although in theory it could have other meanings)? Some terms, such as "changeset," seem both necessary and more or less self-explanatory, but what is the difference between absolute, relative, and local changesets? The use of this jargon sometimes seems irritating and self-indulgent. More importantly, it obscures the otherwise clear and comprehensive help on the project site.

So far as rPath is concerned, Conary seems less an end in itself than a tool to help build the virtual appliances that are the company's main business. Conary is used in rPath Linux, but because rPath Linux is primarily a tool that others can use to create customized distros, the best place to see Conary action is with one of the distributions built using rPath Linux and rBuilder Online, rPath's tool that distros can use to manage the production of their versions. Of these distributions, one of the most advanced is Foresight, which specializes in providing bleeding-edge versions of GNOME.

Conary is starting a long ways behind the .deb and .rpm package systems. Clearly, while rPath finds it useful, I suspect that Conary will be more of an inspiration than a replacement for traditional package systems in the community at large. Although almost everyone who encounters Conary is enthusiastic about it, no major distributions are apt to swap out their existing package systems in order to adopt it. However, sooner or later, as distributions become more complex and the demand for timely releases grows with the commercialization of GNU/Linux, more than one may well develop its own version of Conary's features.

Bruce Byfield is a computer journalist who writes regularly for NewsForge, Linux.com, and IT Manager's Journal.

Bruce Byfield is a computer journalist who writes regularly for Linux.com.

Share    Print    Comments   

Comments

on Conary: An innovative second-generation package manager

Note: Comments are owned by the poster. We are not responsible for their content.

Not a complete waste, but almost

Posted by: Anonymous Coward on March 06, 2007 07:39 AM
It's time to start working together with deb and/or rpm tools. There's no reason we can't come up with a good package management system for most distros.

#

Re:Not a complete waste, but almost

Posted by: Anonymous Coward on March 07, 2007 10:12 AM
Agreed! What GNU/Linux (world) is really lacking is a standardized (if not better) package format, not a new repository format (although this could be interesting nevertheless).

#

Re:Not a complete waste, but almost

Posted by: Anonymous Coward on March 12, 2007 11:08 PM
Maybe that's exactly what they are attempting to do. We should never stifle innovation to adhere to a "lesser" standard (that's a general statement, I'm not knowledgeable enough to declare one package manager better than another). You were right at the end, Conary does sound interesting, especially this little tidbit: "a later version of the program need not automatically overwrite older versions, but can coincide with them, removing a common problem with dependencies in poorly designed packages," a problem I have run into before, more than once.

#

Sorry, already got a great package manager

Posted by: Anonymous Coward on March 07, 2007 12:13 PM
Slackware's pkgtools works for me.

No dependency hell, no convoluted jargon and best of all, easy to roll your own. Everything on my system is packaged and installed thru pkgtools, so its logged in<nobr> <wbr></nobr>/var/log/packages and readily maintained/updated/removed.

#

a package mismanager

Posted by: Anonymous Coward on March 08, 2007 06:12 PM
it's not *manager* in the first place, at most package *advisor* since it doesn't have (overridable but) power to control what it must take care of -- dependencies.

when you're localhost type with only a single system to care of, it might suffice; when you have at least a dozen, you have to grow up and dump slackwarish approach.

seen that quite a few times, and was kind of smart enough not to buy that myself.

--
Michael Shigorin

#

dpkg is the best software along with apt!

Posted by: Anonymous Coward on March 08, 2007 12:40 AM
We need to debianise the pkging system in Linux all in all.
dpkg along with apt or a common wrapper wajig will manage the packages and dep messes very efficiently.
rpm?bah,its verrry old sorta thing-u agreed or not.

#

Rubbish

Posted by: Administrator on March 13, 2007 11:19 PM
> u agreed or not


That would be "or not." The effective differences between deb and rpm packages are virtually insignificant. I have found no realistic reason to prefer one over the other. The thing that makes more of a difference is file system layout and naming conventions. Debian and it's many, many derivatives have made a mess of things in this respect. It's getting better but it's still a bit hairy.


All that said, I personally have not been able to get over the issues with the Debian project and it's early people. I got back-stabbed once by it and I'll be damned if I'll let it happen again. Now I know Ubuntu is the current darling of the distro world. But it still has to much baggage brought over from Debian. The distro would have been SO much better if it were based on Fedora (or even earlier RH versions).

#

naah

Posted by: Anonymous Coward on March 08, 2007 04:13 AM
This whole canary...conary...whatever is just dpkg done weird. Just because he wants to show he can do better than rpm ? Well, it's too late. Or, should I say, two wrongs don't make a right.

#

Re:naah

Posted by: Anonymous Coward on March 12, 2007 10:24 PM
terlmann here, debian's dependency hell is
what conary resolves. and , yes, the terminology used is just plain weird. but, the bugs are rare
and it is simple to install new software in
a conary based system providing it is in the repo.
all dependencies are already resolved.
terlmann@yahoo.com

#

Conary: An innovative second-generation package manager

Posted by: Anonymous [ip: 192.168.200.17] on September 21, 2007 07:17 AM
are all those putting down conary implying that dpkg and rpm are perfect? Coz they are not and we should be encouraging new and innovative solutions to the problems of exiting package managemet sytems.

#

Conary: An innovative second-generation package manager

Posted by: Anonymous [ip: 88.232.163.140] on December 14, 2007 03:54 PM
<a href="http://r10noktanet-seoyarismasi.blogspot.com" title="www.r10.net küresel ısınmaya hayır seo yarışması">www.r10.net küresel ısınmaya hayır seo yarışması</a>

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya