]>
Commit | Line | Data |
---|---|---|
f97cafb4 | 1 | # TODO |
dc6928bc | 2 | # - reap out which in probe scripts and drop R: which |
f97cafb4 | 3 | # - subpackages? e.g. modules and utils |
bcd6a47e | 4 | # - check where is that locale path: /boot/grub/locale and fix it or change it |
8fcee4aa ER |
5 | # - grubemu notes |
6 | # --enable-grub-emu-usb conflicts with --enable-grub-emu-pci, emu-pci seems experimental | |
7 | # - to build and install the `grub-emu' debugging utility we need to re-run build with --target=emu | |
8 | # - put grub-emu to subpackage if it is fixed | |
f97cafb4 | 9 | # |
90feddde | 10 | # Conditional build: |
1536aaf2 | 11 | %bcond_with grubemu # build grub-emu debugging utility |
b06c130d | 12 | %bcond_without efiemu # build efiemu runtimes |
1536aaf2 JK |
13 | %bcond_without pc # do not build for PC BIOS platform |
14 | %bcond_without efi # do not build for EFI platform | |
b06c130d | 15 | |
50ffb0ba | 16 | %ifnarch %{ix86} %{x8664} x32 |
feaacba3 JB |
17 | %undefine with_pc |
18 | %endif | |
50ffb0ba | 19 | %ifnarch %{ix86} %{x8664} x32 ia64 |
feaacba3 JB |
20 | %undefine with_efi |
21 | %endif | |
22 | ||
50ffb0ba | 23 | %ifnarch %{x8664} x32 |
2d8da575 AM |
24 | # non-x86_64 arch doesn't support this |
25 | %undefine with_efiemu | |
26 | %endif | |
27 | ||
1536aaf2 | 28 | # the 'most natural' platform should go last |
50ffb0ba | 29 | %ifarch %{ix86} %{x8664} x32 ia64 |
1536aaf2 | 30 | %define platforms %{?with_efi:efi} %{?with_pc:pc} |
feaacba3 JB |
31 | %endif |
32 | %ifarch ppc ppc64 sparc64 | |
33 | %define platforms ieee1275 | |
34 | %endif | |
35 | %ifarch mips | |
36 | %define platforms arc | |
37 | %endif | |
38 | %ifarch mipsel | |
39 | %define platforms loongson | |
40 | %endif | |
1536aaf2 | 41 | |
a4c52d96 | 42 | %define rel 1 |
afe8504a | 43 | Summary: GRand Unified Bootloader |
c8155f7f | 44 | Summary(de.UTF-8): GRUB2 - ein Bootloader für x86 und ppc |
f97cafb4 | 45 | Summary(hu.UTF-8): GRUB2 - rendszerbetöltő x86 és ppc gépekhez |
c8155f7f ER |
46 | Summary(pl.UTF-8): GRUB2 - bootloader dla x86 i ppc |
47 | Summary(pt_BR.UTF-8): Gerenciador de inicialização GRUB2 | |
afe8504a | 48 | Name: grub2 |
9b98f246 JP |
49 | Version: 2.04 |
50 | Release: 0.1 | |
2e4bec6f | 51 | License: GPL v2 |
afe8504a | 52 | Group: Base |
729e6097 | 53 | Source0: ftp://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz |
9b98f246 | 54 | # Source0-md5: 5aaca6713b47ca2456d8324a58755ac7 |
22909ca1 ER |
55 | Source1: update-grub |
56 | Source2: update-grub.8 | |
b46589aa | 57 | Source3: grub.sysconfig |
e2964b87 | 58 | Source4: grub-custom.cfg |
b46589aa | 59 | Patch1: pld-sysconfdir.patch |
872700b0 | 60 | Patch2: grub-garbage.patch |
c9273ffc JK |
61 | Patch3: grub-lvmdevice.patch |
62 | Patch4: pld-mkconfigdir.patch | |
63 | Patch5: grub-mkconfig-diagnostics.patch | |
668ecb01 JK |
64 | Patch6: posix.patch |
65 | Patch7: %{name}-fonts_path.patch | |
668ecb01 JK |
66 | Patch9: just-say-linux.patch |
67 | Patch10: ignore-kernel-symlinks.patch | |
68 | Patch11: choose-preferred-initrd.patch | |
69 | Patch12: %{name}-cfg.patch | |
c287192d | 70 | Patch13: efi-net-fix.patch |
a4c52d96 | 71 | Patch14: blscfg.patch |
feaacba3 | 72 | URL: http://www.gnu.org/software/grub/ |
27550907 ER |
73 | BuildRequires: autoconf >= 2.53 |
74 | BuildRequires: automake >= 1:1.11.1-1 | |
8b781299 | 75 | BuildRequires: bison |
06df59fd | 76 | BuildRequires: device-mapper-devel |
feaacba3 | 77 | BuildRequires: flex >= 2.5.35 |
26996aed | 78 | BuildRequires: fonts-TTF-DejaVu |
feaacba3 | 79 | BuildRequires: freetype-devel >= 2 |
12fd19f5 | 80 | BuildRequires: gawk |
39b1c916 | 81 | BuildRequires: gcc >= 5:3.4 |
5d291ad2 | 82 | BuildRequires: gettext-tools |
5bafb558 | 83 | BuildRequires: glibc-localedb-all |
feaacba3 | 84 | BuildRequires: glibc-static |
1349ebb8 | 85 | BuildRequires: help2man |
42985b0d | 86 | BuildRequires: libfuse-devel |
afe8504a | 87 | BuildRequires: libtool |
feaacba3 | 88 | BuildRequires: ncurses-devel |
5bafb558 JK |
89 | BuildRequires: python |
90 | BuildRequires: python-modules | |
feaacba3 JB |
91 | BuildRequires: rpm >= 4.4.9-56 |
92 | BuildRequires: rpmbuild(macros) >= 1.213 | |
93 | BuildRequires: sed >= 4.0 | |
94 | BuildRequires: tar >= 1:1.22 | |
81a7e0ba | 95 | BuildRequires: texinfo |
feaacba3 JB |
96 | BuildRequires: xz |
97 | BuildRequires: xz-devel | |
c668211a ER |
98 | %ifarch %{x8664} |
99 | BuildRequires: /usr/lib/libc.so | |
8905dae4 ER |
100 | %if "%{pld_release}" == "ac" |
101 | BuildRequires: libgcc32 | |
102 | %else | |
50ffb0ba | 103 | BuildRequires: gcc-multilib-32 |
c668211a | 104 | %endif |
dee0d6f5 | 105 | %endif |
feaacba3 | 106 | Requires: %{name}-platform = %{version}-%{release} |
a5138d8d | 107 | Requires: pld-release |
dc6928bc | 108 | Requires: which |
feaacba3 JB |
109 | %ifarch %{ix86} %{x8664} |
110 | Suggests: %{name}-platform-pc | |
111 | %endif | |
190cc685 | 112 | Suggests: cdrkit-mkisofs |
97ee543c | 113 | Suggests: os-prober |
afe8504a | 114 | Provides: bootloader |
fc835b5e | 115 | Conflicts: grub |
50ffb0ba | 116 | ExclusiveArch: %{ix86} %{x8664} x32 ia64 mips mipsel ppc ppc64 sparc64 |
afe8504a SP |
117 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
118 | ||
119 | %define _sbindir /sbin | |
4a00f3b7 | 120 | %define _bindir %{_sbindir} |
1536aaf2 | 121 | %define _libdir /lib |
e6fbd304 | 122 | %define _datadir %{_libdir} |
26e757db | 123 | %define _libexecdir %{_libdir}/grub |
1536aaf2 | 124 | %define _grubdir /boot/grub |
da9b7cf9 | 125 | %define _localedir /usr/share/locale |
9d44d75e | 126 | |
0e2cbb94 JK |
127 | # part of grub code is not relocable (these are not Linux libs) |
128 | # stack protector also breaks non-Linux binaries | |
8c5e5aa2 JR |
129 | # any kind of forced optimizations makes grub2 unreliable (random |
130 | # reboots and hangs on boot menu screen) | |
5bc5d891 | 131 | %define filterout_c -fPIC -O. |
5967241e | 132 | %undefine _ssp_cflags |
5bc5d891 | 133 | %undefine _fortify_cflags |
0e2cbb94 | 134 | |
afe8504a SP |
135 | %description |
136 | GRUB is a GPLed bootloader intended to unify bootloading across x86 | |
137 | operating systems. In addition to loading the Linux and *BSD kernels, | |
138 | it implements the Multiboot standard, which allows for flexible | |
139 | loading of multiple boot images (needed for modular kernels such as | |
140 | the GNU Hurd). | |
141 | ||
211df1ed ER |
142 | GRUB 2 is derived from PUPA which was a research project to |
143 | investigate the next generation of GRUB. GRUB 2 has been rewritten | |
144 | from scratch to clean up everything for modularity and portability. | |
145 | ||
146 | GRUB 2 targets at the following goals: | |
147 | - Scripting support, such as conditionals, loops, variables and | |
148 | functions. | |
149 | - Graphical interface. | |
150 | - Dynamic loading of modules in order to extend itself at the run time | |
151 | rather than at the build time. | |
152 | - Portability for various architectures. | |
153 | - Internationalization. This includes support for non-ASCII character | |
154 | code, message catalogs like gettext, fonts, graphics console, and so | |
155 | on. | |
156 | - Real memory management, to make GNU GRUB more extensible. | |
157 | - Modular, hierarchical, object-oriented framework for file systems, | |
158 | files, devices, drives, terminals, commands, partition tables and OS | |
159 | loaders. | |
160 | - Cross-platform installation which allows for installing GRUB from a | |
161 | different architecture. | |
162 | - Rescue mode saves unbootable cases. Stage 1.5 was eliminated. | |
163 | - Fix design mistakes in GRUB Legacy, which could not be solved for | |
164 | backward-compatibility, such as the way of numbering partitions. | |
165 | ||
6b0aefbf | 166 | %description -l de.UTF-8 |
afe8504a SP |
167 | GRUB (GRand Unified Boot-loader) ist ein Bootloader, der oft auf |
168 | Rechnern eingesetzt wird, auf denen das freie Betriebssystem Linux | |
6b0aefbf | 169 | läuft. GRUB löst den betagten LILO (Linux-Loader) ab. |
afe8504a SP |
170 | |
171 | GRUB wurde innerhalb des GNU Hurd-Projektes als Boot-Loader entwickelt | |
6b0aefbf JR |
172 | und wird unter der GPL vertrieben. Aufgrund seiner höheren |
173 | Flexibilität verdrängt GRUB in vielen Linux-Distributionen den | |
afe8504a SP |
174 | traditionellen Boot-Loader LILO. |
175 | ||
f97cafb4 ZU |
176 | %description -l hu.UTF-8 |
177 | GRUB egy GPL liszenszű rendszerbetöltő. Linux és *BSD kernelek | |
178 | betöltése mellett támogatja a Multiboot standard-ot, amely lehetővé | |
179 | teszi boot képek betöltését (moduláris kerneleknek kell, mint pl. a | |
180 | GNU Hurd). | |
181 | ||
182 | GRUB2 céljai a következők: | |
183 | - szkriptelés támogatása, úgymint feltételek, ciklusok, változók, | |
184 | függvények. | |
185 | - grafikus felület | |
186 | - modulok dinamikus betöltése futási időben | |
187 | - hordozhatóság több architektúrára | |
188 | - többnyelvűség: nem-ASCII karakterek támogatása, üzenetkatalógusok, | |
189 | mint gettext, betűtípusok, grafikus konzolon, és így tovább | |
190 | - valós memória kezelés, amellyel még bővíthetőbbé tehetjük | |
191 | - moduláris, hierarchikus, objektum-orientált keretrendszer | |
192 | fájlrendszerekhez, fájlokhoz, eszközökhöz, meghajtókhoz, | |
193 | terminálokhoz, parancsokhoz, partíciós táblákhoz és OS betöltőkhöz | |
194 | ||
6b0aefbf JR |
195 | %description -l es.UTF-8 |
196 | Éste es GRUB - Grand Unified Boot Loader - un administrador de | |
197 | inicialización capaz de entrar en la mayoría de los sistemas | |
afe8504a | 198 | operacionales libres - Linux, FreeBSD, NetBSD, GNU Mach, etc. como |
6b0aefbf | 199 | también en la mayoría de los sistemas operacionales comerciales para |
afe8504a SP |
200 | PC. |
201 | ||
202 | El administrador GRUB puede ser una buena alternativa a LILO, para | |
6b0aefbf JR |
203 | usuarios conmás experiencia y que deseen obtener más recursos de su |
204 | cargador de inicialización (boot loader). | |
afe8504a | 205 | |
6b0aefbf | 206 | %description -l pl.UTF-8 |
feaacba3 | 207 | GRUB jest bootloaderem na licencji GNU GPL, mającym na celu unifikację |
6b0aefbf | 208 | procesu bootowania na systemach x86. Potrafi nie tylko ładować jądra |
feaacba3 | 209 | Linuksa i *BSD: posiada również implementację standardu Multiboot, |
6b0aefbf JR |
210 | który pozwala na elastyczne ładowanie wielu obrazów bootowalnych |
211 | (czego wymagają modułowe jądra, takie jak GNU Hurd). | |
afe8504a | 212 | |
6b0aefbf JR |
213 | %description -l pt_BR.UTF-8 |
214 | Esse é o GRUB - Grand Unified Boot Loader - um gerenciador de boot | |
afe8504a SP |
215 | capaz de entrar na maioria dos sistemas operacionais livres - Linux, |
216 | FreeBSD, NetBSD, GNU Mach, etc. assim como na maioria dos sistemas | |
217 | operacionais comerciais para PC. | |
218 | ||
6b0aefbf JR |
219 | O GRUB pode ser uma boa alternativa ao LILO, para usuários mais |
220 | avançados e que querem mais recursos de seu boot loader. | |
afe8504a | 221 | |
565fe2e3 ER |
222 | %package -n bash-completion-%{name} |
223 | Summary: bash-completion for GRUB | |
feaacba3 | 224 | Summary(pl.UTF-8): Bashowe uzupełnianie nazw dla GRUB-a |
565fe2e3 ER |
225 | Group: Applications/Shells |
226 | Requires: bash-completion | |
d28207fb ER |
227 | %if "%{_rpmversion}" >= "5" |
228 | BuildArch: noarch | |
229 | %endif | |
565fe2e3 ER |
230 | |
231 | %description -n bash-completion-%{name} | |
232 | This package provides bash-completion for GRUB. | |
233 | ||
234 | %description -n bash-completion-%{name} -l pl.UTF-8 | |
feaacba3 | 235 | Pakiet ten dostarcza bashowe uzupełnianie nazw dla GRUB-a. |
565fe2e3 | 236 | |
6d8475a4 | 237 | %package platform-pc |
62081337 | 238 | Summary: PC BIOS platform support for GRUB |
feaacba3 | 239 | Summary(pl.UTF-8): Obsługa platformy PC BIOS dla GRUB-a |
62081337 | 240 | Group: Base |
6d8475a4 | 241 | Provides: %{name}-platform = %{version}-%{release} |
1536aaf2 | 242 | |
6d8475a4 | 243 | %description platform-pc |
62081337 | 244 | PC BIOS platform support for GRUB. |
1536aaf2 | 245 | |
feaacba3 JB |
246 | %description platform-pc -l pl.UTF-8 |
247 | Obsługa platformy PC BIOS dla GRUB-a. | |
248 | ||
6d8475a4 | 249 | %package platform-efi |
1536aaf2 | 250 | Summary: (U)EFI platform support for GRUB |
feaacba3 | 251 | Summary(pl.UTF-8): Obsługa platformy (U)EFI dla GRUB-a |
1536aaf2 | 252 | Group: Base |
6e81e1fe | 253 | Suggests: efibootmgr |
6d8475a4 | 254 | Provides: %{name}-platform = %{version}-%{release} |
1536aaf2 | 255 | |
6d8475a4 | 256 | %description platform-efi |
1536aaf2 JK |
257 | (U)EFI platform support for GRUB. |
258 | ||
feaacba3 JB |
259 | %description platform-efi -l pl.UTF-8 |
260 | Obsługa platformy (U)EFI dla GRUB-a. | |
261 | ||
7615a862 JK |
262 | %package mkfont |
263 | Summary: GRUB font files converter | |
feaacba3 | 264 | Summary(pl.UTF-8): Konwerter plików fontów GRUB-a |
7615a862 JK |
265 | Group: Base |
266 | ||
267 | %description mkfont | |
268 | Converts common font file formats into PF2. | |
269 | ||
feaacba3 JB |
270 | %description mkfont -l pl.UTF-8 |
271 | Program do konwersji popularnych formatów plików fontów do PF2. | |
272 | ||
8ac8605d JK |
273 | %package theme-starfield |
274 | Summary: starfield theme for GRUB | |
feaacba3 | 275 | Summary(pl.UTF-8): Motyw starfield dla GRUB-a |
8ac8605d JK |
276 | Group: Base |
277 | ||
278 | %description theme-starfield | |
279 | starfield theme for GRUB. | |
280 | ||
feaacba3 JB |
281 | %description theme-starfield -l pl.UTF-8 |
282 | Motyw starfield dla GRUB-a. | |
283 | ||
afe8504a | 284 | %prep |
729e6097 | 285 | %setup -q -n grub-%{version} |
b46589aa | 286 | %patch1 -p1 |
872700b0 | 287 | %patch2 -p1 |
f951fcbe | 288 | %patch3 -p1 |
aec70abd | 289 | %patch4 -p1 |
f7ae30d0 | 290 | %patch5 -p1 |
668ecb01 JK |
291 | %patch6 -p1 |
292 | %patch7 -p1 | |
668ecb01 | 293 | %patch9 -p1 |
26996aed | 294 | %patch10 -p1 |
668ecb01 JK |
295 | %patch11 -p1 |
296 | %patch12 -p0 | |
c287192d | 297 | %patch13 -p1 |
9b98f246 | 298 | #%patch14 -p1 |
5bafb558 JK |
299 | |
300 | # we don't have C.utf-8 and need an UTF-8 locale for build | |
301 | sed -i -e 's/LC_ALL=C.UTF-8/LC_ALL=en_US.utf-8/g' po/Makefile* po/Rules* | |
afe8504a SP |
302 | |
303 | %build | |
928eb9c1 | 304 | # if gold is used then grub doesn't even boot |
9bc7aab3 AM |
305 | # https://savannah.gnu.org/bugs/?34539 |
306 | # http://sourceware.org/bugzilla/show_bug.cgi?id=14196 | |
7a73b7a5 | 307 | install -d our-ld |
70fd3248 | 308 | ln -f -s /usr/bin/ld.bfd our-ld/ld |
7a73b7a5 | 309 | export PATH=$(pwd)/our-ld:$PATH |
928eb9c1 | 310 | |
b876d99a JK |
311 | ## not only the typicall autotools stuff |
312 | #./autogen.sh | |
313 | ||
50ffb0ba | 314 | #{__gettextize} |
b876d99a JK |
315 | %{__aclocal} -I m4 |
316 | %{__autoconf} | |
317 | %{__autoheader} | |
318 | %{__automake} | |
12fd19f5 | 319 | |
1536aaf2 | 320 | for platform in %{platforms} ; do |
fc490c3e JK |
321 | install -d build-${platform} |
322 | cd build-${platform} | |
0e2cbb94 JK |
323 | |
324 | if [ "$platform" != "efi" ] ; then | |
feaacba3 | 325 | platform_opts="--enable-efiemu%{!?with_efiemu:=no}" |
0e2cbb94 JK |
326 | else |
327 | platform_opts="" | |
328 | fi | |
329 | ||
55d67ca1 | 330 | ln -f -s ../configure . |
1536aaf2 JK |
331 | # mawk stalls at ./genmoddep.awk, so force gawk |
332 | AWK=gawk \ | |
333 | %configure \ | |
334 | --with-platform=${platform} \ | |
335 | --disable-werror \ | |
18b992da | 336 | --enable-grub-themes \ |
1536aaf2 JK |
337 | %if %{with grubemu} |
338 | --enable-grub-emu-usb \ | |
339 | --enable-grub-emu-sdl \ | |
340 | --enable-grub-emu-pci \ | |
341 | %endif | |
0e2cbb94 | 342 | $platform_opts \ |
1536aaf2 JK |
343 | TARGET_LDFLAGS=-static |
344 | ||
ec98fb4c | 345 | %{__make} -j1 -C po update-gmo |
1536aaf2 JK |
346 | %{__make} |
347 | cd .. | |
348 | done | |
0fb8b1a5 | 349 | |
afe8504a SP |
350 | %install |
351 | rm -rf $RPM_BUILD_ROOT | |
afe8504a | 352 | |
1536aaf2 | 353 | for platform in %{platforms} ; do |
fc490c3e | 354 | cd build-${platform} |
1536aaf2 JK |
355 | %{__make} install \ |
356 | pkgdatadir=%{_libexecdir} \ | |
357 | pkglibdir=%{_libexecdir} \ | |
358 | DESTDIR=$RPM_BUILD_ROOT | |
359 | cd .. | |
360 | done | |
afe8504a | 361 | |
7615a862 JK |
362 | # not in Th (?) |
363 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/de@hebrew | |
364 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/en@{arabic,cyrillic,greek,hebrew,piglatin} | |
365 | ||
f951fcbe AM |
366 | %find_lang grub |
367 | ||
bcd6a47e ER |
368 | # this must be after 'make install' |
369 | install -d $RPM_BUILD_ROOT%{_libexecdir}/locale | |
370 | ||
1536aaf2 JK |
371 | install -d $RPM_BUILD_ROOT%{_grubdir} |
372 | cp -p docs/grub.cfg $RPM_BUILD_ROOT%{_grubdir} | |
373 | ||
7b6caae9 | 374 | # grub.d/41_custom |
1536aaf2 | 375 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_grubdir}/custom.cfg |
7b6caae9 ER |
376 | %{__rm} $RPM_BUILD_ROOT/lib/grub.d/40_custom |
377 | ||
22909ca1 | 378 | install -p %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/update-grub |
7b6caae9 ER |
379 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man8/update-grub.8 |
380 | ||
381 | install -d $RPM_BUILD_ROOT/etc/sysconfig | |
382 | cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/grub | |
383 | ||
384 | # rm -f, because it sometimes exists, sometimes not, depending which texlive you have installed | |
47069130 | 385 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
e2964b87 | 386 | |
feaacba3 | 387 | # platform specific, unnecessarily always installed |
50ffb0ba | 388 | %ifnarch %{ix86} %{x8664} x32 |
feaacba3 JB |
389 | %{__rm} $RPM_BUILD_ROOT{%{_sbindir}/grub-bios-setup,%{_mandir}/man8/grub-bios-setup.8} |
390 | %endif | |
391 | %ifnarch sparc64 | |
392 | %{__rm} $RPM_BUILD_ROOT{%{_sbindir}/grub-sparc64-setup,%{_mandir}/man8/grub-sparc64-setup.8} | |
393 | %endif | |
394 | ||
cbd79801 | 395 | # core.img - bootable image generated by grub-mkimage(1) via grub-install(1) |
1536aaf2 JK |
396 | touch $RPM_BUILD_ROOT%{_grubdir}/core.img |
397 | touch $RPM_BUILD_ROOT%{_grubdir}/device.map | |
cbd79801 | 398 | |
8b5c394b ER |
399 | # needs to be exactly 1KiB |
400 | # but we're ghosting it. so whom are we kidding here? :P (maybe %config it in future?) | |
1536aaf2 | 401 | dd bs=1024 if=/dev/zero count=1 of=$RPM_BUILD_ROOT%{_grubdir}/grubenv |
8b5c394b | 402 | |
afe8504a SP |
403 | %clean |
404 | rm -rf $RPM_BUILD_ROOT | |
405 | ||
5028d8c9 | 406 | %post -p %{_sbindir}/postshell |
fc58858a | 407 | -/usr/sbin/fix-info-dir -c %{_infodir} |
f4604ef8 | 408 | |
5028d8c9 | 409 | %postun -p %{_sbindir}/postshell |
fc58858a | 410 | -/usr/sbin/fix-info-dir -c %{_infodir} |
f4604ef8 | 411 | |
8c5e5aa2 JR |
412 | %triggerpostun -- %{name} < 2.00-2 |
413 | # Note this trigger on version upgrade needed only for upgrade from | |
414 | # old grub2 packages which contained modules in /boot/grub | |
415 | # or were built with optimizations enabled | |
92904505 ER |
416 | # don't do anything on --downgrade |
417 | if [ $1 -le 1 ]; then | |
418 | exit 0 | |
419 | fi | |
420 | echo "Grub was upgraded, trying to setup it to boot sector" | |
421 | /sbin/grub-install '(hd0)' || : | |
422 | ||
7b6caae9 ER |
423 | %triggerpostun -- %{name} < 1.99-7.3 |
424 | # migrate /etc/grub.d/custom.cfg.rpmsave -> /boot/grub/custom.cfg | |
425 | if [ -f %{_sysconfdir}/grub.d/custom.cfg.rpmsave ]; then | |
1536aaf2 JK |
426 | cp -f %{_grubdir}/custom.cfg{,.rpmnew} |
427 | mv -f %{_sysconfdir}/grub.d/custom.cfg.rpmsave %{_grubdir}/custom.cfg | |
7b6caae9 ER |
428 | fi |
429 | ||
f951fcbe | 430 | %files -f grub.lang |
afe8504a | 431 | %defattr(644,root,root,755) |
2e4bec6f | 432 | %doc AUTHORS ChangeLog NEWS README THANKS TODO |
aec70abd | 433 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/grub |
71c933c0 | 434 | %attr(755,root,root) %{_sbindir}/grub-editenv |
3ea0c40e | 435 | %attr(755,root,root) %{_sbindir}/grub-fstest |
5bafb558 JK |
436 | %attr(755,root,root) %{_sbindir}/grub-file |
437 | %attr(755,root,root) %{_sbindir}/grub-glue-efi | |
e9d73181 | 438 | %attr(755,root,root) %{_sbindir}/grub-kbdcomp |
fc835b5e | 439 | %attr(755,root,root) %{_sbindir}/grub-install |
5bafb558 | 440 | %attr(755,root,root) %{_sbindir}/grub-macbless |
e9d73181 | 441 | %attr(755,root,root) %{_sbindir}/grub-menulst2cfg |
fc835b5e | 442 | %attr(755,root,root) %{_sbindir}/grub-mkconfig |
e9d73181 AM |
443 | %attr(755,root,root) %{_sbindir}/grub-mklayout |
444 | %attr(755,root,root) %{_sbindir}/grub-mknetdir | |
71c933c0 ER |
445 | %attr(755,root,root) %{_sbindir}/grub-mkpasswd-pbkdf2 |
446 | %attr(755,root,root) %{_sbindir}/grub-mkrelpath | |
447 | %attr(755,root,root) %{_sbindir}/grub-mkrescue | |
7615a862 JK |
448 | %attr(755,root,root) %{_sbindir}/grub-mkstandalone |
449 | %attr(755,root,root) %{_sbindir}/grub-mount | |
450 | %attr(755,root,root) %{_sbindir}/grub-ofpathname | |
71c933c0 | 451 | %attr(755,root,root) %{_sbindir}/grub-reboot |
5bafb558 | 452 | %attr(755,root,root) %{_sbindir}/grub-render-label |
71c933c0 ER |
453 | %attr(755,root,root) %{_sbindir}/grub-script-check |
454 | %attr(755,root,root) %{_sbindir}/grub-set-default | |
5bafb558 | 455 | %attr(755,root,root) %{_sbindir}/grub-syslinux2cfg |
22909ca1 | 456 | %attr(755,root,root) %{_sbindir}/update-grub |
50ffb0ba | 457 | %ifarch %{ix86} %{x8664} x32 |
feaacba3 JB |
458 | %attr(755,root,root) %{_sbindir}/grub-bios-setup |
459 | %{_mandir}/man8/grub-bios-setup.8* | |
460 | %endif | |
50ffb0ba | 461 | %ifarch %{ix86} %{x8664} x32 |
76be4c4a | 462 | %attr(755,root,root) %{_sbindir}/grub-mkimage |
fc835b5e | 463 | %{_mandir}/man1/grub-mkimage.1* |
76be4c4a AM |
464 | %else |
465 | %attr(755,root,root) %{_sbindir}/grub-probe | |
76be4c4a | 466 | %{_mandir}/man8/grub-probe.8* |
76be4c4a | 467 | %endif |
feaacba3 JB |
468 | %ifarch sparc64 |
469 | %attr(755,root,root) %{_sbindir}/grub-sparc64-setup | |
470 | %{_mandir}/man8/grub-sparc64-setup.8* | |
471 | %endif | |
71c933c0 | 472 | %{_mandir}/man1/grub-editenv.1* |
5bafb558 | 473 | %{_mandir}/man1/grub-file.1* |
3ea0c40e | 474 | %{_mandir}/man1/grub-fstest.1* |
5bafb558 | 475 | %{_mandir}/man1/grub-glue-efi.1* |
7615a862 | 476 | %{_mandir}/man1/grub-kbdcomp.1* |
e9d73181 | 477 | %{_mandir}/man1/grub-menulst2cfg.1* |
e9d73181 | 478 | %{_mandir}/man1/grub-mklayout.1* |
5bafb558 | 479 | %{_mandir}/man1/grub-mknetdir.1* |
71c933c0 | 480 | %{_mandir}/man1/grub-mkpasswd-pbkdf2.1* |
03b9d04b | 481 | %{_mandir}/man1/grub-mkrelpath.1* |
71c933c0 | 482 | %{_mandir}/man1/grub-mkrescue.1* |
7615a862 JK |
483 | %{_mandir}/man1/grub-mkstandalone.1* |
484 | %{_mandir}/man1/grub-mount.1* | |
5bafb558 | 485 | %{_mandir}/man1/grub-render-label.1* |
71c933c0 | 486 | %{_mandir}/man1/grub-script-check.1* |
5bafb558 | 487 | %{_mandir}/man1/grub-syslinux2cfg.1* |
71c933c0 | 488 | %{_mandir}/man8/grub-install.8* |
a4c52d96 | 489 | %{_mandir}/man8/grub-macbless.8* |
fc835b5e | 490 | %{_mandir}/man8/grub-mkconfig.8* |
7615a862 | 491 | %{_mandir}/man8/grub-ofpathname.8* |
71c933c0 ER |
492 | %{_mandir}/man8/grub-reboot.8* |
493 | %{_mandir}/man8/grub-set-default.8* | |
22909ca1 | 494 | %{_mandir}/man8/update-grub.8* |
797addca | 495 | %if %{with grubemu} |
8fcee4aa ER |
496 | %attr(755,root,root) %{_sbindir}/grub-emu |
497 | %{_mandir}/man8/grub-emu.8* | |
797addca | 498 | %endif |
e6fbd304 | 499 | %{_libexecdir}/grub-mkconfig_lib |
aec70abd | 500 | |
1536aaf2 | 501 | %dir %{_grubdir} |
26e757db | 502 | %dir %{_libexecdir} |
bcd6a47e | 503 | # XXX: check this locale dir location and if it is neccesaary to exist on /boot |
565fe2e3 | 504 | |
bcd6a47e | 505 | %dir %{_libexecdir}/locale |
1536aaf2 JK |
506 | %config(noreplace) %verify(not md5 mtime size) %{_grubdir}/grub.cfg |
507 | %config(noreplace) %verify(not md5 mtime size) %{_grubdir}/custom.cfg | |
aec70abd | 508 | |
cbd79801 | 509 | # generated by grub at runtime |
1536aaf2 JK |
510 | %ghost %{_grubdir}/device.map |
511 | %ghost %{_grubdir}/core.img | |
512 | %ghost %{_grubdir}/grubenv | |
cbd79801 | 513 | |
e2964b87 ER |
514 | %dir /lib/grub.d |
515 | %doc /lib/grub.d/README | |
516 | %attr(755,root,root) /lib/grub.d/00_header | |
517 | %attr(755,root,root) /lib/grub.d/10_linux | |
e9d73181 | 518 | %attr(755,root,root) /lib/grub.d/20_linux_xen |
e2964b87 | 519 | %attr(755,root,root) /lib/grub.d/30_os-prober |
e9d73181 | 520 | %attr(755,root,root) /lib/grub.d/41_custom |
e2964b87 | 521 | |
b876d99a JK |
522 | # these are now installed only on matching hosts |
523 | #%attr(755,root,root) /lib/grub.d/10_hurd | |
524 | #%attr(755,root,root) /lib/grub.d/10_illumos | |
525 | #%attr(755,root,root) /lib/grub.d/10_kfreebsd | |
526 | #%attr(755,root,root) /lib/grub.d/10_netbsd | |
527 | #%attr(755,root,root) /lib/grub.d/10_xnu | |
528 | ||
50ffb0ba | 529 | %ifarch %{ix86} %{x8664} x32 |
1ffaf1f6 | 530 | %attr(755,root,root) %{_sbindir}/grub-probe |
fc835b5e | 531 | %{_mandir}/man8/grub-probe.8* |
4a00f3b7 | 532 | %endif |
aec70abd | 533 | |
f4604ef8 | 534 | %{_infodir}/grub*.info* |
565fe2e3 | 535 | |
8ac8605d JK |
536 | %dir %{_datadir}/grub/themes |
537 | ||
1536aaf2 | 538 | %if %{with pc} |
6d8475a4 | 539 | %files platform-pc |
1536aaf2 JK |
540 | %defattr(644,root,root,755) |
541 | %dir %{_libexecdir}/*-pc | |
542 | %{_libexecdir}/*-pc/modinfo.sh | |
543 | %{_libexecdir}/*-pc/*.exec | |
544 | %{_libexecdir}/*-pc/*.image | |
545 | %{_libexecdir}/*-pc/*.lst | |
546 | %{_libexecdir}/*-pc/*.mod | |
547 | %{_libexecdir}/*-pc/*.module | |
548 | %{_libexecdir}/*-pc/lzma_decompress.img | |
549 | %{_libexecdir}/*-pc/config.h | |
550 | %{_libexecdir}/*-pc/gdb_grub | |
551 | %{_libexecdir}/*-pc/gmodule.pl | |
552 | %if %{with efiemu} | |
1536aaf2 JK |
553 | %{_libexecdir}/*-pc/efiemu*.o |
554 | %endif | |
1536aaf2 | 555 | %{_libexecdir}/*-pc/kernel.img |
50ffb0ba | 556 | %ifarch %{ix86} %{x8664} x32 sparc sparc64 |
1536aaf2 | 557 | %{_libexecdir}/*-pc/boot.img |
5bafb558 | 558 | %{_libexecdir}/*-pc/boot_hybrid.img |
1536aaf2 JK |
559 | %{_libexecdir}/*-pc/cdboot.img |
560 | %{_libexecdir}/*-pc/diskboot.img | |
561 | %{_libexecdir}/*-pc/lnxboot.img | |
562 | %{_libexecdir}/*-pc/pxeboot.img | |
563 | %endif | |
564 | %endif | |
565 | ||
566 | %if %{with efi} | |
6d8475a4 | 567 | %files platform-efi |
1536aaf2 JK |
568 | %defattr(644,root,root,755) |
569 | %dir %{_libexecdir}/*-efi | |
570 | %{_libexecdir}/*-efi/modinfo.sh | |
571 | %{_libexecdir}/*-efi/*.exec | |
572 | %{_libexecdir}/*-efi/*.lst | |
573 | %{_libexecdir}/*-efi/*.mod | |
574 | %{_libexecdir}/*-efi/*.module | |
575 | %{_libexecdir}/*-efi/config.h | |
576 | %{_libexecdir}/*-efi/gdb_grub | |
577 | %{_libexecdir}/*-efi/gmodule.pl | |
1536aaf2 JK |
578 | %{_libexecdir}/*-efi/kernel.img |
579 | %endif | |
580 | ||
7615a862 JK |
581 | %files mkfont |
582 | %defattr(644,root,root,755) | |
7615a862 | 583 | %attr(755,root,root) %{_sbindir}/grub-mkfont |
feaacba3 | 584 | %{_mandir}/man1/grub-mkfont.1* |
7615a862 | 585 | |
8ac8605d JK |
586 | %files theme-starfield |
587 | %defattr(644,root,root,755) | |
588 | %{_datadir}/grub/themes/starfield | |
589 | ||
565fe2e3 ER |
590 | %files -n bash-completion-%{name} |
591 | %defattr(644,root,root,755) | |
592 | /etc/bash_completion.d/grub |