public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - Fix ExclusiveArch/ExcludeArch for noarch packages
@ 2026-11-23 9:29 Florian Festi
0 siblings, 0 replies; only message in thread
From: Florian Festi @ 2026-11-23 9:29 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 43e89ed19f4aca01edbd7f09f8477e9a18b96b02
Author : Florian Festi <ffesti@redhat.com>
Date : 2016-02-26T11:23:45+01:00
Stats : +37/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/43e89ed19f4aca01edbd7f09f8477e9a18b96b02?branch=pmatilai-v6
Log:
- 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 <ffesti@redhat.com>
+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 <ffesti@rpm.org> - 4.4.13.0-0.rc1.26
+- Fix ExclusiveArch/ExcludeArch for noarch packages (#1298668)
+
* Thu Feb 25 2016 Florian Festi <ffesti@rpm.org> - 4.4.13.0-0.rc1.25
- Fix dependencies for RemovePathPostfixes (#1306559)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:29 [rpms/rpm] pmatilai-v6: - Fix ExclusiveArch/ExcludeArch for noarch packages Florian Festi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox