1 |
%define Werror_cflags %nil |
2 |
# Modules always contain just 32-bit code |
3 |
%define _libdir %{_exec_prefix}/lib |
4 |
|
5 |
# 64bit intel machines use 32bit boot loader |
6 |
# (We cannot just redefine _target_cpu, as we'd get i386.rpm packages then) |
7 |
%ifarch x86_64 |
8 |
%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu} |
9 |
%global efi_arch x86_64-efi |
10 |
%endif |
11 |
|
12 |
%ifarch %arm |
13 |
%global efi_arch arm-uboot |
14 |
%endif |
15 |
|
16 |
%ifarch %ix86 |
17 |
%global efi_arch i386-efi |
18 |
%endif |
19 |
|
20 |
%global tarversion 2.02~beta2 |
21 |
%global pc_arch i386-pc |
22 |
%define git 10270 |
23 |
%define rel 3 |
24 |
|
25 |
Name: grub2 |
26 |
Version: 2.02 |
27 |
Release: %mkrel -c git%{git} %{rel} |
28 |
Summary: Bootloader with support for Linux, Multiboot and more |
29 |
Group: System/Boot and Init |
30 |
License: GPLv3+ and GPLv2 |
31 |
# unicode font is GPLv2 |
32 |
URL: http://www.gnu.org/software/grub/ |
33 |
Source0: ftp://alpha.gnu.org/gnu/grub/grub-%{tarversion}.tar.xz |
34 |
#Source0: ftp://ftp.gnu.org/gnu/grub/grub-%{tarversion}.tar.xz |
35 |
Source1: 90_persistent |
36 |
Source2: grub.default |
37 |
Source3: README.Mageia |
38 |
Source4: README.efi |
39 |
Source6: gitignore |
40 |
Source7: theme.txt |
41 |
# pf2 fonts may be regenerated in SOURCES using ./mkfonts |
42 |
Source8: mkfonts |
43 |
Source9: unicode.pf2 |
44 |
Source10: MageiaLogo-Bold-16.pf2 |
45 |
Source11: MageiaLogo-Bold-20.pf2 |
46 |
Source12: MageiaLogo-Bold-28.pf2 |
47 |
Source13: MageiaLogo-Regular-20.pf2 |
48 |
Source14: Mageia5-grub2-1024x768.png |
49 |
Source15: MageiaLogoFonts-bdf.tar.xz |
50 |
|
51 |
# |
52 |
# Fedora patches: |
53 |
# |
54 |
|
55 |
# generate with: |
56 |
# git diff grub-2.02-beta2..origin/master |
57 |
Patch0000: grub-2.02-beta2-to-origin-master.patch |
58 |
|
59 |
# generate all the patches after this with: |
60 |
# git format-patch fedora-diff-from-here..fedora-23 |
61 |
Patch0001: 0001-Migrate-PPC-from-Yaboot-to-Grub2.patch |
62 |
Patch0002: 0002-Add-fw_path-variable-revised.patch |
63 |
Patch0003: 0003-Add-support-for-linuxefi.patch |
64 |
Patch0004: 0004-Use-linuxefi-and-initrdefi-where-appropriate.patch |
65 |
Patch0005: 0005-Don-t-allow-insmod-when-secure-boot-is-enabled.patch |
66 |
Patch0006: 0006-Pass-x-hex-hex-straight-through-unmolested.patch |
67 |
Patch0007: 0007-Fix-crash-on-http.patch |
68 |
Patch0008: 0008-IBM-client-architecture-CAS-reboot-support.patch |
69 |
Patch0009: 0009-Add-vlan-tag-support.patch |
70 |
Patch0010: 0010-Add-X-option-to-printf-functions.patch |
71 |
Patch0011: 0011-DHCP-client-ID-and-UUID-options-added.patch |
72 |
Patch0012: 0012-Search-for-specific-config-file-for-netboot.patch |
73 |
Patch0013: 0013-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch |
74 |
Patch0014: 0014-Move-bash-completion-script-922997.patch |
75 |
Patch0015: 0015-for-ppc-reset-console-display-attr-when-clear-screen.patch |
76 |
Patch0016: 0016-Don-t-write-messages-to-the-screen.patch |
77 |
Patch0017: 0017-Don-t-print-GNU-GRUB-header.patch |
78 |
Patch0018: 0018-Don-t-add-to-highlighted-row.patch |
79 |
Patch0019: 0019-Message-string-cleanups.patch |
80 |
Patch0020: 0020-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch |
81 |
Patch0021: 0021-Use-the-correct-indentation-for-the-term-help-text.patch |
82 |
Patch0022: 0022-Indent-menu-entries.patch |
83 |
Patch0023: 0023-Fix-margins.patch |
84 |
Patch0024: 0024-Add-support-for-UEFI-operating-systems-returned-by-o.patch |
85 |
Patch0025: 0025-Disable-GRUB-video-support-for-IBM-power-machines.patch |
86 |
Patch0026: 0026-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch |
87 |
Patch0027: 0027-Use-linux16-when-appropriate-880840.patch |
88 |
Patch0028: 0028-Enable-pager-by-default.-985860.patch |
89 |
Patch0029: 0029-F10-doesn-t-work-on-serial-so-don-t-tell-the-user-to.patch |
90 |
Patch0030: 0030-Don-t-say-GNU-Linux-in-generated-menus.patch |
91 |
Patch0031: 0031-Don-t-draw-a-border-around-the-menu.patch |
92 |
Patch0032: 0032-Use-the-standard-margin-for-the-timeout-string.patch |
93 |
Patch0033: 0033-Fix-grub_script_execute_sourcecode-usage-on-ppc.patch |
94 |
Patch0034: 0034-Add-.eh_frame-to-list-of-relocations-stripped.patch |
95 |
Patch0035: 0035-Make-10_linux-work-with-our-changes-for-linux16-and-.patch |
96 |
Patch0036: 0036-Don-t-print-during-fdt-loading-method.patch |
97 |
Patch0037: 0037-Honor-a-symlink-when-generating-configuration-by-gru.patch |
98 |
Patch0038: 0038-Don-t-munge-raw-spaces-when-we-re-doing-our-cmdline-.patch |
99 |
Patch0039: 0039-Don-t-require-a-password-to-boot-entries-generated-b.patch |
100 |
Patch0040: 0040-Don-t-emit-Booting-.-message.patch |
101 |
Patch0041: 0041-Make-CTRL-and-ALT-keys-work-as-expected-on-EFI-syste.patch |
102 |
Patch0042: 0042-May-as-well-try-it.patch |
103 |
Patch0043: 0043-use-fw_path-prefix-when-fallback-searching-for-grub-.patch |
104 |
Patch0044: 0044-Try-mac-guid-etc-before-grub.cfg-on-tftp-config-file.patch |
105 |
Patch0045: 0045-trim-arp-packets-with-abnormal-size.patch |
106 |
Patch0046: 0046-Fix-convert-function-to-support-NVMe-devices.patch |
107 |
Patch0047: 0047-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch |
108 |
Patch0048: 0048-Switch-to-use-APM-Mustang-device-tree-for-hardware-t.patch |
109 |
Patch0049: 0049-Use-the-default-device-tree-from-the-grub-default-fi.patch |
110 |
Patch0050: 0050-reopen-SNP-protocol-for-exclusive-use-by-grub.patch |
111 |
Patch0051: 0051-Reduce-timer-event-frequency-by-10.patch |
112 |
Patch0052: 0052-always-return-error-to-UEFI.patch |
113 |
Patch0053: 0053-Suport-for-bi-endianess-in-elf-file.patch |
114 |
Patch0054: 0054-Add-grub_util_readlink.patch |
115 |
Patch0055: 0055-Make-editenv-chase-symlinks-including-those-across-d.patch |
116 |
Patch0056: 0056-Generate-OS-and-CLASS-in-10_linux-from-etc-os-releas.patch |
117 |
Patch0057: 0057-Fix-GRUB_DISABLE_SUBMENU-one-more-time.patch |
118 |
Patch0058: 0058-Minimize-the-sort-ordering-for-.debug-and-rescue-ker.patch |
119 |
Patch0059: 0059-Add-GRUB_DISABLE_UUID.patch |
120 |
Patch0060: 0060-Allow-fallback-to-include-entries-by-title-not-just-.patch |
121 |
Patch0061: 0061-Load-arm-with-SB-enabled.patch |
122 |
Patch0062: 0062-Try-prefix-if-fw_path-doesn-t-work.patch |
123 |
Patch0063: 0063-Try-to-emit-linux16-initrd16-and-linuxefi-initrdefi-.patch |
124 |
Patch0064: 0064-Update-to-minilzo-2.08.patch |
125 |
Patch0065: 0065-Make-grub2-mkconfig-construct-titles-that-look-like-.patch |
126 |
Patch0066: 0066-Make-rescue-and-debug-entries-sort-right-again-in-gr.patch |
127 |
Patch0067: 0067-Make-.gitignore-suck-way-less.patch |
128 |
Patch0068: 0068-Update-info-with-grub.cfg-netboot-selection-order-11.patch |
129 |
Patch0069: 0069-Use-Distribution-Package-Sort-for-grub2-mkconfig-112.patch |
130 |
Patch0070: 0070-Add-friendly-grub2-password-config-tool-985962.patch |
131 |
Patch0071: 0071-Make-exit-take-a-return-code.patch |
132 |
Patch0072: 0072-Add-some-__unused__-where-gcc-5.x-is-more-picky-abou.patch |
133 |
Patch0073: 0073-Fix-race-in-EFI-validation.patch |
134 |
Patch0074: 0074-Mark-po-exclude.pot-as-binary-so-git-won-t-try-to-di.patch |
135 |
Patch0075: 0075-Fix-security-issue-when-reading-username-and-passwor.patch |
136 |
Patch0076: 0076-01_users-Handle-GRUB_PASSWORD-better.patch |
137 |
|
138 |
|
139 |
|
140 |
|
141 |
# And these are: |
142 |
# git checkout debuginfo |
143 |
# git format-patch fedora-23.. |
144 |
Patch10001: 10001-Put-the-correct-.file-directives-in-our-.S-files.patch |
145 |
Patch10002: 10002-Make-efi-machines-load-an-env-block-from-a-variable.patch |
146 |
Patch10003: 10003-Make-it-possible-to-enabled-build-id-sha1.patch |
147 |
#Patch10004: 10004-Don-t-tell-the-compiler-to-do-annoying-things-with-f.patch |
148 |
Patch10005: 10005-Add-grub_qdprintf-grub_dprintf-without-the-file-line.patch |
149 |
Patch10006: 10006-Make-a-gdb-dprintf-that-tells-us-load-addresses.patch |
150 |
|
151 |
# |
152 |
# Mga patches: |
153 |
# |
154 |
Patch20001: grub2-2.00-mga-add_failsafe-10_linux.in.patch |
155 |
|
156 |
BuildRequires: flex bison binutils python |
157 |
BuildRequires: ncurses-devel bzip2-devel |
158 |
BuildRequires: freetype-devel libusb-devel |
159 |
BuildRequires: ruby |
160 |
BuildRequires: glibc-static-devel |
161 |
BuildRequires: liblzo-devel |
162 |
BuildRequires: rpm-devel |
163 |
BuildRequires: autoconf automake autogen device-mapper-devel |
164 |
BuildRequires: freetype-devel gettext-devel git |
165 |
BuildRequires: texinfo |
166 |
BuildRequires: help2man |
167 |
BuildRequires: fuse-devel |
168 |
|
169 |
Conflicts: %{name}-efi |
170 |
Provides: bootloader |
171 |
Provides: grub2bootloader = %{version}-%{release} |
172 |
Requires: %{name}-common = %{version}-%{release} |
173 |
|
174 |
%description |
175 |
This is the second version of the GRUB (Grand Unified Boot-loader), a highly |
176 |
configurable and customizable boot-loader with modular architecture. |
177 |
It supports a wide range of kernel formats, file systems, computer |
178 |
architectures and hardware devices. |
179 |
Refer to the README.Mageia file that is part of this package's documentation |
180 |
for more information. |
181 |
|
182 |
%ifnarch %arm |
183 |
%package efi |
184 |
Summary: Boot-loader with support for EFI |
185 |
Group: System/Boot and Init |
186 |
|
187 |
Conflicts: %{name} |
188 |
Requires(post): efibootmgr |
189 |
Provides: bootloader |
190 |
Provides: grub2bootloader = %{version}-%{release} |
191 |
Requires: %{name}-common = %{version}-%{release} |
192 |
|
193 |
%description efi |
194 |
This is the second version of the GRUB (Grand Unified Boot-loader), a highly |
195 |
configurable and customizable boot-loader with modular architecture. |
196 |
It supports a wide range of kernel formats, file systems, computer |
197 |
architectures and hardware devices. |
198 |
************************** WARNING ************************ |
199 |
Do not attempt to install this package on a system which is not |
200 |
already using UEFI mode to boot. You cannot switch to UEFI mode by installing |
201 |
this package, the system must be installed in UEFI mode to use it, when it |
202 |
will be installed by default. |
203 |
%endif |
204 |
|
205 |
%ifarch %arm |
206 |
%package uboot |
207 |
Summary: Boot-loader with support for UBOOT |
208 |
Group: System/Boot and Init |
209 |
|
210 |
Provides: bootloader |
211 |
Provides: grub2bootloader = %{version}-%{release} |
212 |
Requires: %{name}-common = %{version}-%{release} |
213 |
|
214 |
%description uboot |
215 |
configurable and customizable boot-loader with modular architecture. |
216 |
It supports a wide range of kernel formats, file systems, computer |
217 |
architectures and hardware devices. |
218 |
%endif |
219 |
|
220 |
%package common |
221 |
Summary: Provides files common to both grub2 and grub2-efi |
222 |
Group: System/Boot and Init |
223 |
Conflicts: memtest86+ < 5.01-7 |
224 |
Conflicts: %{name} < 2.02-0.git9752.19.mga5 |
225 |
Conflicts: %{name}-efi < 2.02-0.git9752.19.mga5 |
226 |
#Recommends: %{name}-mageia-theme = %{version}-%{release} |
227 |
Recommends: os-prober >= 1.53 |
228 |
Recommends: xorriso |
229 |
Recommends: memtest86+ >= 5.01-7 |
230 |
Requires: grub2bootloader = %{version}-%{release} |
231 |
|
232 |
%description common |
233 |
Common files used by both grub2 and grub2-efi. |
234 |
|
235 |
%package mageia-theme |
236 |
Summary: Provides a graphical theme with a custom Mageia background for grub2 |
237 |
Group: System/Boot and Init |
238 |
|
239 |
Requires: grub2bootloader = %{version}-%{release} |
240 |
Conflicts: grub2-mageia3-theme-dejavu |
241 |
BuildArch: noarch |
242 |
|
243 |
%description mageia-theme |
244 |
This package provides a custom Mageia graphical theme. |
245 |
It is provided as a separate package so it may be easily excluded from |
246 |
minimal installations where a graphical theme is not required. |
247 |
|
248 |
%prep |
249 |
%setup -q -n grub-%{tarversion} |
250 |
|
251 |
cp %{SOURCE6} .gitignore |
252 |
git init |
253 |
echo '![[:digit:]][[:digit:]]_*.in' > util/grub.d/.gitignore |
254 |
echo '!*.[[:digit:]]' > util/.gitignore |
255 |
git config user.email "%{name}-owner@fedoraproject.org" |
256 |
git config user.name "Fedora Ninjas" |
257 |
git config gc.auto 0 |
258 |
git add . |
259 |
git commit -a -q -m "%{tarversion} baseline." |
260 |
git am %{patches} </dev/null |
261 |
git config --unset user.email |
262 |
git config --unset user.name |
263 |
|
264 |
# README.Mageia |
265 |
cp %{SOURCE3} . |
266 |
|
267 |
%ifnarch %arm |
268 |
# README.efi |
269 |
cp %{SOURCE4} . |
270 |
|
271 |
cd .. |
272 |
rm -rf grub-efi-%{tarversion} |
273 |
mv grub-%{tarversion} grub-efi-%{tarversion} |
274 |
%endif |
275 |
|
276 |
%setup -q -n grub-%{tarversion} |
277 |
|
278 |
cp %{SOURCE6} .gitignore |
279 |
git init |
280 |
echo '![[:digit:]][[:digit:]]_*.in' > util/grub.d/.gitignore |
281 |
echo '!*.[[:digit:]]' > util/.gitignore |
282 |
git config user.email "%{name}-owner@fedoraproject.org" |
283 |
git config user.name "Fedora Ninjas" |
284 |
git config gc.auto 0 |
285 |
git add . |
286 |
git commit -a -q -m "%{tarversion} baseline." |
287 |
git am %{patches} </dev/null |
288 |
git config --unset user.email |
289 |
git config --unset user.name |
290 |
find . -name "*.0???" -delete |
291 |
|
292 |
# README.Mageia |
293 |
cp %{SOURCE3} . |
294 |
# README.efi |
295 |
cp %{SOURCE4} . |
296 |
|
297 |
%build |
298 |
cd .. |
299 |
pushd grub-%{tarversion} |
300 |
./autogen.sh |
301 |
%configure2_5x TARGET_LDFLAGS=-static \ |
302 |
%ifarch %arm |
303 |
--with-platform=uboot \ |
304 |
%else |
305 |
--with-platform=pc \ |
306 |
%endif |
307 |
--enable-grub-emu-usb \ |
308 |
--disable-werror \ |
309 |
--enable-grub-mkfont \ |
310 |
--program-transform-name=s,grub,%{name}, \ |
311 |
--with-bootdir=/boot \ |
312 |
--with-grubdir=/%{name} \ |
313 |
CFLAGS="" |
314 |
%make |
315 |
popd |
316 |
|
317 |
%ifnarch %arm |
318 |
pushd grub-efi-%{tarversion} |
319 |
./autogen.sh |
320 |
%configure2_5x TARGET_LDFLAGS=-static \ |
321 |
--with-platform=efi \ |
322 |
%ifarch x86_64 |
323 |
--target=x86_64 \ |
324 |
%endif |
325 |
--enable-grub-emu-usb \ |
326 |
--disable-werror \ |
327 |
--enable-grub-mkfont \ |
328 |
--program-transform-name=s,grub,%{name}, \ |
329 |
--with-bootdir=/boot \ |
330 |
--with-grubdir=/%{name} \ |
331 |
CFLAGS="" |
332 |
%make |
333 |
popd |
334 |
%endif |
335 |
|
336 |
%install |
337 |
cd .. |
338 |
%ifnarch %arm |
339 |
pushd grub-efi-%{tarversion} |
340 |
%makeinstall_std |
341 |
popd |
342 |
%endif |
343 |
|
344 |
pushd grub-%{tarversion} |
345 |
%makeinstall_std |
346 |
|
347 |
# (bor) grub.info is harcoded in sources |
348 |
mv %{buildroot}%{_infodir}/grub.info %{buildroot}%{_infodir}/%{name}.info |
349 |
|
350 |
# Script that makes part of grub.cfg persist across updates |
351 |
install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/grub.d |
352 |
|
353 |
# Font |
354 |
install -d %{buildroot}/boot/%{name}/fonts |
355 |
install -D %{SOURCE9} %{buildroot}/boot/%{name}/fonts |
356 |
|
357 |
# Theme |
358 |
install -d %{buildroot}/boot/%{name}/themes/maggy |
359 |
install -D %{SOURCE7} %{buildroot}/boot/%{name}/themes/maggy |
360 |
install -D %{SOURCE10} %{buildroot}/boot/%{name}/themes/maggy |
361 |
install -D %{SOURCE11} %{buildroot}/boot/%{name}/themes/maggy |
362 |
install -D %{SOURCE12} %{buildroot}/boot/%{name}/themes/maggy |
363 |
install -D %{SOURCE13} %{buildroot}/boot/%{name}/themes/maggy |
364 |
install -D %{SOURCE14} %{buildroot}/boot/%{name}/themes/maggy |
365 |
|
366 |
# Ghost config files |
367 |
install -d %{buildroot}/boot/%{name} |
368 |
|
369 |
# Workaround for RHL Bug 817187 |
370 |
install -d %{buildroot}%{_datadir}/locale/en/LC_MESSAGES |
371 |
ln -s %{_datadir}/locale/en@quot/LC_MESSAGES/grub.mo %{buildroot}%{_datadir}/locale/en/LC_MESSAGES/grub.mo |
372 |
|
373 |
cat > %{buildroot}/boot/%{name}/custom.cfg <<EOF |
374 |
# Set non-graphical text/background colours |
375 |
set menu_color_normal=cyan/blue |
376 |
set menu_color_highlight=white/blue |
377 |
|
378 |
# Add any extra custom menu entries in here: |
379 |
|
380 |
EOF |
381 |
|
382 |
# Provide 'update-grub' and update-grub2 symlink for *buntu exiles ;) |
383 |
cat > %{buildroot}%{_bindir}/update-grub <<EOF |
384 |
#!/bin/sh |
385 |
su --login root -c "/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg" |
386 |
|
387 |
EOF |
388 |
chmod +x %{buildroot}%{_bindir}/update-grub |
389 |
ln -s %{_bindir}/update-grub %{buildroot}%{_bindir}/update-grub2 |
390 |
|
391 |
# Defaults |
392 |
install -m 644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/default/grub |
393 |
|
394 |
# Remove "GNU/Linux" in menu selections |
395 |
sed -i 's/ GNU\/Linux//' %{buildroot}%{_sysconfdir}/grub.d/10_linux |
396 |
|
397 |
%find_lang grub |
398 |
|
399 |
popd |
400 |
|
401 |
%post |
402 |
# On update re-install grub2 to where it was installed by drakboot if possible, |
403 |
# otherwise next boot may fail due to mismatched boot code. |
404 |
|
405 |
if [ $1 -eq 2 ]; then |
406 |
if [ -f /boot/grub2/install.sh -a -x /usr/sbin/detectloader ]; then |
407 |
LOADER=$(/usr/sbin/detectloader) |
408 |
[ "$LOADER" = "GRUB2" ] && /boot/grub2/install.sh ||: |
409 |
fi |
410 |
rm -f /etc/default/grub.rpm* |
411 |
fi |
412 |
|
413 |
%ifnarch %arm |
414 |
%post efi |
415 |
# On update re-install grub2 to where it was installed by drakboot if possible, |
416 |
# otherwise next boot may fail due to mismatched boot code. |
417 |
|
418 |
if [ $1 -eq 2 ]; then |
419 |
if [ -f /boot/grub2/install.sh -a -x /usr/sbin/detectloader ]; then |
420 |
LOADER=$(/usr/sbin/detectloader) |
421 |
[ "$LOADER" = "GRUB2" ] && /boot/grub2/install.sh ||: |
422 |
fi |
423 |
rm -f /etc/default/grub.rpm* |
424 |
fi |
425 |
%endif |
426 |
|
427 |
%post mageia-theme |
428 |
# Don't install if updating |
429 |
if [ $1 -eq 1 ] ; then |
430 |
# Remove trailing blank lines from /etc/default/grub |
431 |
sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' %{_sysconfdir}/default/grub |
432 |
# Check that /etc/default/grub ends in a linefeed |
433 |
[ "$(tail -n 1 %{_sysconfdir}/default/grub | wc --lines)" = "1" ] || echo >> %{_sysconfdir}/default/grub |
434 |
# Add theme |
435 |
echo "GRUB_THEME=/boot/grub2/themes/maggy/theme.txt" >> %{_sysconfdir}/default/grub |
436 |
fi |
437 |
|
438 |
# If updating from below 2.02-0.git10101.4 then re-make grub.cfg once. |
439 |
# grub2 dropped ownership of grub.cfg to avoid rpmnew being created. |
440 |
# Remove rpmnew and after new grub.cfg is created remove rpmsave. |
441 |
%triggerpostun common -- %{name} < 2.02-0.git10101.4, %{name}-efi < 2.02-0.git10101.4 |
442 |
rm -f /boot/%{name}/grub.cfg.rpmnew |
443 |
%{name}-mkconfig -o /boot/%{name}/grub.cfg && rm -f /boot/%{name}/grub.cfg.rpmsave |
444 |
# Take this opportunity to remove some unwanted logs |
445 |
rm -f /var/log/%{name}_preun.log |
446 |
rm -f /var/log/%{name}_post.log |
447 |
rm -f /var/log/%{name}_theme_postun.log |
448 |
|
449 |
%preun |
450 |
# Only if uninstalling |
451 |
if [ $1 -eq 0 ]; then |
452 |
rm -rf /boot/%{name}/%{pc_arch} |
453 |
rm -rf /boot/%{name}/locale |
454 |
fi |
455 |
|
456 |
%ifnarch %arm |
457 |
%preun efi |
458 |
# Only if uninstalling |
459 |
if [ $1 -eq 0 ]; then |
460 |
rm -rf /boot/%{name}/%{efi_arch} |
461 |
rm -rf /boot/%{name}/locale |
462 |
fi |
463 |
%endif |
464 |
|
465 |
%postun mageia-theme |
466 |
# Only if uninstalling theme |
467 |
if [ $1 -eq 0 ]; then |
468 |
# Remove theme from config |
469 |
sed -i '/GRUB_THEME=\/boot\/grub2\/themes\/maggy\/theme.txt/d' %{_sysconfdir}/default/grub |
470 |
fi |
471 |
|
472 |
%ifnarch %arm |
473 |
%files |
474 |
%dir %{_libdir}/grub |
475 |
%dir %{_libdir}/grub/i386-pc |
476 |
%{_libdir}/grub/i386-pc/* |
477 |
%endif |
478 |
|
479 |
%ifnarch %arm |
480 |
%files efi |
481 |
%doc README.efi |
482 |
%dir %{_libdir}/grub |
483 |
%dir %{_libdir}/grub/%{efi_arch} |
484 |
%{_libdir}/grub/%{efi_arch}/* |
485 |
%endif |
486 |
|
487 |
%ifarch %arm |
488 |
%files uboot |
489 |
%dir %{_libdir}/grub |
490 |
%dir %{_libdir}/grub/%{efi_arch} |
491 |
%{_libdir}/grub/%{efi_arch}/* |
492 |
%endif |
493 |
|
494 |
%files common -f grub.lang |
495 |
%doc COPYING NEWS README THANKS TODO README.Mageia |
496 |
%dir /boot/%{name} |
497 |
%dir /boot/%{name}/fonts |
498 |
%dir /boot/%{name}/themes |
499 |
%{_infodir}/* |
500 |
%{_bindir}/%{name}-* |
501 |
%{_bindir}/update-grub |
502 |
%{_bindir}/update-grub2 |
503 |
%{_sbindir}/%{name}-* |
504 |
%{_datarootdir}/bash-completion/completions/grub |
505 |
%{_sysconfdir}/grub.d/README |
506 |
%{_sysconfdir}/grub.d/00_header |
507 |
%{_sysconfdir}/grub.d/01_users |
508 |
%{_sysconfdir}/grub.d/10_linux |
509 |
%{_sysconfdir}/grub.d/20_linux_xen |
510 |
%{_sysconfdir}/grub.d/20_ppc_terminfo |
511 |
%{_sysconfdir}/grub.d/30_os-prober |
512 |
%{_sysconfdir}/grub.d/90_persistent |
513 |
%config(noreplace) %{_sysconfdir}/grub.d/40_custom |
514 |
%config(noreplace) %{_sysconfdir}/grub.d/41_custom |
515 |
%config(noreplace) %{_sysconfdir}/default/grub |
516 |
%{_datadir}/grub |
517 |
%config(noreplace) /boot/%{name}/custom.cfg |
518 |
%{_mandir}/man1/%{name}-*.1* |
519 |
%{_mandir}/man8/%{name}-*.8* |
520 |
|
521 |
%files mageia-theme |
522 |
/boot/%{name}/fonts/unicode.pf2 |
523 |
%dir /boot/%{name}/themes/maggy |
524 |
/boot/%{name}/themes/maggy/* |