summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-12-03 17:58:29 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-06 12:31:04 +0000
commitf47fa1a8c0e76ca1b72091fefa8e59af09f5c501 (patch)
tree97e84c9bc5a2542d9e908357c060ad04809d8d49
parentf8b2ec3c9468d29e0d3ac010c1d05d275d53123c (diff)
downloadpoky-f47fa1a8c0e76ca1b72091fefa8e59af09f5c501.tar.gz
rpm: Fixup platform matching code
On ARM systems the platform matching code could fail in some cases, as the system macros file could override the 'platform' file settings. (From OE-Core rev: e5f557b3bdaa5bbd632b50824d8f85d2d2aeb221) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpm-platform2.patch56
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.9.bb3
2 files changed, 58 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
new file mode 100644
index 0000000000..3d50e46c11
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
@@ -0,0 +1,56 @@
1Fix up platform and related sysinfo file loading (part 2).
2
3Upstream-Status: Pending
4
5We need to ensure that we set the _gnu flag somehow. We do this by reading
6from the platform file, and setting a new platform_gnu and related vars.
7
8We then check for the existance of these things and change the configure
9time defaults to the run-time values as necessary.
10
11Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
12
13Index: rpm-5.4.9/lib/rpmrc.c
14===================================================================
15--- rpm-5.4.9.orig/lib/rpmrc.c
16+++ rpm-5.4.9/lib/rpmrc.c
17@@ -487,9 +487,10 @@ static rpmRC rpmPlatform(const char * pl
18 }
19
20 if (!parseCVOG(p, &cvog) && cvog != NULL) {
21- addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1);
22- addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1);
23- addMacro(NULL, "_host_os", NULL, cvog->os, -1);
24+ addMacro(NULL, "_platform_cpu", NULL, cvog->cpu, -1);
25+ addMacro(NULL, "_platform_vendor", NULL, cvog->vendor, -1);
26+ addMacro(NULL, "_platform_os", NULL, cvog->os, -1);
27+ addMacro(NULL, "_platform_gnu", NULL, cvog->gnu, -1);
28 }
29
30 #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
31Index: rpm-5.4.9/macros/macros.in
32===================================================================
33--- rpm-5.4.9.orig/macros/macros.in
34+++ rpm-5.4.9/macros/macros.in
35@@ -873,7 +873,7 @@ $_arbitrary_tags_tests Foo:Bar
36 %_build_arch @RPMCANONARCH@
37 %_vendor @RPMCANONVENDOR@
38 %_os @RPMCANONOS@
39-%_gnu @RPMCANONGNU@
40+%_gnu %{?_platform_gnu:-%{_platform_gnu}}%{!?_platform_gnu:@RPMCANONGNU@}
41
42 %_host_platform %{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}
43 %_build_platform %{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_gnu}
44@@ -920,9 +920,9 @@ $_arbitrary_tags_tests Foo:Bar
45 %_build_os %{_host_os}
46 %_host @host@
47 %_host_alias @host_alias@%{nil}
48-%_host_cpu @host_cpu@
49-%_host_vendor @host_vendor@
50-%_host_os @host_os@
51+%_host_cpu %{?_platform_cpu}%{!?_platform_cpu:@host_cpu@}
52+%_host_vendor %{?_platform_vendor}%{!?_platform_vendor:@host_vendor@}
53+%_host_os %{?_platform_os}%{!?_platform_os:@host_os@}
54 %_target %{_host}
55 %_target_alias %{_host_alias}
56 %_target_cpu %{_host_cpu}
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 59f3eef276..7311d0e015 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" 43LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
44 44
45DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native" 45DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
46PR = "r57" 46PR = "r58"
47 47
48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed 48# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
49# in order to extract the distribution SRPM into a format we can extract... 49# in order to extract the distribution SRPM into a format we can extract...
@@ -83,6 +83,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
83 file://rpm-py-init.patch \ 83 file://rpm-py-init.patch \
84 file://python-rpm-rpmsense.patch \ 84 file://python-rpm-rpmsense.patch \
85 file://rpm-reloc-macros.patch \ 85 file://rpm-reloc-macros.patch \
86 file://rpm-platform2.patch \
86 " 87 "
87 88
88SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768" 89SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"