3

Example 1:

using yum info vim-enhanced I get this:

Name        : vim-enhanced
Arch        : x86_64
Epoch       : 2
Version     : 7.4.629
Release     : 5.el6_8.1
Size        : 2.2 M
Repo        : installed

Example 2:

yum info kernel

Installed Packages
Name        : kernel
Arch        : x86_64
Version     : 3.10.0
Release     : 514.el7
Size        : 148 M
Repo        : installed
From repo   : anaconda
Summary     : The Linux kernel
URL         : http://www.kernel.org/
License     : GPLv2
Description : The kernel package contains the Linux kernel (vmlinuz), the core of any
            : Linux operating system.  The kernel handles the basic functions
            : of the operating system: memory allocation, process allocation, device
            : input and output, etc.

Name        : kernel
Arch        : x86_64
Version     : 3.10.0
Release     : 514.26.2.el7
Size        : 148 M
Repo        : installed
From repo   : updates
Summary     : The Linux kernel
URL         : http://www.kernel.org/
License     : GPLv2
Description : The kernel package contains the Linux kernel (vmlinuz), the core of any
            : Linux operating system.  The kernel handles the basic functions
            : of the operating system: memory allocation, process allocation, device
            : input and output, etc.

what I really interested in is Release field: 5.el6_8.1 , 514.el7, 514.26.2.el7.

According to some answers, there is no official rule governing the naming convention of Release field. is this true? or do they have specific naming convention for each kind of software package?

1
  • 1
    It could be anything. Ask the maintainer or have a look at the documentation of the repo/distribution and their policy.
    – Seth
    Commented Aug 18, 2017 at 9:00

1 Answer 1

2

See https://fedoraproject.org/wiki/Packaging:DistTag for comprehensive documentation.

This macro is used to distinguish two identical packages, which are in fact not identical.

For example package python-alembic. You can have files python-alembic-0.9.1-1.el6.rpm and python-alembic-0.9.1-1.fc26.rpm. They have the same content, the same code. But they are stored in different path. EL6 use /usr/lib/python2.6/site-packages/alembic but FC26 have /usr/lib/python2.7/site-packages/alembic (the difference is in python version). So .el6 package will not work in Fedora 26 and vice versa.

Without the dist tag you will have only python-alembic-0.9.1-1 and you will have hard time to figure whether it is suitable for your OS.

And you usually do not define the content of dist tag. It is defined by one of system packages automatically.

6
  • what do you mean by "defined by one of system packages"? isn't this package name including the dist tag defined by a 'upstream maintainer' manually?
    – Sajuuk
    Commented Aug 22, 2017 at 14:38
  • No. The line in spec file looks like: Release: 1%{?dist} which expand just to '1' if dist macro is not defined. The macro is usually defined in file /usr/lib/rpm/macros.d/macros.dist which in Fedora is shipped by fedora-release package.
    – msuchy
    Commented Aug 23, 2017 at 10:53
  • and what is 1 in your example? like those 5, 514 in my example.
    – Sajuuk
    Commented Aug 23, 2017 at 11:37
  • Yes. In your example, the line should be Release : 5%{?dist} and in example2 it should be Release : 514%{?dist}
    – msuchy
    Commented Aug 24, 2017 at 15:02
  • I mean, what do those 1/5/514 represent?
    – Sajuuk
    Commented Aug 24, 2017 at 17:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .