一种新的第二代包管理模式

最新ubuntu/linux/开源新闻或者其它IT相关资讯
回复
头像
zhuqin_83
帖子: 10606
注册时间: 2006-05-13 4:02
送出感谢: 0
接收感谢: 7 次
联系:

一种新的第二代包管理模式

#1

帖子 zhuqin_83 » 2007-03-06 10:31

Conary: An innovative second-generation package manager

Monday March 05, 2007 (09:01 PM GMT)

By: Bruce Byfield

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.
HP Pavilion DV6-2064CA: AMD Turion II Ultra Dual-Core Mobile M640, HD4650, 2GBx2 DDR2-800, Seagate 500GB 7200RPM SATA, BD-ROM
DELL UltraSharp 2209WA
Arch64, Testing repo
头像
skyx
论坛版主
帖子: 9203
注册时间: 2006-12-23 13:46
来自: Azores Islands
送出感谢: 0
接收感谢: 1 次
联系:

#2

帖子 skyx » 2007-03-06 10:31

代码: 全选

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. 

代码: 全选

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. 

代码: 全选

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. 

mark
上次由 skyx 在 2007-03-06 10:42,总共编辑 1 次。
no security measure is worth anything if an attacker has physical access to the machine
头像
zhuqin_83
帖子: 10606
注册时间: 2006-05-13 4:02
送出感谢: 0
接收感谢: 7 次
联系:

#3

帖子 zhuqin_83 » 2007-03-06 10:34

OMG,你什么速度阿?我才贴你就。。。
不愧是水王。。。
HP Pavilion DV6-2064CA: AMD Turion II Ultra Dual-Core Mobile M640, HD4650, 2GBx2 DDR2-800, Seagate 500GB 7200RPM SATA, BD-ROM
DELL UltraSharp 2209WA
Arch64, Testing repo
lb_bn
帖子: 1261
注册时间: 2007-02-25 16:56
送出感谢: 0
接收感谢: 0

#4

帖子 lb_bn » 2007-03-07 10:29

什么时候可用上 ???
头像
Jimmy.Zhou
帖子: 475
注册时间: 2006-12-05 21:51
来自: Vienna, Austria
送出感谢: 0
接收感谢: 0

#5

帖子 Jimmy.Zhou » 2007-03-16 6:31

rPath看似有自己的发行版,不知道他们的conary技术会不会用到ubuntu里面来。
Jimmy.Zhou

Acer Extensa 5620G
T5250 + HD 2400 XT + 2G DDR2 +160G SATA + iwp 3945
Ubuntu Intrepid Ibex + Firefox 3
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙
送出感谢: 4 次
接收感谢: 256 次

#6

帖子 eexpress » 2007-03-16 10:03

一般是一代不如一代。等几年再说。
● 鸣学
头像
fortruth
帖子: 1795
注册时间: 2005-11-06 1:51
来自: 七彩云世界
送出感谢: 0
接收感谢: 0
联系:

#7

帖子 fortruth » 2007-05-13 16:09

eexpress 写了:一般是一代不如一代。等几年再说。
那不是更不如了。随长江水去吧。!
头像
speme
帖子: 723
注册时间: 2005-10-02 8:22
送出感谢: 0
接收感谢: 0
联系:

#8

帖子 speme » 2007-05-21 18:51

有一定的吸引力,但最终效果怎么样还难说。我指的是那个可以选择包的版本的功能。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
送出感谢: 0
接收感谢: 7 次
联系:

#9

帖子 BigSnake.NET » 2007-05-21 18:54

speme 写了:有一定的吸引力,但最终效果怎么样还难说。我指的是那个可以选择包的版本的功能。
apt有选择包版本功能

觉得apt-dpkg系统最大不足是容错性不足,一些畸形的包很容易搞坏apt
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
speme
帖子: 723
注册时间: 2005-10-02 8:22
送出感谢: 0
接收感谢: 0
联系:

#10

帖子 speme » 2007-05-21 19:32

BigSnake.NET 写了:
speme 写了:有一定的吸引力,但最终效果怎么样还难说。我指的是那个可以选择包的版本的功能。
apt有选择包版本功能

觉得apt-dpkg系统最大不足是容错性不足,一些畸形的包很容易搞坏apt
apt是有选择功能,但是,没有像它们据说的,动态选择所需的包进行测试啊!
phomeray
帖子: 524
注册时间: 2006-05-30 20:48
送出感谢: 0
接收感谢: 0

#11

帖子 phomeray » 2007-05-21 19:45

看不懂,不过感觉deb管理已经很不错了。
foxhack
帖子: 9
注册时间: 2007-06-21 20:57
送出感谢: 0
接收感谢: 0

#12

帖子 foxhack » 2007-06-21 21:04

哪个大大给翻一下啊
头像
skyx
论坛版主
帖子: 9203
注册时间: 2006-12-23 13:46
来自: Azores Islands
送出感谢: 0
接收感谢: 1 次
联系:

#13

帖子 skyx » 2007-08-09 1:16

以下几个特点,期待中。。。。。。。。。。。

代码: 全选

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. 

代码: 全选

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. 

代码: 全选

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. 

mark
no security measure is worth anything if an attacker has physical access to the machine
头像
zhuqin_83
帖子: 10606
注册时间: 2006-05-13 4:02
送出感谢: 0
接收感谢: 7 次
联系:

#14

帖子 zhuqin_83 » 2007-08-09 1:18

你还翻阿
HP Pavilion DV6-2064CA: AMD Turion II Ultra Dual-Core Mobile M640, HD4650, 2GBx2 DDR2-800, Seagate 500GB 7200RPM SATA, BD-ROM
DELL UltraSharp 2209WA
Arch64, Testing repo
回复

回到 “新闻和通知”