talloc: rename to libtalloc and cleanup dependency mess
PATCH 1/1 talloc: rename to libtalloc and cleanup dependency mess
To avoid errors when building dev-images (talloc-dev is missing), and to avoid insane empty packages for that, rename talloc -> libtalloc as libtevent shows.
With that, remove dependencies to attr/xattr and libbsd - unless explicitely enabled via PACKAGECONFIG.
---
.../libtalloc/avoid-attr-unless-wanted.patch | 20 +++++++++++++++++
.../libtalloc/avoid-libbsd-unless-wanted.patch | 10 +++++++++
.../libtalloc_2.1.1.bb} | 25 +++++++++-------------
.../recipes-support/libtevent/libtevent_0.9.21.bb | 3 +--
4 files changed, 41 insertions(+), 17 deletions(-)
create mode 100644 meta-oe/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch
create mode 100644 meta-oe/recipes-support/libtalloc/libtalloc/avoid-libbsd-unless-wanted.patch
rename meta-oe/recipes-support/{talloc/talloc_2.1.1.bb => libtalloc/libtalloc_2.1.1.bb} (70%)meta-oe/recipes-support/libtalloc/libtalloc/avoid-attr-unless-wanted.patch new file +20 -0
@@ -0,0 +1,20 @@ +--- a/lib/replace/wscript 2015-11-13 16:04:04.000000000 +0100 ++++ b/lib/replace/wscript 2015-11-13 16:23:20.000000000 +0100 +@@ -636,8 +636,6 @@ + if not bld.CONFIG_SET('HAVE_INET_ATON'): REPLACE_SOURCE += ' inet_aton.c' + if not bld.CONFIG_SET('HAVE_INET_NTOP'): REPLACE_SOURCE += ' inet_ntop.c' + if not bld.CONFIG_SET('HAVE_INET_PTON'): REPLACE_SOURCE += ' inet_pton.c' +- if not bld.CONFIG_SET('HAVE_GETXATTR') or bld.CONFIG_SET('XATTR_ADDITIONAL_OPTIONS'): +- REPLACE_SOURCE += ' xattr.c' + + bld.SAMBA_LIBRARY('replace', + source=REPLACE_SOURCE, +@@ -648,7 +646,7 @@ + # at the moment: + # hide_symbols=bld.BUILTIN_LIBRARY('replace'), + private_library=True, +- deps='crypt dl nsl socket rt attr' + extra_libs) ++ deps='crypt dl nsl socket rt ' + extra_libs) + + bld.SAMBA_SUBSYSTEM('replace-test', + source='''test/testsuite.c test/strptime.c
meta-oe/recipes-support/libtalloc/libtalloc/avoid-libbsd-unless-wanted.patch new file +10 -0
@@ -0,0 +1,10 @@ +--- a/lib/replace/wscript 2015-11-13 16:26:06.000000000 +0100 ++++ b/lib/replace/wscript 2015-11-13 16:26:12.000000000 +0100 +@@ -610,7 +610,6 @@ + break + + extra_libs = '' +- if bld.CONFIG_SET('HAVE_LIBBSD'): extra_libs += ' bsd' + + bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC', + REPLACE_HOSTCC_SOURCE,
meta-oe/recipes-support/libtalloc/libtalloc_2.1.1.bb renamed from meta-oe/recipes-support/talloc/talloc_2.1.1.bb +10 -15
@@ -3,7 +3,7 @@ HOMEPAGE = "http://talloc.samba.org" SECTION = "libs" LICENSE = "LGPL-3.0+ & GPL-3.0+" -SRC_URI = "http://samba.org/ftp/${BPN}/${BPN}-${PV}.tar.gz" +SRC_URI = "http://samba.org/ftp/${BPN}/talloc-${PV}.tar.gz" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \ file://${COREBASE}/meta/files/common-licenses/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"
@@ -12,6 +12,14 @@ SRC_URI[sha256sum] = "3e29ce6c3ba3c4f7c2d57ce8cf0fbc24c86618c519f2b2fb6a45902548 inherit waf-samba +PACKAGECONFIG[attr] = ",,attr" +PACKAGECONFIG[libbsd] = ",,libbsd" + +SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'attr', 'avoid-attr-unless-wanted.patch', '', d)}" +SRC_URI += "${@bb.utils.contains('PACKAGECONFIG', 'libbsd', 'avoid-libbsd-unless-wanted.patch', '', d)}" + +S = "${WORKDIR}/talloc-${PV}" + EXTRA_OECONF += "--disable-rpath \ --disable-rpath-install \ --bundled-libraries=NONE \
@@ -20,20 +28,7 @@ EXTRA_OECONF += "--disable-rpath \ --with-libiconv=${STAGING_DIR_HOST}${prefix}\ " -PACKAGES += "libtalloc libtalloc-dbg libtalloc-dev pytalloc pytalloc-dbg pytalloc-dev" - -#ALLOW_EMPTY_${PN} = "1" -FILES_${PN} = "" -FILES_${PN}-dev = "" -FILES_${PN}-dbg = "" - -FILES_libtalloc = "${libdir}/libtalloc.so.2 \ - ${libdir}/libtalloc.so.2.1.1" -FILES_libtalloc-dbg = "/usr/src/debug/ \ - ${libdir}/.debug/libtalloc.so.2.1.1" -FILES_libtalloc-dev = "${includedir}/ \ - ${libdir}/libtalloc.so \ - ${libdir}/pkgconfig/" +PACKAGES += "pytalloc pytalloc-dbg pytalloc-dev" FILES_pytalloc = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ ${libdir}/libpytalloc-util.so.2 \
meta-oe/recipes-support/libtevent/libtevent_0.9.21.bb +1 -2
@@ -3,8 +3,7 @@ HOMEPAGE = "http://tevent.samba.org" SECTION = "libs" LICENSE = "LGPLv3+" -DEPENDS += "talloc libcap" -RDEPENDS_${PN} += "libtalloc" +DEPENDS += "libtalloc libcap" RDEPENDS_python-tevent = "python" SRC_URI = "http://samba.org/ftp/tevent/tevent-${PV}.tar.gz"
Signature · 7 lines
2.4.9 (Apple Git-60) I would work on all the waf-packages in a similar way, if this is reasonable. Cheers -- Jens Rehsack - [email protected]
Quoted 11 lines · Jens Rehsack
To avoid errors when building dev-images (talloc-dev is missing), and to avoid
insane empty packages for that, rename talloc -> libtalloc as libtevent shows.With that, remove dependencies to attr/xattr and libbsd - unless explicitely
enabled via PACKAGECONFIG.Signed-off-by Jens Rehsack <[email protected]>
Our recipe names should be named based on the upstream project name, not the library they happen to ship.
Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
Signature · 5 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Quoted 14 lines · Christopher Larson
Quoted 11 lines · Jens Rehsack
To avoid errors when building dev-images (talloc-dev is missing), and to avoid
insane empty packages for that, rename talloc -> libtalloc as libtevent shows.With that, remove dependencies to attr/xattr and libbsd - unless explicitely
enabled via PACKAGECONFIG.Signed-off-by Jens Rehsack <[email protected]>
Quoted 7 lines
Our recipe names should be named based on the upstream project name, not the library they happen to ship.
Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
I just realized this may sound critical, but that wasn't intended. The other changes look great, thanks for your work on making those dependencies optional, it's good stuff.
Signature · 5 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Quoted 11 lines
Am 13.11.2015 um 18:01 schrieb Christopher Larson <[email protected]>:
On Fri, Nov 13, 2015 at 9:56 AM, Christopher Larson <[email protected]> wrote:
On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <[email protected]> wrote:
To avoid errors when building dev-images (talloc-dev is missing), and to avoid insane empty packages for that, rename talloc -> libtalloc as libtevent shows.With that, remove dependencies to attr/xattr and libbsd - unless explicitely enabled via PACKAGECONFIG.
Quoted 7 lines
Signed-off-by Jens Rehsack <[email protected]>Our recipe names should be named based on the upstream project name, not the library they happen to ship.
Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
I just realized this may sound critical, but that wasn't intended. The other changes look great, thanks for your work on making those dependencies optional, it's good stuff.
In that case - please take me by the hand and explain a bit more detailed
Quoted 1 line
Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*
since I have no clue what you try to guide me.
Cheers
Signature · 1 line
Jens Rehsack - [email protected]
Quoted 27 lines · Jens Rehsack
Quoted 3 lines
Am 13.11.2015 um 18:01 schrieb Christopher Larson <[email protected]>:
On Fri, Nov 13, 2015 at 9:56 AM, Christopher Larson <[email protected]>
Quoted 2 lines · wrote:
On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <[email protected]> wrote:
To avoid errors when building dev-images (talloc-dev is missing), and toavoid
Quoted 1 line
insane empty packages for that, rename talloc -> libtalloc as libtevent
shows.
Quoted 2 lines
With that, remove dependencies to attr/xattr and libbsd - unless
explicitely
Quoted 5 lines
enabled via PACKAGECONFIG.
Signed-off-by Jens Rehsack <[email protected]>Our recipe names should be named based on the upstream project name, not
the library they happen to ship.
Quoted 2 lines
Instead, either we could we should kill all the libtalloc bits in the
PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
Quoted 2 lines
I just realized this may sound critical, but that wasn't intended. The
other changes look great, thanks for your work on making those dependencies optional, it's good stuff.
Quoted 7 lines
In that case - please take me by the hand and explain a bit more detailed
Quoted 1 line
Instead, either we could we should kill all the libtalloc bits in the
PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*
since I have no clue what you try to guide me.
I'm not able to reproduce any error when building an image. Add libtalloc and dev-pkgs, and it builds just fine. You can't add talloc, as there is no talloc package emitted.
That said, what I was suggesting was something along the lines of
https://gist.github.com/kergoth/ead0e1d2682a9e9fcd59 -- debian.bbclass will automatically rename the ${PN}, ${PN}-dev, and ${PN}-dbg packages based on the library soname, so will end up named libtalloc* anyway if you use it. Since the main packages weren't emitted at all, it was pointless complexity in the packaging to add libtalloc* explicitly.
Signature · 5 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Quoted 25 lines
Am 18.11.2015 um 03:08 schrieb Christopher Larson <[email protected]>:
Quoted 10 lines · Jens Rehsack
Am 13.11.2015 um 18:01 schrieb Christopher Larson <[email protected]>:
On Fri, Nov 13, 2015 at 9:56 AM, Christopher Larson <[email protected]> wrote:
On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <[email protected]> wrote:
To avoid errors when building dev-images (talloc-dev is missing), and to avoid insane empty packages for that, rename talloc -> libtalloc as libtevent shows.With that, remove dependencies to attr/xattr and libbsd - unless explicitely enabled via PACKAGECONFIG.
Quoted 7 lines
Signed-off-by Jens Rehsack <[email protected]>Our recipe names should be named based on the upstream project name, not the library they happen to ship.
Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
I just realized this may sound critical, but that wasn't intended. The other changes look great, thanks for your work on making those dependencies optional, it's good stuff.
In that case - please take me by the hand and explain a bit more detailed
Quoted 7 lines
Quoted 1 line
Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*
since I have no clue what you try to guide me.
I'm not able to reproduce any error when building an image. Add libtalloc and dev-pkgs, and it builds just fine. You can't add talloc, as there is no talloc package emitted.
That said, what I was suggesting was something along the lines of https://gist.github.com/kergoth/ead0e1d2682a9e9fcd59 -- debian.bbclass will automatically rename the ${PN}, ${PN}-dev, and ${PN}-dbg packages based on the library soname, so will end up named libtalloc* anyway if you use it. Since the main packages weren't emitted at all, it was pointless complexity in the packaging to add libtalloc* explicitly.
Well, I had the problem and one of our contributors either that samba's dependency on talloc prevents creating a dev-image (not a regular image!), because no -dev image was emitted but talloc-dev was added as RDEPENDS automatically because it might contain header files or so (no idea).
I don't see the win in https://gist.github.com/kergoth/ead0e1d2682a9e9fcd59#file-talloc-patch-L25-L34 vs. renaming the recipe, but during meta-java cleanup and packaging openjdk-8 I encountered lot's of issues with RPROVIDES - so I try to avoid it where possible. And - as said - libtevent (http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/libtevent) is currently there and accepted, don't see adopting talloc -> libtalloc doing similar.
You can HL me in #yocto if I miss something which might be clarified in a short talk.
Cheers
Signature · 1 line
Jens Rehsack - [email protected]
Quoted 7 lines
Am 13.11.2015 um 17:56 schrieb Christopher Larson <[email protected]>:
On Fri, Nov 13, 2015 at 8:53 AM, Jens Rehsack <[email protected]> wrote:
To avoid errors when building dev-images (talloc-dev is missing), and to avoid insane empty packages for that, rename talloc -> libtalloc as libtevent shows.
Quoted 8 lines
With that, remove dependencies to attr/xattr and libbsd - unless explicitely enabled via PACKAGECONFIG.
Signed-off-by Jens Rehsack <[email protected]>Our recipe names should be named based on the upstream project name, not the library they happen to ship.
Instead, either we could we should kill all the libtalloc bits in the PACKAGES var, and let the debian shlib renaming handle renaming talloc* to libtalloc*, or add a talloc-dev that pulls in libtalloc-dev & pytalloc-dev.
libtevent does it the same way - neither is ideal, but the original behaviour results in unbuildable -dev images with talloc (samba) in it.
Beside of the rename, what's with the rest?
Cheers
Signature · 1 line
Jens Rehsack - [email protected]