diff --git a/0007-Make-a-macros.efi-srpm-that-defines-efi.patch b/0007-Make-a-macros.efi-srpm-that-defines-efi.patch new file mode 100644 index 0000000..54afe94 --- /dev/null +++ b/0007-Make-a-macros.efi-srpm-that-defines-efi.patch @@ -0,0 +1,123 @@ +From 09efa919eb4a85bd77fe8d482f4c369e1fc29ed7 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Tue, 1 May 2018 15:42:01 -0400 +Subject: [PATCH 7/7] Make a macros.efi-srpm that defines %{efi} + +Signed-off-by: Peter Jones +--- + Makefile | 3 ++- + .gitignore | 1 + + efi-rpm-macros.spec.in | 17 ++++++++++++++++- + macros.efi-srpm.in | 20 ++++++++++++++++++++ + macros.efi.in | 2 +- + 5 files changed, 40 insertions(+), 3 deletions(-) + create mode 100644 macros.efi-srpm.in + +diff --git a/Makefile b/Makefile +index 53f10c5a9eb..b9a04dddb5d 100644 +--- a/Makefile ++++ b/Makefile +@@ -18,7 +18,7 @@ EFI_ESP_ROOT ?= /boot/efi + EFI_ARCHES ?= x86_64 aarch64 %{arm} %{ix86} + EFI_VENDOR ?= + +-TARGETS = macros.efi efi-rpm-macros.spec ++TARGETS = macros.efi macros.efi-srpm efi-rpm-macros.spec + + check_efi_vendor : + ifeq ($(EFI_VENDOR),) +@@ -35,6 +35,7 @@ install : | check_efi_vendor + install : $(TARGETS) + install -d -m 0755 $(DESTDIR)/$(MACRODIR) + install -m 0644 macros.efi $(DESTDIR)/$(MACRODIR)/ ++ install -m 0644 macros.efi-srpm $(DESTDIR)/$(MACRODIR)/ + + $(TARGETS) : + % : %.in +diff --git a/.gitignore b/.gitignore +index 6c98e5354ab..8365ee70797 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -1,6 +1,7 @@ + *~ + .*.sw? + macros.efi ++macros.efi-srpm + efi-rpm-macros.spec + *.tar.* + usr/ +diff --git a/efi-rpm-macros.spec.in b/efi-rpm-macros.spec.in +index fa68b1dd7b1..5aa11d4c903 100644 +--- a/efi-rpm-macros.spec.in ++++ b/efi-rpm-macros.spec.in +@@ -18,6 +18,15 @@ Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}- + %description + %{name} provides a set of RPM macros for use in EFI-related packages. + ++%package -n efi-srpm-macros ++Summary: Common SRPM Macros for building EFI-related packages ++Group: Development/System ++BuildArch: noarch ++Requires: rpm ++ ++%description -n efi-srpm-macros ++efi-srpm-macros provides a set of SRPM macros for use in EFI-related packages. ++ + %prep + %autosetup -S git + +@@ -31,7 +40,13 @@ Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}- + %{!?_licensedir:%global license %%doc} + %license LICENSE + %doc README +-%{_rpmmacrodir}/* ++%{_rpmmacrodir}/macros.efi ++ ++%files -n efi-srpm-macros ++%{!?_licensedir:%global license %%doc} ++%license LICENSE ++%doc README ++%{_rpmmacrodir}/macros.efi-srpm + + %changelog + * Tue May 01 2018 Peter Jones - 2-1 +diff --git a/macros.efi-srpm.in b/macros.efi-srpm.in +new file mode 100644 +index 00000000000..7192b07ba6c +--- /dev/null ++++ b/macros.efi-srpm.in +@@ -0,0 +1,20 @@ ++# ++# EFI specific SRPM macro definitions ++# ++# Copyright 2018 Peter M Jones ++# ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or (at ++# your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++# ++ ++%efi @@EFI_ARCHES@@ +diff --git a/macros.efi.in b/macros.efi.in +index f4c70617ae7..c61b3972f2d 100644 +--- a/macros.efi.in ++++ b/macros.efi.in +@@ -1,5 +1,5 @@ + # +-# EFI specific macro definitions ++# EFI specific RPM macro definitions + # + # Copyright 2018 Peter M Jones + # +-- +2.14.3 + diff --git a/efi-rpm-macros.spec b/efi-rpm-macros.spec index fc0c6f0..b3d19a9 100644 --- a/efi-rpm-macros.spec +++ b/efi-rpm-macros.spec @@ -1,7 +1,7 @@ Summary: Common RPM Macros for building EFI-related packages Name: efi-rpm-macros Version: 2 -Release: 2%{?dist} +Release: 3%{?dist} Group: Development/System License: GPLv3+ URL: https://github.com/rhboot/%{name}/ @@ -17,6 +17,7 @@ Patch0003: 0003-efi-rpm-macros.spec.in-use-autosetup.patch Patch0004: 0004-Add-efi_alt_arch-and-efi_alt_arch_upper.patch 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 %global debug_package %{nil} %global _efi_vendor_ %(eval sed -n -e 's/rhel/redhat/' -e 's/^ID=//p' /etc/os-release) @@ -24,6 +25,15 @@ Patch0006: 0006-efi_arch-turns-out-nil-is-definitely-not-what-we-wan.patch %description %{name} provides a set of RPM macros for use in EFI-related packages. +%package -n efi-srpm-macros +Summary: Common SRPM Macros for building EFI-related packages +Group: Development/System +BuildArch: noarch +Requires: rpm + +%description -n efi-srpm-macros +efi-srpm-macros provides a set of SRPM macros for use in EFI-related packages. + %prep %autosetup -S git @@ -37,9 +47,19 @@ Patch0006: 0006-efi_arch-turns-out-nil-is-definitely-not-what-we-wan.patch %{!?_licensedir:%global license %%doc} %license LICENSE %doc README -%{_rpmmacrodir}/* +%{_rpmmacrodir}/macros.efi + +%files -n efi-srpm-macros +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc README +%{_rpmmacrodir}/macros.efi-srpm %changelog +* Tue May 01 2018 Peter Jones - 2-3 +- Make an efi-srpm-macros subpackage to pull in so %%{efi} works in + ExclusiveArch in koji. + * Tue May 01 2018 Peter Jones - 2-2 - Fix the non-efi and non-efi-alt-arch cases, hopefully.