Summary(pt_BR.UTF-8): Gerenciador de inicialização GRUB2
Name: grub2
Version: 1.99
-Release: 7
+Release: 8
License: GPL v2
Group: Base
Source0: http://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{_sysconfdir}/grub.d}
%{__make} install \
pkgdatadir=%{_libexecdir} \
# this must be after 'make install'
install -d $RPM_BUILD_ROOT%{_libexecdir}/locale
-cp -a docs/grub.cfg $RPM_BUILD_ROOT%{_libexecdir}
+cp -p docs/grub.cfg $RPM_BUILD_ROOT%{_libexecdir}
+# grub.d/41_custom
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/custom.cfg
+%{__rm} $RPM_BUILD_ROOT/lib/grub.d/40_custom
+
install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/update-grub
-cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8/update-grub.8
-cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/grub
-cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/grub.d/custom.cfg
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8/update-grub.8
+
+install -d $RPM_BUILD_ROOT/etc/sysconfig
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/grub
+
+# rm -f, because it sometimes exists, sometimes not, depending which texlive you have installed
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
# deprecated. we don't need it
# core.img - bootable image generated by grub-mkimage(1) via grub-install(1)
touch $RPM_BUILD_ROOT%{_libexecdir}/core.img
touch $RPM_BUILD_ROOT%{_libexecdir}/device.map
-# grub.d/41_custom
-touch $RPM_BUILD_ROOT%{_libexecdir}/custom.cfg
# needs to be exactly 1KiB
# but we're ghosting it. so whom are we kidding here? :P (maybe %config it in future?)
echo "Grub was upgraded, trying to setup it to boot sector"
/sbin/grub-install '(hd0)' || :
+%triggerpostun -- %{name} < 1.99-7.3
+# migrate /etc/grub.d/custom.cfg.rpmsave -> /boot/grub/custom.cfg
+if [ -f %{_sysconfdir}/grub.d/custom.cfg.rpmsave ]; then
+ cp -f %{_libexecdir}/custom.cfg{,.rpmnew}
+ mv -f %{_sysconfdir}/grub.d/custom.cfg.rpmsave %{_libexecdir}/custom.cfg
+fi
+
%files -f grub.lang
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README THANKS TODO
%attr(755,root,root) /lib/grub.d/10_linux
%attr(755,root,root) /lib/grub.d/20_linux_xen
%attr(755,root,root) /lib/grub.d/30_os-prober
-%attr(755,root,root) /lib/grub.d/40_custom
%attr(755,root,root) /lib/grub.d/41_custom
-%dir %attr(750,root,root) %{_sysconfdir}/grub.d
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/grub.d/custom.cfg
-
%ifarch %{ix86} %{x8664}
%attr(755,root,root) %{_sbindir}/grub-mkdevicemap
%attr(755,root,root) %{_sbindir}/grub-probe