From 95f82a1479cfecfd56e0faeca0bbfbbc3d64c278 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Aug 31 2019 19:32:55 +0000 Subject: Fast forward to 7.6.1810 --- diff --git a/.centos-release.metadata b/.centos-release.metadata index 7e42afe..2d1b947 100644 --- a/.centos-release.metadata +++ b/.centos-release.metadata @@ -1 +1 @@ -9d459788d8d20c1f92a86eeb3a00dabcea965a08 SOURCES/centos-release-7-1.1503.tar.gz +f978b0e63578ef3caabe28f77df6c034a147e4ee SOURCES/centos-release-7-6.1810.tar.gz diff --git a/SOURCES/1000-centos-release-cr.patch b/SOURCES/1000-centos-release-cr.patch deleted file mode 100644 index 38ddcb9..0000000 --- a/SOURCES/1000-centos-release-cr.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -uNr centos-release-7__orig/CentOS-CR.repo centos-release-7/CentOS-CR.repo ---- centos-release-7__orig/CentOS-CR.repo 1970-01-01 01:00:00.000000000 +0100 -+++ centos-release-7/CentOS-CR.repo 2015-02-17 09:31:08.319527338 +0000 -@@ -0,0 +1,28 @@ -+# CentOS-CR.repo -+# -+# The Continuous Release ( CR ) repository contains rpms that are due in the next -+# release for a specific CentOS Version ( eg. next release in CentOS-7 ); these rpms -+# are far less tested, with no integration checking or update path testing having -+# taken place. They are still built from the upstream sources, but might not map -+# to an exact upstream distro release. -+# -+# These packages are made available soon after they are built, for people willing -+# to test their environments, provide feedback on content for the next release, and -+# for people looking for early-access to next release content. -+# -+# The CR repo is shipped in a disabled state by default; its important that users -+# understand the implications of turning this on. -+# -+# NOTE: We do not use a mirrorlist for the CR repos, to ensure content is available -+# to everyone as soon as possible, and not need to wait for the external -+# mirror network to seed first. However, many local mirrors will carry CR repos -+# and if desired you can use one of these local mirrors by editing the baseurl -+# line in the repo config below. -+# -+ -+[cr] -+name=CentOS-$releasever - cr -+baseurl=http://mirror.centos.org/centos/$releasever/cr/$basearch/ -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 -+enabled=0 diff --git a/SOURCES/90-default.preset b/SOURCES/90-default.preset index af25f3b..4d95ed5 100644 --- a/SOURCES/90-default.preset +++ b/SOURCES/90-default.preset @@ -36,6 +36,7 @@ enable ladvd.service # Storage enable multipathd.service enable libstoragemgmt.service +enable lvm2-lvmpolld.socket enable lvm2-monitor.* enable lvm2-lvmetad.* enable dm-event.* @@ -54,10 +55,6 @@ enable qemu-guest-agent.service # https://bugzilla.redhat.com/show_bug.cgi?id=928726 enable dnf-makecache.timer -# https://bugzilla.redhat.com/show_bug.cgi?id=929403 -enable initial-setup-graphical.service -#enable initial-setup-text.service - # https://bugzilla.redhat.com/show_bug.cgi?id=957135 enable vmtoolsd.service @@ -67,6 +64,9 @@ enable kdump.service #https://bugzilla.redhat.com/show_bug.cgi?id=1009970 enable tuned.service +# https://bugzilla.redhat.com/show_bug.cgi?id=1215645 +enable unbound-anchor.timer + # Hardware enable gpm.* enable gpsd.* @@ -105,3 +105,48 @@ enable udisks2.service enable polkit.service enable packagekit-offline-update.service enable PackageKit.service + +# Initial Setup reconfiguration service +enable initial-setup-reconfiguration.service + +# virtlog.service is sometimes used by VMs started by libvirt.service +# Enable virtlog.socket to have it socket activated +# https://bugzilla.redhat.com/show_bug.cgi?id=1325503 +enable virtlogd.socket + +# https://bugzilla.redhat.com/show_bug.cgi?id=1271839 +enable rhsmcertd.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=1359645 +# This is included in redhat-release, but we actually don't want it because we +# don't provide /var/lib/rhsm/branded_name for inclusion in os-release. We +# template /etc/os-release ourself +#enable brandbot.* + +# https://bugzilla.redhat.com/show_bug.cgi?id=1493545 +enable rhel-autorelabel.service +enable rhel-autorelable-mark.service +enable rhel-configure.service +enable rhel-dmesg.service +enable rhel-import-state.service +enable rhel-loadmodules.service +enable rhel-readonly.service +enable rhel-domainname.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=1540243 +enable NetworkManager-wait-online.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=1518411 +enable spice-vdagentd.socket + +# https://bugzilla.redhat.com/show_bug.cgi?id=1193616 +enable hypervfcopyd.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=1312446 +enable opal-prd.service + +# Enable ostree-remount on ostree-based systems +# (Does nothing on non-ostree systems) +# https://bugzilla.redhat.com/show_bug.cgi?id=1451458 +enable ostree-remount.service + diff --git a/SOURCES/rootfs-expand b/SOURCES/rootfs-expand new file mode 100755 index 0000000..730b9b9 --- /dev/null +++ b/SOURCES/rootfs-expand @@ -0,0 +1,30 @@ +#!/bin/bash +clear +part=$(mount |grep '^/dev.* / ' |awk '{print $1}') +if [ -z "$part" ];then + echo "Error detecting rootfs" + exit -1 +fi +dev=$(echo $part|sed 's/[0-9]*$//g') +devlen=${#dev} +num=${part:$devlen} +if [[ "$dev" =~ ^/dev/mmcblk[0-9]*p$ ]];then + dev=${dev:0:-1} +fi +if [ ! -x /usr/bin/growpart ];then + echo "Please install cloud-utils-growpart (sudo yum install cloud-utils-growpart)" + exit -2 +fi +if [ ! -x /usr/sbin/resize2fs ];then + echo "Please install e2fsprogs (sudo yum install e2fsprogs)" + exit -3 +fi +echo $part $dev $num + +echo "Extending partition $num to max size ...." +growpart $dev $num +echo "Resizing ext4 filesystem ..." +resize2fs $part +echo "Done." +df -h |grep $part + diff --git a/SOURCES/update-boot b/SOURCES/update-boot new file mode 100755 index 0000000..8b4eba5 --- /dev/null +++ b/SOURCES/update-boot @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "Starting with CentOS 7.5.1804, this script is obsoleted by grubby" +exit 0 diff --git a/SPECS/centos-release.spec b/SPECS/centos-release.spec index f521310..cc1f72f 100644 --- a/SPECS/centos-release.spec +++ b/SPECS/centos-release.spec @@ -2,29 +2,61 @@ %define product_family CentOS Linux %define variant_titlecase Server %define variant_lowercase server +%define targetdir %{_target_cpu} +%ifarch x86_64 %define release_name Core +%else +%define release_name AltArch +%endif +%ifarch aarch64 +%define dist_suffix .a +%endif +%ifarch ppc ppc64 ppc64le +%define dist_suffix .p +%define tuned_profile :server +%endif +%ifarch ppc64le +%if "%{dist}" == ".el7a" +%define dist_suffix .p9 +%define targetdir power9 +%endif +%endif +%ifarch %{ix86} +%define dist_suffix .i +%endif %define base_release_version 7 %define full_release_version 7 %define dist_release_version 7 -%define upstream_rel 7.3 -%define centos_rel 3.1611 +%define upstream_rel_long 7.6-1 +%define upstream_rel 7.6 +%define centos_rel 6.1810 #define beta Beta -%define dist .el%{dist_release_version}.centos +%define dist .el%{dist_release_version}.centos%{?dist_suffix} +%ifarch %{arm} +Name: centos-userland-release +%else Name: centos-release +%endif Version: %{base_release_version} -Release: %{centos_rel}%{?dist} +Release: %{centos_rel}.2%{?dist} Summary: %{product_family} release file Group: System Environment/Base License: GPLv2 +Requires(post): coreutils, grep +%ifarch %{arm} +Requires: extlinux-bootloader +%endif Provides: centos-release = %{version}-%{release} Provides: centos-release(upstream) = %{upstream_rel} -Provides: redhat-release = %{upstream_rel} -Provides: system-release = %{upstream_rel} +Provides: redhat-release = %{upstream_rel_long} +Provides: system-release = %{upstream_rel_long} Provides: system-release(releasever) = %{base_release_version} Source0: centos-release-%{base_release_version}-%{centos_rel}.tar.gz Source1: 85-display-manager.preset Source2: 90-default.preset +Source99: update-boot +Source100: rootfs-expand %description %{product_family} release files @@ -56,7 +88,7 @@ ID_LIKE="rhel fedora" VERSION_ID="%{full_release_version}" PRETTY_NAME="%{product_family} %{full_release_version} (%{release_name})" ANSI_COLOR="0;31" -CPE_NAME="cpe:/o:centos:centos:7" +CPE_NAME="cpe:/o:centos:centos:7%{?tuned_profile}" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" @@ -75,6 +107,7 @@ echo 'Kernel \r on an \m' >> %{buildroot}/etc/issue cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net echo >> %{buildroot}/etc/issue +pushd %{targetdir} # copy GPG keys mkdir -p -m 755 %{buildroot}/etc/pki/rpm-gpg for file in RPM-GPG-KEY* ; do @@ -89,6 +122,10 @@ done mkdir -p -m 755 %{buildroot}/etc/yum/vars install -m 0644 yum-vars-infra %{buildroot}/etc/yum/vars/infra +%ifarch %{arm} +install -m 0644 yum-vars-releasever %{buildroot}/etc/yum/vars/releasever +%endif +popd # set up the dist tag macros install -d -m 755 %{buildroot}/etc/rpm @@ -98,7 +135,7 @@ cat >> %{buildroot}/etc/rpm/macros.dist << EOF %%centos_ver %{base_release_version} %%centos %{base_release_version} %%rhel %{base_release_version} -%%dist %dist +%%dist .el7 %%el%{base_release_version} 1 EOF @@ -118,6 +155,22 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-preset/ install -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/ install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/systemd/system-preset/ +%ifarch %{arm} +# Install armhfp specific tools +mkdir -p %{buildroot}/%{_bindir}/ +install -m 0755 %{SOURCE99} %{buildroot}%{_bindir}/ +install -m 0755 %{SOURCE100} %{buildroot}%{_bindir}/ +%endif + +%posttrans +%ifarch %{arm} +if [ -e /usr/local/bin/rootfs-expand ];then +rm -f /usr/local/bin/rootfs-expand +fi +%endif + +/usr/bin/uname -m | grep -q 'x86_64' && echo 'centos' >/etc/yum/vars/contentdir || echo 'altarch' > /etc/yum/vars/contentdir + %clean rm -rf %{buildroot} @@ -141,16 +194,76 @@ rm -rf %{buildroot} %{_datadir}/redhat-release %{_datadir}/centos-release/* %{_prefix}/lib/systemd/system-preset/* +%ifarch %{arm} +%attr(0755,root,root) %{_bindir}/update-boot +%attr(0755,root,root) %{_bindir}/rootfs-expand +%endif %changelog +* Fri Nov 23 2018 Pablo Greco +- Update to 7.6 +- Fix vault repos + +* Mon Oct 1 2018 Anssi Johansson +- Point AltArch URLs to mirrorlist.c.o instead of mirror.c.o + +* Thu Aug 9 2018 Pablo Greco +- Enable ostree-remount in presets +- Include power9 as a separate ppc64le arch + +* Fri Aug 3 2018 Pablo Greco +- Unified tarball for all arches, so it can be built from the same src.rpm + +* Thu Aug 2 2018 Pablo Greco +- Sync version and fixes with centos-release +- Unified spec for all arches + +* Thu Aug 2 2018 Johnny Hughes +- Post Trans for contentdir + +* Fri May 4 2018 Pablo Greco +- armhfp: Require extlinux-bootloader now that update-boot was obsoleted + +* Wed Apr 11 2018 Johnny Hughes +- Bump Release for 1804 + +* Wed Mar 21 2018 Pablo Greco +- armhfp: Update rootfs-expand to detect rootfs +- armhfp: Obsolete update-boot +- armhfp: Remove old versions of rootfs-expand + +* Thu Dec 28 2017 Fabian Arrotin +- armhfp: Fixed the post scriptlet to detect correctly rpi2/rpi3 with 4.9 kernel + +* Wed Aug 30 2017 Johnny Hughes +- Bump Release for 1708 + +* Mon Feb 27 2017 Fabian Arrotin +- armhfp: Added rootfs-expand and update-boot tools for armhfp + * Tue Nov 29 2016 Johnny Hughes - Bump Release for 1611 +* Mon Oct 24 2016 Fabian Arrotin +- armhfp: Using a new kvariant yum var to point to correct kernel repo path + +* Wed Dec 2 2015 Fabian Arrotin +- armhfp: Fixed the definitive altarch path for altarch/armhfp + * Tue Dec 1 2015 Johnny Hughes - Bump Release for 1511 - Add CentOS-Media.repo and put CentOS-CR.repo in the tarball, then removed patch1000 +* Mon Nov 30 2015 Fabian Arrotin +- armhfp: Defaulting to normal repositories now (release approaching) + +* Sat Nov 28 2015 Fabian Arrotin +- armhfp: Overriding the releasever yum var, as pkg name isn't centos-release + +* Fri Nov 27 2015 Fabian Arrotin +- armhfp: initial release for the AltArch armhfp userland + * Tue Mar 31 2015 Karanbir Singh - rework upstream communication - re-establish redhat-release as a symlink from centos-release @@ -200,3 +313,4 @@ rm -rf %{buildroot} * Fri Jun 13 2014 Karanbir Singh 7-0.el7 - initial setup for centos-rc +