RPM包中的几个组

发布于 2024-10-11 02:13:57 字数 788 浏览 9 评论 0原文

单个rpm包是否可以属于多个组?

在spec文件中你可以设置包组:

组:系统环境/基础

我需要的是能够为此包设置多个组(例如 System|Util|MyCompanyName) - 它们就像分配给包的标签。

安装包后,我想像

rpm -q --group System

or

rpm -q --group MyCompanyName

一样查询它,在这两种情况下我应该看到我的包(以及属于该组的其他包)


Edit:

许多软件包可能属于 MyCompanyName 组,但只能安装少数软件包。我需要一种方法来区分我们的包和 Linux 系统包 - 我计划使用组名称来实现它


我尝试放置几行 Group: 行,但它只使用最后一行。 Group: 之后的所有内容似乎都被视为一个字符串,我找不到一种方法来拆分它们。

我能想到的另一个解决方案是将这些东西作为 PROVIDES 然后进行查询

rpm -q --whatprovides System

,但我不喜欢这种方式。

还有其他方法可以完成所请求的功能吗?

Is it possible for single rpm package to belong to several groups?

In spec file you can set package group:

Group: System Environment/Base

What I need is to be able to set several groups for this package (like System|Util|MyCompanyName) - they would be like tags assigned to the package.

When the package is installed I want to query it like

rpm -q --group System

or

rpm -q --group MyCompanyName

and in both cases I should see my package (and others belonging to this group)


Edit:

Many packages may belong to MyCompanyName group, but only few may be installed. I need a way to differentiate our packages from linux system packages - I was planning to do it using the group name


I tried putting several Group: lines, but it only uses the last one. Everything after Group: seems to be taken as one string and I couldn't find a way to split them.

Another solution that I could think of is putting this stuff as PROVIDES and then to query

rpm -q --whatprovides System

but I don't like it this way.

Is there other way to accomplish the requested functionality?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

像你 2024-10-18 02:13:57

指定公司名称的正确方法是通过供应商标签,如下所示:

Vendor: Yoyodyne, Inc.

要按供应商获取软件包列表,您可以运行以下命令:

rpm -qa --qf '%{NAME} %{VENDOR}\n' | grep -v Yoyodyne

一个 RPM 只能属于一个组。此外,允许的组是由分布定义的。

要查找特定发行版的有效组,您必须经常运行该发行版的包管理器并查看列表。

RPM 的定义并不像 Debian 软件包格式那么明确。似乎没有官方或完整的文档。

http://www.rpm.org/max-rpm/ s1-rpm-inside-tags.html

The correct way to specify your company name is via the Vendor tag like this:

Vendor: Yoyodyne, Inc.

To get a list of packages by vendor you can run this command:

rpm -qa --qf '%{NAME} %{VENDOR}\n' | grep -v Yoyodyne

An RPM can only belong to one group. Furthermore, the allowable groups is defined by the distribution.

To find the valid groups for a particular distribution you must often run the package manager for that distro and look at the list.

RPM is not nearly as well defined as the Debian package format is. There seems to be no official or thorough documentation.

http://www.rpm.org/max-rpm/s1-rpm-inside-tags.html

小清晰的声音 2024-10-18 02:13:57

AFAIU,RPM 应该属于 RPM 的 GROUPS 文件中的单个组,或者未指定组。不能有超过一个。

AFAIU, RPMs should belong to a single Group in RPM's GROUPS file or have Group unspecified. Cannot have more than one.

堇年纸鸢 2024-10-18 02:13:57

您可以使用 yum groups 在存储库级别而不是包级别定义组。定义了组后,您应该能够使用“yum groupinfo”命令来查看每个组中的包。

You might be able to define the groups at the repo-level instead of the package level using yum groups. Once you have your groups defined, you should be able yo use the 'yum groupinfo' command to see the packages in each group.

筱果果 2024-10-18 02:13:57

这是一篇旧帖子,但由于它仍然出现在 Google 上;

如今,至少 OpenSUSE 使用 Group: 字段作为空格分隔的标签字段,而不是层次树,因此对于 SUSE 软件包,您可以简单地用空格分隔您希望软件包所属的标签。

有关详细信息,请参阅:https://en.opensuse.org/openSUSE:Package_group_guidelines

This is an old post but since it still shows up on Google;

Nowadays at least OpenSUSE uses the Group: field as a space-separated tags field instead of an hierarchial tree, so for SUSE packages you can simply space separate the tags you'd like your package to belong to.

See: https://en.opensuse.org/openSUSE:Package_group_guidelines for details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文