Fixed post and preun sections of the spec file.
This commit is contained in:
parent
331d278737
commit
fc4e404fd0
@ -1 +1,2 @@
|
|||||||
memtest86+-2_11-4_fc10:HEAD:memtest86+-2.11-4.fc10.src.rpm:1236973348
|
memtest86+-2_11-4_fc10:HEAD:memtest86+-2.11-4.fc10.src.rpm:1236973348
|
||||||
|
memtest86+-2_11-5_fc10:HEAD:memtest86+-2.11-5.fc10.src.rpm:1238510694
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
%define __spec_install_post /usr/lib/rpm/brp-compress
|
%define __spec_install_post /usr/lib/rpm/brp-compress
|
||||||
# Turn off debuginfo package
|
# Turn off debuginfo package
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
%bcond_with update-grub.conf
|
%bcond_with update_grub
|
||||||
|
|
||||||
Summary: Stand-alone memory tester for x86 and x86-64 computers
|
Summary: Stand-alone memory tester for x86 and x86-64 computers
|
||||||
Name: memtest86+
|
Name: memtest86+
|
||||||
Version: 2.11
|
Version: 2.11
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
ExclusiveArch: %{ix86} x86_64
|
ExclusiveArch: %{ix86} x86_64
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -15,11 +15,13 @@ Source0: http://www.memtest.org/download/%{version}/%{name}-%{version}.tar.gz
|
|||||||
URL: http://www.memtest.org
|
URL: http://www.memtest.org
|
||||||
Source1: new-memtest-pkg
|
Source1: new-memtest-pkg
|
||||||
Source2: memtest-setup
|
Source2: memtest-setup
|
||||||
Requires(preun): coreutils
|
|
||||||
# require glibc-devel.i386 via this file:
|
# require glibc-devel.i386 via this file:
|
||||||
BuildRequires: %{_includedir}/gnu/stubs-32.h
|
BuildRequires: %{_includedir}/gnu/stubs-32.h
|
||||||
BuildRequires: compat-gcc-34
|
BuildRequires: compat-gcc-34
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
Requires: /sbin/grubby
|
||||||
|
Requires(preun): coreutils
|
||||||
|
Requires(post): coreutils
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Memtest86+ is a thorough stand-alone memory test for x86 and x86-64
|
Memtest86+ is a thorough stand-alone memory test for x86 and x86-64
|
||||||
@ -56,43 +58,23 @@ install -m755 %{SOURCE2} %{buildroot}%{_sbindir}/memtest-setup
|
|||||||
sed -i 's/\r//' $RPM_BUILD_DIR/%{name}-%{version}/README
|
sed -i 's/\r//' $RPM_BUILD_DIR/%{name}-%{version}/README
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if %{with update-grub.conf}
|
%if %{with update_grub}
|
||||||
if [ -x /sbin/grubby ] ; then
|
/usr/sbin/memtest-setup
|
||||||
/sbin/grubby \
|
|
||||||
--add-kernel="/boot/%{name}-%{version}" \
|
|
||||||
--title "Memtest86+ (%{version})"
|
|
||||||
|
|
||||||
sed -i -e's,kernel /%{name}-%{version},kernel --type=netbsd /%{name}-%{version},' /boot/grub/grub.conf
|
|
||||||
fi
|
|
||||||
%else
|
%else
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
************************************************
|
************************************************
|
||||||
* REMINDER: Please update your /etc/grub.conf *
|
* REMINDER: Please update your /etc/grub.conf *
|
||||||
* file and add the memtest86+ boot entry, *
|
* file and add the memtest86+ boot entry, *
|
||||||
* by running /usr/sbin/memtest-setup as root. *
|
* by running /usr/sbin/memtest-setup as root. *
|
||||||
************************************************
|
************************************************
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
%endif
|
|
||||||
|
|
||||||
%postun
|
|
||||||
%if %{with update-grub.conf}
|
|
||||||
if [ -x /sbin/grubby ] ; then
|
|
||||||
sed -i -e's,kernel --type=netbsd /%{name}-%{version},kernel /%{name}-%{version},' /boot/grub/grub.conf
|
|
||||||
/sbin/grubby --remove-kernel="/boot/%{name}-%{version}"
|
|
||||||
fi
|
|
||||||
%else
|
|
||||||
cat << EOF
|
|
||||||
|
|
||||||
************************************************
|
|
||||||
* REMINDER: Please update your /etc/grub.conf *
|
|
||||||
* file and remove any memtest86+ boot entry. *
|
|
||||||
************************************************
|
|
||||||
|
|
||||||
EOF
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%preun
|
||||||
|
sed -i -e's,kernel --type=netbsd /%{name}-%{version},kernel /%{name}-%{version},' /boot/grub/grub.conf
|
||||||
|
/sbin/new-memtest-pkg --remove %{version}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -105,6 +87,10 @@ rm -rf %{buildroot}
|
|||||||
%{_sbindir}/memtest-setup
|
%{_sbindir}/memtest-setup
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 31 2009 Paulo Roma <roma@lcg.ufrj.br> - 2.11-5
|
||||||
|
- Changed postun for preun.
|
||||||
|
- Calling memtest-setup in case of updating grub.conf
|
||||||
|
|
||||||
* Mon Mar 11 2009 Paulo Roma <roma@lcg.ufrj.br> - 2.11-4
|
* Mon Mar 11 2009 Paulo Roma <roma@lcg.ufrj.br> - 2.11-4
|
||||||
- Updated to 2.11
|
- Updated to 2.11
|
||||||
- Patched for booting from grub.
|
- Patched for booting from grub.
|
||||||
|
Loading…
Reference in New Issue
Block a user