From 43e89ed19f4aca01edbd7f09f8477e9a18b96b02 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Feb 26 2016 10:23:45 +0000 Subject: - Fix ExclusiveArch/ExcludeArch for noarch packages - Resolves: #1298668 --- diff --git a/rpm-4.13.0-Noarch-ExclusiveArch.patch b/rpm-4.13.0-Noarch-ExclusiveArch.patch new file mode 100644 index 0000000..555e3ed --- /dev/null +++ b/rpm-4.13.0-Noarch-ExclusiveArch.patch @@ -0,0 +1,32 @@ +From d53499d1565dd7ba6d93939e552cc604b26dccd7 Mon Sep 17 00:00:00 2001 +From: Florian Festi +Date: Fri, 26 Feb 2016 11:15:23 +0100 +Subject: [PATCH] Use %_build_cpu instead of noarch when evaluating ExcludeArch + and ExclusiveArch + +Some noarch packages need build tools not available on all architectures. +By using %_build_cpu you can restrict the architectures those noarch +packages can be build on. +--- + build/parsePreamble.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/build/parsePreamble.c b/build/parsePreamble.c +index 13501de..933f734 100644 +--- a/build/parsePreamble.c ++++ b/build/parsePreamble.c +@@ -428,6 +428,11 @@ static rpmRC checkForValidArchitectures(rpmSpec spec) + char *arch = rpmExpand("%{_target_cpu}", NULL); + char *os = rpmExpand("%{_target_os}", NULL); + rpmRC rc = RPMRC_FAIL; /* assume failure */ ++ ++ if (!strcmp(arch, "noarch")) { ++ free(arch); ++ arch = rpmExpand("%{_build_cpu}", NULL); ++ } + + if (isMemberInEntry(spec->buildRestrictions, + arch, RPMTAG_EXCLUDEARCH) == 1) { +-- +2.5.0 + diff --git a/rpm.spec b/rpm.spec index e53bbbf..2090f15 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}25%{?dist} +Release: %{?snapver:0.%{snapver}.}26%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/rpm-4.12.x/%{name}-%{srcver}.tar.bz2 @@ -71,6 +71,7 @@ Patch115: rpm-4.13.0-unlimited-macro-expand.patch Patch116: rpm-4.13.0-idle-and-sleep-in-systemd-inhibit.patch Patch117: rpm-4.13.0-add-mipsr6-support.patch Patch118: rpm-4.13.0-Use-pkg-dpaths-during-dependency-generation.patch +Patch119: rpm-4.13.0-Noarch-ExclusiveArch.patch # These are not yet upstream Patch302: rpm-4.7.1-geode-i686.patch @@ -581,6 +582,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Fri Feb 26 2016 Florian Festi - 4.4.13.0-0.rc1.26 +- Fix ExclusiveArch/ExcludeArch for noarch packages (#1298668) + * Thu Feb 25 2016 Florian Festi - 4.4.13.0-0.rc1.25 - Fix dependencies for RemovePathPostfixes (#1306559)