From 4d38fc38961a39f6109eb6b5897c6c5a406b436e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 2 May 2018 10:50:44 -0400 Subject: [PATCH] Add efi-filesystem subpackage Signed-off-by: Peter Jones --- 0009-Add-efi-filesystem-subpackage.patch | 81 ++++++++++++++++++++++++ efi-rpm-macros.spec | 27 +++++++- 2 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 0009-Add-efi-filesystem-subpackage.patch diff --git a/0009-Add-efi-filesystem-subpackage.patch b/0009-Add-efi-filesystem-subpackage.patch new file mode 100644 index 0000000..7b6ad7f --- /dev/null +++ b/0009-Add-efi-filesystem-subpackage.patch @@ -0,0 +1,81 @@ +From 309396c167bcd9ae6219e70e7e2b93ec5b773939 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Wed, 2 May 2018 10:48:28 -0400 +Subject: [PATCH 9/9] Add efi-filesystem subpackage + +Signed-off-by: Peter Jones +--- + 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 - 2-1 + - Lots of rpmlint fixups and the like. +-- +2.14.3 + diff --git a/efi-rpm-macros.spec b/efi-rpm-macros.spec index a9f5e1a..3ca291f 100644 --- a/efi-rpm-macros.spec +++ b/efi-rpm-macros.spec @@ -1,13 +1,13 @@ Summary: Common RPM Macros for building EFI-related packages Name: efi-rpm-macros Version: 2 -Release: 4%{?dist} +Release: 5%{?dist} Group: Development/System License: GPLv3+ URL: https://github.com/rhboot/%{name}/ ExclusiveArch: x86_64 aarch64 %{arm} %{ix86} BuildRequires: git sed -Requires: rpm +Requires: efi-filesystem rpm BuildArch: noarch Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2 @@ -19,6 +19,7 @@ Patch0005: 0005-Return-nil-instead-of-on-unsupported-arches.patch Patch0006: 0006-efi_arch-turns-out-nil-is-definitely-not-what-we-wan.patch Patch0007: 0007-Make-a-macros.efi-srpm-that-defines-efi.patch Patch0008: 0008-Add-efi_has_alt_arch-0-or-1.patch +Patch0009: 0009-Add-efi-filesystem-subpackage.patch %global debug_package %{nil} %global _efi_vendor_ %(eval sed -n -e 's/rhel/redhat/' -e 's/^ID=//p' /etc/os-release) @@ -30,11 +31,21 @@ Patch0008: 0008-Add-efi_has_alt_arch-0-or-1.patch 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 @@ -56,7 +67,17 @@ 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 +* Wed May 02 2018 Peter Jones - 2-5 +- Add efi-filesystem subpackage + * Wed May 02 2018 Peter Jones - 2-4 - Add %%{efi_has_alt_arch}