packages: grub2/grub2.spec, grub2/pld-mkconfigdir.patch - one custom.cfg is...
glen
glen at pld-linux.org
Tue Nov 15 23:28:06 CET 2011
Author: glen Date: Tue Nov 15 22:28:06 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- one custom.cfg is enough, prefer one that needs to grub regeneration in grub dir; rel 8
---- Files affected:
packages/grub2:
grub2.spec (1.114 -> 1.115) , pld-mkconfigdir.patch (1.2 -> 1.3)
---- Diffs:
================================================================
Index: packages/grub2/grub2.spec
diff -u packages/grub2/grub2.spec:1.114 packages/grub2/grub2.spec:1.115
--- packages/grub2/grub2.spec:1.114 Mon Oct 17 10:51:13 2011
+++ packages/grub2/grub2.spec Tue Nov 15 23:28:01 2011
@@ -34,7 +34,7 @@
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
@@ -238,7 +238,6 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/sysconfig,%{_sysconfdir}/grub.d}
%{__make} install \
pkgdatadir=%{_libexecdir} \
@@ -250,11 +249,18 @@
# 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
@@ -263,8 +269,6 @@
# 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?)
@@ -288,6 +292,13 @@
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
@@ -373,12 +384,8 @@
%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
@@ -400,6 +407,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.115 2011/11/15 22:28:01 glen
+- one custom.cfg is enough, prefer one that needs to grub regeneration in grub dir; rel 8
+
Revision 1.114 2011/10/17 08:51:13 glen
- add bash-completion package
================================================================
Index: packages/grub2/pld-mkconfigdir.patch
diff -u packages/grub2/pld-mkconfigdir.patch:1.2 packages/grub2/pld-mkconfigdir.patch:1.3
--- packages/grub2/pld-mkconfigdir.patch:1.2 Thu Sep 8 13:21:08 2011
+++ packages/grub2/pld-mkconfigdir.patch Tue Nov 15 23:28:01 2011
@@ -20,12 +20,3 @@
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
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/grub2/grub2.spec?r1=1.114&r2=1.115&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/grub2/pld-mkconfigdir.patch?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list