* [PATCH] zlib: minor symbolic link issue
@ 2015-05-05 8:14 Matthieu Crapet
2015-05-20 9:47 ` Matthieu CRAPET
0 siblings, 1 reply; 5+ messages in thread
From: Matthieu Crapet @ 2015-05-05 8:14 UTC (permalink / raw)
To: openembedded-core
libz.so symbolic link created in ${libdir} is ../..//lib/libz.so.1.2.8
Make it cleaner and generic (idea comes from libcgroup recipe).
Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
meta/recipes-core/zlib/zlib_1.2.8.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/zlib/zlib_1.2.8.bb b/meta/recipes-core/zlib/zlib_1.2.8.bb
index ca0ba3f..5e11f23 100644
--- a/meta/recipes-core/zlib/zlib_1.2.8.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.8.bb
@@ -6,7 +6,6 @@ SECTION = "libs"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd"
-
SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.xz \
file://remove.ldconfig.call.patch \
file://Makefile-runtests.patch \
@@ -54,7 +53,8 @@ do_install_append_class-target() {
mkdir -p ${D}/${base_libdir}
mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
tmp=`readlink ${D}/${libdir}/libz.so`
- ln -sf ../../${base_libdir}/$tmp ${D}/${libdir}/libz.so
+ rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+ ln -sf ${rel_lib_prefix}${base_libdir}/$tmp ${D}/${libdir}/libz.so
fi
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] zlib: minor symbolic link issue
2015-05-05 8:14 [PATCH] zlib: minor symbolic link issue Matthieu Crapet
@ 2015-05-20 9:47 ` Matthieu CRAPET
2015-05-20 14:42 ` Burton, Ross
0 siblings, 1 reply; 5+ messages in thread
From: Matthieu CRAPET @ 2015-05-20 9:47 UTC (permalink / raw)
To: openembedded-core
Hello,
Just tell me if something is wrong, I can provide a v2 patch.
Regards,
Matthieu
-----Message d'origine-----
De : openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] De la part de Matthieu Crapet
Envoyé : mardi 5 mai 2015 10:14
À : openembedded-core@lists.openembedded.org
Objet : [OE-core] [PATCH] zlib: minor symbolic link issue
libz.so symbolic link created in ${libdir} is ../..//lib/libz.so.1.2.8 Make it cleaner and generic (idea comes from libcgroup recipe).
Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
meta/recipes-core/zlib/zlib_1.2.8.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/zlib/zlib_1.2.8.bb b/meta/recipes-core/zlib/zlib_1.2.8.bb
index ca0ba3f..5e11f23 100644
--- a/meta/recipes-core/zlib/zlib_1.2.8.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.8.bb
@@ -6,7 +6,6 @@ SECTION = "libs"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd"
-
SRC_URI = "http://www.zlib.net/${BPN}-${PV}.tar.xz \
file://remove.ldconfig.call.patch \
file://Makefile-runtests.patch \ @@ -54,7 +53,8 @@ do_install_append_class-target() {
mkdir -p ${D}/${base_libdir}
mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
tmp=`readlink ${D}/${libdir}/libz.so`
- ln -sf ../../${base_libdir}/$tmp ${D}/${libdir}/libz.so
+ rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
+ ln -sf ${rel_lib_prefix}${base_libdir}/$tmp ${D}/${libdir}/libz.so
fi
}
--
1.9.1
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] zlib: minor symbolic link issue
2015-05-20 9:47 ` Matthieu CRAPET
@ 2015-05-20 14:42 ` Burton, Ross
2015-05-21 7:31 ` Matthieu CRAPET
0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2015-05-20 14:42 UTC (permalink / raw)
To: Matthieu CRAPET; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 989 bytes --]
On 20 May 2015 at 10:47, Matthieu CRAPET <Matthieu.CRAPET@ingenico.com>
wrote:
> Just tell me if something is wrong, I can provide a v2 patch.
>
No, it just slipped through the cracks.
That regex looked a bit obscure, and there's a Python function we provide
that uses the Python standard library to do the same thing, so I ended up
with this locally:
# Move zlib shared libraries for target builds to $base_libdir so the
library
# can be used in early boot before $prefix is mounted.
do_install_append_class-target() {
if [ ${base_libdir} != ${libdir} ]
then
mkdir -p ${D}/${base_libdir}
mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
libname=`readlink ${D}/${libdir}/libz.so`
ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname
${D}${libdir}/libz.so
fi
}
Do you have any objections to this form instead? I'm also thinking we
should rationalise the duplicated logic into a single implementation in
meta/classes/utils.bbclass...
Ross
[-- Attachment #2: Type: text/html, Size: 2305 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] zlib: minor symbolic link issue
2015-05-20 14:42 ` Burton, Ross
@ 2015-05-21 7:31 ` Matthieu CRAPET
2015-05-21 10:32 ` Burton, Ross
0 siblings, 1 reply; 5+ messages in thread
From: Matthieu CRAPET @ 2015-05-21 7:31 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]
Hi Ross,
I didn’t know such a function was existing. You can use it of course, it’s much better.
I found the (obscure) regexp in libcgroup recipe, it could be updated too.
Is it worth it I send a v2 patch ?
Matthieu
De : Burton, Ross [mailto:ross.burton@intel.com]
Envoyé : mercredi 20 mai 2015 16:42
À : Matthieu CRAPET
Cc : openembedded-core@lists.openembedded.org
Objet : Re: [OE-core] [PATCH] zlib: minor symbolic link issue
On 20 May 2015 at 10:47, Matthieu CRAPET <Matthieu.CRAPET@ingenico.com<mailto:Matthieu.CRAPET@ingenico.com>> wrote:
Just tell me if something is wrong, I can provide a v2 patch.
No, it just slipped through the cracks.
That regex looked a bit obscure, and there's a Python function we provide that uses the Python standard library to do the same thing, so I ended up with this locally:
# Move zlib shared libraries for target builds to $base_libdir so the library
# can be used in early boot before $prefix is mounted.
do_install_append_class-target() {
if [ ${base_libdir} != ${libdir} ]
then
mkdir -p ${D}/${base_libdir}
mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
libname=`readlink ${D}/${libdir}/libz.so`
ln -sf ${@oe.path.relative("${libdir}<mailto:$%7b@oe.path.relative(%22$%7blibdir%7d>", "${base_libdir}")}/$libname ${D}${libdir}/libz.so
fi
}
Do you have any objections to this form instead? I'm also thinking we should rationalise the duplicated logic into a single implementation in meta/classes/utils.bbclass...
Ross
[-- Attachment #2: Type: text/html, Size: 7063 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] zlib: minor symbolic link issue
2015-05-21 7:31 ` Matthieu CRAPET
@ 2015-05-21 10:32 ` Burton, Ross
0 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2015-05-21 10:32 UTC (permalink / raw)
To: Matthieu CRAPET; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 368 bytes --]
On 21 May 2015 at 08:31, Matthieu CRAPET <Matthieu.CRAPET@ingenico.com>
wrote:
> I didn’t know such a function was existing. You can use it of course, it’s
> much better.
>
> I found the (obscure) regexp in libcgroup recipe, it could be updated too.
>
>
>
> Is it worth it I send a v2 patch ?
>
I already sent it, but thanks for the offer!
Ross
[-- Attachment #2: Type: text/html, Size: 1328 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-21 10:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05 8:14 [PATCH] zlib: minor symbolic link issue Matthieu Crapet
2015-05-20 9:47 ` Matthieu CRAPET
2015-05-20 14:42 ` Burton, Ross
2015-05-21 7:31 ` Matthieu CRAPET
2015-05-21 10:32 ` Burton, Ross
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.