mohanboddu / rpms / centos-release

Forked from rpms/centos-release 4 years ago
Clone

Blame SPECS/centos-release.spec

f85a5f
%define debug_package %{nil}
f85a5f
%define product_family CentOS Linux
f85a5f
%define variant_titlecase Server
f85a5f
%define variant_lowercase server
9c58df
%ifarch %{arm}
9c58df
%define release_name AltArch
Pablo Greco 837d0a
%define contentdir   altarch
9c58df
%else
9c58df
%define release_name Core
Pablo Greco 837d0a
%define contentdir   centos
f85a5f
%endif
f85a5f
%ifarch ppc64le
f85a5f
%define tuned_profile :server
f85a5f
%endif
Pablo Greco 837d0a
%define infra_var stock
f85a5f
%define base_release_version 8
f85a5f
%define full_release_version 8
f85a5f
%define dist_release_version 8
Brian Stinson 34630c
%define upstream_rel_long 8.1-0
Brian Stinson 34630c
%define upstream_rel 8.1
Brian Stinson 34630c
%define centos_rel 1.1911
f85a5f
#define beta Beta
9c58df
%define dist .el%{dist_release_version}
f85a5f
Pablo Greco 78208f
# The anaconda scripts in %%{_libexecdir} can create false requirements
Pablo Greco 837d0a
%global __requires_exclude_from %{_libexecdir}
Pablo Greco 837d0a
f85a5f
Name:           centos-release
Pablo Greco 837d0a
Version:        %{upstream_rel}
89457c
Release:        %{centos_rel}.0.8%{?dist}
f85a5f
Summary:        %{product_family} release file
f85a5f
Group:          System Environment/Base
f85a5f
License:        GPLv2
Pablo Greco ec1615
%ifnarch %{arm}
Pablo Greco ec1615
%define pkg_name %{name}
Pablo Greco ec1615
%else
Pablo Greco ec1615
%define pkg_name centos-userland-release
Pablo Greco ec1615
%package -n %{pkg_name}
Pablo Greco ec1615
Summary:        %{product_family} release file
Pablo Greco f3869d
Requires:       extlinux-bootloader
f85a5f
%endif
f85a5f
Provides:       centos-release = %{version}-%{release}
f85a5f
Provides:       centos-release(upstream) = %{upstream_rel}
f85a5f
Provides:       redhat-release = %{upstream_rel_long}
f85a5f
Provides:       system-release = %{upstream_rel_long}
f85a5f
Provides:       system-release(releasever) = %{base_release_version}
89457c
Provides:       base-module(platform:el%{base_release_version})
f85a5f
f85a5f
Provides:       centos-release-eula
f85a5f
Provides:       redhat-release-eula
f85a5f
26a0d7
Requires:       centos-gpg-keys = %{version}-%{release}
Brian Stinson 21470e
Requires:       centos-repos = %{version}-%{release}
26a0d7
f85a5f
Source1:        85-display-manager.preset
f85a5f
Source2:        90-default.preset
f85a5f
Source3:        99-default-disable.preset
Pablo Greco 837d0a
Source10:       RPM-GPG-KEY-centosofficial
Pablo Greco 837d0a
Source11:       RPM-GPG-KEY-centostesting
f85a5f
f85a5f
Source99:       update-boot
f85a5f
Source100:      rootfs-expand
f85a5f
Pablo Greco 837d0a
Source200:      EULA
Pablo Greco 837d0a
Source201:      GPL
Pablo Greco 837d0a
Source202:      Contributors
Pablo Greco 837d0a
Pablo Greco 837d0a
Source300:      CentOS-Base.repo
Pablo Greco 837d0a
Source301:      CentOS-CR.repo
Pablo Greco 837d0a
Source302:      CentOS-Debuginfo.repo
Pablo Greco 837d0a
Source303:      CentOS-Extras.repo
Pablo Greco 837d0a
Source304:      CentOS-fasttrack.repo
Pablo Greco 837d0a
Source305:      CentOS-Media.repo
Pablo Greco 837d0a
Source306:      CentOS-Sources.repo
Pablo Greco 837d0a
Source307:      CentOS-Vault.repo
Pablo Greco 7e41ce
Source308:      CentOS-AppStream.repo
Brian Stinson 0fd809
Source309:      CentOS-PowerTools.repo
Pablo Greco 7e41ce
Source310:      CentOS-centosplus.repo
Brian Stinson 2e317d
Source311:      CentOS-HA.repo
Brian Stinson 227c41
Source312:      CentOS-Devel.repo
Pablo Greco 837d0a
Pablo Greco ec1615
%ifarch %{arm}
Pablo Greco ec1615
%description -n %{pkg_name}
Pablo Greco ec1615
%{product_family} release files
Pablo Greco ec1615
%endif
Pablo Greco ec1615
f85a5f
%description
f85a5f
%{product_family} release files
f85a5f
26a0d7
%package -n centos-repos
26a0d7
Summary:        %{product_family} package repositories
26a0d7
Group:          System Environment/Base
26a0d7
Provides:       centos-repos(%{base_release_version}) = %{upstream_rel}
26a0d7
Requires:       system-release = %{upstream_rel}
26a0d7
Requires:       centos-gpg-keys = %{version}-%{release}
26a0d7
Conflicts:      %{name} < 8.0-0.1905.0.10
26a0d7
26a0d7
%description -n centos-repos
26a0d7
%{product_family} package repository files for yum and dnf
26a0d7
26a0d7
%package -n centos-gpg-keys
26a0d7
Summary:        %{product_family} RPM keys
26a0d7
Group:          System Environment/Base
26a0d7
Conflicts:      %{name} < 8.0-0.1905.0.10
26a0d7
BuildArch:      noarch
26a0d7
26a0d7
%description -n centos-gpg-keys
26a0d7
%{product_family} RPM signature keys
26a0d7
f85a5f
%prep
Pablo Greco 837d0a
echo OK
f85a5f
f85a5f
%build
f85a5f
echo OK
f85a5f
f85a5f
%install
f85a5f
rm -rf %{buildroot}
f85a5f
b9613e
# create skeleton
f85a5f
mkdir -p %{buildroot}/etc
b9613e
mkdir -p %{buildroot}%{_prefix}/lib
f85a5f
f85a5f
# create /etc/system-release and /etc/redhat-release
f85a5f
echo "%{product_family} release %{full_release_version}.%{centos_rel} (%{release_name}) " > %{buildroot}/etc/centos-release
f85a5f
echo "Derived from Red Hat Enterprise Linux %{upstream_rel} (Source)" > %{buildroot}/etc/centos-release-upstream
f85a5f
ln -s centos-release %{buildroot}/etc/system-release
f85a5f
ln -s centos-release %{buildroot}/etc/redhat-release
f85a5f
b9613e
# Create the os-release file
b9613e
cat << EOF >>%{buildroot}%{_prefix}/lib/os-release
f85a5f
NAME="%{product_family}"
f85a5f
VERSION="%{full_release_version} (%{release_name})"
f85a5f
ID="centos"
f85a5f
ID_LIKE="rhel fedora"
f85a5f
VERSION_ID="%{full_release_version}"
89457c
PLATFORM_ID="platform:el%{base_release_version}"
f85a5f
PRETTY_NAME="%{product_family} %{full_release_version} (%{release_name})"
f85a5f
ANSI_COLOR="0;31"
Pablo Greco 837d0a
CPE_NAME="cpe:/o:centos:centos:%{base_release_version}%{?tuned_profile}"
f85a5f
HOME_URL="https://www.centos.org/"
f85a5f
BUG_REPORT_URL="https://bugs.centos.org/"
f85a5f
Pablo Greco 837d0a
CENTOS_MANTISBT_PROJECT="CentOS-%{base_release_version}"
Pablo Greco 837d0a
CENTOS_MANTISBT_PROJECT_VERSION="%{base_release_version}"
f85a5f
REDHAT_SUPPORT_PRODUCT="centos"
Pablo Greco 837d0a
REDHAT_SUPPORT_PRODUCT_VERSION="%{base_release_version}"
f85a5f
f85a5f
EOF
b9613e
# Create the symlink for /etc/os-release
b9613e
ln -s ../usr/lib/os-release %{buildroot}%{_sysconfdir}/os-release
b9613e
f85a5f
# write cpe to /etc/system/release-cpe
Pablo Greco 837d0a
echo "cpe:/o:centos:centos:%{base_release_version}" > %{buildroot}/etc/system-release-cpe
f85a5f
f85a5f
# create /etc/issue and /etc/issue.net
f85a5f
echo '\S' > %{buildroot}/etc/issue
f85a5f
echo 'Kernel \r on an \m' >> %{buildroot}/etc/issue
f85a5f
cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net
f85a5f
echo >> %{buildroot}/etc/issue
f85a5f
f85a5f
# copy GPG keys
f85a5f
mkdir -p -m 755 %{buildroot}/etc/pki/rpm-gpg
Pablo Greco 837d0a
install -m 644 %{SOURCE10} %{buildroot}/etc/pki/rpm-gpg
Pablo Greco 837d0a
install -m 644 %{SOURCE11} %{buildroot}/etc/pki/rpm-gpg
f85a5f
f85a5f
# copy yum repos
f85a5f
mkdir -p -m 755 %{buildroot}/etc/yum.repos.d
Pablo Greco 837d0a
install -m 644 %{SOURCE300} %{buildroot}/etc/yum.repos.d
Pablo Greco 837d0a
install -m 644 %{SOURCE301} %{buildroot}/etc/yum.repos.d
Pablo Greco 837d0a
install -m 644 %{SOURCE302} %{buildroot}/etc/yum.repos.d
Pablo Greco 837d0a
install -m 644 %{SOURCE303} %{buildroot}/etc/yum.repos.d
Pablo Greco 837d0a
install -m 644 %{SOURCE304} %{buildroot}/etc/yum.repos.d
Pablo Greco 837d0a
install -m 644 %{SOURCE305} %{buildroot}/etc/yum.repos.d
Pablo Greco 837d0a
install -m 644 %{SOURCE306} %{buildroot}/etc/yum.repos.d
Pablo Greco 837d0a
install -m 644 %{SOURCE307} %{buildroot}/etc/yum.repos.d
Pablo Greco 7e41ce
install -m 644 %{SOURCE308} %{buildroot}/etc/yum.repos.d
Pablo Greco 7e41ce
install -m 644 %{SOURCE309} %{buildroot}/etc/yum.repos.d
Pablo Greco 7e41ce
install -m 644 %{SOURCE310} %{buildroot}/etc/yum.repos.d
Brian Stinson 2e317d
install -m 644 %{SOURCE311} %{buildroot}/etc/yum.repos.d
Brian Stinson 227c41
install -m 644 %{SOURCE312} %{buildroot}/etc/yum.repos.d
Pablo Greco 837d0a
Pablo Greco 837d0a
mkdir -p -m 755 %{buildroot}/etc/dnf/vars
Pablo Greco 837d0a
echo "%{infra_var}" > %{buildroot}/etc/dnf/vars/infra
Pablo Greco 837d0a
echo "%{contentdir}" >%{buildroot}/etc/dnf/vars/contentdir
f85a5f
%ifarch %{arm}
Pablo Greco 837d0a
echo %{base_release_version} > %{buildroot}/etc/dnf/vars/releasever
f85a5f
%endif
f85a5f
f85a5f
# set up the dist tag macros
f85a5f
install -d -m 755 %{buildroot}/etc/rpm
f85a5f
cat >> %{buildroot}/etc/rpm/macros.dist << EOF
f85a5f
# dist macros.
f85a5f
f85a5f
%%centos_ver %{base_release_version}
f85a5f
%%centos %{base_release_version}
f85a5f
%%rhel %{base_release_version}
Pablo Greco 837d0a
%%dist .el%{base_release_version}
f85a5f
%%el%{base_release_version} 1
f85a5f
EOF
f85a5f
f85a5f
# use unbranded datadir
f85a5f
mkdir -p -m 755 %{buildroot}/%{_datadir}/centos-release
f85a5f
ln -s centos-release %{buildroot}/%{_datadir}/redhat-release
Pablo Greco 837d0a
install -m 644 %{SOURCE200} %{buildroot}/%{_datadir}/centos-release
f85a5f
f85a5f
# use unbranded docdir
f85a5f
mkdir -p -m 755 %{buildroot}/%{_docdir}/centos-release
f85a5f
ln -s centos-release %{buildroot}/%{_docdir}/redhat-release
Pablo Greco 837d0a
install -m 644 %{SOURCE201} %{buildroot}/%{_docdir}/centos-release
Pablo Greco 837d0a
install -m 644 %{SOURCE202} %{buildroot}/%{_docdir}/centos-release
f85a5f
f85a5f
# copy systemd presets
f85a5f
mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system-preset/
f85a5f
install -m 0644 %{SOURCE1} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
f85a5f
install -m 0644 %{SOURCE2} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
f85a5f
install -m 0644 %{SOURCE3} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
f85a5f
f85a5f
%ifarch %{arm}
f85a5f
# Install armhfp specific tools
f85a5f
mkdir -p %{buildroot}/%{_bindir}/
f85a5f
install -m 0755 %{SOURCE99} %{buildroot}%{_bindir}/
f85a5f
install -m 0755 %{SOURCE100} %{buildroot}%{_bindir}/
f85a5f
%endif
f85a5f
f85a5f
f85a5f
%clean
f85a5f
rm -rf %{buildroot}
f85a5f
Pablo Greco ec1615
%files -n %{pkg_name}
f85a5f
%defattr(0644,root,root,0755)
f85a5f
/etc/redhat-release
f85a5f
/etc/system-release
f85a5f
/etc/centos-release
f85a5f
/etc/centos-release-upstream
f85a5f
%config(noreplace) /etc/os-release
f85a5f
%config /etc/system-release-cpe
f85a5f
%config(noreplace) /etc/issue
f85a5f
%config(noreplace) /etc/issue.net
f85a5f
/etc/rpm/macros.dist
f85a5f
%{_docdir}/redhat-release
f85a5f
%{_docdir}/centos-release/*
f85a5f
%{_datadir}/redhat-release
f85a5f
%{_datadir}/centos-release/*
b9613e
%{_prefix}/lib/os-release
f85a5f
%{_prefix}/lib/systemd/system-preset/*
f85a5f
%ifarch %{arm}
f85a5f
%attr(0755,root,root) %{_bindir}/update-boot
f85a5f
%attr(0755,root,root) %{_bindir}/rootfs-expand
f85a5f
%endif
f85a5f
26a0d7
%files -n centos-repos
26a0d7
%config(noreplace) /etc/yum.repos.d/*
26a0d7
%config(noreplace) /etc/dnf/vars/*
26a0d7
26a0d7
%files -n centos-gpg-keys
26a0d7
/etc/pki/rpm-gpg/
26a0d7
f85a5f
%changelog
Brian Stinson c3a999
* Thu Jan 02 2020 Brian Stinson <bstinson@centosproject.org> - 8-1.0.8
Brian Stinson c3a999
- Add base module platform Provides so DNF can auto-discover modular platform (ngompa)pr#6
Brian Stinson c3a999
- Switched CR repo to mirrorlist to spread the load (arrfab)pr#5
89457c
Brian Stinson b0b15c
* Thu Dec 19 2019 bstinson@centosproject.org - 8-1.0.7
Brian Stinson b0b15c
- Typo fixes
Brian Stinson b0b15c
- Disable the HA repo by default
Brian Stinson b0b15c
Pablo Greco f3869d
* Wed Dec 18 2019 Pablo Greco <pgreco@centosproject.org> - 8-1.el8
Pablo Greco f3869d
- Fix requires in armhfp
Pablo Greco f3869d
Brian Stinson 2e317d
* Tue Dec 17 2019 bstinson@centosproject.org - 8-1.el8
Brian Stinson 2e317d
- Add the HighAvailability repository
Brian Stinson 2e317d
Brian Stinson 34630c
* Wed Aug 14 2019 Neal Gompa <ngompa@centosproject.org> 8-1.el8
26a0d7
- Split repositories and GPG keys out into subpackages
26a0d7
Pablo Greco 78208f
* Sat Aug 10 2019 Fabian Arrotin <arrfab@centos.org> 8-0.el8
3ed191
- modified baseurl paths, even if disabled
3ed191
Pablo Greco 78208f
* Sat Aug 10 2019 Fabian Arrotin <arrfab@centos.org> 8-0.el8
1e77d3
- Enabled Extras by default.
1e77d3
- Fixed sources paths for BaseOS/AppStream
1e77d3
Brian Stinson 0fd809
* Sat Aug 10 2019 Brian Stinson <bstinson@centosproject.org> 8-0.el7
Brian Stinson 0fd809
- Update Debuginfo and fasttrack to use releasever
Brian Stinson 0fd809
- Fix CentOS-media.repo to include appstream
Pablo Greco 78208f
f85a5f
* Wed May  8 2019 Pablo Greco <pablo@fliagreco.com.ar> 8-0.el7
f85a5f
- Initial setup for CentOS-8
f85a5f