From 434cc479bc458663fbadbf7cb5a23abb92e6dde5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 17 Apr 2024 13:41:17 +0200 Subject: [PATCH] Fix build when %_bindir==%_sbindir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Preparation for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin. Also remove duplicate listing in %files. Signed-off-by: Zbigniew Jędrzejewski-Szmek --- grub2.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/grub2.spec b/grub2.spec index 1f80842..a6084da 100644 --- a/grub2.spec +++ b/grub2.spec @@ -287,8 +287,9 @@ ln -s ../grub2-systemd-integration.service \ %global dip RPM_BUILD_ROOT=%{finddebugroot} %{__debug_install_post} %define __debug_install_post ( \ mkdir -p %{finddebugroot}/usr \ - mv ${RPM_BUILD_ROOT}/usr/bin %{finddebugroot}/usr/bin \ - mv ${RPM_BUILD_ROOT}/usr/sbin %{finddebugroot}/usr/sbin \ + mv %{buildroot}/usr/bin %{finddebugroot}/usr/bin \ + [ "%{_sbindir}" != "%{_bindir}" ] && \\\ + mv %{buildroot}/usr/sbin %{finddebugroot}/usr/sbin \ %{dip} \ install -m 0755 -d %{buildroot}/usr/lib/ %{buildroot}/usr/src/ \ cp -al %{finddebugroot}/usr/lib/debug/ \\\ @@ -296,7 +297,8 @@ ln -s ../grub2-systemd-integration.service \ cp -al %{finddebugroot}/usr/src/debug/ \\\ %{buildroot}/usr/src/debug/ ) \ mv %{finddebugroot}/usr/bin %{buildroot}/usr/bin \ - mv %{finddebugroot}/usr/sbin %{buildroot}/usr/sbin \ + [ "%{_sbindir}" != "%{_bindir}" ] && \\\ + mv %{finddebugroot}/usr/sbin %{buildroot}/usr/sbin \ %{nil} %undefine buildsubdir @@ -482,7 +484,6 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %exclude %{_datadir}/man/man1/grub2-render-label* %if %{with_legacy_arch} -%{_sbindir}/grub2-install %ifarch x86_64 %{_sbindir}/grub2-bios-setup %else