Blame SPECS/centos-linux-release.spec

18f2f8
%global distro  CentOS Linux
18f2f8
%global major   8
18f2f8
%global minor   2
18f2f8
%global date    2004
18f2f8
18f2f8
Name:           centos-linux-release
18f2f8
Version:        %{major}.%{minor}
18f2f8
Release:        3.%{date}%{?dist}
18f2f8
Summary:        %{distro} release files
acfbd3
License:        GPLv2
18f2f8
URL:            https://centos.org
18f2f8
BuildArch:      noarch
18f2f8
18f2f8
Requires:       centos-repos(%{major})
acfbd3
Provides:       centos-release = %{version}-%{release}
acfbd3
18f2f8
# upgrade path from old release packages
18f2f8
Obsoletes:      centos-release < 8.2-3
18f2f8
Obsoletes:      centos-repos < 8.2-3
18f2f8
Obsoletes:      centos-userland-release < 8.2-3
acfbd3
18f2f8
# required by epel-release
18f2f8
Provides:       redhat-release = %{version}-%{release}
acfbd3
18f2f8
# required by dnf
18f2f8
# https://github.com/rpm-software-management/dnf/blob/4.2.23/dnf/const.py.in#L26
18f2f8
Provides:       system-release = %{version}-%{release}
18f2f8
Provides:       system-release(releasever) = %{major}
acfbd3
18f2f8
# required by libdnf
18f2f8
# https://github.com/rpm-software-management/libdnf/blob/0.48.0/libdnf/module/ModulePackage.cpp#L472
18f2f8
Provides:       base-module(platform:el%{major})
acfbd3
acfbd3
Source200:      EULA
18f2f8
Source201:      LICENSE
acfbd3
Source202:      Contributors
acfbd3
18f2f8
Source300:      85-display-manager.preset
18f2f8
Source301:      90-default.preset
18f2f8
Source302:      99-default-disable.preset
acfbd3
acfbd3
18f2f8
%description
18f2f8
%{distro} release files.
acfbd3
acfbd3
acfbd3
%install
18f2f8
# copy license and contributors doc here for %%license and %%doc macros
18f2f8
cp %{SOURCE201} %{SOURCE202} .
acfbd3
acfbd3
# create /etc/system-release and /etc/redhat-release
18f2f8
install -d -m 0755 %{buildroot}%{_sysconfdir}
18f2f8
echo "%{distro} release %{version}.%{date}" > %{buildroot}%{_sysconfdir}/centos-release
18f2f8
echo "Derived from Red Hat Enterprise Linux %{version}" > %{buildroot}%{_sysconfdir}/centos-release-upstream
18f2f8
ln -s centos-release %{buildroot}%{_sysconfdir}/system-release
18f2f8
ln -s centos-release %{buildroot}%{_sysconfdir}/redhat-release
acfbd3
acfbd3
# Create the os-release file
18f2f8
install -d -m 0755 %{buildroot}%{_prefix}/lib
18f2f8
cat > %{buildroot}%{_prefix}/lib/os-release << EOF
18f2f8
NAME="%{distro}"
18f2f8
VERSION="%{major}"
acfbd3
ID="centos"
acfbd3
ID_LIKE="rhel fedora"
18f2f8
VERSION_ID="%{major}"
18f2f8
PLATFORM_ID="platform:el%{major}"
18f2f8
PRETTY_NAME="%{distro} %{major}"
acfbd3
ANSI_COLOR="0;31"
18f2f8
CPE_NAME="cpe:/o:centos:centos:%{major}"
18f2f8
HOME_URL="https://centos.org/"
acfbd3
BUG_REPORT_URL="https://bugs.centos.org/"
18f2f8
CENTOS_MANTISBT_PROJECT="CentOS-%{major}"
18f2f8
CENTOS_MANTISBT_PROJECT_VERSION="%{major}"
acfbd3
EOF
18f2f8
acfbd3
# Create the symlink for /etc/os-release
acfbd3
ln -s ../usr/lib/os-release %{buildroot}%{_sysconfdir}/os-release
acfbd3
acfbd3
# write cpe to /etc/system/release-cpe
18f2f8
echo "cpe:/o:centos:centos:%{major}" > %{buildroot}%{_sysconfdir}/system-release-cpe
acfbd3
acfbd3
# create /etc/issue and /etc/issue.net
18f2f8
echo '\S' > %{buildroot}%{_sysconfdir}/issue
18f2f8
echo 'Kernel \r on an \m' >> %{buildroot}%{_sysconfdir}/issue
18f2f8
cp %{buildroot}%{_sysconfdir}/issue{,.net}
18f2f8
echo >> %{buildroot}%{_sysconfdir}/issue
acfbd3
acfbd3
# set up the dist tag macros
18f2f8
install -d -m 0755 %{buildroot}%{_sysconfdir}/rpm
18f2f8
cat > %{buildroot}%{_sysconfdir}/rpm/macros.dist << EOF
acfbd3
# dist macros.
acfbd3
18f2f8
%%centos_ver %{major}
18f2f8
%%centos %{major}
18f2f8
%%rhel %{major}
18f2f8
%%dist .el%{major}
18f2f8
%%el%{major} 1
acfbd3
EOF
acfbd3
acfbd3
# use unbranded datadir
18f2f8
install -d -m 0755 %{buildroot}%{_datadir}/centos-release
18f2f8
ln -s centos-release %{buildroot}%{_datadir}/redhat-release
18f2f8
install -p -m 0644 %{SOURCE200} %{buildroot}%{_datadir}/centos-release/
acfbd3
acfbd3
# copy systemd presets
18f2f8
install -d -m 0755 %{buildroot}%{_prefix}/lib/systemd/system-preset/
18f2f8
install -p -m 0644 %{_sourcedir}/*.preset %{buildroot}%{_prefix}/lib/systemd/system-preset/
18f2f8
18f2f8
18f2f8
%files
18f2f8
%license LICENSE
18f2f8
%doc Contributors
18f2f8
%{_sysconfdir}/redhat-release
18f2f8
%{_sysconfdir}/system-release
18f2f8
%{_sysconfdir}/centos-release
18f2f8
%{_sysconfdir}/centos-release-upstream
18f2f8
%config(noreplace) %{_sysconfdir}/os-release
18f2f8
%config %{_sysconfdir}/system-release-cpe
18f2f8
%config(noreplace) %{_sysconfdir}/issue
18f2f8
%config(noreplace) %{_sysconfdir}/issue.net
18f2f8
%{_sysconfdir}/rpm/macros.dist
acfbd3
%{_datadir}/redhat-release
18f2f8
%{_datadir}/centos-release
acfbd3
%{_prefix}/lib/os-release
acfbd3
%{_prefix}/lib/systemd/system-preset/*
acfbd3
%ifarch %{arm} aarch64
acfbd3
%attr(0755,root,root) %{_bindir}/rootfs-expand
acfbd3
%endif
acfbd3
acfbd3
acfbd3
%changelog
18f2f8
* Thu Sep 03 2020 Carl George <carl@george.computer> - 8.2-3.2004
18f2f8
- Convert to centos-linux-release
18f2f8
acfbd3
* Fri May 15 2020 Pablo Greco <pgreco@centosproject.org> - 8-2.0.1
acfbd3
- Relax dependency for centos-repos
acfbd3
- Remove update_boot, it was never used in 8
acfbd3
- Add rootfs_expand to aarch64
acfbd3
- Bump release for 8.2
acfbd3
acfbd3
* Thu Mar 12 2020 bstinson@centosproject.org - 8-1.0.9
acfbd3
- Add the Devel repo to centos-release
acfbd3
- Install os-release(5) content to /usr/lib and have /etc/os-release be a symlink (ngompa)pr#9
acfbd3
acfbd3
* Thu Jan 02 2020 Brian Stinson <bstinson@centosproject.org> - 8-1.0.8
acfbd3
- Add base module platform Provides so DNF can auto-discover modular platform (ngompa)pr#6
acfbd3
- Switched CR repo to mirrorlist to spread the load (arrfab)pr#5
acfbd3
acfbd3
* Thu Dec 19 2019 bstinson@centosproject.org - 8-1.0.7
acfbd3
- Typo fixes
acfbd3
- Disable the HA repo by default
acfbd3
acfbd3
* Wed Dec 18 2019 Pablo Greco <pgreco@centosproject.org> - 8-1.el8
acfbd3
- Fix requires in armhfp
acfbd3
acfbd3
* Tue Dec 17 2019 bstinson@centosproject.org - 8-1.el8
acfbd3
- Add the HighAvailability repository
acfbd3
acfbd3
* Wed Aug 14 2019 Neal Gompa <ngompa@centosproject.org> 8-1.el8
acfbd3
- Split repositories and GPG keys out into subpackages
acfbd3
acfbd3
* Sat Aug 10 2019 Fabian Arrotin <arrfab@centos.org> 8-0.el8
acfbd3
- modified baseurl paths, even if disabled
acfbd3
acfbd3
* Sat Aug 10 2019 Fabian Arrotin <arrfab@centos.org> 8-0.el8
acfbd3
- Enabled Extras by default.
acfbd3
- Fixed sources paths for BaseOS/AppStream
acfbd3
acfbd3
* Sat Aug 10 2019 Brian Stinson <bstinson@centosproject.org> 8-0.el7
acfbd3
- Update Debuginfo and fasttrack to use releasever
acfbd3
- Fix CentOS-media.repo to include appstream
acfbd3
18f2f8
* Wed May 08 2019 Pablo Greco <pablo@fliagreco.com.ar> 8-0.el7
acfbd3
- Initial setup for CentOS-8