Blame SPECS/centos-linux-release.spec

2e3df0
%global distro  CentOS Linux
2e3df0
%global major   8
780e31
%global minor   3
780e31
%global date    2011
2e3df0
2e3df0
Name:           centos-linux-release
2e3df0
Version:        %{major}.%{minor}
780e31
Release:        1.%{date}%{?dist}
2e3df0
Summary:        %{distro} release files
acfbd3
License:        GPLv2
2e3df0
URL:            https://centos.org
2e3df0
BuildArch:      noarch
2e3df0
2e3df0
Requires:       centos-repos(%{major})
acfbd3
Provides:       centos-release = %{version}-%{release}
acfbd3
Brian Stinson fb401e
# required for a lorax run (to generate install media)
Brian Stinson fb401e
Provides:       centos-release-eula
Brian Stinson fb401e
Provides:       redhat-release-eula
Brian Stinson fb401e
2e3df0
# upgrade path from old release packages
2e3df0
Obsoletes:      centos-release < 8.2-3
2e3df0
Obsoletes:      centos-repos < 8.2-3
2e3df0
Obsoletes:      centos-userland-release < 8.2-3
acfbd3
2e3df0
# required by epel-release
2e3df0
Provides:       redhat-release = %{version}-%{release}
acfbd3
2e3df0
# required by dnf
2e3df0
# https://github.com/rpm-software-management/dnf/blob/4.2.23/dnf/const.py.in#L26
2e3df0
Provides:       system-release = %{version}-%{release}
2e3df0
Provides:       system-release(releasever) = %{major}
acfbd3
2e3df0
# required by libdnf
2e3df0
# https://github.com/rpm-software-management/libdnf/blob/0.48.0/libdnf/module/ModulePackage.cpp#L472
2e3df0
Provides:       base-module(platform:el%{major})
acfbd3
acfbd3
Source200:      EULA
2e3df0
Source201:      LICENSE
acfbd3
Source202:      Contributors
acfbd3
2e3df0
Source300:      85-display-manager.preset
2e3df0
Source301:      90-default.preset
2e3df0
Source302:      99-default-disable.preset
acfbd3
acfbd3
2e3df0
%description
2e3df0
%{distro} release files.
acfbd3
acfbd3
acfbd3
%install
2e3df0
# copy license and contributors doc here for %%license and %%doc macros
2e3df0
cp %{SOURCE201} %{SOURCE202} .
acfbd3
acfbd3
# create /etc/system-release and /etc/redhat-release
2e3df0
install -d -m 0755 %{buildroot}%{_sysconfdir}
2e3df0
echo "%{distro} release %{version}.%{date}" > %{buildroot}%{_sysconfdir}/centos-release
2e3df0
echo "Derived from Red Hat Enterprise Linux %{version}" > %{buildroot}%{_sysconfdir}/centos-release-upstream
2e3df0
ln -s centos-release %{buildroot}%{_sysconfdir}/system-release
2e3df0
ln -s centos-release %{buildroot}%{_sysconfdir}/redhat-release
acfbd3
acfbd3
# Create the os-release file
2e3df0
install -d -m 0755 %{buildroot}%{_prefix}/lib
2e3df0
cat > %{buildroot}%{_prefix}/lib/os-release << EOF
2e3df0
NAME="%{distro}"
2e3df0
VERSION="%{major}"
acfbd3
ID="centos"
acfbd3
ID_LIKE="rhel fedora"
2e3df0
VERSION_ID="%{major}"
2e3df0
PLATFORM_ID="platform:el%{major}"
2e3df0
PRETTY_NAME="%{distro} %{major}"
acfbd3
ANSI_COLOR="0;31"
2e3df0
CPE_NAME="cpe:/o:centos:centos:%{major}"
2e3df0
HOME_URL="https://centos.org/"
acfbd3
BUG_REPORT_URL="https://bugs.centos.org/"
2e3df0
CENTOS_MANTISBT_PROJECT="CentOS-%{major}"
2e3df0
CENTOS_MANTISBT_PROJECT_VERSION="%{major}"
acfbd3
EOF
2e3df0
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
2e3df0
echo "cpe:/o:centos:centos:%{major}" > %{buildroot}%{_sysconfdir}/system-release-cpe
acfbd3
acfbd3
# create /etc/issue and /etc/issue.net
2e3df0
echo '\S' > %{buildroot}%{_sysconfdir}/issue
2e3df0
echo 'Kernel \r on an \m' >> %{buildroot}%{_sysconfdir}/issue
2e3df0
cp %{buildroot}%{_sysconfdir}/issue{,.net}
2e3df0
echo >> %{buildroot}%{_sysconfdir}/issue
acfbd3
acfbd3
# set up the dist tag macros
2e3df0
install -d -m 0755 %{buildroot}%{_sysconfdir}/rpm
2e3df0
cat > %{buildroot}%{_sysconfdir}/rpm/macros.dist << EOF
acfbd3
# dist macros.
acfbd3
2e3df0
%%centos_ver %{major}
2e3df0
%%centos %{major}
2e3df0
%%rhel %{major}
2e3df0
%%dist .el%{major}
2e3df0
%%el%{major} 1
acfbd3
EOF
acfbd3
acfbd3
# use unbranded datadir
2e3df0
install -d -m 0755 %{buildroot}%{_datadir}/centos-release
2e3df0
ln -s centos-release %{buildroot}%{_datadir}/redhat-release
2e3df0
install -p -m 0644 %{SOURCE200} %{buildroot}%{_datadir}/centos-release/
acfbd3
acfbd3
# copy systemd presets
2e3df0
install -d -m 0755 %{buildroot}%{_prefix}/lib/systemd/system-preset/
2e3df0
install -p -m 0644 %{_sourcedir}/*.preset %{buildroot}%{_prefix}/lib/systemd/system-preset/
2e3df0
2e3df0
2e3df0
%files
2e3df0
%license LICENSE
2e3df0
%doc Contributors
2e3df0
%{_sysconfdir}/redhat-release
2e3df0
%{_sysconfdir}/system-release
2e3df0
%{_sysconfdir}/centos-release
2e3df0
%{_sysconfdir}/centos-release-upstream
2e3df0
%config(noreplace) %{_sysconfdir}/os-release
2e3df0
%config %{_sysconfdir}/system-release-cpe
2e3df0
%config(noreplace) %{_sysconfdir}/issue
2e3df0
%config(noreplace) %{_sysconfdir}/issue.net
2e3df0
%{_sysconfdir}/rpm/macros.dist
acfbd3
%{_datadir}/redhat-release
2e3df0
%{_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
780e31
* Mon Nov 09 2020 Carl George <carl@george.computer> - 8.3-1.2011
780e31
- Update version to 8.3
780e31
871d3a
* Fri Nov 06 2020 Carl George <carl@george.computer> - 8.2-4.2004
871d3a
- Add provides for centos-release-eula and redhat-release-eula
871d3a
2e3df0
* Thu Sep 03 2020 Carl George <carl@george.computer> - 8.2-3.2004
2e3df0
- Convert to centos-linux-release
2e3df0
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
2e3df0
* Wed May 08 2019 Pablo Greco <pablo@fliagreco.com.ar> 8-0.el7
acfbd3
- Initial setup for CentOS-8