/[packages]/updates/6/grub2/current/SPECS/grub2.spec
ViewVC logotype

Annotation of /updates/6/grub2/current/SPECS/grub2.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 550657 - (hide annotations) (download)
Tue Nov 12 00:49:25 2013 UTC (10 years, 5 months ago) by barjac
Original Path: cauldron/grub2/current/SPECS/grub2.spec
File size: 13542 byte(s)
- add Fedora patches not applied upstream
- drop virtual provide on theme
1 barjac 248856 %define Werror_cflags %nil
2     # Modules always contain just 32-bit code
3     %define _libdir %{_exec_prefix}/lib
4     %ifarch x86_64
5     # 64bit intel machines use 32bit boot loader
6     # (We cannot just redefine _target_cpu, as we'd get i386.rpm packages)
7     %global _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu}
8     %global efi_arch x86_64-efi
9     %else
10     %global efi_arch i386-efi
11     %endif
12    
13     %global pc_arch i386-pc
14    
15     Name: grub2
16 tv 331863 Version: 2.00
17 barjac 550657 Release: %mkrel 56
18 barjac 248856 Summary: Boot-loader with support for Linux, Multiboot and more
19 barjac 390289 Group: System/Boot and Init
20 barjac 248856 License: GPLv3+ and GPLv2
21     # unicode font is GPLv2
22 barjac 318311 URL: http://www.gnu.org/software/grub/
23 tv 331857 Source0: ftp://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
24 barjac 400190 Source1: 90_persistent
25     Source2: grub.default
26     Source3: README.Mageia
27     Source4: README.efi
28     Source5: grub2.filter
29     Source6: grub2.script
30     Source7: theme.txt
31 barjac 404821 # pf2 fonts may be regenerated in SOURCES using ./mkfonts
32 barjac 400190 Source8: mkfonts
33     Source9: unicode.pf2
34 barjac 402075 Source10: MageiaLogo-Bold-16.pf2
35     Source11: MageiaLogo-Bold-20.pf2
36     Source12: MageiaLogo-Bold-28.pf2
37     Source13: MageiaLogo-Regular-20.pf2
38 barjac 403927 Source14: Mageia3-grub2-1024x768.png
39 barjac 404821 Source15: MageiaLogoFonts-bdf.tar.xz
40 barjac 425400 Source16: 93_memtest
41 barjac 394991
42 barjac 550058 Patch0: grub2-2.00-bzrignore.patch
43 barjac 550657 # Upstream git snapshot
44 barjac 550058 Patch1: grub2-2.00-mga-git-9066.patch
45 barjac 550657 # Fedora patches not upstream
46     Patch0443: 0443-Migrate-PPC-from-Yaboot-to-Grub2.patch
47     Patch0444: 0444-Add-fw_path-variable-revised.patch
48     Patch0445: 0445-Don-t-set-boot-device-on-ppc-ieee1275.patch
49     Patch0446: 0446-Add-support-for-linuxefi.patch
50     Patch0448: 0448-Use-linuxefi-and-initrdefi-where-appropriate.patch
51     Patch0449: 0449-Don-t-allow-insmod-when-secure-boot-is-enabled.patch
52     Patch0450: 0450-Pass-x-hex-hex-straight-through-unmolested.patch
53     Patch0451: 0451-Fix-crash-on-http.patch
54     Patch0455: 0455-Add-X-option-to-printf-functions.patch
55     Patch0458: 0458-Add-bootpath-device-to-the-list.patch
56     Patch0460: 0460-blscfg-add-blscfg-module-to-parse-Boot-Loader-Specif.patch
57     # This would move bash completions for grub to /usr/share/bash-completion/
58     # Not sure if we have a policy on this.
59     #Patch0461: 0461-Move-bash-completion-script-922997.patch
60     Patch0462: 0462-for-ppc-reset-console-display-attr-when-clear-screen.patch
61     Patch0468: 0468-Don-t-write-messages-to-the-screen.patch
62     Patch0469: 0469-Don-t-print-GNU-GRUB-header.patch
63     Patch0471: 0471-Don-t-add-to-highlighted-row.patch
64     Patch0472: 0472-Don-t-add-to-highlighted-row.patch
65     Patch0474: 0474-Message-string-cleanups.patch
66     Patch0475: 0475-Fix-border-spacing-now-that-we-aren-t-displaying-it.patch
67     Patch0476: 0476-Use-the-correct-indentation-for-the-term-help-text.patch
68     Patch0477: 0477-Indent-menu-entries.patch
69     Patch0478: 0478-Fix-margins.patch
70     Patch0479: 0479-Add-support-for-UEFI-operating-systems-returned-by-o.patch
71     Patch0480: 0480-Disable-GRUB-video-support-for-IBM-power-machines.patch
72     Patch0481: 0481-Revert-Add-bootpath-device-to-the-list-967862.patch
73     Patch0483: 0483-Initialize-grub_file_filters_-all-enabled.patch
74     Patch0484: 0484-Use-2-instead-of-1-for-our-right-hand-margin-so-line.patch
75 barjac 248856
76     BuildRequires: flex
77     BuildRequires: bison
78     BuildRequires: ruby
79     BuildRequires: binutils
80     BuildRequires: glibc-static-devel
81     BuildRequires: ncurses-devel
82     BuildRequires: liblzo-devel
83     BuildRequires: freetype2-devel
84     BuildRequires: libusb-devel
85     BuildRequires: help2man
86     BuildRequires: texinfo
87     BuildRequires: libdevmapper-devel
88     BuildRequires: fuse-devel
89 pterjan 397685 BuildRequires: autogen
90 barjac 248856
91     Conflicts: %{name}-efi
92 barjac 394533 Suggests: os-prober >= 1.53
93 barjac 394991 Suggests: %{name}-mageia-theme = %{version}-%{release}
94 barjac 388456 Provides: bootloader
95 barjac 450000 Provides: grub2bootloader
96 barjac 248856
97     %description
98     This is the second version of the GRUB (Grand Unified Boot-loader), a highly
99     configurable and customizable boot-loader with modular architecture.
100     It supports a wide range of kernel formats, file systems, computer
101     architectures and hardware devices.
102 barjac 403927 It may be safely installed alongside legacy grub.
103 barjac 248856 Refer to the README.Mageia file that is part of this package's documentation
104     for more information.
105    
106     %package efi
107 barjac 248863 Summary: Boot-loader with support for EFI
108 barjac 390289 Group: System/Boot and Init
109 barjac 248856
110     Conflicts: %{name}
111 barjac 394533 Suggests: os-prober >= 1.53
112 tmb 547151 Requires(post): efibootmgr
113 barjac 394991 Suggests: %{name}-mageia-theme = %{version}-%{release}
114 barjac 388456 Provides: bootloader
115 barjac 450000 Provides: grub2bootloader
116 barjac 248856
117     %description efi
118     This is the second version of the GRUB (Grand Unified Boot-loader), a highly
119     configurable and customizable boot-loader with modular architecture.
120     It supports a wide range of kernel formats, file systems, computer
121     architectures and hardware devices.
122 barjac 403927 It may be safely installed alongside legacy grub.
123     Refer to the README.Mageia and README.efi files that are part of this package's
124     documentation for more information.
125 barjac 248856
126 barjac 394991 %package mageia-theme
127 barjac 403927 Summary: Provides a graphical theme with a custom Mageia background for grub2
128 barjac 394991 Group: System/Boot and Init
129    
130 barjac 450000 Requires: grub2bootloader
131 tmb 550414 Conflicts: grub2-mageia3-theme-dejavu
132 barjac 450000 BuildArch: noarch
133 barjac 394991
134     %description mageia-theme
135 barjac 403927 This package provides a custom Mageia graphical theme.
136 barjac 394991 It is provided as a separate package so it may be easily excluded from
137     minimal installations where a graphical theme is not required.
138    
139 barjac 248856 %prep
140 tv 331864 %setup -q -n grub-%{version}
141 barjac 248856
142 barjac 550058 %apply_patches
143 barjac 295597
144 barjac 248856 # README.Mageia
145 barjac 400190 cp %{SOURCE3} .
146     # README.efi
147 barjac 397190 cp %{SOURCE4} .
148 barjac 248856
149     cd ..
150 tv 331864 rm -rf grub-efi-%{version}
151     mv grub-%{version} grub-efi-%{version}
152 barjac 248856
153 tv 331864 %setup -q -n grub-%{version}
154 barjac 248856
155 barjac 550058 %apply_patches
156 barjac 295597
157 barjac 248856 # README.Mageia
158 barjac 400190 cp %{SOURCE3} .
159     # README.efi
160 barjac 397190 cp %{SOURCE4} .
161 barjac 248856
162     %build
163     cd ..
164 tv 331864 pushd grub-%{version}
165 pterjan 397685 ./autogen.sh
166 barjac 304517 %configure2_5x TARGET_LDFLAGS=-static \
167 barjac 248856 --with-platform=pc \
168     --enable-grub-emu-usb \
169     --disable-werror \
170     --enable-grub-mkfont \
171     --program-transform-name=s,grub,%{name}, \
172     --with-bootdir=/boot \
173     --with-grubdir=/%{name} \
174     CFLAGS=""
175 pterjan 397685 %make
176 barjac 248856 popd
177    
178 tv 331864 pushd grub-efi-%{version}
179 barjac 397694 ./autogen.sh
180 barjac 304517 %configure2_5x TARGET_LDFLAGS=-static \
181 barjac 248856 --with-platform=efi \
182     %ifarch x86_64
183     --target=x86_64 \
184     %endif
185     --enable-grub-emu-usb \
186     --disable-werror \
187     --enable-grub-mkfont \
188     --program-transform-name=s,grub,%{name}, \
189     --with-bootdir=/boot \
190     --with-grubdir=/%{name} \
191     CFLAGS=""
192 pterjan 397685 %make
193 barjac 248856 popd
194    
195     %install
196     cd ..
197 tv 331864 pushd grub-efi-%{version}
198 barjac 248856 %makeinstall_std
199     popd
200    
201 tv 331864 pushd grub-%{version}
202 barjac 248856 %makeinstall_std
203    
204     # (bor) grub.info is harcoded in sources
205     mv %{buildroot}%{_infodir}/grub.info %{buildroot}%{_infodir}/%{name}.info
206    
207     # Script that makes part of grub.cfg persist across updates
208 barjac 400190 install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/grub.d
209 barjac 248856
210 barjac 425400 # Memtest
211     install -m 755 %{SOURCE16} %{buildroot}%{_sysconfdir}/grub.d
212    
213 barjac 248856 # Font
214     install -d %{buildroot}/boot/%{name}/fonts
215 barjac 400190 install -D %{SOURCE9} %{buildroot}/boot/%{name}/fonts
216 barjac 248856
217     # Theme
218     install -d %{buildroot}/boot/%{name}/themes/maggy
219 barjac 400190 install -D %{SOURCE7} %{buildroot}/boot/%{name}/themes/maggy
220     install -D %{SOURCE10} %{buildroot}/boot/%{name}/themes/maggy
221 barjac 397190 install -D %{SOURCE11} %{buildroot}/boot/%{name}/themes/maggy
222     install -D %{SOURCE12} %{buildroot}/boot/%{name}/themes/maggy
223 barjac 401593 install -D %{SOURCE13} %{buildroot}/boot/%{name}/themes/maggy
224 barjac 402075 install -D %{SOURCE14} %{buildroot}/boot/%{name}/themes/maggy
225 barjac 248856
226 barjac 397190 # Ghost config files
227 barjac 248856 install -d %{buildroot}/boot/%{name}
228     touch %{buildroot}/boot/%{name}/grub.cfg
229    
230 barjac 400102 # Workaround for RHL Bug 817187
231     install -d %{buildroot}%{_datadir}/locale/en/LC_MESSAGES
232     ln -s %{_datadir}/locale/en@quot/LC_MESSAGES/grub.mo %{buildroot}%{_datadir}/locale/en/LC_MESSAGES/grub.mo
233 barjac 397190
234     cat > %{buildroot}/boot/%{name}/custom.cfg <<EOF
235 barjac 449511 # Set non-graphical text/background colours
236     set menu_color_normal=cyan/blue
237     set menu_color_highlight=white/blue
238 barjac 397190
239 barjac 449511 # Add any extra custom menu entries in here:
240    
241 barjac 397190 EOF
242    
243 barjac 400332 # Provide 'update-grub' and update-grub2 symlink for *buntu exiles ;)
244     cat > %{buildroot}%{_bindir}/update-grub <<EOF
245 barjac 404429 #!/bin/sh
246     su --login root -c "/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg"
247 barjac 400332
248     EOF
249     chmod +x %{buildroot}%{_bindir}/update-grub
250     ln -s %{_bindir}/update-grub %{buildroot}%{_bindir}/update-grub2
251    
252 barjac 394991 # Filetriggers
253 barjac 248856 install -d %{buildroot}/%{_filetriggers_dir}
254 barjac 400190 install -D %{SOURCE5} %{buildroot}/%{_filetriggers_dir}/%{name}.filter
255     install -D %{SOURCE6} %{buildroot}/%{_filetriggers_dir}/%{name}.script
256 barjac 248856
257     # Defaults
258 barjac 400190 install -m 644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/default/grub
259 barjac 248856
260 barjac 491788 # Remove "GNU/Linux" in menu selections
261     sed -i 's/ GNU\/Linux//' %{buildroot}%{_sysconfdir}/grub.d/10_linux
262 barjac 397190
263 barjac 248856 %find_lang grub
264    
265     popd
266    
267 barjac 412288 %post
268     exec > /var/log/%{name}_post.log 2>&1
269     # Determine the partition with /boot
270     BOOT_PARTITION=$(df -h /boot |(read; awk '{print $1; exit}'))
271 tmb 549704 # make it work with live images
272     if [ "$BOOT_PARTITION" == "overlayfs" ]; then
273     BOOT_PARTITION=$(df -h /mnt/install/boot |(read; awk '{print $1; exit}'))
274     fi
275 barjac 412288
276     # Generate core.img, but don't let it be installed in boot sector
277     %{name}-install --directory=%{_libdir}/grub/%{pc_arch} --grub-setup=/bin/true $BOOT_PARTITION
278    
279 barjac 549519 # On update re-install grub2 to where it was installed by drakboot
280     # otherwise next boot may fail due to mismatched boot code.
281     # If grub2 was manually installed (outside drakboot) do nothing.
282     # This will also re-build the menu.
283     if [ $1 -eq 2 ] && [ -e /boot/grub2/drakboot.conf ]; then
284     install_part=$(cat /boot/grub2/drakboot.conf|grep "boot="|cut -d= -f2)
285     root_part=$(df -h / |(read; awk '{print $1; exit}'))
286     if [ "$root_part" != "$install_part" ]; then
287     %{name}-install $install_part
288     fi
289     fi
290    
291 barjac 412288 # Generate grub.cfg only on install
292     if [ $1 -eq 1 ]; then
293     %{name}-mkconfig -o /boot/%{name}/grub.cfg
294     fi
295    
296     %post efi
297     exec > /var/log/%{name}_post.log 2>&1
298     # Determine the partition with /boot
299     BOOT_PARTITION=$(df -h /boot |(read; awk '{print $1; exit}'))
300 tmb 549704 # make it work with live images
301     if [ "$BOOT_PARTITION" == "overlayfs" ]; then
302     BOOT_PARTITION=$(df -h /mnt/install/boot |(read; awk '{print $1; exit}'))
303     fi
304 barjac 412288
305     # Generate core.img, but don't let it be installed in boot sector
306     %{name}-install --directory=%{_libdir}/grub/%{efi_arch} --grub-setup=/bin/true $BOOT_PARTITION
307    
308 barjac 549519 # On update re-install grub2 to where it was installed by drakboot
309     # otherwise next boot may fail due to mismatched boot code.
310     # If grub2 was manually installed (outside drakboot) do nothing.
311     # This will also re-build the menu.
312     if [ $1 -eq 2 ] && [ -e /boot/grub2/drakboot.conf ]; then
313     install_part=$(cat /boot/grub2/drakboot.conf|grep "boot="|cut -d= -f2)
314     root_part=$(df -h / |(read; awk '{print $1; exit}'))
315     if [ "$root_part" != "$install_part" ]; then
316     %{name}-install $install_part
317     fi
318     fi
319    
320 barjac 412288 # Generate grub.cfg only on install
321     if [ $1 -eq 1 ]; then
322     %{name}-mkconfig -o /boot/%{name}/grub.cfg
323     fi
324    
325 barjac 394991 %post mageia-theme
326     # Don't install if updating
327     if [ $1 -eq 1 ] ; then
328 barjac 397534 # Remove trailing blank lines from /etc/default/grub
329     sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' %{_sysconfdir}/default/grub
330     # Check that /etc/default/grub ends in a linefeed
331     [ "$(tail -n 1 %{_sysconfdir}/default/grub | wc --lines)" = "1" ] || echo >> %{_sysconfdir}/default/grub
332     # Add theme
333 barjac 394991 echo "GRUB_THEME=/boot/grub2/themes/maggy/theme.txt" >> %{_sysconfdir}/default/grub
334 barjac 248856 fi
335    
336     %preun
337     exec > /var/log/%{name}_preun.log 2>&1
338 barjac 394991 # Only if uninstalling
339     if [ $1 -eq 0 ]; then
340 barjac 248856 rm -rf /boot/%{name}/%{pc_arch}
341     rm -rf /boot/%{name}/locale
342 barjac 253503 fi
343 barjac 248856
344     %preun efi
345     exec > /var/log/%{name}_preun.log 2>&1
346 barjac 394991 # Only if uninstalling
347     if [ $1 -eq 0 ]; then
348 barjac 248856 rm -rf /boot/%{name}/%{efi_arch}
349     rm -rf /boot/%{name}/locale
350 barjac 253503 fi
351 barjac 248856
352 barjac 394991 %postun mageia-theme
353     exec > /var/log/%{name}_theme_postun.log 2>&1
354     # Only if uninstalling theme
355     if [ $1 -eq 0 ]; then
356 barjac 450000 # Remove theme from config
357     sed -i '/GRUB_THEME=\/boot\/grub2\/themes\/maggy\/theme.txt/d' %{_sysconfdir}/default/grub
358 barjac 394991 fi
359    
360 barjac 248856 %files -f grub.lang
361 tv 399478 %doc COPYING NEWS README THANKS TODO README.Mageia
362 barjac 412225 %{_infodir}/*
363 barjac 248856 %dir %{_libdir}/grub
364     %dir %{_libdir}/grub/i386-pc
365 tmb 397106 %dir /boot/%{name}
366 barjac 394991 %dir /boot/%{name}/fonts
367     %dir /boot/%{name}/themes
368 barjac 248856 %{_libdir}/grub/i386-pc/*
369     %{_bindir}/%{name}-*
370 barjac 400332 %{_bindir}/update-grub
371     %{_bindir}/update-grub2
372 barjac 248856 %{_sbindir}/%{name}-*
373     %{_sysconfdir}/bash_completion.d/grub
374     %{_sysconfdir}/grub.d/README
375     %{_sysconfdir}/grub.d/00_header
376     %{_sysconfdir}/grub.d/10_linux
377     %{_sysconfdir}/grub.d/20_linux_xen
378 barjac 550657 %{_sysconfdir}/grub.d/20_ppc_terminfo
379 barjac 425400 %{_sysconfdir}/grub.d/93_memtest
380 barjac 248856 %{_sysconfdir}/grub.d/30_os-prober
381 barjac 399253 %{_sysconfdir}/grub.d/90_persistent
382 barjac 248856 %config(noreplace) %{_sysconfdir}/grub.d/40_custom
383     %config(noreplace) %{_sysconfdir}/grub.d/41_custom
384     %config(noreplace) %{_sysconfdir}/default/grub
385 barjac 399253 %{_datadir}/grub
386 barjac 248856 %config(noreplace) /boot/%{name}/grub.cfg
387 barjac 397190 %config(noreplace) /boot/%{name}/custom.cfg
388 barjac 248856 %{_mandir}/man1/%{name}-*.1*
389     %{_mandir}/man8/%{name}-*.8*
390     %{_filetriggers_dir}/%{name}.filter
391 barjac 254425 %{_filetriggers_dir}/%{name}.script
392    
393     %files efi -f grub.lang
394 tv 399478 %doc COPYING NEWS README THANKS TODO README.Mageia README.efi
395 barjac 412225 %{_infodir}/*
396 barjac 254425 %dir %{_libdir}/grub
397     %dir %{_libdir}/grub/%{efi_arch}
398 barjac 397190 %dir /boot/%{name}
399 barjac 394991 %dir /boot/%{name}/fonts
400     %dir /boot/%{name}/themes
401 barjac 254425 %{_libdir}/grub/%{efi_arch}/*
402     %{_bindir}/%{name}-*
403 barjac 400332 %{_bindir}/update-grub
404     %{_bindir}/update-grub2
405 barjac 254425 %{_sbindir}/%{name}-*
406     %{_sysconfdir}/bash_completion.d/grub
407     %{_sysconfdir}/grub.d/README
408     %{_sysconfdir}/grub.d/00_header
409     %{_sysconfdir}/grub.d/10_linux
410     %{_sysconfdir}/grub.d/20_linux_xen
411 barjac 550657 %{_sysconfdir}/grub.d/20_ppc_terminfo
412 barjac 425400 %{_sysconfdir}/grub.d/93_memtest
413 barjac 254425 %{_sysconfdir}/grub.d/30_os-prober
414 barjac 399253 %{_sysconfdir}/grub.d/90_persistent
415 barjac 254425 %config(noreplace) %{_sysconfdir}/grub.d/40_custom
416     %config(noreplace) %{_sysconfdir}/grub.d/41_custom
417     %config(noreplace) %{_sysconfdir}/default/grub
418 barjac 399253 %{_datadir}/grub
419 barjac 254425 %config(noreplace) /boot/%{name}/grub.cfg
420 barjac 397190 %config(noreplace) /boot/%{name}/custom.cfg
421 barjac 254425 %{_mandir}/man1/%{name}-*.1*
422     %{_mandir}/man8/%{name}-*.8*
423     %{_filetriggers_dir}/%{name}.filter
424     %{_filetriggers_dir}/%{name}.script
425 barjac 394991
426     %files mageia-theme
427     /boot/%{name}/fonts/unicode.pf2
428 barjac 450000 %dir /boot/%{name}/themes/maggy
429     /boot/%{name}/themes/maggy/*

  ViewVC Help
Powered by ViewVC 1.1.30