]> git.pld-linux.org Git - packages/grub2.git/commitdiff
- one custom.cfg is enough, prefer one that needs to grub regeneration in grub dir... auto/th/grub2-1_99-8 auto/ti/grub2-1_99-8
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 15 Nov 2011 22:28:01 +0000 (22:28 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    grub2.spec -> 1.115
    pld-mkconfigdir.patch -> 1.3

grub2.spec
pld-mkconfigdir.patch

index 86ad43811b463782a3deff3b982c64cd5288f4a3..914d71aa6368a41130ec3788c4d970b0cbaa773f 100644 (file)
@@ -33,7 +33,7 @@ Summary(pl.UTF-8):    GRUB2 - bootloader dla x86 i ppc
 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
@@ -237,7 +237,6 @@ AWK=gawk \
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{_sysconfdir}/grub.d}
 
 %{__make} install \
        pkgdatadir=%{_libexecdir} \
@@ -249,11 +248,18 @@ install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{_sysconfdir}/grub.d}
 # 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
@@ -262,8 +268,6 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 # 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?)
@@ -287,6 +291,13 @@ fi
 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
@@ -372,12 +383,8 @@ echo "Grub was upgraded, trying to setup it to boot sector"
 %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
index 5712d8e2b3540e4da607801ade48fd1ced282c07..e8bc48ed6c3059b728a0499ef341617bab7f07c8 100644 (file)
  grubdatadir = $(datadir)/`echo @PACKAGE_TARNAME@ | sed '$(transform)'`
  platformdir = $(pkglibrootdir)/$(target_cpu)-$(platform)
  
---- grub-1.97.1/util/grub.d/40_custom.in~      2009-11-09 17:48:16.000000000 +0200
-+++ grub-1.97.1/util/grub.d/40_custom.in       2010-01-12 12:37:52.608575356 +0200
-@@ -1,5 +1,2 @@
- #!/bin/sh
--exec tail -n +3 $0
--# This file provides an easy way to add custom menu entries.  Simply type the
--# menu entries you want to add after this comment.  Be careful not to change
--# the 'exec tail' line above.
-+cat /etc/grub.d/custom.cfg
This page took 1.278942 seconds and 4 git commands to generate.