* [V2 PATCH] libcgroup: fix the QA issue for pam_cgroup.so*
@ 2013-01-24 11:25 Xin Ouyang
2013-01-24 11:32 ` Burton, Ross
2013-01-26 9:13 ` Pascal Ouyang
0 siblings, 2 replies; 5+ messages in thread
From: Xin Ouyang @ 2013-01-24 11:25 UTC (permalink / raw)
To: openembedded-core, openembedded-core
PAM modules in ${base_libdir}/security/ should be binary .so files,
not symlinks, so fix this. Since pam_cgroup.so is installed into
${base_libdir}/security, move libcgroup.so.* to ${base_libdir} to
avoid "unsafe-references-in-binaries" QA issue.
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
---
meta/recipes-core/libcgroup/libcgroup_0.37.1.bb | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb b/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
index e74f831..d217f7b 100644
--- a/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
+++ b/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
@@ -23,5 +23,16 @@ FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
FILES_${PN}-dbg += "${base_libdir}/security/.debug"
FILES_${PN}-dev += "${base_libdir}/security/*.la"
-# We really need the symlink so :(
-INSANE_SKIP_cgroups-pam-plugin = "dev-so"
+do_install_append() {
+ # Moving libcgroup to base_libdir
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mkdir -p ${D}/${base_libdir}/
+ mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
+ ln -sf ${D}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
+ fi
+ # pam modules in ${base_libdir}/security/ should be binary .so files, not symlinks.
+ if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
+ mv -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ${D}${base_libdir}/security/pam_cgroup.so
+ rm -f ${D}${base_libdir}/security/pam_cgroup.so.*
+ fi
+}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [V2 PATCH] libcgroup: fix the QA issue for pam_cgroup.so*
2013-01-24 11:25 [V2 PATCH] libcgroup: fix the QA issue for pam_cgroup.so* Xin Ouyang
@ 2013-01-24 11:32 ` Burton, Ross
2013-01-26 9:13 ` Pascal Ouyang
1 sibling, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2013-01-24 11:32 UTC (permalink / raw)
To: Xin Ouyang; +Cc: openembedded-core, openembedded-core
On 24 January 2013 11:25, Xin Ouyang <Xin.Ouyang@windriver.com> wrote:
> PAM modules in ${base_libdir}/security/ should be binary .so files,
> not symlinks, so fix this. Since pam_cgroup.so is installed into
> ${base_libdir}/security, move libcgroup.so.* to ${base_libdir} to
> avoid "unsafe-references-in-binaries" QA issue.
>
> Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Acked-by: Ross Burton <ross.burton@intel.com>
(Why doesn't upstream fix their build...)
Ross
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [V2 PATCH] libcgroup: fix the QA issue for pam_cgroup.so*
2013-01-24 11:25 [V2 PATCH] libcgroup: fix the QA issue for pam_cgroup.so* Xin Ouyang
2013-01-24 11:32 ` Burton, Ross
@ 2013-01-26 9:13 ` Pascal Ouyang
2013-01-26 10:33 ` lei yang
1 sibling, 1 reply; 5+ messages in thread
From: Pascal Ouyang @ 2013-01-26 9:13 UTC (permalink / raw)
To: Xin Ouyang; +Cc: openembedded-core, openembedded-core
于 2013年01月24日 19:25, Xin Ouyang 写道:
> PAM modules in ${base_libdir}/security/ should be binary .so files,
> not symlinks, so fix this. Since pam_cgroup.so is installed into
> ${base_libdir}/security, move libcgroup.so.* to ${base_libdir} to
> avoid "unsafe-references-in-binaries" QA issue.
>
> Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
> ---
> meta/recipes-core/libcgroup/libcgroup_0.37.1.bb | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb b/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
> index e74f831..d217f7b 100644
> --- a/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
> +++ b/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
> @@ -23,5 +23,16 @@ FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
> FILES_${PN}-dbg += "${base_libdir}/security/.debug"
> FILES_${PN}-dev += "${base_libdir}/security/*.la"
>
> -# We really need the symlink so :(
> -INSANE_SKIP_cgroups-pam-plugin = "dev-so"
> +do_install_append() {
> + # Moving libcgroup to base_libdir
> + if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
> + mkdir -p ${D}/${base_libdir}/
> + mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
> + ln -sf ${D}${base_libdir}/libcgroup.so.1 ${D}${libdir}/libcgroup.so
I should not use absolute path for this symlink here.
rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 \
${D}${libdir}/libcgroup.so
V3 will be sent. Thanks.
- Pascal
> + fi
> + # pam modules in ${base_libdir}/security/ should be binary .so files, not symlinks.
> + if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
> + mv -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ${D}${base_libdir}/security/pam_cgroup.so
> + rm -f ${D}${base_libdir}/security/pam_cgroup.so.*
> + fi
> +}
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [V2 PATCH] libcgroup: fix the QA issue for pam_cgroup.so*
2013-01-26 9:13 ` Pascal Ouyang
@ 2013-01-26 10:33 ` lei yang
2013-01-28 1:43 ` Pascal Ouyang
0 siblings, 1 reply; 5+ messages in thread
From: lei yang @ 2013-01-26 10:33 UTC (permalink / raw)
To: Pascal Ouyang; +Cc: openembedded-core, openembedded-core
On Sat, Jan 26, 2013 at 5:13 PM, Pascal Ouyang <xin.ouyang@windriver.com> wrote:
> 于 2013年01月24日 19:25, Xin Ouyang 写道:
>
>> PAM modules in ${base_libdir}/security/ should be binary .so files,
>> not symlinks, so fix this. Since pam_cgroup.so is installed into
>> ${base_libdir}/security, move libcgroup.so.* to ${base_libdir} to
>> avoid "unsafe-references-in-binaries" QA issue.
>>
>> Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
>> ---
>> meta/recipes-core/libcgroup/libcgroup_0.37.1.bb | 15 +++++++++++++--
>> 1 file changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
>> b/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
>> index e74f831..d217f7b 100644
>> --- a/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
>> +++ b/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
>> @@ -23,5 +23,16 @@ FILES_cgroups-pam-plugin =
>> "${base_libdir}/security/pam_cgroup.so*"
>> FILES_${PN}-dbg += "${base_libdir}/security/.debug"
>> FILES_${PN}-dev += "${base_libdir}/security/*.la"
>>
>> -# We really need the symlink so :(
>> -INSANE_SKIP_cgroups-pam-plugin = "dev-so"
>> +do_install_append() {
>> + # Moving libcgroup to base_libdir
>> + if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
>> + mkdir -p ${D}/${base_libdir}/
>> + mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
>> + ln -sf ${D}${base_libdir}/libcgroup.so.1
>> ${D}${libdir}/libcgroup.so
>
>
> I should not use absolute path for this symlink here.
>
> rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
> ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 \
>
I think use
cd ${D}
ln -sf libcgroup.so.1 ${D}${libdir}/libcgroup.so
should be OK, no need sed to handle
Lei
> ${D}${libdir}/libcgroup.so
>
> V3 will be sent. Thanks.
>
> - Pascal
>
>
>> + fi
>> + # pam modules in ${base_libdir}/security/ should be binary .so
>> files, not symlinks.
>> + if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
>> + mv -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0
>> ${D}${base_libdir}/security/pam_cgroup.so
>> + rm -f ${D}${base_libdir}/security/pam_cgroup.so.*
>> + fi
>> +}
>>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [V2 PATCH] libcgroup: fix the QA issue for pam_cgroup.so*
2013-01-26 10:33 ` lei yang
@ 2013-01-28 1:43 ` Pascal Ouyang
0 siblings, 0 replies; 5+ messages in thread
From: Pascal Ouyang @ 2013-01-28 1:43 UTC (permalink / raw)
To: lei yang; +Cc: openembedded-core, openembedded-core
于 2013年01月26日 18:33, lei yang 写道:
> On Sat, Jan 26, 2013 at 5:13 PM, Pascal Ouyang <xin.ouyang@windriver.com> wrote:
>> 于 2013年01月24日 19:25, Xin Ouyang 写道:
>>
>>> PAM modules in ${base_libdir}/security/ should be binary .so files,
>>> not symlinks, so fix this. Since pam_cgroup.so is installed into
>>> ${base_libdir}/security, move libcgroup.so.* to ${base_libdir} to
>>> avoid "unsafe-references-in-binaries" QA issue.
>>>
>>> Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
>>> ---
>>> meta/recipes-core/libcgroup/libcgroup_0.37.1.bb | 15 +++++++++++++--
>>> 1 file changed, 13 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
>>> b/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
>>> index e74f831..d217f7b 100644
>>> --- a/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
>>> +++ b/meta/recipes-core/libcgroup/libcgroup_0.37.1.bb
>>> @@ -23,5 +23,16 @@ FILES_cgroups-pam-plugin =
>>> "${base_libdir}/security/pam_cgroup.so*"
>>> FILES_${PN}-dbg += "${base_libdir}/security/.debug"
>>> FILES_${PN}-dev += "${base_libdir}/security/*.la"
>>>
>>> -# We really need the symlink so :(
>>> -INSANE_SKIP_cgroups-pam-plugin = "dev-so"
>>> +do_install_append() {
>>> + # Moving libcgroup to base_libdir
>>> + if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
>>> + mkdir -p ${D}/${base_libdir}/
>>> + mv -f ${D}${libdir}/libcgroup.so.* ${D}${base_libdir}/
>>> + ln -sf ${D}${base_libdir}/libcgroup.so.1
>>> ${D}${libdir}/libcgroup.so
>>
>>
>> I should not use absolute path for this symlink here.
>>
>> rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
>> ln -sf ${rel_lib_prefix}${base_libdir}/libcgroup.so.1 \
>>
>
> I think use
>
> cd ${D}
> ln -sf libcgroup.so.1 ${D}${libdir}/libcgroup.so
>
> should be OK, no need sed to handle
libcgroup.so.1 is now moved to ${base_libdir}, so just sed. :)
- Pascal
>
>
> Lei
>
>> ${D}${libdir}/libcgroup.so
>>
>> V3 will be sent. Thanks.
>>
>> - Pascal
>>
>>
>>> + fi
>>> + # pam modules in ${base_libdir}/security/ should be binary .so
>>> files, not symlinks.
>>> + if [ -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ]; then
>>> + mv -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0
>>> ${D}${base_libdir}/security/pam_cgroup.so
>>> + rm -f ${D}${base_libdir}/security/pam_cgroup.so.*
>>> + fi
>>> +}
>>>
>>
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
--
- Pascal
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-28 1:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24 11:25 [V2 PATCH] libcgroup: fix the QA issue for pam_cgroup.so* Xin Ouyang
2013-01-24 11:32 ` Burton, Ross
2013-01-26 9:13 ` Pascal Ouyang
2013-01-26 10:33 ` lei yang
2013-01-28 1:43 ` Pascal Ouyang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox