Blame SPECS/centos-stream-release.spec

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