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