Skip to content

Commit

Permalink
Use /etc/system-release
Browse files Browse the repository at this point in the history
CentOS 7.1 splits the /etc/centos-release from /etc/redhat-release:
 https://git.centos.org/blob/rpms!centos-release.git/54ca24850d109adea8726a5bd1caa55e9ef61ac9/SPECS!centos-release.spec#L47

producing baseurl=http://repos.fedorapeople.org/repos/openstack/openstack-juno/epel-Derived from Red Hat Enterprise Linux 7.1 (Source)/

/etc/system-release is still a symlink to centos-release so use that instead.
  • Loading branch information
apevec committed Mar 31, 2015
1 parent e2ab7cd commit 458134f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rdo-release.spec
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ install -Dpm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-R
DIST=fedora
FDIST=f
RELEASEVER='$releasever'
if ! grep -qFi 'fedora' /etc/redhat-release; then
if ! grep -qFi 'fedora' /etc/system-release; then
DIST=epel # Should this be something else (maybe el)?
FDIST=el
# $releasever doesn't seem to be a reliable way to get the major version on RHEL
# e.g. if distroverpkg isn't present in yum.conf mine was set to 6Server
# because this was the version of the package redhat-release-server-6Server
RELEASEVER=$(sed -e 's/.*release \([0-9]\+\).*/\1/' /etc/redhat-release)
RELEASEVER=$(sed -e 's/.*release \([0-9]\+\).*/\1/' /etc/system-release)
fi

for repo in rdo-release ; do
Expand Down

1 comment on commit 458134f

@apevec
Copy link
Member Author

@apevec apevec commented on 458134f Apr 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

centos-release restored[1] /etc/redhat-release as a symlink so this change is not necessary but also does not hurt i.e. I won't revert it but won't push rdo-release updates either.

[1] https://git.centos.org/commitdiff/rpms!centos-release.git/f3a9a7fb3d640e80ed979be291330537a174d6b9

Please sign in to comment.