3

According to the Fedora documentation the %{?dist} tag when building an RPM on CentOS 7 I should get .el7. but currently I get .el7.centos.

The line from my .spec:

Release: 1%{?_buildid}%{?dist}

I cannot find any documentation talking about this change or any way to change it back to the old (and in my case preferred) behaviour.

Any pointers on how to force the old behaviour?

kemra102
  • 211
  • 4
  • 12
  • 1
    This seems to have been remedied by a change to the definition of *%{dist}* in `/etc/rpm/macros.dist` in the *centos-release-7-5.1804.el7.centos.2.x86_64* update. – jhfrontz Jun 28 '18 at 14:37

1 Answers1

3

I just fought the same problem. A search led me here: http://rpmfind.net/linux/RPM/centos/7.1.1503/x86_64/Packages/centos-release-7-1.1503.el7.centos.2.8.x86_64.html

The value of "%{dist}" is (at least on CentOS 7) defined by the file "/etc/rpm/macros.dist", and you might modify that file. As a less drastic means, try this in your spec file:

%if 0%{?rhel} == 7
  %define dist .el7
  # CentOS 7 would force ".el7.centos", we want to avoid that.
%endif