Stop using %{name} for things in the spec file

There's no point to this (the packaging isn't generic, confusion between
grub and grub2 in places, it's not fewer characters to type, have to
think about escaping in macros, ...) and it makes searching for things
needlessly difficult.

This finishes the revert of 967c5629ed
("Don't harcode grub2 in the spec file") that was begun in
af038a0bdc ("Revert "Don't harcode grub2
in the spec file"").

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
This commit is contained in:
Robbie Harwood 2022-04-18 17:01:36 -04:00
parent 1d98b5f260
commit f9344de20a
2 changed files with 159 additions and 159 deletions

View File

@ -237,13 +237,13 @@
%define define_legacy_variant() \ %define define_legacy_variant() \
%{expand:%%package %%{1}} \ %{expand:%%package %%{1}} \
Summary: Bootloader with support for Linux, Multiboot, and more \ Summary: Bootloader with support for Linux, Multiboot, and more \
Provides: %{name} = %{evr} \ Provides: grub2 = %{evr} \
Obsoletes: %{name} < %{evr} \ Obsoletes: grub2 < %{evr} \
Requires: %{name}-common = %{evr} \ Requires: grub2-common = %{evr} \
Requires: %{name}-tools-minimal = %{evr} \ Requires: grub2-tools-minimal = %{evr} \
Requires: %{name}-%{1}-modules = %{evr} \ Requires: grub2-%{1}-modules = %{evr} \
Requires: gettext which file \ Requires: gettext which file \
Requires: %{name}-tools = %{evr} \ Requires: grub2-tools = %{evr} \
Requires(pre): dracut \ Requires(pre): dracut \
Requires(post): dracut \ Requires(post): dracut \
%{expand:%%description %%{1}} \ %{expand:%%description %%{1}} \
@ -255,7 +255,7 @@ This subpackage provides support for %{1} systems. \
%%package %%{1}-modules \ %%package %%{1}-modules \
Summary: Modules used to build custom grub images \ Summary: Modules used to build custom grub images \
BuildArch: noarch \ BuildArch: noarch \
Requires: %%{name}-common = %%{evr} \ Requires: grub2-common = %%{evr} \
%%description %%{1}-modules \ %%description %%{1}-modules \
%%{desc} \ %%{desc} \
This subpackage provides support for rebuilding your own grub.efi. \ This subpackage provides support for rebuilding your own grub.efi. \
@ -266,8 +266,8 @@ This subpackage provides support for rebuilding your own grub.efi. \
%{expand:%%package %%{1}-tools} \ %{expand:%%package %%{1}-tools} \
Summary: Support tools for GRUB. \ Summary: Support tools for GRUB. \
Requires: gettext os-prober which file system-logos \ Requires: gettext os-prober which file system-logos \
Requires: %{name}-common = %{evr} \ Requires: grub2-common = %{evr} \
Requires: %{name}-tools-minimal = %{evr} \ Requires: grub2-tools-minimal = %{evr} \
Requires: os-prober >= 1.58-11 \ Requires: os-prober >= 1.58-11 \
Requires: gettext which file \ Requires: gettext which file \
\ \
@ -280,12 +280,12 @@ This subpackage provides tools for support of %%{1} platforms. \
%{expand:%%package %{1}} \ %{expand:%%package %{1}} \
Summary: GRUB for EFI systems. \ Summary: GRUB for EFI systems. \
Requires: efi-filesystem \ Requires: efi-filesystem \
Requires: %{name}-common = %{evr} \ Requires: grub2-common = %{evr} \
Requires: %{name}-tools-minimal >= %{evr} \ Requires: grub2-tools-minimal >= %{evr} \
Requires: %{name}-tools = %{evr} \ Requires: grub2-tools = %{evr} \
Provides: %{name}-efi = %{evr} \ Provides: grub2-efi = %{evr} \
%{?legacy_provides:Provides: %{name} = %{evr}} \ %{?legacy_provides:Provides: grub2 = %{evr}} \
%{-o:Obsoletes: %{name}-efi < %{evr}} \ %{-o:Obsoletes: grub2-efi < %{evr}} \
\ \
%{expand:%%description %{1}} \ %{expand:%%description %{1}} \
%{desc} \ %{desc} \
@ -296,9 +296,9 @@ This subpackage provides support for %{1} systems. \
%{expand:%%package %{1}-modules} \ %{expand:%%package %{1}-modules} \
Summary: Modules used to build custom grub.efi images \ Summary: Modules used to build custom grub.efi images \
BuildArch: noarch \ BuildArch: noarch \
Requires: %{name}-common = %{evr} \ Requires: grub2-common = %{evr} \
Provides: %{name}-efi-modules = %{evr} \ Provides: grub2-efi-modules = %{evr} \
Obsoletes: %{name}-efi-modules < %{evr} \ Obsoletes: grub2-efi-modules < %{evr} \
%{expand:%%description %{1}-modules} \ %{expand:%%description %{1}-modules} \
%{desc} \ %{desc} \
This subpackage provides support for rebuilding your own grub.efi. \ This subpackage provides support for rebuilding your own grub.efi. \
@ -306,8 +306,8 @@ This subpackage provides support for rebuilding your own grub.efi. \
\ \
%{expand:%%package %{1}-cdboot} \ %{expand:%%package %{1}-cdboot} \
Summary: Files used to boot removeable media with EFI \ Summary: Files used to boot removeable media with EFI \
Requires: %{name}-common = %{evr} \ Requires: grub2-common = %{evr} \
Provides: %{name}-efi-cdboot = %{evr} \ Provides: grub2-efi-cdboot = %{evr} \
%{expand:%%description %{1}-cdboot} \ %{expand:%%description %{1}-cdboot} \
%{desc} \ %{desc} \
This subpackage provides optional components of grub used with removeable media on %{1} systems.\ This subpackage provides optional components of grub used with removeable media on %{1} systems.\
@ -327,7 +327,7 @@ git init \
echo '![[:digit:]][[:digit:]]_*.in' > util/grub.d/.gitignore \ echo '![[:digit:]][[:digit:]]_*.in' > util/grub.d/.gitignore \
echo '!*.[[:digit:]]' > util/.gitignore \ echo '!*.[[:digit:]]' > util/.gitignore \
echo '!config.h' > include/grub/emu/.gitignore \ echo '!config.h' > include/grub/emu/.gitignore \
git config user.email "%{name}-owner@fedoraproject.org" \ git config user.email "grub2-owner@fedoraproject.org" \
git config user.name "Fedora Ninjas" \ git config user.name "Fedora Ninjas" \
git config gc.auto 0 \ git config gc.auto 0 \
rm -f configure \ rm -f configure \
@ -350,8 +350,8 @@ rm -r build-aux m4 \
--with-platform=efi \\\ --with-platform=efi \\\
--with-utils=host \\\ --with-utils=host \\\
--target=%{1} \\\ --target=%{1} \\\
--with-grubdir=%{name} \\\ --with-grubdir=grub2 \\\
--program-transform-name=s,grub,%{name}, \\\ --program-transform-name=s,grub,grub2, \\\
--disable-werror || ( cat config.log ; exit 1 ) \ --disable-werror || ( cat config.log ; exit 1 ) \
git add . \ git add . \
git commit -m "After efi configure" \ git commit -m "After efi configure" \
@ -454,8 +454,8 @@ cd grub-%{1}-%{tarversion} \
--with-platform=%{platform} \\\ --with-platform=%{platform} \\\
--with-utils=host \\\ --with-utils=host \\\
--target=%{_target_platform} \\\ --target=%{_target_platform} \\\
--with-grubdir=%{name} \\\ --with-grubdir=grub2 \\\
--program-transform-name=s,grub,%{name}, \\\ --program-transform-name=s,grub,grub2, \\\
--disable-werror || ( cat config.log ; exit 1 ) \ --disable-werror || ( cat config.log ; exit 1 ) \
git add . \ git add . \
git commit -m "After legacy configure" \ git commit -m "After legacy configure" \
@ -471,8 +471,8 @@ cd grub-emu-%{tarversion} \
HOST_CPPFLAGS="-I$(pwd)" \\\ HOST_CPPFLAGS="-I$(pwd)" \\\
HOST_LDFLAGS="%{legacy_host_ldflags}" \\\ HOST_LDFLAGS="%{legacy_host_ldflags}" \\\
--with-platform=emu \\\ --with-platform=emu \\\
--with-grubdir=%{name} \\\ --with-grubdir=grub2 \\\
--program-transform-name=s,grub,%{name}, \\\ --program-transform-name=s,grub,grub2, \\\
--disable-werror || ( cat config.log ; exit 1 ) \ --disable-werror || ( cat config.log ; exit 1 ) \
git add . \ git add . \
git commit -m "After emu configure" \ git commit -m "After emu configure" \
@ -498,7 +498,7 @@ find . '(' -iname gdb_grub \\\
find $RPM_BUILD_ROOT -type f -iname "*.mod*" -exec chmod a-x {} '\;' \ find $RPM_BUILD_ROOT -type f -iname "*.mod*" -exec chmod a-x {} '\;' \
install -m 700 %{2} $RPM_BUILD_ROOT%{efi_esp_dir}/%{2} \ install -m 700 %{2} $RPM_BUILD_ROOT%{efi_esp_dir}/%{2} \
install -m 700 %{3} $RPM_BUILD_ROOT%{efi_esp_dir}/%{3} \ install -m 700 %{3} $RPM_BUILD_ROOT%{efi_esp_dir}/%{3} \
%{expand:%%do_install_protected_file %{name}-%{alt_package_arch}} \ %{expand:%%do_install_protected_file grub2-%{alt_package_arch}} \
cd .. \ cd .. \
%{nil} %{nil}
@ -512,18 +512,18 @@ if [ -f $RPM_BUILD_ROOT%{_infodir}/grub-dev.info ]; then \
rm -f $RPM_BUILD_ROOT%{_infodir}/grub-dev.info \ rm -f $RPM_BUILD_ROOT%{_infodir}/grub-dev.info \
fi \ fi \
find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;' \ find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;' \
ln -s ../boot/%{name}/grub.cfg \\\ ln -s ../boot/grub2/grub.cfg \\\
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \ $RPM_BUILD_ROOT%{_sysconfdir}/grub2-efi.cfg \
install -m 700 %{2} $RPM_BUILD_ROOT%{efi_esp_dir}/%{2} \ install -m 700 %{2} $RPM_BUILD_ROOT%{efi_esp_dir}/%{2} \
install -m 700 %{3} $RPM_BUILD_ROOT%{efi_esp_dir}/%{3} \ install -m 700 %{3} $RPM_BUILD_ROOT%{efi_esp_dir}/%{3} \
%ifarch %{arm} \ %ifarch %{arm} \
install -D -m 700 %{2} $RPM_BUILD_ROOT%{efi_esp_boot}/BOOTARM.EFI \ install -D -m 700 %{2} $RPM_BUILD_ROOT%{efi_esp_boot}/BOOTARM.EFI \
%endif \ %endif \
install -D -m 700 unicode.pf2 \\\ install -D -m 700 unicode.pf2 \\\
${RPM_BUILD_ROOT}/boot/%{name}/fonts/unicode.pf2 \ ${RPM_BUILD_ROOT}/boot/grub2/fonts/unicode.pf2 \
${RPM_BUILD_ROOT}/%{_bindir}/%{name}-editenv \\\ ${RPM_BUILD_ROOT}/%{_bindir}/grub2-editenv \\\
${RPM_BUILD_ROOT}/boot/%{name}/grubenv create \ ${RPM_BUILD_ROOT}/boot/grub2/grubenv create \
%{expand:%%do_install_protected_file %{name}-%{package_arch}} \ %{expand:%%do_install_protected_file grub2-%{package_arch}} \
cd .. \ cd .. \
%{nil} %{nil}
@ -541,10 +541,10 @@ if [ -f $RPM_BUILD_ROOT/%{_libdir}/grub/%{1}/grub2.chrp ]; then \
$RPM_BUILD_ROOT/%{_libdir}/grub/%{1}/grub.chrp \ $RPM_BUILD_ROOT/%{_libdir}/grub/%{1}/grub.chrp \
fi \ fi \
if [ %{3} -eq 0 ]; then \ if [ %{3} -eq 0 ]; then \
${RPM_BUILD_ROOT}/%{_bindir}/%{name}-editenv \\\ ${RPM_BUILD_ROOT}/%{_bindir}/grub2-editenv \\\
${RPM_BUILD_ROOT}/boot/%{name}/grubenv create \ ${RPM_BUILD_ROOT}/boot/grub2/grubenv create \
fi \ fi \
%{expand:%%do_install_protected_file %{name}-%{legacy_package_arch}} \ %{expand:%%do_install_protected_file grub2-%{legacy_package_arch}} \
cd .. \ cd .. \
%{nil} %{nil}
@ -571,30 +571,30 @@ install -d -m 0755 \\\
$RPM_BUILD_ROOT%{_infodir}/ \ $RPM_BUILD_ROOT%{_infodir}/ \
cp -a $RPM_BUILD_ROOT%{_datarootdir}/locale/en\@quot \\\ cp -a $RPM_BUILD_ROOT%{_datarootdir}/locale/en\@quot \\\
$RPM_BUILD_ROOT%{_datarootdir}/locale/en \ $RPM_BUILD_ROOT%{_datarootdir}/locale/en \
cp docs/grub.info $RPM_BUILD_ROOT%{_infodir}/%{name}.info \ cp docs/grub.info $RPM_BUILD_ROOT%{_infodir}/grub2.info \
cp docs/grub-dev.info \\\ cp docs/grub-dev.info \\\
$RPM_BUILD_ROOT%{_infodir}/%{name}-dev.info \ $RPM_BUILD_ROOT%{_infodir}/grub2-dev.info \
install -d -m 0700 ${RPM_BUILD_ROOT}%{efi_esp_dir}/ \ install -d -m 0700 ${RPM_BUILD_ROOT}%{efi_esp_dir}/ \
install -d -m 0700 ${RPM_BUILD_ROOT}/boot/grub2/ \ install -d -m 0700 ${RPM_BUILD_ROOT}/boot/grub2/ \
install -d -m 0700 ${RPM_BUILD_ROOT}/boot/loader/entries \ install -d -m 0700 ${RPM_BUILD_ROOT}/boot/loader/entries \
install -d -m 0700 ${RPM_BUILD_ROOT}/boot/%{name}/themes/system \ install -d -m 0700 ${RPM_BUILD_ROOT}/boot/grub2/themes/system \
install -d -m 0700 ${RPM_BUILD_ROOT}%{_sysconfdir}/default \ install -d -m 0700 ${RPM_BUILD_ROOT}%{_sysconfdir}/default \
install -d -m 0700 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig \ install -d -m 0700 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig \
touch ${RPM_BUILD_ROOT}%{_sysconfdir}/default/grub \ touch ${RPM_BUILD_ROOT}%{_sysconfdir}/default/grub \
ln -sf ../default/grub \\\ ln -sf ../default/grub \\\
${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/grub \ ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/grub \
touch ${RPM_BUILD_ROOT}/boot/%{name}/grub.cfg \ touch ${RPM_BUILD_ROOT}/boot/grub2/grub.cfg \
ln -s ../boot/%{name}/grub.cfg \\\ ln -s ../boot/grub2/grub.cfg \\\
${RPM_BUILD_ROOT}%{_sysconfdir}/grub2.cfg \ ${RPM_BUILD_ROOT}%{_sysconfdir}/grub2.cfg \
%{nil} %{nil}
%define define_legacy_variant_files() \ %define define_legacy_variant_files() \
%{expand:%%files %{1}} \ %{expand:%%files %{1}} \
%defattr(-,root,root,-) \ %defattr(-,root,root,-) \
%config(noreplace) %{_sysconfdir}/%{name}.cfg \ %config(noreplace) %{_sysconfdir}/grub2.cfg \
%ghost %config(noreplace) %attr(0700,root,root)/boot/%{name}/grub.cfg \ %ghost %config(noreplace) %attr(0700,root,root)/boot/grub2/grub.cfg \
%dir %attr(0700,root,root)/boot/loader/entries \ %dir %attr(0700,root,root)/boot/loader/entries \
%attr(0644,root,root) %config(noreplace) /etc/dnf/protected.d/%{name}-%{1}.conf \ %attr(0644,root,root) %config(noreplace) /etc/dnf/protected.d/grub2-%{1}.conf \
\ \
%{expand:%if 0%{?with_legacy_modules} \ %{expand:%if 0%{?with_legacy_modules} \
%{expand:%%files %{1}-modules} \ %{expand:%%files %{1}-modules} \
@ -612,18 +612,18 @@ ln -s ../boot/%{name}/grub.cfg \\\
%define define_efi_variant_files() \ %define define_efi_variant_files() \
%{expand:%%files %{1}} \ %{expand:%%files %{1}} \
%defattr(-,root,root,-) \ %defattr(-,root,root,-) \
%config(noreplace) %{_sysconfdir}/%{name}.cfg \ %config(noreplace) %{_sysconfdir}/grub2.cfg \
%config(noreplace) %{_sysconfdir}/%{name}-efi.cfg \ %config(noreplace) %{_sysconfdir}/grub2-efi.cfg \
%attr(0700,root,root)%{efi_esp_dir}/%{2} \ %attr(0700,root,root)%{efi_esp_dir}/%{2} \
%ifarch %{arm} \ %ifarch %{arm} \
%attr(0700,root,root)%{efi_esp_boot}/BOOTARM.EFI \ %attr(0700,root,root)%{efi_esp_boot}/BOOTARM.EFI \
%endif \ %endif \
%attr(0700,root,root)/boot/%{name}/fonts \ %attr(0700,root,root)/boot/grub2/fonts \
%dir %attr(0700,root,root)/boot/loader/entries \ %dir %attr(0700,root,root)/boot/loader/entries \
%ghost %config(noreplace) %attr(0700,root,root)/boot/%{name}/grub.cfg \ %ghost %config(noreplace) %attr(0700,root,root)/boot/grub2/grub.cfg \
%ghost %config(noreplace) %attr(0700,root,root)%{efi_esp_dir}/grub.cfg \ %ghost %config(noreplace) %attr(0700,root,root)%{efi_esp_dir}/grub.cfg \
%config(noreplace) %verify(not size mode md5 mtime) /boot/grub2/grubenv \ %config(noreplace) %verify(not size mode md5 mtime) /boot/grub2/grubenv \
%attr(0644,root,root) %config(noreplace) /etc/dnf/protected.d/%{name}-%{1}.conf \ %attr(0644,root,root) %config(noreplace) /etc/dnf/protected.d/grub2-%{1}.conf \
%{expand:%if 0%{?without_efi_modules} \ %{expand:%if 0%{?without_efi_modules} \
%exclude %{_libdir}/grub/%{6} \ %exclude %{_libdir}/grub/%{6} \
%exclude %{_libdir}/grub/%{6}/* \ %exclude %{_libdir}/grub/%{6}/* \
@ -640,5 +640,5 @@ ln -s ../boot/%{name}/grub.cfg \\\
%{expand:%%files %{1}-cdboot} \ %{expand:%%files %{1}-cdboot} \
%defattr(-,root,root,-) \ %defattr(-,root,root,-) \
%attr(0700,root,root)%{efi_esp_dir}/%{3} \ %attr(0700,root,root)%{efi_esp_dir}/%{3} \
%attr(0700,root,root)/boot/%{name}/fonts \ %attr(0700,root,root)/boot/grub2/fonts \
%{nil} %{nil}

View File

@ -59,12 +59,12 @@ BuildRequires: ccache
%endif %endif
ExcludeArch: s390 s390x %{ix86} ExcludeArch: s390 s390x %{ix86}
Obsoletes: %{name} <= %{evr} Obsoletes: grub2 <= %{evr}
%if 0%{with_legacy_arch} %if 0%{with_legacy_arch}
Requires: %{name}-%{legacy_package_arch} = %{evr} Requires: grub2-%{legacy_package_arch} = %{evr}
%else %else
Requires: %{name}-%{package_arch} = %{evr} Requires: grub2-%{package_arch} = %{evr}
%endif %endif
%global desc \ %global desc \
@ -94,8 +94,8 @@ subpackages.
%package tools %package tools
Summary: Support tools for GRUB. Summary: Support tools for GRUB.
Obsoletes: %{name}-tools < %{evr} Obsoletes: grub2-tools < %{evr}
Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: grub2-common = %{epoch}:%{version}-%{release}
Requires: gettext os-prober file Requires: gettext os-prober file
Requires(pre): dracut Requires(pre): dracut
Requires(pre): grep Requires(pre): grep
@ -109,8 +109,8 @@ This subpackage provides tools for support of all platforms.
%package tools-efi %package tools-efi
Summary: Support tools for GRUB. Summary: Support tools for GRUB.
Requires: gettext os-prober file Requires: gettext os-prober file
Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: grub2-common = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-tools < %{evr} Obsoletes: grub2-tools < %{evr}
%description tools-efi %description tools-efi
%{desc} %{desc}
@ -120,8 +120,8 @@ This subpackage provides tools for support of EFI platforms.
%package tools-minimal %package tools-minimal
Summary: Support tools for GRUB. Summary: Support tools for GRUB.
Requires: gettext Requires: gettext
Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: grub2-common = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-tools < %{evr} Obsoletes: grub2-tools < %{evr}
%description tools-minimal %description tools-minimal
%{desc} %{desc}
@ -130,9 +130,9 @@ This subpackage provides tools for support of all platforms.
%package tools-extra %package tools-extra
Summary: Support tools for GRUB. Summary: Support tools for GRUB.
Requires: gettext os-prober file Requires: gettext os-prober file
Requires: %{name}-tools-minimal = %{epoch}:%{version}-%{release} Requires: grub2-tools-minimal = %{epoch}:%{version}-%{release}
Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: grub2-common = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-tools < %{evr} Obsoletes: grub2-tools < %{evr}
%description tools-extra %description tools-extra
%{desc} %{desc}
@ -151,7 +151,7 @@ This subpackage provides tools for support of all platforms.
%if 0%{with_emu_arch} %if 0%{with_emu_arch}
%package emu %package emu
Summary: GRUB user-space emulation. Summary: GRUB user-space emulation.
Requires: %{name}-tools-minimal = %{epoch}:%{version}-%{release} Requires: grub2-tools-minimal = %{epoch}:%{version}-%{release}
%description emu %description emu
%{desc} %{desc}
@ -159,7 +159,7 @@ This subpackage provides the GRUB user-space emulation support of all platforms.
%package emu-modules %package emu-modules
Summary: GRUB user-space emulation modules. Summary: GRUB user-space emulation modules.
Requires: %{name}-tools-minimal = %{epoch}:%{version}-%{release} Requires: grub2-tools-minimal = %{epoch}:%{version}-%{release}
%description emu-modules %description emu-modules
%{desc} %{desc}
@ -236,14 +236,14 @@ rm -fr $RPM_BUILD_ROOT
%{expand:%do_emu_install %%{package_arch}} %{expand:%do_emu_install %%{package_arch}}
%endif %endif
rm -f $RPM_BUILD_ROOT%{_infodir}/dir rm -f $RPM_BUILD_ROOT%{_infodir}/dir
ln -s %{name}-set-password ${RPM_BUILD_ROOT}/%{_sbindir}/%{name}-setpassword ln -s grub2-set-password ${RPM_BUILD_ROOT}/%{_sbindir}/grub2-setpassword
echo '.so man8/%{name}-set-password.8' > ${RPM_BUILD_ROOT}/%{_datadir}/man/man8/%{name}-setpassword.8 echo '.so man8/grub2-set-password.8' > ${RPM_BUILD_ROOT}/%{_datadir}/man/man8/grub2-setpassword.8
%ifnarch x86_64 %ifnarch x86_64
rm -vf ${RPM_BUILD_ROOT}/%{_bindir}/%{name}-render-label rm -vf ${RPM_BUILD_ROOT}/%{_bindir}/grub2-render-label
rm -vf ${RPM_BUILD_ROOT}/%{_sbindir}/%{name}-bios-setup rm -vf ${RPM_BUILD_ROOT}/%{_sbindir}/grub2-bios-setup
rm -vf ${RPM_BUILD_ROOT}/%{_sbindir}/%{name}-macbless rm -vf ${RPM_BUILD_ROOT}/%{_sbindir}/grub2-macbless
%endif %endif
%{expand:%%do_install_protected_file %{name}-tools-minimal} %{expand:%%do_install_protected_file grub2-tools-minimal}
%find_lang grub %find_lang grub
@ -364,9 +364,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%{_prefix}/lib/kernel/install.d/99-grub-mkconfig.install %{_prefix}/lib/kernel/install.d/99-grub-mkconfig.install
%dir %{_datarootdir}/grub %dir %{_datarootdir}/grub
%exclude %{_datarootdir}/grub/* %exclude %{_datarootdir}/grub/*
%dir /boot/%{name} %dir /boot/grub2
%dir /boot/%{name}/themes/ %dir /boot/grub2/themes/
%dir /boot/%{name}/themes/system %dir /boot/grub2/themes/system
%attr(0700,root,root) %dir /boot/grub2 %attr(0700,root,root) %dir /boot/grub2
%exclude /boot/grub2/* %exclude /boot/grub2/*
%dir %attr(0700,root,root) %{efi_esp_dir} %dir %attr(0700,root,root) %{efi_esp_dir}
@ -379,30 +379,30 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%doc docs/font_char_metrics.png %doc docs/font_char_metrics.png
%files tools-minimal %files tools-minimal
%{_sbindir}/%{name}-get-kernel-settings %{_sbindir}/grub2-get-kernel-settings
%{_sbindir}/%{name}-probe %{_sbindir}/grub2-probe
%attr(4755, root, root) %{_sbindir}/%{name}-set-bootflag %attr(4755, root, root) %{_sbindir}/grub2-set-bootflag
%{_sbindir}/%{name}-set-default %{_sbindir}/grub2-set-default
%{_sbindir}/%{name}-set*password %{_sbindir}/grub2-set*password
%{_bindir}/%{name}-editenv %{_bindir}/grub2-editenv
%{_bindir}/%{name}-mkpasswd-pbkdf2 %{_bindir}/grub2-mkpasswd-pbkdf2
%{_bindir}/%{name}-mount %{_bindir}/grub2-mount
%attr(0644,root,root) %config(noreplace) /etc/dnf/protected.d/%{name}-tools-minimal.conf %attr(0644,root,root) %config(noreplace) /etc/dnf/protected.d/grub2-tools-minimal.conf
%{_datadir}/man/man3/%{name}-get-kernel-settings* %{_datadir}/man/man3/grub2-get-kernel-settings*
%{_datadir}/man/man8/%{name}-set-default* %{_datadir}/man/man8/grub2-set-default*
%{_datadir}/man/man8/%{name}-set*password* %{_datadir}/man/man8/grub2-set*password*
%{_datadir}/man/man1/%{name}-editenv* %{_datadir}/man/man1/grub2-editenv*
%{_datadir}/man/man1/%{name}-mkpasswd-* %{_datadir}/man/man1/grub2-mkpasswd-*
%ifarch x86_64 %ifarch x86_64
%files tools-efi %files tools-efi
%{_bindir}/%{name}-glue-efi %{_bindir}/grub2-glue-efi
%{_bindir}/%{name}-render-label %{_bindir}/grub2-render-label
%{_sbindir}/%{name}-macbless %{_sbindir}/grub2-macbless
%{_datadir}/man/man1/%{name}-glue-efi* %{_datadir}/man/man1/grub2-glue-efi*
%{_datadir}/man/man1/%{name}-render-label* %{_datadir}/man/man1/grub2-render-label*
%{_datadir}/man/man8/%{name}-macbless* %{_datadir}/man/man8/grub2-macbless*
%endif %endif
%files tools %files tools
@ -414,98 +414,98 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%{_userunitdir}/timers.target.wants %{_userunitdir}/timers.target.wants
%{_unitdir}/grub-boot-indeterminate.service %{_unitdir}/grub-boot-indeterminate.service
%{_unitdir}/system-update.target.wants %{_unitdir}/system-update.target.wants
%{_unitdir}/%{name}-systemd-integration.service %{_unitdir}/grub2-systemd-integration.service
%{_unitdir}/reboot.target.wants %{_unitdir}/reboot.target.wants
%{_unitdir}/systemd-logind.service.d %{_unitdir}/systemd-logind.service.d
%{_infodir}/%{name}* %{_infodir}/grub2*
%{_datarootdir}/grub/* %{_datarootdir}/grub/*
%{_sbindir}/%{name}-install %{_sbindir}/grub2-install
%exclude %{_datarootdir}/grub/themes %exclude %{_datarootdir}/grub/themes
%exclude %{_datarootdir}/grub/*.h %exclude %{_datarootdir}/grub/*.h
%{_datarootdir}/bash-completion/completions/grub %{_datarootdir}/bash-completion/completions/grub
%{_sbindir}/%{name}-mkconfig %{_sbindir}/grub2-mkconfig
%{_sbindir}/%{name}-switch-to-blscfg %{_sbindir}/grub2-switch-to-blscfg
%{_sbindir}/%{name}-rpm-sort %{_sbindir}/grub2-rpm-sort
%{_sbindir}/%{name}-reboot %{_sbindir}/grub2-reboot
%{_bindir}/%{name}-file %{_bindir}/grub2-file
%{_bindir}/%{name}-menulst2cfg %{_bindir}/grub2-menulst2cfg
%{_bindir}/%{name}-mkimage %{_bindir}/grub2-mkimage
%{_bindir}/%{name}-mkrelpath %{_bindir}/grub2-mkrelpath
%{_bindir}/%{name}-script-check %{_bindir}/grub2-script-check
%{_libexecdir}/%{name} %{_libexecdir}/grub2
%{_datadir}/man/man?/* %{_datadir}/man/man?/*
# exclude man pages from tools-extra # exclude man pages from tools-extra
%exclude %{_datadir}/man/man8/%{name}-sparc64-setup* %exclude %{_datadir}/man/man8/grub2-sparc64-setup*
%exclude %{_datadir}/man/man1/%{name}-fstest* %exclude %{_datadir}/man/man1/grub2-fstest*
%exclude %{_datadir}/man/man1/%{name}-glue-efi* %exclude %{_datadir}/man/man1/grub2-glue-efi*
%exclude %{_datadir}/man/man1/%{name}-kbdcomp* %exclude %{_datadir}/man/man1/grub2-kbdcomp*
%exclude %{_datadir}/man/man1/%{name}-mkfont* %exclude %{_datadir}/man/man1/grub2-mkfont*
%exclude %{_datadir}/man/man1/%{name}-mklayout* %exclude %{_datadir}/man/man1/grub2-mklayout*
%exclude %{_datadir}/man/man1/%{name}-mknetdir* %exclude %{_datadir}/man/man1/grub2-mknetdir*
%exclude %{_datadir}/man/man1/%{name}-mkrescue* %exclude %{_datadir}/man/man1/grub2-mkrescue*
%exclude %{_datadir}/man/man1/%{name}-mkstandalone* %exclude %{_datadir}/man/man1/grub2-mkstandalone*
%exclude %{_datadir}/man/man1/%{name}-syslinux2cfg* %exclude %{_datadir}/man/man1/grub2-syslinux2cfg*
# exclude man pages from tools-minimal # exclude man pages from tools-minimal
%exclude %{_datadir}/man/man3/%{name}-get-kernel-settings* %exclude %{_datadir}/man/man3/grub2-get-kernel-settings*
%exclude %{_datadir}/man/man8/%{name}-set-default* %exclude %{_datadir}/man/man8/grub2-set-default*
%exclude %{_datadir}/man/man8/%{name}-set*password* %exclude %{_datadir}/man/man8/grub2-set*password*
%exclude %{_datadir}/man/man1/%{name}-editenv* %exclude %{_datadir}/man/man1/grub2-editenv*
%exclude %{_datadir}/man/man1/%{name}-mkpasswd-* %exclude %{_datadir}/man/man1/grub2-mkpasswd-*
%exclude %{_datadir}/man/man8/%{name}-macbless* %exclude %{_datadir}/man/man8/grub2-macbless*
%exclude %{_datadir}/man/man1/%{name}-render-label* %exclude %{_datadir}/man/man1/grub2-render-label*
%if %{with_legacy_arch} %if %{with_legacy_arch}
%{_sbindir}/%{name}-install %{_sbindir}/grub2-install
%ifarch x86_64 %ifarch x86_64
%{_sbindir}/%{name}-bios-setup %{_sbindir}/grub2-bios-setup
%else %else
%exclude %{_sbindir}/%{name}-bios-setup %exclude %{_sbindir}/grub2-bios-setup
%exclude %{_datadir}/man/man8/%{name}-bios-setup* %exclude %{_datadir}/man/man8/grub2-bios-setup*
%endif %endif
%ifarch %{sparc} %ifarch %{sparc}
%{_sbindir}/%{name}-sparc64-setup %{_sbindir}/grub2-sparc64-setup
%else %else
%exclude %{_sbindir}/%{name}-sparc64-setup %exclude %{_sbindir}/grub2-sparc64-setup
%exclude %{_datadir}/man/man8/%{name}-sparc64-setup* %exclude %{_datadir}/man/man8/grub2-sparc64-setup*
%endif %endif
%ifarch %{sparc} ppc ppc64 ppc64le %ifarch %{sparc} ppc ppc64 ppc64le
%{_sbindir}/%{name}-ofpathname %{_sbindir}/grub2-ofpathname
%else %else
%exclude %{_sbindir}/%{name}-ofpathname %exclude %{_sbindir}/grub2-ofpathname
%exclude %{_datadir}/man/man8/%{name}-ofpathname* %exclude %{_datadir}/man/man8/grub2-ofpathname*
%endif %endif
%endif %endif
%files tools-extra %files tools-extra
%{_bindir}/%{name}-fstest %{_bindir}/grub2-fstest
%{_bindir}/%{name}-kbdcomp %{_bindir}/grub2-kbdcomp
%{_bindir}/%{name}-mkfont %{_bindir}/grub2-mkfont
%{_bindir}/%{name}-mklayout %{_bindir}/grub2-mklayout
%{_bindir}/%{name}-mknetdir %{_bindir}/grub2-mknetdir
%ifnarch %{sparc} %ifnarch %{sparc}
%{_bindir}/%{name}-mkrescue %{_bindir}/grub2-mkrescue
%{_datadir}/man/man1/%{name}-mkrescue* %{_datadir}/man/man1/grub2-mkrescue*
%else %else
%exclude %{_datadir}/man/man1/%{name}-mkrescue* %exclude %{_datadir}/man/man1/grub2-mkrescue*
%endif %endif
%{_bindir}/%{name}-mkstandalone %{_bindir}/grub2-mkstandalone
%{_bindir}/%{name}-syslinux2cfg %{_bindir}/grub2-syslinux2cfg
%{_sysconfdir}/sysconfig/grub %{_sysconfdir}/sysconfig/grub
%{_datadir}/man/man1/%{name}-fstest* %{_datadir}/man/man1/grub2-fstest*
%{_datadir}/man/man1/%{name}-kbdcomp* %{_datadir}/man/man1/grub2-kbdcomp*
%{_datadir}/man/man1/%{name}-mkfont* %{_datadir}/man/man1/grub2-mkfont*
%{_datadir}/man/man1/%{name}-mklayout* %{_datadir}/man/man1/grub2-mklayout*
%{_datadir}/man/man1/%{name}-mknetdir* %{_datadir}/man/man1/grub2-mknetdir*
%{_datadir}/man/man1/%{name}-mkstandalone* %{_datadir}/man/man1/grub2-mkstandalone*
%{_datadir}/man/man1/%{name}-syslinux2cfg* %{_datadir}/man/man1/grub2-syslinux2cfg*
%exclude %{_bindir}/%{name}-glue-efi %exclude %{_bindir}/grub2-glue-efi
%exclude %{_sbindir}/%{name}-sparc64-setup %exclude %{_sbindir}/grub2-sparc64-setup
%exclude %{_sbindir}/%{name}-ofpathname %exclude %{_sbindir}/grub2-ofpathname
%exclude %{_datadir}/man/man1/%{name}-glue-efi* %exclude %{_datadir}/man/man1/grub2-glue-efi*
%exclude %{_datadir}/man/man8/%{name}-ofpathname* %exclude %{_datadir}/man/man8/grub2-ofpathname*
%exclude %{_datadir}/man/man8/%{name}-sparc64-setup* %exclude %{_datadir}/man/man8/grub2-sparc64-setup*
%exclude %{_datarootdir}/grub/themes/starfield %exclude %{_datarootdir}/grub/themes/starfield
%if 0%{with_efi_arch} %if 0%{with_efi_arch}
@ -520,8 +520,8 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%if 0%{with_emu_arch} %if 0%{with_emu_arch}
%files emu %files emu
%{_bindir}/%{name}-emu* %{_bindir}/grub2-emu*
%{_datadir}/man/man1/%{name}-emu* %{_datadir}/man/man1/grub2-emu*
%files emu-modules %files emu-modules
%{_libdir}/grub/%{emuarch}-emu/* %{_libdir}/grub/%{emuarch}-emu/*