* [PATCH] rpm: change arch scoring items
@ 2013-04-23 13:37 Bogdan Marinescu
2013-04-23 14:42 ` Mark Hatle
0 siblings, 1 reply; 3+ messages in thread
From: Bogdan Marinescu @ 2013-04-23 13:37 UTC (permalink / raw)
To: openembedded-core
Don't add the first line of /etc/rpm/platform to the list of patterns
to match when computing an arch score, use it just for getting
information about the platform (cpu/vendor/os).
[YOCTO #3864]
Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
---
.../rpm/rpm/rpm-platform-file-fix.patch | 28 ++++++++++++++++++++
meta/recipes-devtools/rpm/rpm_5.4.9.bb | 3 ++-
2 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
new file mode 100644
index 0000000..3e14d4d
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
@@ -0,0 +1,28 @@
+Don't add the first line of /etc/rpm/platform to the list of patterns
+to match when computing an arch score, use it just for getting
+information about the platform (cpu/vendor/os). Fixes #3864.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+diff --git a/lib/rpmrc.c b/lib/rpmrc.c
+index e676601..e433faa 100644
+--- a/lib/rpmrc.c
++++ b/lib/rpmrc.c
+@@ -510,17 +510,6 @@ static rpmRC rpmPlatform(const char * platform)
+ #endif
+ }
+
+-#if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
+- /* do not use vendor and GNU attribution */
+- p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
+-#else
+- p = rpmExpand("%{_host_cpu}-%{_host_vendor}-%{_host_os}",
+- (cvog && *cvog->gnu ? "-" : NULL),
+- (cvog ? cvog->gnu : NULL), NULL);
+-#endif
+- xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
+- p = _free(p);
+-
+ init_platform++;
+ }
+ rc = (init_platform ? RPMRC_OK : RPMRC_FAIL);
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 7d2cba4..112d11d 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"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
-PR = "r62"
+PR = "r63"
# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
# in order to extract the distribution SRPM into a format we can extract...
@@ -86,6 +86,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
file://rpm-platform2.patch \
file://rpm-remove-sykcparse-decl.patch \
file://debugedit-segv.patch \
+ file://rpm-platform-file-fix.patch \
"
# Uncomment the following line to enable platform score debugging
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rpm: change arch scoring items
2013-04-23 13:37 [PATCH] rpm: change arch scoring items Bogdan Marinescu
@ 2013-04-23 14:42 ` Mark Hatle
2013-04-24 11:42 ` Marinescu, Bogdan A
0 siblings, 1 reply; 3+ messages in thread
From: Mark Hatle @ 2013-04-23 14:42 UTC (permalink / raw)
To: openembedded-core
On 4/23/13 8:37 AM, Bogdan Marinescu wrote:
> Don't add the first line of /etc/rpm/platform to the list of patterns
> to match when computing an arch score, use it just for getting
> information about the platform (cpu/vendor/os).
>
> [YOCTO #3864]
>
> Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
> ---
> .../rpm/rpm/rpm-platform-file-fix.patch | 28 ++++++++++++++++++++
> meta/recipes-devtools/rpm/rpm_5.4.9.bb | 3 ++-
> 2 files changed, 30 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
>
> diff --git a/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch b/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
> new file mode 100644
> index 0000000..3e14d4d
> --- /dev/null
> +++ b/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
> @@ -0,0 +1,28 @@
> +Don't add the first line of /etc/rpm/platform to the list of patterns
> +to match when computing an arch score, use it just for getting
> +information about the platform (cpu/vendor/os). Fixes #3864.
> +
> +Upstream-Status: Inappropriate [embedded specific]
> +
> +diff --git a/lib/rpmrc.c b/lib/rpmrc.c
> +index e676601..e433faa 100644
> +--- a/lib/rpmrc.c
> ++++ b/lib/rpmrc.c
> +@@ -510,17 +510,6 @@ static rpmRC rpmPlatform(const char * platform)
> + #endif
> + }
> +
The change below should be fine, and does address both of my concerns. (it
slightly changes /etc/rpm/platform behavior, but I don't think it does so in a
way that will confuse anyone.)
I do suggest the patch be reworked though to conform with the upstream
guidelines for "local vendor patches" Replace the following with:
> +-#if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
> +- /* do not use vendor and GNU attribution */
> +- p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
> +-#else
> +- p = rpmExpand("%{_host_cpu}-%{_host_vendor}-%{_host_os}",
> +- (cvog && *cvog->gnu ? "-" : NULL),
> +- (cvog ? cvog->gnu : NULL), NULL);
> +-#endif
> +- xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
> +- p = _free(p);
> +-
#if !defined(RPM_VENDOR_POKY) /* Skip the explicit-platform */
#if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
/* do not use vendor and GNU attribution */
p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
#else
p = rpmExpand("%{_host_cpu}-%{_host_vendor}-%{_host_os}",
(cvog && *cvog->gnu ? "-" : NULL),
(cvog ? cvog->gnu : NULL), NULL);
#endif
xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
p = _free(p);
#endif
(And yes, at some point we really should change from VENDOR_POKY to VENDOR_OE or
similar.. but that is the existing setting.. so we should use it for now.)
> + init_platform++;
> + }
> + rc = (init_platform ? RPMRC_OK : RPMRC_FAIL);
> diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
> index 7d2cba4..112d11d 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"
> LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
>
> DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
> -PR = "r62"
> +PR = "r63"
>
> # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
> # in order to extract the distribution SRPM into a format we can extract...
> @@ -86,6 +86,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
> file://rpm-platform2.patch \
> file://rpm-remove-sykcparse-decl.patch \
> file://debugedit-segv.patch \
> + file://rpm-platform-file-fix.patch \
> "
>
> # Uncomment the following line to enable platform score debugging
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rpm: change arch scoring items
2013-04-23 14:42 ` Mark Hatle
@ 2013-04-24 11:42 ` Marinescu, Bogdan A
0 siblings, 0 replies; 3+ messages in thread
From: Marinescu, Bogdan A @ 2013-04-24 11:42 UTC (permalink / raw)
To: Mark Hatle; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 4889 bytes --]
I've sent v2 of this patch with the suggested changes.
Thanks,
Bogdan
On Tue, Apr 23, 2013 at 5:42 PM, Mark Hatle <mark.hatle@windriver.com>wrote:
> On 4/23/13 8:37 AM, Bogdan Marinescu wrote:
>
>> Don't add the first line of /etc/rpm/platform to the list of patterns
>> to match when computing an arch score, use it just for getting
>> information about the platform (cpu/vendor/os).
>>
>> [YOCTO #3864]
>>
>> Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
>> ---
>> .../rpm/rpm/rpm-platform-file-**fix.patch | 28
>> ++++++++++++++++++++
>> meta/recipes-devtools/rpm/rpm_**5.4.9.bb <http://rpm_5.4.9.bb>
>> | 3 ++-
>> 2 files changed, 30 insertions(+), 1 deletion(-)
>> create mode 100644 meta/recipes-devtools/rpm/rpm/**
>> rpm-platform-file-fix.patch
>>
>> diff --git a/meta/recipes-devtools/rpm/**rpm/rpm-platform-file-fix.**patch
>> b/meta/recipes-devtools/rpm/**rpm/rpm-platform-file-fix.**patch
>> new file mode 100644
>> index 0000000..3e14d4d
>> --- /dev/null
>> +++ b/meta/recipes-devtools/rpm/**rpm/rpm-platform-file-fix.**patch
>> @@ -0,0 +1,28 @@
>> +Don't add the first line of /etc/rpm/platform to the list of patterns
>> +to match when computing an arch score, use it just for getting
>> +information about the platform (cpu/vendor/os). Fixes #3864.
>> +
>> +Upstream-Status: Inappropriate [embedded specific]
>> +
>> +diff --git a/lib/rpmrc.c b/lib/rpmrc.c
>> +index e676601..e433faa 100644
>> +--- a/lib/rpmrc.c
>> ++++ b/lib/rpmrc.c
>> +@@ -510,17 +510,6 @@ static rpmRC rpmPlatform(const char * platform)
>> + #endif
>> + }
>> +
>>
>
> The change below should be fine, and does address both of my concerns.
> (it slightly changes /etc/rpm/platform behavior, but I don't think it does
> so in a way that will confuse anyone.)
>
> I do suggest the patch be reworked though to conform with the upstream
> guidelines for "local vendor patches" Replace the following with:
>
>
> +-#if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
>> +- /* do not use vendor and GNU attribution */
>> +- p = rpmExpand("%{_host_cpu}-%{_**host_os}", NULL);
>> +-#else
>> +- p = rpmExpand("%{_host_cpu}-%{_**host_vendor}-%{_host_os}",
>> +- (cvog && *cvog->gnu ? "-" : NULL),
>> +- (cvog ? cvog->gnu : NULL), NULL);
>> +-#endif
>> +- xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
>> +- p = _free(p);
>> +-
>>
>
> #if !defined(RPM_VENDOR_POKY) /* Skip the explicit-platform */
> #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
>
> /* do not use vendor and GNU attribution */
> p = rpmExpand("%{_host_cpu}-%{_**host_os}", NULL);
> #else
>
> p = rpmExpand("%{_host_cpu}-%{_**host_vendor}-%{_host_os}",
> (cvog && *cvog->gnu ? "-" : NULL),
> (cvog ? cvog->gnu : NULL), NULL);
> #endif
>
> xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
> p = _free(p);
> #endif
>
> (And yes, at some point we really should change from VENDOR_POKY to
> VENDOR_OE or similar.. but that is the existing setting.. so we should use
> it for now.)
>
>
> + init_platform++;
>> + }
>> + rc = (init_platform ? RPMRC_OK : RPMRC_FAIL);
>> diff --git a/meta/recipes-devtools/rpm/rp**m_5.4.9.bb<http://rpm_5.4.9.bb>b/meta/recipes-devtools/rpm/
>> rp**m_5.4.9.bb <http://rpm_5.4.9.bb>
>> index 7d2cba4..112d11d 100644
>> --- a/meta/recipes-devtools/rpm/rp**m_5.4.9.bb <http://rpm_5.4.9.bb>
>> +++ b/meta/recipes-devtools/rpm/rp**m_5.4.9.bb <http://rpm_5.4.9.bb>
>> @@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
>> LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=**
>> 2d5025d4aa3495befef8f17206a5b0**a1"
>>
>> DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
>> -PR = "r62"
>> +PR = "r63"
>>
>> # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is
>> needed
>> # in order to extract the distribution SRPM into a format we can
>> extract...
>> @@ -86,6 +86,7 @@ SRC_URI = "http://www.rpm5.org/files/**
>> rpm/rpm-5.4/rpm-5.4.9-0.**20120508.src.rpm;ex<http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex>
>> file://rpm-platform2.patch \
>> file://rpm-remove-sykcparse-**decl.patch \
>> file://debugedit-segv.patch \
>> + file://rpm-platform-file-fix.**patch \
>> "
>>
>> # Uncomment the following line to enable platform score debugging
>>
>>
>
> ______________________________**_________________
> Openembedded-core mailing list
> Openembedded-core@lists.**openembedded.org<Openembedded-core@lists.openembedded.org>
> http://lists.linuxtogo.org/**cgi-bin/mailman/listinfo/**openembedded-core<http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core>
>
[-- Attachment #2: Type: text/html, Size: 6509 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-24 12:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-23 13:37 [PATCH] rpm: change arch scoring items Bogdan Marinescu
2013-04-23 14:42 ` Mark Hatle
2013-04-24 11:42 ` Marinescu, Bogdan A
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.