From f85a5f359b5588e77bbe3826720b08a440dc6a97 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: May 10 2019 21:00:01 +0000 Subject: import centos-release-8-0.1905.0.1.el8.src.rpm --- diff --git a/.centos-release.metadata b/.centos-release.metadata new file mode 100644 index 0000000..f238aff --- /dev/null +++ b/.centos-release.metadata @@ -0,0 +1 @@ +9e784270794c9f88af6c7bc46a02c07f4389d271 SOURCES/centos-release-8-0.1905.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7d92609 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +BUILD/ +BUILDROOT/ +RPMS/ +SRPMS/ +SOURCES/*.xz +SOURCES/*.gz +SOURCES/*.bz2 +SOURCES/*.rpm +SOURCES/*.orig +SOURCES/*.sign diff --git a/SOURCES/85-display-manager.preset b/SOURCES/85-display-manager.preset new file mode 100644 index 0000000..c1d3069 --- /dev/null +++ b/SOURCES/85-display-manager.preset @@ -0,0 +1,10 @@ +# We enable all display managers by default. Since only one can +# actually be enabled at the same time the one which is installed +# first wins + +enable gdm.service +enable lightdm.service +enable slim.service +enable lxdm.service +enable kdm.service +enable xdm.service diff --git a/SOURCES/90-default.preset b/SOURCES/90-default.preset new file mode 100644 index 0000000..ec83002 --- /dev/null +++ b/SOURCES/90-default.preset @@ -0,0 +1,160 @@ +# Also see: +# https://fedoraproject.org/wiki/Starting_services_by_default + +disable systemd-timesyncd.service +disable systemd-resolved.service + +# systemd +enable remote-fs.target +enable getty@tty1.service + +# System stuff +enable sshd.service +enable atd.* +enable crond.* +enable chronyd.service +enable rpcbind.* +enable NetworkManager.service +enable NetworkManager-dispatcher.service +enable ModemManager.service +enable auditd.service +enable restorecond.service +enable bluetooth.* +enable avahi-daemon.* +enable cups.* + +# The various syslog implementations +enable rsyslog.* +enable syslog-ng.* +enable sysklogd.* + +# Network facing +enable firewalld.service +enable libvirtd.service +enable xinetd.service +enable ladvd.service + +# Storage +enable multipathd.service +enable libstoragemgmt.service +enable lvm2-lvmpolld.socket +enable lvm2-monitor.* +enable lvm2-lvmetad.* +enable dm-event.* +enable dmraid-activation.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=855372 +enable mdmonitor.service +enable mdmonitor-takeover.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=876237 +enable spice-vdagentd.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=885406 +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=957135 +enable vmtoolsd.service + +# mcelog is a utility that collects and decodes Machine Check Exception data +# on x86-32 and x86-64 systems. +# https://bugzilla.redhat.com/show_bug.cgi?id=1302179 +enable mcelog.service + +#https://bugzilla.redhat.com/show_bug.cgi?id=995987 +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 + +# Enable SSSD Kerberos Credential Cache Server +# https://bugzilla.redhat.com/show_bug.cgi?id=1558927 +enable sssd-kcm.socket + +# https://bugzilla.redhat.com/show_bug.cgi?id=1578833 +enable sssd.service + +# Hardware +enable gpm.* +enable gpsd.* +enable irqbalance.service +enable lm_sensors.service +enable mcelog.* +enable microcode.service +enable smartd.service +enable pcscd.socket +enable rngd.service + +# Other stuff +enable abrtd.service +enable abrt-ccpp.service +enable abrt-oops.service +enable abrt-xorg.service +enable abrt-vmcore.service +enable lttng-sessiond.service +enable ksm.service +enable ksmtuned.service +enable rootfs-resize.service +enable sysstat.service +enable uuidd.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=1193616 +enable hypervfcopyd.service +enable hypervkvpd.service +enable hypervvssd.service + +# Desktop stuff +enable accounts-daemon.service +enable rtkit-daemon.service +enable upower.service +enable udisks2.service +enable polkit.service +enable packagekit-offline-update.service +enable PackageKit.service + +# Initial Setup reconfiguration service +enable initial-setup-reconfiguration.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=1312446 +enable opal-prd.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 +enable brandbot.* + +# https://bugzilla.redhat.com/show_bug.cgi?id=1572550 +enable timedatex.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=1578870 +enable selinux-autorelabel-mark.service +enable rhel-configure.service +enable rhel-dmesg.service + +# https://github.com/fedora-sysv/initscripts/commit/37109fdf9808 +enable nis-domainname.service +enable import-state.service +enable loadmodules.service +enable readonly-root.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=1630200 +# s390x specific services +enable cpi.service +enable device_cio_free.service + +# Enable the stratis daemon for managing stratis storage +# https://bugzilla.redhat.com/show_bug.cgi?id=1632510 +enable stratisd.service diff --git a/SOURCES/99-default-disable.preset b/SOURCES/99-default-disable.preset new file mode 100644 index 0000000..1f29b50 --- /dev/null +++ b/SOURCES/99-default-disable.preset @@ -0,0 +1 @@ +disable * 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 new file mode 100644 index 0000000..a8e7aa9 --- /dev/null +++ b/SPECS/centos-release.spec @@ -0,0 +1,208 @@ +%define debug_package %{nil} +%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 ppc64le +%define dist_suffix .p +%define tuned_profile :server +%endif +%define base_release_version 8 +%define full_release_version 8 +%define dist_release_version 8 +%define upstream_rel_long 8.0-0 +%define upstream_rel 8.0 +%define centos_rel 0.1905 +#define beta Beta +%define dist .el%{dist_release_version}+2%{?dist_suffix} + +%undefine dist_suffix + +%ifarch %{arm} +Name: centos-userland-release +%else +Name: centos-release +%endif +Version: %{base_release_version} +Release: %{centos_rel}.0.1%{?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_long} +Provides: system-release = %{upstream_rel_long} +Provides: system-release(releasever) = %{base_release_version} + +Provides: centos-release-eula +Provides: redhat-release-eula + +Source0: centos-release-%{base_release_version}-%{centos_rel}.tar.gz +Source1: 85-display-manager.preset +Source2: 90-default.preset +Source3: 99-default-disable.preset + +Source99: update-boot +Source100: rootfs-expand + +ExcludeArch: %{ix86} + +%description +%{product_family} release files + +%prep +%setup -q -n centos-release-%{base_release_version} + +%build +echo OK + +%install +rm -rf %{buildroot} + +# create /etc +mkdir -p %{buildroot}/etc + +# create /etc/system-release and /etc/redhat-release +echo "%{product_family} release %{full_release_version}.%{centos_rel} (%{release_name}) " > %{buildroot}/etc/centos-release +echo "Derived from Red Hat Enterprise Linux %{upstream_rel} (Source)" > %{buildroot}/etc/centos-release-upstream +ln -s centos-release %{buildroot}/etc/system-release +ln -s centos-release %{buildroot}/etc/redhat-release + +# create /etc/os-release +cat << EOF >>%{buildroot}/etc/os-release +NAME="%{product_family}" +VERSION="%{full_release_version} (%{release_name})" +ID="centos" +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:8%{?tuned_profile}" +HOME_URL="https://www.centos.org/" +BUG_REPORT_URL="https://bugs.centos.org/" + +CENTOS_MANTISBT_PROJECT="CentOS-8" +CENTOS_MANTISBT_PROJECT_VERSION="8" +REDHAT_SUPPORT_PRODUCT="centos" +REDHAT_SUPPORT_PRODUCT_VERSION="8" + +EOF +# write cpe to /etc/system/release-cpe +echo "cpe:/o:centos:centos:8" > %{buildroot}/etc/system-release-cpe + +# create /etc/issue and /etc/issue.net +echo '\S' > %{buildroot}/etc/issue +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 + install -m 644 $file %{buildroot}/etc/pki/rpm-gpg +done + +# copy yum repos +mkdir -p -m 755 %{buildroot}/etc/yum.repos.d +for file in CentOS-*.repo; do + install -m 644 $file %{buildroot}/etc/yum.repos.d +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 +cat >> %{buildroot}/etc/rpm/macros.dist << EOF +# dist macros. + +%%centos_ver %{base_release_version} +%%centos %{base_release_version} +%%rhel %{base_release_version} +%%dist .el8 +%%el%{base_release_version} 1 +EOF + +# use unbranded datadir +mkdir -p -m 755 %{buildroot}/%{_datadir}/centos-release +ln -s centos-release %{buildroot}/%{_datadir}/redhat-release +install -m 644 EULA %{buildroot}/%{_datadir}/centos-release + +# use unbranded docdir +mkdir -p -m 755 %{buildroot}/%{_docdir}/centos-release +ln -s centos-release %{buildroot}/%{_docdir}/redhat-release +install -m 644 GPL %{buildroot}/%{_docdir}/centos-release +install -m 644 Contributors %{buildroot}/%{_docdir}/centos-release + +# copy systemd presets +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/ +install -m 0644 %{SOURCE3} %{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 +echo 'altarch' >/etc/yum/vars/contentdir +%else +echo 'centos' > /etc/yum/vars/contentdir +%endif + + +%clean +rm -rf %{buildroot} + +%files +%defattr(0644,root,root,0755) +/etc/redhat-release +/etc/system-release +/etc/centos-release +/etc/centos-release-upstream +%config(noreplace) /etc/os-release +%config /etc/system-release-cpe +%config(noreplace) /etc/issue +%config(noreplace) /etc/issue.net +/etc/pki/rpm-gpg/ +%config(noreplace) /etc/yum.repos.d/* +%config(noreplace) /etc/yum/vars/* +/etc/rpm/macros.dist +%{_docdir}/redhat-release +%{_docdir}/centos-release/* +%{_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 +* Wed May 8 2019 Pablo Greco 8-0.el7 +- Initial setup for CentOS-8 +