Alan Pevec
2009-Feb-27 01:31 UTC
[Ovirt-devel] [PATCH node] add ovirt-node-release subpackage
Provides /etc/ovirt-release and /etc/issue* files. Remove /etc/issue generation from o-install-stateless script. Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> Signed-off-by: Alan Pevec <apevec at redhat.com> --- ovirt-node.spec.in | 28 ++++++++++++++++++++++++++++ scripts/ovirt-install-node-stateless | 22 ---------------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in index 84f10a3..1c5fd58 100644 --- a/ovirt-node.spec.in +++ b/ovirt-node.spec.in @@ -1,3 +1,6 @@ +%define product_family oVirt Node +%define beta Beta + Summary: The oVirt Node daemons/scripts Name: ovirt-node Version: @VERSION@ @@ -87,6 +90,14 @@ Conflicts: redhat-artwork <= 5.0.5 The ovirt-logos package contains various image files which can be used by the bootloader, anaconda, and other related tools. +%package release +Summary: %{product_family} release file +Group: System Environment/Base +Obsoletes: redhat-release +Provides: redhat-release +%description release +%{product_family} release files. + %package selinux Summary: SELinux policy module supporting ovirt-node Group: System Environment/Base @@ -191,6 +202,15 @@ mkdir -p %{buildroot}/usr/lib/anaconda-runtime install -p -m 644 images/syslinux-vesa-splash.jpg %{buildroot}/usr/lib/anaconda-runtime # ovirt-logos +# release files +echo "%{product_family} release %{version}%{?beta: %{beta}} (%{release})" > %{buildroot}/etc/ovirt-release +cp %{buildroot}/etc/ovirt-release %{buildroot}/etc/issue +echo "Kernel \r on an \m (\l)" >> %{buildroot}/etc/issue +cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net +echo >> %{buildroot}/etc/issue +ln -s ovirt-release %{buildroot}/etc/redhat-release +ln -s ovirt-release %{buildroot}/etc/system-release + # ovirt-config-boot post-install hooks %{__install} -d -m0755 %{buildroot}%{_sysconfdir}/ovirt-config-boot.d @@ -252,6 +272,14 @@ if [ $1 -eq 0 ] ; then done fi +%files release +%defattr(-,root,root) +%attr(0644,root,root) /etc/ovirt-release +/etc/redhat-release +/etc/system-release +%config(noreplace) %attr(0644,root,root) /etc/issue +%config(noreplace) %attr(0644,root,root) /etc/issue.net + %files selinux %defattr(-,root,root,0755) %doc SELinux/* diff --git a/scripts/ovirt-install-node-stateless b/scripts/ovirt-install-node-stateless index e7b36d4..705c491 100755 --- a/scripts/ovirt-install-node-stateless +++ b/scripts/ovirt-install-node-stateless @@ -28,25 +28,3 @@ rm -f /etc/libvirt/qemu/networks/autostart/default.xml # remove the /etc/krb5.conf file; it will be fetched on bootup rm -f /etc/krb5.conf - -g=$(printf '\33[1m\33[32m') # similar to g=$(tput bold; tput setaf 2) -n=$(printf '\33[m') # similar to n=$(tput sgr0) -version=$(rpm -q --qf '%{version}' ovirt-node) -release=$(rpm -q --qf '%{release}' ovirt-node) -cat <<EOF > /etc/issue - - 888 888 ${g}d8b$n 888 - 888 888 ${g}Y8P$n 888 - 888 888 888 - .d88b. Y88b d88P 888 888d888 888888 - d88''88b Y88b d88P 888 888P' 888 - 888 888 Y88o88P 888 888 888 - Y88..88P Y888P 888 888 Y88b. - 'Y88P' Y8P 888 888 'Y888 - - oVirt Node release ${version}-${release} - - Virtualization just got the ${g}Green Light$n - -EOF -cp -p /etc/issue /etc/issue.net -- 1.6.0.6