From a5b8a165b6977d2b2a1528f5b190ec39648eb886 Mon Sep 17 00:00:00 2001 From: Karanbir Singh Date: Jun 14 2014 01:59:18 +0000 Subject: initial hackup for a centos-release --- diff --git a/.centos-release.metadata b/.centos-release.metadata new file mode 100644 index 0000000..fe016fd --- /dev/null +++ b/.centos-release.metadata @@ -0,0 +1 @@ +4946b0acc9691e76f3b61aeaa0e6732a61ff75d842101d97f64bc49e9e335b39 SOURCES/centos-release-7.tar.gz 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..095d838 --- /dev/null +++ b/SOURCES/90-default.preset @@ -0,0 +1,107 @@ +# Also see: +# https://fedoraproject.org/wiki/Starting_services_by_default + +# systemd +enable remote-fs.target +enable getty@tty1.service +enable systemd-readahead-replay.service +enable systemd-readahead-collect.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-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=929403 +enable initial-setup-graphical.service +enable initial-setup-text.service + +# https://bugzilla.redhat.com/show_bug.cgi?id=957135 +enable vmtoolsd.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 + +# Hardware +enable gpm.* +enable gpsd.* +enable irqbalance.service +enable lm_sensors.service +enable mcelog.* +enable microcode.service +enable acpid.* +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 +enable xendomains.service +enable xenstored.service +enable xenconsoled.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 diff --git a/SPECS/centos-release.spec b/SPECS/centos-release.spec new file mode 100644 index 0000000..3aba968 --- /dev/null +++ b/SPECS/centos-release.spec @@ -0,0 +1,125 @@ +%define debug_package %{nil} +%define product_family CentOs Linux +%define variant_titlecase Server +%define variant_lowercase server +%define release_name Final +%define base_release_version 7 +%define full_release_version 7.0 +%define dist_release_version 7 +#define beta Beta +%define dist .el%{dist_release_version} + +Name: centos-release +Version: %{base_release_version} +Release: 0%{?dist}.0 +Summary: %{product_family} release file +Group: System Environment/Base +License: GPLv2 +Provides: centos-release = %{version}-%{release} +Provides: redhat-release = %{version}-%{release} +Provides: system-release = %{version}-%{release} +Provides: system-release(releasever) = %{base_release_version}%{?variant_titlecase} +Source0: centos-release-%{base_release_version}.tar.gz +Source1: 85-display-manager.preset +Source2: 90-default.preset + + +%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}%{?variant_titlecase: %{variant_titlecase}} release %{full_release_version}%{?beta: %{beta}} (%{release_name})" > %{buildroot}/etc/centos-release +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}%{?variant_titlecase: %{variant_titlecase}}" +VERSION="%{full_release_version} (%{release_name})" +ID="rhel" +ID_LIKE="fedora" +VERSION_ID="%{full_release_version}" +PRETTY_NAME="%{product_family}%{?variant_titlecase: %{variant_titlecase}} %{full_release_version} (%{release_name})" +ANSI_COLOR="0;31" +CPE_NAME="cpe:/o:redhat:enterprise_linux:%{full_release_version}:%{?beta:beta}%{!?beta:GA}%{?variant_lowercase::%{variant_lowercase}}" +HOME_URL="https://www.redhat.com/" +BUG_REPORT_URL="https://bugzilla.redhat.com/" + +REDHAT_BUGZILLA_PRODUCT="%{product_family} %{base_release_version}" +REDHAT_BUGZILLA_PRODUCT_VERSION=%{full_release_version} +REDHAT_SUPPORT_PRODUCT="%{product_family}" +REDHAT_SUPPORT_PRODUCT_VERSION=%{full_release_version} +EOF +# write cpe to /etc/system/release-cpe +echo "cpe:/o:redhat:enterprise_linux:%{full_release_version}:%{?beta:beta}%{!?beta:GA}%{?variant_lowercase::%{variant_lowercase}}" | tr [A-Z] [a-z] > %{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 + +# 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 + +# 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} +%%rhel %{base_release_version} +%%dist %dist +%%el%{base_release_version} 1 +EOF + +# use unbranded datadir +mkdir -p -m 755 %{buildroot}/%{_datadir}/redhat-release +install -m 644 EULA %{buildroot}/%{_datadir}/redhat-release + +# use unbranded docdir +mkdir -p -m 755 %{buildroot}/%{_docdir}/redhat-release +install -m 644 GPL %{buildroot}/%{_docdir}/redhat-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/ + + +%clean +rm -rf %{buildroot} + +%files +%defattr(0644,root,root,0755) +/etc/redhat-release +/etc/system-release +/etc/centos-release +%config(noreplace) /etc/os-release +%config /etc/system-release-cpe +%config(noreplace) /etc/issue +%config(noreplace) /etc/issue.net +/etc/pki/rpm-gpg/ +/etc/rpm/macros.dist +%{_docdir}/redhat-release/* +%{_datadir}/redhat-release/* +%{_prefix}/lib/systemd/system-preset/* + +%changelog +* Fri Jun 13 2014 Karanbir Singh 7-0.el7 +- initial setup for centos-rc