|
|
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
|
|
|
f85a5f |
%define upstream_rel_long 8.0-0
|
|
|
f85a5f |
%define upstream_rel 8.0
|
|
|
f85a5f |
%define centos_rel 0.1905
|
|
|
f85a5f |
#define beta Beta
|
|
|
9c58df |
%define dist .el%{dist_release_version}
|
|
|
f85a5f |
|
|
Pablo Greco |
837d0a |
# 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}
|
|
Pablo Greco |
7e41ce |
Release: %{centos_rel}.0.6%{?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
|
|
|
f85a5f |
Requires: extlinux-bootloader
|
|
Pablo Greco |
ec1615 |
%define pkg_name centos-userland-release
|
|
Pablo Greco |
ec1615 |
%package -n %{pkg_name}
|
|
Pablo Greco |
ec1615 |
Summary: %{product_family} release file
|
|
|
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}
|
|
|
f85a5f |
|
|
|
f85a5f |
Provides: centos-release-eula
|
|
|
f85a5f |
Provides: redhat-release-eula
|
|
|
f85a5f |
|
|
|
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
|
|
Pablo Greco |
7e41ce |
Source309: CentOS-Devel.repo
|
|
Pablo Greco |
7e41ce |
Source310: CentOS-centosplus.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 |
|
|
|
f85a5f |
%prep
|
|
Pablo Greco |
837d0a |
echo OK
|
|
|
f85a5f |
|
|
|
f85a5f |
%build
|
|
|
f85a5f |
echo OK
|
|
|
f85a5f |
|
|
|
f85a5f |
%install
|
|
|
f85a5f |
rm -rf %{buildroot}
|
|
|
f85a5f |
|
|
|
f85a5f |
# create /etc
|
|
|
f85a5f |
mkdir -p %{buildroot}/etc
|
|
|
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 |
|
|
|
f85a5f |
# create /etc/os-release
|
|
|
f85a5f |
cat << EOF >>%{buildroot}/etc/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}"
|
|
Pablo Greco |
c40e6a |
PLATFORM_ID="platform:el%{full_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
|
|
|
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
|
|
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/pki/rpm-gpg/
|
|
|
f85a5f |
%config(noreplace) /etc/yum.repos.d/*
|
|
Pablo Greco |
837d0a |
%config(noreplace) /etc/dnf/vars/*
|
|
|
f85a5f |
/etc/rpm/macros.dist
|
|
|
f85a5f |
%{_docdir}/redhat-release
|
|
|
f85a5f |
%{_docdir}/centos-release/*
|
|
|
f85a5f |
%{_datadir}/redhat-release
|
|
|
f85a5f |
%{_datadir}/centos-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 |
|
|
|
f85a5f |
%changelog
|
|
|
f85a5f |
* Wed May 8 2019 Pablo Greco <pablo@fliagreco.com.ar> 8-0.el7
|
|
|
f85a5f |
- Initial setup for CentOS-8
|
|
|
f85a5f |
|