What is the last part of rpm package release field?

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?

Sajuuk

Posted 2017-08-18T07:54:30.313

Reputation: 289

1It could be anything. Ask the maintainer or have a look at the documentation of the repo/distribution and their policy. – Seth – 2017-08-18T09:00:10.457

Answers

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.

msuchy

Posted 2017-08-18T07:54:30.313

Reputation: 504

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 – 2017-08-22T14:38:32.650

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 – 2017-08-23T10:53:43.307

and what is 1 in your example? like those 5, 514 in my example. – Sajuuk – 2017-08-23T11:37:49.407

Yes. In your example, the line should be Release : 5%{?dist} and in example2 it should be Release : 514%{?dist} – msuchy – 2017-08-24T15:02:47.050

I mean, what do those 1/5/514 represent? – Sajuuk – 2017-08-24T17:02:36.660

See https://superuser.com/a/1237302/413143

– msuchy – 2017-08-28T07:26:29.113