From 0bacf1cba52cd3ee436e436f4d0c97e6846b9a9a Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 1 Oct 2013 15:13:51 +0300 Subject: [PATCH] - add support for ppc64le architecture - adjust armhftp-logic patch to apply without fuzz due to above --- rpm-4.11.1-ppc64le.patch | 96 ++++++++++++++++++++++++++++++++++++ rpm-4.9.0-armhfp-logic.patch | 12 ++--- rpm.spec | 9 +++- 3 files changed, 109 insertions(+), 8 deletions(-) create mode 100644 rpm-4.11.1-ppc64le.patch diff --git a/rpm-4.11.1-ppc64le.patch b/rpm-4.11.1-ppc64le.patch new file mode 100644 index 0000000..94e601b --- /dev/null +++ b/rpm-4.11.1-ppc64le.patch @@ -0,0 +1,96 @@ +diff --git a/installplatform b/installplatform +index 9a11bc3..6908f02 100755 +--- a/installplatform ++++ b/installplatform +@@ -54,12 +54,18 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do + CANONARCH=s390x + CANONCOLOR=3 + ;; +- ppc64*) ++ ppc64|ppc64p7) + ISANAME=ppc + ISABITS=64 + CANONARCH=ppc64 + CANONCOLOR=3 + ;; ++ ppc64le) ++ ISANAME=ppc ++ ISABITS=64 ++ CANONARCH=ppc64le ++ CANONCOLOR=3 ++ ;; + ppc*) + ISANAME=ppc + ISABITS=32 +diff --git a/lib/rpmrc.c b/lib/rpmrc.c +index 794d028..f209851 100644 +--- a/lib/rpmrc.c ++++ b/lib/rpmrc.c +@@ -1125,6 +1125,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) + # endif /* sparc*-linux */ + + # if defined(__linux__) && defined(__powerpc__) ++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + { + int powerlvl; + if (!rstreq(un.machine, "ppc") && +@@ -1133,6 +1134,7 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) + strcpy(un.machine, "ppc64p7"); + } + } ++# endif /* __ORDER_BIG_ENDIAN__ */ + # endif /* ppc64*-linux */ + + # if defined(__GNUC__) && defined(__alpha__) +diff --git a/rpmrc.in b/rpmrc.in +index 55ff25f..affb736 100644 +--- a/rpmrc.in ++++ b/rpmrc.in +@@ -48,6 +48,7 @@ optflags: ppc32dy4 -O2 -g -fsigned-char + optflags: ppciseries -O2 -g -fsigned-char + optflags: ppcpseries -O2 -g -fsigned-char + optflags: ppc64 -O2 -g -fsigned-char ++optflags: ppc64le -O2 -g -fsigned-char + optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g -fsigned-char + + optflags: parisc -O2 -g -mpa-risc-1-0 +@@ -96,6 +97,7 @@ archcolor: sparc64 2 + archcolor: sparcv9 2 + archcolor: ppc 1 + archcolor: ppc64 2 ++archcolor: ppc64le 2 + + archcolor: armv3l 1 + archcolor: armv4b 1 +@@ -194,6 +196,7 @@ arch_canon: i370: i370 14 + arch_canon: s390x: s390x 15 + + arch_canon: ppc64: ppc64 16 ++arch_canon: ppc64le: ppc64le 16 + arch_canon: ppc64pseries: ppc64pseries 16 + arch_canon: ppc64iseries: ppc64iseries 16 + arch_canon: ppc64p7: ppc64p7 16 +@@ -281,6 +284,7 @@ buildarchtranslate: ppcpseries: ppc + buildarchtranslate: ppc64iseries: ppc64 + buildarchtranslate: ppc64pseries: ppc64 + buildarchtranslate: ppc64p7: ppc64 ++buildarchtranslate: ppc64le: ppc64le + + buildarchtranslate: armv3l: armv3l + buildarchtranslate: armv4b: armv4b +@@ -352,6 +356,7 @@ arch_compat: rs6000: noarch fat + arch_compat: ppc64pseries: ppc64 + arch_compat: ppc64iseries: ppc64 + arch_compat: ppc64p7: ppc64 ++arch_compat: ppc64le: noarch fat + + arch_compat: sun4c: sparc + arch_compat: sun4d: sparc +@@ -475,6 +480,7 @@ buildarch_compat: ppciseries: noarch + buildarch_compat: ppcpseries: noarch + buildarch_compat: ppc: noarch fat + buildarch_compat: ppc64: noarch fat ++buildarch_compat: ppc64le: noarch fat + buildarch_compat: ppc64pseries: ppc64 + buildarch_compat: ppc64iseries: ppc64 + buildarch_compat: ppc64p7: ppc64 diff --git a/rpm-4.9.0-armhfp-logic.patch b/rpm-4.9.0-armhfp-logic.patch index be00bba..916b53f 100644 --- a/rpm-4.9.0-armhfp-logic.patch +++ b/rpm-4.9.0-armhfp-logic.patch @@ -1,7 +1,7 @@ -diff -up rpm-4.9.1.3/lib/rpmrc.c.armhfp-logic rpm-4.9.1.3/lib/rpmrc.c ---- rpm-4.9.1.3/lib/rpmrc.c.armhfp-logic 2012-04-19 17:11:32.728750591 +0200 -+++ rpm-4.9.1.3/lib/rpmrc.c 2012-04-19 17:11:32.754738455 +0200 -@@ -743,6 +743,56 @@ static int is_sun4v() +diff -up rpm-4.11.1/lib/rpmrc.c.armhfp-logic rpm-4.11.1/lib/rpmrc.c +--- rpm-4.11.1/lib/rpmrc.c.armhfp-logic 2013-10-01 14:59:12.841041726 +0300 ++++ rpm-4.11.1/lib/rpmrc.c 2013-10-01 14:59:12.856041684 +0300 +@@ -733,6 +733,56 @@ static int is_sun4v() } #endif @@ -58,8 +58,8 @@ diff -up rpm-4.9.1.3/lib/rpmrc.c.armhfp-logic rpm-4.9.1.3/lib/rpmrc.c # if defined(__linux__) && defined(__i386__) #include -@@ -1220,6 +1270,22 @@ static void defaultMachine(const char ** - } +@@ -1136,6 +1186,22 @@ static void defaultMachine(const char ** + # endif /* __ORDER_BIG_ENDIAN__ */ # endif /* ppc64*-linux */ +# if defined(__linux__) && defined(__arm__) diff --git a/rpm.spec b/rpm.spec index e9f2333..8f3580e 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}7%{?dist} +Release: %{?snapver:0.%{snapver}.}8%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/rpm-4.11.x/%{name}-%{srcver}.tar.bz2 @@ -53,6 +53,7 @@ Patch102: rpm-4.11.x-do-not-filter-ld64.patch Patch103: rpm-4.11.1-file-triplet-check.patch Patch104: rpm-4.11.1-caps-double-free.patch Patch105: rpm-4.11.1-empty-lua-script.patch +Patch106: rpm-4.11.1-ppc64le.patch # These are not yet upstream Patch301: rpm-4.6.0-niagara.patch @@ -257,6 +258,7 @@ packages on a system. %patch103 -p1 -b .file-triplet-check %patch104 -p1 -b .caps-double-free %patch105 -p1 -b .empty-lua-script +%patch106 -p1 -b .ppc64le %patch301 -p1 -b .niagara %patch302 -p1 -b .geode @@ -513,7 +515,10 @@ exit 0 %doc COPYING doc/librpm/html/* %changelog -* Mon Sep 09 2013 Matilainen - 4.11.1-7 +* Tue Oct 01 2013 Panu Matilainen - 4.11.1-8 +- add support for ppc64le architecture + +* Mon Sep 09 2013 Panu Matilainen - 4.11.1-7 - fix build-time double-free on file capability processing (#956190) - fix relocation related regression on file sanity check (#1001553) - fix segfault on empty -p scriptlet body (#1004062)