1 | %define efi_support 1 |
---|
2 | |
---|
3 | %ifarch %{ix86} |
---|
4 | %define _host_cpu i386 |
---|
5 | %else |
---|
6 | %define _host_cpu %{_arch} |
---|
7 | %endif |
---|
8 | |
---|
9 | %define defshell defaultmenu.sh |
---|
10 | |
---|
11 | Summary: grub - a Multiboot boot loader. |
---|
12 | Summary(ja): grub - マルチブートローダ |
---|
13 | Name: grub |
---|
14 | Version: 0.97 |
---|
15 | Release: 6%{?_dist_release} |
---|
16 | License: GPL |
---|
17 | Group: System Environment/Base |
---|
18 | URL: http://www.gnu.org/software/grub/ |
---|
19 | |
---|
20 | Source0: ftp://alpha.gnu.org/gnu/grub/%{name}-%{version}.tar.gz |
---|
21 | Source1: %{defshell} |
---|
22 | |
---|
23 | # This is from |
---|
24 | # http://git.kernel.org/?p=boot/grub-fedora/grub-fedora.git;a=summary |
---|
25 | Patch0: grub-fedora-18.patch |
---|
26 | Patch1: 0001-Fix-strange-compilation-problem.patch |
---|
27 | Patch2: 0003-Move_network-disable-earlier.patch |
---|
28 | Patch3: 0005-Fix-Apple-CD-fixup.patch |
---|
29 | Patch4: 0006-Avoid-broken-uefi-fs.patch |
---|
30 | Patch5: 0007-fix-uefi-stride.patch |
---|
31 | Patch6: 0008-fix-gop.patch |
---|
32 | |
---|
33 | # for Vine |
---|
34 | Patch1000: grub-fedora-18-uninitialized.patch |
---|
35 | Patch1001: grub-fedora-18-static-efi.patch |
---|
36 | Patch1002: grub-0.97-grub-install-vine.patch |
---|
37 | |
---|
38 | ExclusiveArch: %{ix86} x86_64 |
---|
39 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
40 | Requires(post): install-info, sed, grep, coreutils |
---|
41 | Requires(preun): install-info |
---|
42 | Requires: mktemp |
---|
43 | Requires: util-linux |
---|
44 | BuildRequires: ncurses-devel >= 5.6 |
---|
45 | BuildRequires: glibc-static |
---|
46 | %ifarch x86_64 |
---|
47 | BuildRequires: compat32-glibc-devel |
---|
48 | BuildRequires: compat32-glibc-static |
---|
49 | %endif |
---|
50 | %if %{efi_support} |
---|
51 | BuildRequires: gnu-efi >= 3.0e-9 |
---|
52 | %endif |
---|
53 | BuildRequires: texinfo |
---|
54 | |
---|
55 | %description |
---|
56 | GNU GRUB is a Multiboot boot loader. |
---|
57 | It was derived from GRUB, GRand Unified Bootloader, which was |
---|
58 | originally designed and implemented by Erich Stefan Boleyn. |
---|
59 | |
---|
60 | Briefly, bootloader is the first software program that runs when |
---|
61 | a computer starts. It is responsible for loading and transferring |
---|
62 | control to the operating system kernel software (such as the Hurd |
---|
63 | or the Linux). The kernel, in turn, initializes the rest of the |
---|
64 | operating system (usually GNU). |
---|
65 | |
---|
66 | %description -l ja |
---|
67 | GNU GRUB はマルチブートローダです。 |
---|
68 | この名前は GRand Unified Bootloader (壮大な 統一されたブート |
---|
69 | ローダ) に由来し、元来は Erich Stefan Boleyn によって、設計・ |
---|
70 | 実装されたものです。 |
---|
71 | |
---|
72 | 手短に言えば、ブートローダとはコンピュータが起動する際に最初 |
---|
73 | に実行されるプログラムで、(Hurd や Linux のような) オペレー |
---|
74 | ティングシステムのカーネルをディスクから読み込んで制御を渡す |
---|
75 | 作業を担当します。カーネルは、それを受けて、オペレーティング |
---|
76 | システムの他の部分 (通常は GNU) を初期化します。 |
---|
77 | |
---|
78 | |
---|
79 | %prep |
---|
80 | %setup -q |
---|
81 | %patch0 -p1 |
---|
82 | %patch1 -p1 |
---|
83 | %patch2 -p1 |
---|
84 | %patch3 -p1 |
---|
85 | %patch4 -p1 |
---|
86 | %patch5 -p1 |
---|
87 | %patch6 -p1 |
---|
88 | %patch1000 -p1 |
---|
89 | %patch1001 -p1 |
---|
90 | %patch1002 -p1 |
---|
91 | |
---|
92 | # Modify grub to show the full version number |
---|
93 | sed -i 's/0\.97/%{version}-%{release}/' configure.ac |
---|
94 | |
---|
95 | %build |
---|
96 | autoreconf -if |
---|
97 | GCCVERS=$(gcc --version | head -1 | cut -d\ -f3 | cut -d. -f1) |
---|
98 | # add "-fno-reorder-functions" |
---|
99 | # https://bugzilla.redhat.com/show_bug.cgi?id=718722 |
---|
100 | # https://bugs.launchpad.net/ubuntu/+source/grub/+bug/837815 |
---|
101 | CFLAGS="-Os -g -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused -fno-reorder-functions" |
---|
102 | if [ "$GCCVERS" == "4" ]; then |
---|
103 | CFLAGS="$CFLAGS -Wno-pointer-sign" |
---|
104 | fi |
---|
105 | export CFLAGS |
---|
106 | |
---|
107 | %if %{efi_support} |
---|
108 | %configure --sbindir=/sbin \ |
---|
109 | --disable-auto-linux-mem-opt \ |
---|
110 | --datarootdir=%{_datadir} \ |
---|
111 | --with-platform=efi |
---|
112 | %__make |
---|
113 | mv efi/grub.efi . |
---|
114 | make clean |
---|
115 | %endif |
---|
116 | autoreconf -if |
---|
117 | CFLAGS="$CFLAGS -static" |
---|
118 | export CFLAGS |
---|
119 | %configure --sbindir=/sbin \ |
---|
120 | --datarootdir=%{_datadir} \ |
---|
121 | --disable-auto-linux-mem-opt |
---|
122 | %__make |
---|
123 | |
---|
124 | |
---|
125 | %install |
---|
126 | rm -rf $RPM_BUILD_ROOT |
---|
127 | %makeinstall sbindir=${RPM_BUILD_ROOT}/sbin |
---|
128 | mkdir -p ${RPM_BUILD_ROOT}/boot/grub |
---|
129 | %if %{efi_support} |
---|
130 | mkdir -m 0755 -p ${RPM_BUILD_ROOT}/boot/efi/EFI/vine/ |
---|
131 | install -m 755 grub.efi ${RPM_BUILD_ROOT}/boot/efi/EFI/vine/grub.efi |
---|
132 | %endif |
---|
133 | %{__install} -p -m 644 docs/menu.lst %{buildroot}%{_datadir}/grub/%{_host_cpu}-%{_target_vendor} |
---|
134 | %{__install} -p -m 744 %{SOURCE1} %{buildroot}%{_datadir}/grub/%{_host_cpu}-%{_target_vendor} |
---|
135 | |
---|
136 | # create compat links |
---|
137 | mkdir -p ${RPM_BUILD_ROOT}/%{_sbindir} |
---|
138 | for i in grub grub-install grub-set-default grub-md5-crypt grub-terminfo ;do |
---|
139 | ln -sf ../../sbin/$i ${RPM_BUILD_ROOT}/%{_sbindir}/$i |
---|
140 | done |
---|
141 | mkdir -p ${RPM_BUILD_ROOT}/%{_libdir} |
---|
142 | mv ${RPM_BUILD_ROOT}/%{_datadir}/grub ${RPM_BUILD_ROOT}/%{_libdir}/grub |
---|
143 | ln -sf ../%{_lib}/grub ${RPM_BUILD_ROOT}/%{_datadir}/grub |
---|
144 | |
---|
145 | rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir |
---|
146 | |
---|
147 | %clean |
---|
148 | rm -rf $RPM_BUILD_ROOT |
---|
149 | |
---|
150 | %post |
---|
151 | /sbin/install-info %{_infodir}/grub.info.gz %{_infodir}/dir |
---|
152 | /sbin/install-info %{_infodir}/multiboot.info.gz %{_infodir}/dir |
---|
153 | %{_datadir}/grub/%{_host_cpu}-%{_target_vendor}/%{defshell} |
---|
154 | |
---|
155 | %preun |
---|
156 | if [ $1 = 0 ]; then |
---|
157 | /sbin/install-info --delete %{_infodir}/grub.info.gz %{_infodir}/dir |
---|
158 | /sbin/install-info --delete %{_infodir}/multiboot.info.gz %{_infodir}/dir |
---|
159 | fi |
---|
160 | |
---|
161 | %files |
---|
162 | %defattr(-,root,root) |
---|
163 | %doc COPYING INSTALL README AUTHORS BUGS ChangeLog NEWS THANKS TODO MAINTENANCE |
---|
164 | /boot/grub |
---|
165 | %if %{efi_support} |
---|
166 | %attr(0755,root,root) /boot/efi/EFI/vine |
---|
167 | %endif |
---|
168 | %{_syssbindir}/* |
---|
169 | %{_sbindir}/* |
---|
170 | %{_bindir}/* |
---|
171 | %{_datadir}/grub |
---|
172 | %{_libdir}/grub |
---|
173 | %{_infodir}/*.info* |
---|
174 | %{_mandir}/man*/* |
---|
175 | |
---|
176 | %changelog |
---|
177 | * Sun Aug 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.97-6 |
---|
178 | - add Patch 2,3,4,5,6 from fedora |
---|
179 | - add Requires: util-linux |
---|
180 | - update Patch1002 (grub-0.97-grub-install-vine.patch) |
---|
181 | |
---|
182 | * Sun Jun 14 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.97-5 |
---|
183 | - add BuildRequires: texinfo,gnu-efi |
---|
184 | - update Patch0 from fedora |
---|
185 | - add Patch1 from fedora |
---|
186 | - add Patch1000,1001,1002 |
---|
187 | |
---|
188 | * Fri May 27 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-4 |
---|
189 | - switch to grub-fedora.git to support new features (ext4/efi/...) |
---|
190 | |
---|
191 | * Wed Mar 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-3 |
---|
192 | - add Patch110 to support ext4 filesystem |
---|
193 | - add Patch120 to build with current binutils |
---|
194 | - add Patch130 to build with ncurses-5.6 |
---|
195 | - add R(post): install-info, grep, sed, coreutils |
---|
196 | - add R(preun): install-info |
---|
197 | - add BR: compat32-glibc-{devel,static} for x86_64 |
---|
198 | - add BR: glibc-static |
---|
199 | |
---|
200 | * Wed Jan 21 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-2 |
---|
201 | - add patch100 to support newer e2fsprogs |
---|
202 | |
---|
203 | * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 0.97-1vl5 |
---|
204 | - applied new versioning policy, spec in utf-8 |
---|
205 | |
---|
206 | * Tue May 22 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-0vl8 |
---|
207 | - fix _host_cpu trick |
---|
208 | |
---|
209 | * Tue May 22 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-0vl7 |
---|
210 | - add x86_64 to ExclusiveArch: |
---|
211 | - add BuildRequires: compat32-glibc-devel for x86_64 |
---|
212 | - add "-static" to CFLAGS for x86_64 |
---|
213 | - use special CFLAGS |
---|
214 | - add Patch10 to run configure with new binutils |
---|
215 | |
---|
216 | * Thu Sep 07 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.97-0vl6 |
---|
217 | - add PreReq: grep, sed for defaultmenu.sh |
---|
218 | |
---|
219 | * Tue Sep 5 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.97-0vl5 |
---|
220 | - add initrd in menu.lst file created by defaultmenu.sh |
---|
221 | |
---|
222 | * Mon Jun 26 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.97-0vl4 |
---|
223 | - fix date of previous changelog entry |
---|
224 | - escape macro of past changelog entries |
---|
225 | - change Source1: menu.lst.vine to defautmenu.sh |
---|
226 | - invoke defaultmenu.sh on %%post scriptlet |
---|
227 | |
---|
228 | * Wed Jun 21 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.97-0vl3 |
---|
229 | - remove Requires: ncurses, gpm, bash |
---|
230 | |
---|
231 | * Thu May 12 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.97-0vl2 |
---|
232 | - upstream release |
---|
233 | - add MAINTENANCE to %%doc |
---|
234 | - drop Patch0 (merged in upstream source) |
---|
235 | |
---|
236 | * Sun Mar 20 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.96-0vl3 |
---|
237 | - savedefault patch from upstream CVS: http://savannah.gnu.org/cgi-bin/viewcvs/grub/grub/stage2/stage2.c.diff?r1=1.45&r2=1.46&diff_format=u |
---|
238 | stage2/stage2.c (cmain): Initialize DEFAULT_FILE to an empty |
---|
239 | string. Reported by NATORI Shin <natori@adm.s.u-tokyo.ac.jp>. |
---|
240 | |
---|
241 | * Sun Feb 20 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.96-0vl2 |
---|
242 | - upstream release |
---|
243 | - drop Patch0 (merged) |
---|
244 | - added sample file /usr/lib/grub/i386-pc/menu.lst.vine |
---|
245 | - change installation destination of menu.lst from %%datadir to %%libdir |
---|
246 | |
---|
247 | * Wed Jan 19 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.95-0vl3 |
---|
248 | - applied Patch0 from upstream CVS: |
---|
249 | http://savannah.gnu.org/cgi-bin/viewcvs/grub/grub/util/grub-install.in.diff?r1=1.46&r2=1.47&diff_format=u |
---|
250 | util/grub-install.in (convert): Fix the sed statement for |
---|
251 | Linux. The expression was ambigious in some cases. |
---|
252 | |
---|
253 | * Wed Aug 18 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 0.95-0vl2 |
---|
254 | - catch up to upstream release |
---|
255 | - delete %%_target_platform macro |
---|
256 | - delete gzip info files from %%install macro |
---|
257 | - add BuildRequires: ncurses-devel |
---|
258 | - add Requires: ncurses, gpm, mktemp, bash |
---|
259 | - add PreReq: install-info |
---|
260 | - %%configure with --disable-auto-linux-mem-opt option |
---|
261 | |
---|
262 | * Thu Jul 12 2001 <sagami@vinelinux.org> |
---|
263 | - 0.90-0vl1: %%configure with a trick for _host_cpu, %%makeinstall |
---|
264 | |
---|
265 | * Tue Apr 24 2001 <sagami@vinelinux.org> |
---|
266 | - 0.5.96-0vl1: use some macros |
---|
267 | |
---|
268 | * Wed Oct 11 2000 Yoshihiro Kajiki <kajiki@ylug.org> [0vl2] |
---|
269 | - build for Vine 2.1beta |
---|
270 | |
---|
271 | * Tue Oct 10 2000 Yoshihiro Kajiki <kajiki@ylug.org> [0vl1] |
---|
272 | - update to 0.5.95 and build for Vine 2.0 |
---|
273 | - add Japanese summary and description |
---|
274 | - based on grub-0.5.94-2, Kondara Zoo |
---|
275 | |
---|
276 | * Sun Jun 4 2000 AYUHANA Tomonori <l@kondara.org> |
---|
277 | * /usr/doc/grub-*/menu.lst -> /usr/share/grub/i386-pc/menu.lst |
---|
278 | |
---|
279 | * Thu May 18 2000 AYUHANA Tomonori <l@kondara.org> |
---|
280 | - upgrade to 0.5.93.1 to 0.5.94 |
---|