carlwgeorge / rpms / centos-release

Forked from rpms/centos-release 4 years ago
Clone

Blame SPECS/centos-release.spec

Karanbir Singh a5b8a1
%define debug_package %{nil}
Karanbir Singh 8862a1
%define product_family CentOS Linux
Karanbir Singh a5b8a1
%define variant_titlecase Server
Karanbir Singh a5b8a1
%define variant_lowercase server
Pablo Greco 95f82a
%define targetdir %{_target_cpu}
Pablo Greco 95f82a
%ifarch x86_64
c742ab
%define release_name Core
Pablo Greco f763c7
%define contentdir   centos
Pablo Greco 95f82a
%else
Pablo Greco 95f82a
%define release_name AltArch
Pablo Greco f763c7
%define contentdir   altarch
Pablo Greco 95f82a
%endif
Pablo Greco e3ded9
Pablo Greco 95f82a
%ifarch ppc ppc64 ppc64le
Pablo Greco 95f82a
%define tuned_profile :server
Pablo Greco 95f82a
%endif
Pablo Greco 95f82a
%ifarch ppc64le
Pablo Greco 95f82a
%if "%{dist}" == ".el7a"
Pablo Greco e3ded9
%define altarch_suffix a
Pablo Greco 95f82a
%define targetdir power9
Pablo Greco 95f82a
%endif
Pablo Greco 95f82a
%endif
Pablo Greco e3ded9
Pablo Greco f763c7
%define infra_var stock
Karanbir Singh b7269c
%define base_release_version 7
Karanbir Singh b7269c
%define full_release_version 7
Karanbir Singh a5b8a1
%define dist_release_version 7
Pablo Greco 95f82a
%define upstream_rel_long 7.6-1
Pablo Greco 95f82a
%define upstream_rel 7.6
Pablo Greco 95f82a
%define centos_rel 6.1810
Karanbir Singh a5b8a1
#define beta Beta
Pablo Greco e3ded9
%define dist .el%{dist_release_version}%{?altarch_suffix}.centos
Karanbir Singh a5b8a1
Pablo Greco 95f82a
%ifarch %{arm}
Pablo Greco 95f82a
Name:           centos-userland-release
Pablo Greco 95f82a
%else
Karanbir Singh a5b8a1
Name:           centos-release
Pablo Greco 95f82a
%endif
Karanbir Singh a5b8a1
Version:        %{base_release_version}
Pablo Greco 95f82a
Release:        %{centos_rel}.2%{?dist}
Karanbir Singh a5b8a1
Summary:        %{product_family} release file
Karanbir Singh a5b8a1
Group:          System Environment/Base
Karanbir Singh a5b8a1
License:        GPLv2
Pablo Greco 95f82a
%ifarch %{arm}
Pablo Greco a2ed49
Requires(post): coreutils
Pablo Greco 95f82a
Requires:       extlinux-bootloader
Pablo Greco 95f82a
%endif
Karanbir Singh a5b8a1
Provides:       centos-release = %{version}-%{release}
c742ab
Provides:       centos-release(upstream) = %{upstream_rel}
Pablo Greco 95f82a
Provides:       redhat-release = %{upstream_rel_long}
Pablo Greco 95f82a
Provides:       system-release = %{upstream_rel_long}
Karanbir Singh b7269c
Provides:       system-release(releasever) = %{base_release_version}
Karanbir Singh 54ca24
Source0:        centos-release-%{base_release_version}-%{centos_rel}.tar.gz
Karanbir Singh a5b8a1
Source1:        85-display-manager.preset
Karanbir Singh a5b8a1
Source2:        90-default.preset
Pablo Greco 95f82a
Source99:       update-boot
Pablo Greco 95f82a
Source100:      rootfs-expand
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
%description
Karanbir Singh a5b8a1
%{product_family} release files
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
%prep
Karanbir Singh a5b8a1
%setup -q -n centos-release-%{base_release_version}
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
%build
Karanbir Singh a5b8a1
echo OK
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
%install
Karanbir Singh a5b8a1
rm -rf %{buildroot}
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
# create /etc
Karanbir Singh a5b8a1
mkdir -p %{buildroot}/etc
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
# create /etc/system-release and /etc/redhat-release
c742ab
echo "%{product_family} release %{full_release_version}.%{centos_rel} (%{release_name}) " > %{buildroot}/etc/centos-release
Karanbir Singh f3a9a7
echo "Derived from Red Hat Enterprise Linux %{upstream_rel} (Source)" > %{buildroot}/etc/centos-release-upstream
Karanbir Singh a5b8a1
ln -s centos-release %{buildroot}/etc/system-release
Karanbir Singh f3a9a7
ln -s centos-release %{buildroot}/etc/redhat-release
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
# create /etc/os-release
Karanbir Singh a5b8a1
cat << EOF >>%{buildroot}/etc/os-release
Karanbir Singh 8862a1
NAME="%{product_family}"
Karanbir Singh a5b8a1
VERSION="%{full_release_version} (%{release_name})"
Karanbir Singh 8862a1
ID="centos"
c742ab
ID_LIKE="rhel fedora"
Karanbir Singh a5b8a1
VERSION_ID="%{full_release_version}"
Karanbir Singh 8862a1
PRETTY_NAME="%{product_family} %{full_release_version} (%{release_name})"
Karanbir Singh a5b8a1
ANSI_COLOR="0;31"
Pablo Greco a55850
CPE_NAME="cpe:/o:centos:centos:%{base_release_version}%{?tuned_profile}"
Karanbir Singh 8862a1
HOME_URL="https://www.centos.org/"
Karanbir Singh 8862a1
BUG_REPORT_URL="https://bugs.centos.org/"
Karanbir Singh 8862a1
Pablo Greco a55850
CENTOS_MANTISBT_PROJECT="CentOS-%{base_release_version}"
Pablo Greco a55850
CENTOS_MANTISBT_PROJECT_VERSION="%{base_release_version}"
Karanbir Singh 54ca24
REDHAT_SUPPORT_PRODUCT="centos"
Pablo Greco a55850
REDHAT_SUPPORT_PRODUCT_VERSION="%{base_release_version}"
Karanbir Singh 54ca24
Karanbir Singh a5b8a1
EOF
Karanbir Singh a5b8a1
# write cpe to /etc/system/release-cpe
Pablo Greco a55850
echo "cpe:/o:centos:centos:%{base_release_version}" > %{buildroot}/etc/system-release-cpe
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
# create /etc/issue and /etc/issue.net
Karanbir Singh a5b8a1
echo '\S' > %{buildroot}/etc/issue
Karanbir Singh a5b8a1
echo 'Kernel \r on an \m' >> %{buildroot}/etc/issue
Karanbir Singh a5b8a1
cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net
Karanbir Singh a5b8a1
echo >> %{buildroot}/etc/issue
Karanbir Singh a5b8a1
Pablo Greco 95f82a
pushd %{targetdir}
Karanbir Singh a5b8a1
# copy GPG keys
Karanbir Singh a5b8a1
mkdir -p -m 755 %{buildroot}/etc/pki/rpm-gpg
Karanbir Singh a5b8a1
for file in RPM-GPG-KEY* ; do
Karanbir Singh a5b8a1
    install -m 644 $file %{buildroot}/etc/pki/rpm-gpg
Karanbir Singh a5b8a1
done
Karanbir Singh a5b8a1
c742ab
# copy yum repos
c742ab
mkdir -p -m 755 %{buildroot}/etc/yum.repos.d
c742ab
for file in CentOS-*.repo; do 
c742ab
    install -m 644 $file %{buildroot}/etc/yum.repos.d
c742ab
done
c742ab
Karanbir Singh 84825e
mkdir -p -m 755 %{buildroot}/etc/yum/vars
Pablo Greco f763c7
echo "%{infra_var}" > %{buildroot}/etc/yum/vars/infra
Pablo Greco f763c7
echo "%{contentdir}" >%{buildroot}/etc/yum/vars/contentdir
Pablo Greco 95f82a
%ifarch %{arm}
Pablo Greco f763c7
echo %{base_release_version} > %{buildroot}/etc/yum/vars/releasever
Pablo Greco 95f82a
%endif
Pablo Greco 95f82a
popd
Karanbir Singh 84825e
Karanbir Singh a5b8a1
# set up the dist tag macros
Karanbir Singh a5b8a1
install -d -m 755 %{buildroot}/etc/rpm
Karanbir Singh a5b8a1
cat >> %{buildroot}/etc/rpm/macros.dist << EOF
Karanbir Singh a5b8a1
# dist macros.
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
%%centos_ver %{base_release_version}
c742ab
%%centos %{base_release_version}
Karanbir Singh a5b8a1
%%rhel %{base_release_version}
Pablo Greco a55850
%%dist .el%{base_release_version}
Karanbir Singh a5b8a1
%%el%{base_release_version} 1
Karanbir Singh a5b8a1
EOF
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
# use unbranded datadir
c742ab
mkdir -p -m 755 %{buildroot}/%{_datadir}/centos-release
c742ab
ln -s centos-release %{buildroot}/%{_datadir}/redhat-release
c742ab
install -m 644 EULA %{buildroot}/%{_datadir}/centos-release
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
# use unbranded docdir
c742ab
mkdir -p -m 755 %{buildroot}/%{_docdir}/centos-release
c742ab
ln -s centos-release %{buildroot}/%{_docdir}/redhat-release
c742ab
install -m 644 GPL %{buildroot}/%{_docdir}/centos-release
c742ab
install -m 644 Contributors %{buildroot}/%{_docdir}/centos-release
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
# copy systemd presets
Karanbir Singh a5b8a1
mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-preset/
Karanbir Singh a5b8a1
install -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/
Karanbir Singh a5b8a1
install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/systemd/system-preset/
Karanbir Singh a5b8a1
Pablo Greco 95f82a
%ifarch %{arm}
Pablo Greco 95f82a
# Install armhfp specific tools
Pablo Greco 95f82a
mkdir -p %{buildroot}/%{_bindir}/
Pablo Greco 95f82a
install -m 0755 %{SOURCE99} %{buildroot}%{_bindir}/
Pablo Greco 95f82a
install -m 0755 %{SOURCE100} %{buildroot}%{_bindir}/
Pablo Greco 95f82a
%endif
Pablo Greco 95f82a
Pablo Greco 95f82a
%ifarch %{arm}
Pablo Greco a2ed49
%posttrans
Pablo Greco 95f82a
if [ -e /usr/local/bin/rootfs-expand ];then
Pablo Greco 95f82a
rm -f /usr/local/bin/rootfs-expand
Pablo Greco 95f82a
fi
Pablo Greco 95f82a
%endif
Pablo Greco 95f82a
Karanbir Singh a5b8a1
%clean
Karanbir Singh a5b8a1
rm -rf %{buildroot}
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
%files
Karanbir Singh a5b8a1
%defattr(0644,root,root,0755)
Karanbir Singh a5b8a1
/etc/redhat-release
Karanbir Singh a5b8a1
/etc/system-release
Karanbir Singh a5b8a1
/etc/centos-release
Karanbir Singh a3866a
/etc/centos-release-upstream
Karanbir Singh a5b8a1
%config(noreplace) /etc/os-release
Karanbir Singh a5b8a1
%config /etc/system-release-cpe
Karanbir Singh a5b8a1
%config(noreplace) /etc/issue
Karanbir Singh a5b8a1
%config(noreplace) /etc/issue.net
Karanbir Singh a5b8a1
/etc/pki/rpm-gpg/
c742ab
%config(noreplace) /etc/yum.repos.d/*
Karanbir Singh 84825e
%config(noreplace) /etc/yum/vars/*
Karanbir Singh a5b8a1
/etc/rpm/macros.dist
c742ab
%{_docdir}/redhat-release
c742ab
%{_docdir}/centos-release/*
c742ab
%{_datadir}/redhat-release
c742ab
%{_datadir}/centos-release/*
Karanbir Singh a5b8a1
%{_prefix}/lib/systemd/system-preset/*
Pablo Greco 95f82a
%ifarch %{arm}
Pablo Greco 95f82a
%attr(0755,root,root) %{_bindir}/update-boot
Pablo Greco 95f82a
%attr(0755,root,root) %{_bindir}/rootfs-expand
Pablo Greco 95f82a
%endif
Karanbir Singh a5b8a1
Karanbir Singh a5b8a1
%changelog
Pablo Greco 95f82a
* Fri Nov 23 2018 Pablo Greco <pablo@fliagreco.com.ar>
Pablo Greco 95f82a
- Update to 7.6
Pablo Greco 95f82a
- Fix vault repos
Pablo Greco 95f82a
Pablo Greco 95f82a
* Mon Oct  1 2018 Anssi Johansson <avij@centosproject.org>
Pablo Greco 95f82a
- Point AltArch URLs to mirrorlist.c.o instead of mirror.c.o
Pablo Greco 95f82a
Pablo Greco 95f82a
* Thu Aug  9 2018 Pablo Greco <pablo@fliagreco.com.ar>
Pablo Greco 95f82a
- Enable ostree-remount in presets
Pablo Greco 95f82a
- Include power9 as a separate ppc64le arch
Pablo Greco 95f82a
Pablo Greco 95f82a
* Fri Aug  3 2018 Pablo Greco <pablo@fliagreco.com.ar>
Pablo Greco 95f82a
- Unified tarball for all arches, so it can be built from the same src.rpm
Pablo Greco 95f82a
Pablo Greco 95f82a
* Thu Aug  2 2018 Pablo Greco <pablo@fliagreco.com.ar>
Pablo Greco 95f82a
- Sync version and fixes with centos-release
Pablo Greco 95f82a
- Unified spec for all arches
Pablo Greco 95f82a
Pablo Greco 95f82a
* Thu Aug  2 2018 Johnny Hughes <johnny@centos.org>
Pablo Greco 95f82a
- Post Trans for contentdir
Pablo Greco 95f82a
Pablo Greco 95f82a
* Fri May  4 2018 Pablo Greco <pablo@fliagreco.com.ar>
Pablo Greco 95f82a
- armhfp: Require extlinux-bootloader now that update-boot was obsoleted
Pablo Greco 95f82a
Pablo Greco 95f82a
* Wed Apr 11 2018 Johnny Hughes <johnny@centos.org>
Pablo Greco 95f82a
- Bump Release for 1804
Pablo Greco 95f82a
Pablo Greco 95f82a
* Wed Mar 21 2018 Pablo Greco <pablo@fliagreco.com.ar>
Pablo Greco 95f82a
- armhfp: Update rootfs-expand to detect rootfs
Pablo Greco 95f82a
- armhfp: Obsolete update-boot
Pablo Greco 95f82a
- armhfp: Remove old versions of rootfs-expand
Pablo Greco 95f82a
Pablo Greco 95f82a
* Thu Dec 28 2017 Fabian Arrotin <arrfab@centos.org>
Pablo Greco 95f82a
- armhfp: Fixed the post scriptlet to detect correctly rpi2/rpi3 with 4.9 kernel
Pablo Greco 95f82a
Pablo Greco 95f82a
* Wed Aug 30 2017 Johnny Hughes <johnny@centos.org>
Pablo Greco 95f82a
- Bump Release for 1708
Pablo Greco 95f82a
Pablo Greco 95f82a
* Mon Feb 27 2017 Fabian Arrotin <arrfab@centos.org>
Pablo Greco 95f82a
- armhfp: Added rootfs-expand and update-boot tools for armhfp
Pablo Greco 95f82a
5d075d
* Tue Nov 29 2016 Johnny Hughes <johnny@centos.org>
5d075d
- Bump Release for 1611
5d075d
Pablo Greco 95f82a
* Mon Oct 24 2016 Fabian Arrotin <arrfab@centos.org>
Pablo Greco 95f82a
- armhfp: Using a new kvariant yum var to point to correct kernel repo path
Pablo Greco 95f82a
Pablo Greco 95f82a
* Wed Dec 2 2015 Fabian Arrotin <arrfab@centos.org>
Pablo Greco 95f82a
- armhfp: Fixed the definitive altarch path for altarch/armhfp
Pablo Greco 95f82a
6f5354
* Tue Dec  1 2015 Johnny Hughes <johnny@centos.org>
6f5354
- Bump Release for 1511
6f5354
- Add CentOS-Media.repo and put CentOS-CR.repo in the
6f5354
  tarball, then removed patch1000 
6f5354
Pablo Greco 95f82a
* Mon Nov 30 2015 Fabian Arrotin <arrfab@centos.org>
Pablo Greco 95f82a
- armhfp: Defaulting to normal repositories now (release approaching)
Pablo Greco 95f82a
Pablo Greco 95f82a
* Sat Nov 28 2015 Fabian Arrotin <arrfab@centos.org>
Pablo Greco 95f82a
- armhfp: Overriding the releasever yum var, as pkg name isn't centos-release
Pablo Greco 95f82a
Pablo Greco 95f82a
* Fri Nov 27 2015 Fabian Arrotin <arrfab@centos.org>
Pablo Greco 95f82a
- armhfp: initial release for the AltArch armhfp userland
Pablo Greco 95f82a
Karanbir Singh f3a9a7
* Tue Mar 31 2015 Karanbir Singh <kbsingh@centos.org>
Karanbir Singh f3a9a7
- rework upstream communication
Karanbir Singh f3a9a7
- re-establish redhat-release as a symlink from centos-release
Karanbir Singh f3a9a7
Karanbir Singh 6308ee
* Fri Mar 27 2015 Karanbir Singh <kbsingh@centos.org>
Karanbir Singh 6308ee
- dont auto enable the initial-setup tui mode
Karanbir Singh 6308ee
Karanbir Singh 54ca24
* Thu Mar 19 2015 Karanbir Singh <kbsingh@centos.org>
Karanbir Singh 54ca24
- Bump Release for 1503 
Karanbir Singh 54ca24
- add ABRT specific content to os-release
Karanbir Singh 54ca24
- split redhat-release from centos-release
Karanbir Singh 54ca24
Karanbir Singh cfa6c6
* Tue Feb 17 2015 Karanbir Singh <kbsingh@centos.org>
Karanbir Singh cfa6c6
- Include the CR repo for upcoming 7.1 release ( and beyond )
Karanbir Singh cfa6c6
Karanbir Singh 84825e
* Thu Aug 21 2014 Karanbir Singh <kbsingh@centos.org>
Karanbir Singh 84825e
- add a yum var to route mirrorlist accurately
Karanbir Singh 84825e
- add CentOS-fastrack repo
Karanbir Singh 84825e
- Trim the CentOS-Debug-7 key
Karanbir Singh 84825e
- rename the Debug repo to base-debug so yum-utils can consume easier
Karanbir Singh 84825e
Karanbir Singh c3f036
* Tue Jul 15 2014 Karanbir Singh <kbsingh@centos.org>
Karanbir Singh c3f036
- add CentOS-7 Debug rpm key
Karanbir Singh c3f036
c742ab
* Fri Jul 4 2014 Karanbir Singh <kbsingh@centos.org>
c742ab
- Roll in the final name change conversation results
c742ab
- Stage for release content
c742ab
- Add yum repos
c742ab
- Add distro keys ( incomplete )
c742ab
c742ab
* Mon Jun 30 2014 Karanbir Singh <kbsingh@centos.org>
c742ab
- add a macro to macros.dist to indicate just centos as well 
c742ab
c742ab
* Tue Jun 24 2014 Karanbir Singh <kbsingh@centos.org> 
c742ab
- Trial run for CentOS DateStamp release
c742ab
- Add stubs for the yum repos
c742ab
- fix os-release to only have one ID_LIKE ( Avij #7171)
c742ab
- make the yum repo definitions be config noreplace ( Trevor )
c742ab
Karanbir Singh 515186
* Tue Jun 17 2014 Karanbir Singh <kbsingh@centos.org> 7.0.el7.0.140617.3
Karanbir Singh 515186
- rebuild for 2014-06-17 pub qa release
Karanbir Singh 8862a1
- ensure we get the right cpe info
Karanbir Singh 8862a1
- ensure centos-release is trackable
Karanbir Singh 515186
Karanbir Singh b7269c
* Sat Jun 14 2014 Karanbir Singh <kbsingh@centos.org> 7.0.el7.0.140614.2
Karanbir Singh b7269c
- prep for public QA release tag as broken
Karanbir Singh b7269c
Karanbir Singh a5b8a1
* Fri Jun 13 2014 Karanbir Singh <kbsingh@centos.org> 7-0.el7
Karanbir Singh a5b8a1
- initial setup for centos-rc
Pablo Greco 95f82a