* [PATCH][meta-selinux] libselinux, libsepol: depends on coreutils-native
@ 2015-10-20 9:49 wenzong.fan
2015-10-20 21:49 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: wenzong.fan @ 2015-10-20 9:49 UTC (permalink / raw)
To: yocto
From: Wenzong Fan <wenzong.fan@windriver.com>
'ln --relative' doesn't work on Ubuntu 12.04 that has ln 8.13. The
changes involved by SELinux commit:
commit 71393a181d63c9baae5fe8dcaeb9411d1f253998
Author: Steve Lawrence <slawrence@tresys.com>
Date: Mon Oct 20 15:46:17 2014 -0400
libselinux: libsepol: use ln --relative to create .so symlinks
The current build system assumes SHLIBDIR is ../../ relative to LIBDIR.
However, this isn't always the case. For example, Arch Linux sets both
LIBDIR and SHLIBDIR to /usr/lib, which results in broken symlinks.
Instead of making that assumption, create .so symlinks using ln
--relative so that the correct relative paths are used. Note that this
adds a dependency for the build system to use coretuils-8.16 or later.
Just depends on coreutils-native to fix the issue.
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---
recipes-security/selinux/libselinux.inc | 2 +-
recipes-security/selinux/libsepol.inc | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/recipes-security/selinux/libselinux.inc b/recipes-security/selinux/libselinux.inc
index d571a7c..b0f7bc4 100644
--- a/recipes-security/selinux/libselinux.inc
+++ b/recipes-security/selinux/libselinux.inc
@@ -7,7 +7,7 @@ LICENSE = "PD"
inherit lib_package pythonnative
-DEPENDS += "libsepol python libpcre swig-native"
+DEPENDS += "libsepol python libpcre swig-native coreutils-native"
PACKAGES += "${PN}-python"
FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
diff --git a/recipes-security/selinux/libsepol.inc b/recipes-security/selinux/libsepol.inc
index b24ed28..9234f24 100644
--- a/recipes-security/selinux/libsepol.inc
+++ b/recipes-security/selinux/libsepol.inc
@@ -8,6 +8,8 @@ LICENSE = "LGPLv2+"
inherit lib_package
+DEPENDS += "coreutils-native"
+
# Change RANLIB for cross compiling, use host-tools $(AR) rather than
# local ranlib.
EXTRA_OEMAKE += "RANLIB='$(AR) s'"
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH][meta-selinux] libselinux, libsepol: depends on coreutils-native
2015-10-20 9:49 [PATCH][meta-selinux] libselinux, libsepol: depends on coreutils-native wenzong.fan
@ 2015-10-20 21:49 ` Khem Raj
2015-10-26 2:23 ` wenzong fan
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2015-10-20 21:49 UTC (permalink / raw)
To: wenzong.fan; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 2430 bytes --]
> On Oct 20, 2015, at 2:49 AM, wenzong.fan@windriver.com wrote:
>
> From: Wenzong Fan <wenzong.fan@windriver.com>
>
> 'ln --relative' doesn't work on Ubuntu 12.04 that has ln 8.13. The
OE-Core has lnr script you can use that.
> changes involved by SELinux commit:
>
> commit 71393a181d63c9baae5fe8dcaeb9411d1f253998
> Author: Steve Lawrence <slawrence@tresys.com>
> Date: Mon Oct 20 15:46:17 2014 -0400
>
> libselinux: libsepol: use ln --relative to create .so symlinks
>
> The current build system assumes SHLIBDIR is ../../ relative to LIBDIR.
> However, this isn't always the case. For example, Arch Linux sets both
> LIBDIR and SHLIBDIR to /usr/lib, which results in broken symlinks.
>
> Instead of making that assumption, create .so symlinks using ln
> --relative so that the correct relative paths are used. Note that this
> adds a dependency for the build system to use coretuils-8.16 or later.
>
> Just depends on coreutils-native to fix the issue.
>
> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
> ---
> recipes-security/selinux/libselinux.inc | 2 +-
> recipes-security/selinux/libsepol.inc | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/recipes-security/selinux/libselinux.inc b/recipes-security/selinux/libselinux.inc
> index d571a7c..b0f7bc4 100644
> --- a/recipes-security/selinux/libselinux.inc
> +++ b/recipes-security/selinux/libselinux.inc
> @@ -7,7 +7,7 @@ LICENSE = "PD"
>
> inherit lib_package pythonnative
>
> -DEPENDS += "libsepol python libpcre swig-native"
> +DEPENDS += "libsepol python libpcre swig-native coreutils-native"
>
> PACKAGES += "${PN}-python"
> FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
> diff --git a/recipes-security/selinux/libsepol.inc b/recipes-security/selinux/libsepol.inc
> index b24ed28..9234f24 100644
> --- a/recipes-security/selinux/libsepol.inc
> +++ b/recipes-security/selinux/libsepol.inc
> @@ -8,6 +8,8 @@ LICENSE = "LGPLv2+"
>
> inherit lib_package
>
> +DEPENDS += "coreutils-native"
> +
> # Change RANLIB for cross compiling, use host-tools $(AR) rather than
> # local ranlib.
> EXTRA_OEMAKE += "RANLIB='$(AR) s'"
> --
> 1.9.1
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH][meta-selinux] libselinux, libsepol: depends on coreutils-native
2015-10-20 21:49 ` Khem Raj
@ 2015-10-26 2:23 ` wenzong fan
2015-11-24 1:48 ` Chris Patterson
0 siblings, 1 reply; 5+ messages in thread
From: wenzong fan @ 2015-10-26 2:23 UTC (permalink / raw)
To: Khem Raj; +Cc: yocto
On 10/21/2015 05:49 AM, Khem Raj wrote:
>
>> On Oct 20, 2015, at 2:49 AM, wenzong.fan@windriver.com wrote:
>>
>> From: Wenzong Fan <wenzong.fan@windriver.com>
>>
>> 'ln --relative' doesn't work on Ubuntu 12.04 that has ln 8.13. The
>
> OE-Core has lnr script you can use that.
It's good to know this. I did a grep:
$ grep lnr -r *
meta/recipes-kernel/kmod/kmod_git.bb: lnr ${D}${base_bindir}/kmod
${D}${base_bindir}/lsmod
meta/recipes-kernel/kmod/kmod_git.bb: lnr
${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool}
meta/recipes-core/systemd/systemd_225.bb: sed -i -e 's:\$(LN_S)
--relative -f:lnr:g' ${S}/Makefile.am
meta/recipes-core/systemd/systemd_225.bb: sed -i -e 's:\$(LN_S)
--relative:lnr:g' ${S}/Makefile.am
meta/recipes-core/ncurses/ncurses.inc: # Use lnr to ensure
this is a relative link despite absolute paths
meta/recipes-core/ncurses/ncurses.inc: lnr
${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
meta/classes/populate_sdk_ext.bbclass: lnr
${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/devtool
${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/devtool
meta/classes/populate_sdk_ext.bbclass: lnr
${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool
${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool
Looks it only used by bb/bbclass.
I prefer to add a dependency here rather than patch Makefile with 'lnr'.
Agreed?
Thanks
Wenzong
>
>> changes involved by SELinux commit:
>>
>> commit 71393a181d63c9baae5fe8dcaeb9411d1f253998
>> Author: Steve Lawrence <slawrence@tresys.com>
>> Date: Mon Oct 20 15:46:17 2014 -0400
>>
>> libselinux: libsepol: use ln --relative to create .so symlinks
>>
>> The current build system assumes SHLIBDIR is ../../ relative to LIBDIR.
>> However, this isn't always the case. For example, Arch Linux sets both
>> LIBDIR and SHLIBDIR to /usr/lib, which results in broken symlinks.
>>
>> Instead of making that assumption, create .so symlinks using ln
>> --relative so that the correct relative paths are used. Note that this
>> adds a dependency for the build system to use coretuils-8.16 or later.
>>
>> Just depends on coreutils-native to fix the issue.
>>
>> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
>> ---
>> recipes-security/selinux/libselinux.inc | 2 +-
>> recipes-security/selinux/libsepol.inc | 2 ++
>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/recipes-security/selinux/libselinux.inc b/recipes-security/selinux/libselinux.inc
>> index d571a7c..b0f7bc4 100644
>> --- a/recipes-security/selinux/libselinux.inc
>> +++ b/recipes-security/selinux/libselinux.inc
>> @@ -7,7 +7,7 @@ LICENSE = "PD"
>>
>> inherit lib_package pythonnative
>>
>> -DEPENDS += "libsepol python libpcre swig-native"
>> +DEPENDS += "libsepol python libpcre swig-native coreutils-native"
>>
>> PACKAGES += "${PN}-python"
>> FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
>> diff --git a/recipes-security/selinux/libsepol.inc b/recipes-security/selinux/libsepol.inc
>> index b24ed28..9234f24 100644
>> --- a/recipes-security/selinux/libsepol.inc
>> +++ b/recipes-security/selinux/libsepol.inc
>> @@ -8,6 +8,8 @@ LICENSE = "LGPLv2+"
>>
>> inherit lib_package
>>
>> +DEPENDS += "coreutils-native"
>> +
>> # Change RANLIB for cross compiling, use host-tools $(AR) rather than
>> # local ranlib.
>> EXTRA_OEMAKE += "RANLIB='$(AR) s'"
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH][meta-selinux] libselinux, libsepol: depends on coreutils-native
2015-10-26 2:23 ` wenzong fan
@ 2015-11-24 1:48 ` Chris Patterson
2016-01-21 9:06 ` wenzong fan
0 siblings, 1 reply; 5+ messages in thread
From: Chris Patterson @ 2015-11-24 1:48 UTC (permalink / raw)
To: yocto
> On 10/21/2015 05:49 AM, Khem Raj wrote:
>>
>>> On Oct 20, 2015, at 2:49 AM,wenzong.fan at windriver.com wrote:
>>>
>>> From: Wenzong Fan <wenzong.fan at windriver.com>
>>>
>>> 'ln --relative' doesn't work on Ubuntu 12.04 that has ln 8.13. The
> >
> > OE-Core has lnr script you can use that.
> /
> It's good to know this. I did a grep:
>
> $ grep lnr -r *
> meta/recipes-kernel/kmod/kmod_git.bb: lnr ${D}${base_bindir}/kmod
> ${D}${base_bindir}/lsmod
> meta/recipes-kernel/kmod/kmod_git.bb: lnr
> ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool}
> meta/recipes-core/systemd/systemd_225.bb: sed -i -e 's:\$(LN_S)
> --relative -f:lnr:g' ${S}/Makefile.am
> meta/recipes-core/systemd/systemd_225.bb: sed -i -e 's:\$(LN_S)
> --relative:lnr:g' ${S}/Makefile.am
> meta/recipes-core/ncurses/ncurses.inc: # Use lnr to ensure
> this is a relative link despite absolute paths
> meta/recipes-core/ncurses/ncurses.inc: lnr
> ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
> meta/classes/populate_sdk_ext.bbclass: lnr
> ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/devtool
> ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/devtool
> meta/classes/populate_sdk_ext.bbclass: lnr
> ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool
> ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool
>
> Looks it only used by bb/bbclass.
>
> I prefer to add a dependency here rather than patch Makefile with 'lnr'.
> Agreed?
>
This approach makes sense to me.
> Thanks
> Wenzong
>
>>
>>> changes involved by SELinux commit:
>>>
>>> commit 71393a181d63c9baae5fe8dcaeb9411d1f253998
>>> Author: Steve Lawrence <slawrence at tresys.com>
>>> Date: Mon Oct 20 15:46:17 2014 -0400
>>>
>>> libselinux: libsepol: use ln --relative to create .so symlinks
>>>
>>> The current build system assumes SHLIBDIR is ../../ relative
to LIBDIR.
>>> However, this isn't always the case. For example, Arch Linux
sets both
>>> LIBDIR and SHLIBDIR to /usr/lib, which results in broken symlinks.
>>>
>>> Instead of making that assumption, create .so symlinks using ln
>>> --relative so that the correct relative paths are used. Note
that this
>>> adds a dependency for the build system to use coretuils-8.16
or later.
>>>
>>> Just depends on coreutils-native to fix the issue.
>>>
>>> Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
>>> ---
>>> recipes-security/selinux/libselinux.inc | 2 +-
>>> recipes-security/selinux/libsepol.inc | 2 ++
>>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/recipes-security/selinux/libselinux.inc
b/recipes-security/selinux/libselinux.inc
>>> index d571a7c..b0f7bc4 100644
>>> --- a/recipes-security/selinux/libselinux.inc
>>> +++ b/recipes-security/selinux/libselinux.inc
>>> @@ -7,7 +7,7 @@ LICENSE = "PD"
>>>
>>> inherit lib_package pythonnative
>>>
>>> -DEPENDS += "libsepol python libpcre swig-native"
>>> +DEPENDS += "libsepol python libpcre swig-native coreutils-native"
>>>
>>> PACKAGES += "${PN}-python"
>>> FILES_${PN}-python =
"${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
>>> diff --git a/recipes-security/selinux/libsepol.inc
b/recipes-security/selinux/libsepol.inc
>>> index b24ed28..9234f24 100644
>>> --- a/recipes-security/selinux/libsepol.inc
>>> +++ b/recipes-security/selinux/libsepol.inc
>>> @@ -8,6 +8,8 @@ LICENSE = "LGPLv2+"
>>>
>>> inherit lib_package
>>>
>>> +DEPENDS += "coreutils-native"
>>> +
>>> # Change RANLIB for cross compiling, use host-tools $(AR) rather than
>>> # local ranlib.
>>> EXTRA_OEMAKE += "RANLIB='$(AR) s'"
>>> --
>>> 1.9.1
+1, this patch resolved the issue nicely for me! :)
Thanks,
-Chris
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH][meta-selinux] libselinux, libsepol: depends on coreutils-native
2015-11-24 1:48 ` Chris Patterson
@ 2016-01-21 9:06 ` wenzong fan
0 siblings, 0 replies; 5+ messages in thread
From: wenzong fan @ 2016-01-21 9:06 UTC (permalink / raw)
To: yocto
Ping ...
Could it be merged?
Thanks
Wenzong
On 11/24/2015 09:48 AM, Chris Patterson wrote:
>> On 10/21/2015 05:49 AM, Khem Raj wrote:
>>>
>>>> On Oct 20, 2015, at 2:49 AM,wenzong.fan at windriver.com wrote:
>>>>
>>>> From: Wenzong Fan <wenzong.fan at windriver.com>
>>>>
>>>> 'ln --relative' doesn't work on Ubuntu 12.04 that has ln 8.13. The
>> >
>> > OE-Core has lnr script you can use that.
>> /
>> It's good to know this. I did a grep:
>>
>> $ grep lnr -r *
>> meta/recipes-kernel/kmod/kmod_git.bb: lnr ${D}${base_bindir}/kmod
>> ${D}${base_bindir}/lsmod
>> meta/recipes-kernel/kmod/kmod_git.bb: lnr
>> ${D}${base_bindir}/kmod ${D}${base_sbindir}/${tool}
>> meta/recipes-core/systemd/systemd_225.bb: sed -i -e 's:\$(LN_S)
>> --relative -f:lnr:g' ${S}/Makefile.am
>> meta/recipes-core/systemd/systemd_225.bb: sed -i -e 's:\$(LN_S)
>> --relative:lnr:g' ${S}/Makefile.am
>> meta/recipes-core/ncurses/ncurses.inc: # Use lnr to ensure
>> this is a relative link despite absolute paths
>> meta/recipes-core/ncurses/ncurses.inc: lnr
>> ${D}${base_libdir}/libtinfo.so.5 ${D}${libdir}/libtinfo.so
>> meta/classes/populate_sdk_ext.bbclass: lnr
>> ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/devtool
>> ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/devtool
>> meta/classes/populate_sdk_ext.bbclass: lnr
>> ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool
>> ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool
>>
>> Looks it only used by bb/bbclass.
>>
>> I prefer to add a dependency here rather than patch Makefile with 'lnr'.
>> Agreed?
>>
>
> This approach makes sense to me.
>
>> Thanks
>> Wenzong
>>
>>>
>>>> changes involved by SELinux commit:
>>>>
>>>> commit 71393a181d63c9baae5fe8dcaeb9411d1f253998
>>>> Author: Steve Lawrence <slawrence at tresys.com>
>>>> Date: Mon Oct 20 15:46:17 2014 -0400
>>>>
>>>> libselinux: libsepol: use ln --relative to create .so symlinks
>>>>
>>>> The current build system assumes SHLIBDIR is ../../ relativeto LIBDIR.
>>>> However, this isn't always the case. For example, Arch Linuxsets both
>>>> LIBDIR and SHLIBDIR to /usr/lib, which results in broken symlinks.
>>>>
>>>> Instead of making that assumption, create .so symlinks using ln
>>>> --relative so that the correct relative paths are used. Notethat this
>>>> adds a dependency for the build system to use coretuils-8.16or later.
>>>>
>>>> Just depends on coreutils-native to fix the issue.
>>>>
>>>> Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
>>>> ---
>>>> recipes-security/selinux/libselinux.inc | 2 +-
>>>> recipes-security/selinux/libsepol.inc | 2 ++
>>>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/recipes-security/selinux/libselinux.incb/recipes-security/selinux/libselinux.inc
>>>> index d571a7c..b0f7bc4 100644
>>>> --- a/recipes-security/selinux/libselinux.inc
>>>> +++ b/recipes-security/selinux/libselinux.inc
>>>> @@ -7,7 +7,7 @@ LICENSE = "PD"
>>>>
>>>> inherit lib_package pythonnative
>>>>
>>>> -DEPENDS += "libsepol python libpcre swig-native"
>>>> +DEPENDS += "libsepol python libpcre swig-native coreutils-native"
>>>>
>>>> PACKAGES += "${PN}-python"
>>>> FILES_${PN}-python ="${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/*"
>>>> diff --git a/recipes-security/selinux/libsepol.incb/recipes-security/selinux/libsepol.inc
>>>> index b24ed28..9234f24 100644
>>>> --- a/recipes-security/selinux/libsepol.inc
>>>> +++ b/recipes-security/selinux/libsepol.inc
>>>> @@ -8,6 +8,8 @@ LICENSE = "LGPLv2+"
>>>>
>>>> inherit lib_package
>>>>
>>>> +DEPENDS += "coreutils-native"
>>>> +
>>>> # Change RANLIB for cross compiling, use host-tools $(AR) rather than
>>>> # local ranlib.
>>>> EXTRA_OEMAKE += "RANLIB='$(AR) s'"
>>>> --
>>>> 1.9.1
>
> +1, this patch resolved the issue nicely for me! :)
>
> Thanks,
> -Chris
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-21 9:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-20 9:49 [PATCH][meta-selinux] libselinux, libsepol: depends on coreutils-native wenzong.fan
2015-10-20 21:49 ` Khem Raj
2015-10-26 2:23 ` wenzong fan
2015-11-24 1:48 ` Chris Patterson
2016-01-21 9:06 ` wenzong fan
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.