efi-rpm-macros/0009-Add-efi-filesystem-sub...

82 lines
2.5 KiB
Diff

From 309396c167bcd9ae6219e70e7e2b93ec5b773939 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 2 May 2018 10:48:28 -0400
Subject: [PATCH 09/11] Add efi-filesystem subpackage
Signed-off-by: Peter Jones <pjones@redhat.com>
---
Makefile | 6 ++++++
efi-rpm-macros.spec.in | 21 +++++++++++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index b9a04dddb5d..cf7cf956e8a 100644
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,12 @@ install : $(TARGETS)
install -d -m 0755 $(DESTDIR)/$(MACRODIR)
install -m 0644 macros.efi $(DESTDIR)/$(MACRODIR)/
install -m 0644 macros.efi-srpm $(DESTDIR)/$(MACRODIR)/
+ if [[ "$(EFI_ESP_ROOT)" != /boot ]] ; then \
+ install -d -m 0755 $(DESTDIR)/boot ; \
+ fi
+ install -d -m 0700 $(DESTDIR)/$(EFI_ESP_ROOT)
+ install -d -m 0700 $(DESTDIR)/$(EFI_ESP_ROOT)/EFI/BOOT
+ install -d -m 0700 $(DESTDIR)/$(EFI_ESP_ROOT)/EFI/$(EFI_VENDOR)
$(TARGETS) :
% : %.in
diff --git a/efi-rpm-macros.spec.in b/efi-rpm-macros.spec.in
index 5aa11d4c903..fce2f5ff296 100644
--- a/efi-rpm-macros.spec.in
+++ b/efi-rpm-macros.spec.in
@@ -7,7 +7,7 @@ License: GPLv3+
URL: https://github.com/rhboot/%{name}/
ExclusiveArch: @@EFI_ARCHES@@
BuildRequires: git sed
-Requires: rpm
+Requires: efi-filesystem rpm
BuildArch: noarch
Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2
@@ -22,11 +22,21 @@ Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-
Summary: Common SRPM Macros for building EFI-related packages
Group: Development/System
BuildArch: noarch
-Requires: rpm
+Requires: efi-filesystem rpm
%description -n efi-srpm-macros
efi-srpm-macros provides a set of SRPM macros for use in EFI-related packages.
+%package -n efi-filesystem
+Summary: The basic directory layout for EFI machines
+Group: System Environment/Base
+BuildArch: noarch
+Requires: filesystem
+
+%description -n efi-filesystem
+The efi-filesystem package contains the basic directory layout for EFI
+machine bootloaders and tools.
+
%prep
%autosetup -S git
@@ -48,6 +58,13 @@ efi-srpm-macros provides a set of SRPM macros for use in EFI-related packages.
%doc README
%{_rpmmacrodir}/macros.efi-srpm
+%files -n efi-filesystem
+%defattr(0700,root,root,-)
+%dir %{efi_esp_root}
+%dir %{efi_esp_efi}
+%dir %{efi_esp_dir}
+%dir %{efi_esp_boot}
+
%changelog
* Tue May 01 2018 Peter Jones <pjones@redhat.com> - 2-1
- Lots of rpmlint fixups and the like.
--
2.14.3