Due to huge amount of bots taking interest in registering here registration is now invite-only. Any user can make an invite, you need to create it here and give resulting link to someone to register.
avatar
mikhailnov has added e239fd6d82
move from rpm5 to rpm4 file trigger
... ... --- a/grub2.spec
... ... +++ b/grub2.spec
... ... @@ -10,6 +10,9 @@
10 10
%bcond_with	doc
11 11
%bcond_with	pdf
12 12
13
# autoreconf is run
14
%define _disable_rebuild_configure 1
15
13 16
Summary:	GRUB is a boot loader
14 17
Name:		grub2
15 18
Version:	2.02
... ... @@ -216,8 +219,6 @@ computer architectures and hardware devices.
219 219
%{_infodir}/grub-dev.info*
220 220
%{_mandir}/*/%{name}-*
221 221
%exclude %{_mandir}/*/%{name}-efi-*
222
# RPM filetriggers
223
%{_filetriggers_dir}/%{name}.*
224 222
%dir /boot/%{name}/fonts
225 223
/boot/%{name}/fonts/unicode.pf2
226 224
... ... @@ -253,6 +254,12 @@ if [ ! -d /sys/firmware/efi ]; then
254 254
	# Regenerate grub.cfg on install or update.
255 255
	%{_sbindir}/update-grub2
256 256
fi
257
258
%transfiletriggerin -- /boot
259
if grep -qE 'vmlinuz-|vmlinux-' ; then
260
  %{_sbindir}/update-grub2
261
fi
262
257 263
#-----------------------------------------------------------------------
258 264
259 265
%ifarch %{efi}
... ... @@ -327,6 +334,11 @@ fi
334 334
%setup -q -n grub-%{version}
335 335
%apply_patches
336 336
337
%if %rpm5
338
echo "File triggers are only for rpm4!"
339
exit 1
340
%endif
341
337 342
# Make sure GRUB uses the particular font.
338 343
# The top build directory is searched for it first by 'configure'.
339 344
cp %{SOURCE1} %{unifont}
... ... @@ -487,20 +499,6 @@ install -m 644 -D %{SOURCE2} %{buildroot}%{_sysconfdir}/default/grub
499 499
#Add more useful update-grub2 script
500 500
install -m 755 -D %{SOURCE9} %{buildroot}%{_sbindir}
501 501
502
# Install filetriggers to update grub.cfg on kernel add or remove
503
install -d %{buildroot}%{_filetriggers_dir}
504
pushd %{buildroot}%{_filetriggers_dir} && {
505
	cat > %{name}.filter << EOF
506
^./boot/vmlinuz-
507
EOF
508
	cat > %{name}.script << EOF
509
#!/bin/sh
510
%{_sbindir}/update-grub2
511
EOF
512
	chmod 0755 %{name}.script
513
	popd
514
}
515
516 502
install -m 755 %{SOURCE14} %{buildroot}%{_sbindir}/grub2-cfg-mod
517 503
518 504
%find_lang grub

Comments